[INCLUDE] SteamID na Steam Community ID
Misiaczek ;c
30.10.2011
Stock zamienia SteamID na Steam Community ID , na alliedzie twierdzono iż jest to nie możliwe z powodu ograniczeń AMXX lecz ten gość to obszedł
Ja tylko wyciągnąłem funkcje z pluginu i "zrobiłem" z nich Include
Przykład użycia:
#include <amxmodx>
#include <steamcomid>
new const gNazwaPluginu[] = "Moje Steam Community ID";
new const gWersjaPluginu[] = "0.1";
new const gAutorPluginu[] = "MisieQ";
public plugin_init()
{
register_plugin(gNazwaPluginu, gWersjaPluginu, gAutorPluginu);
register_clcmd("say /moje","PokazSteamCommunity")
}
public PokazSteamCommunity(id)
{
new szAuthID[36], szCommunityID[64],szURL[256]
get_user_authid(id,szAuthID,sizeof szAuthID - 1)
if(GetFriendID(szAuthID,szCommunityID,sizeof szCommunityID - 1))
{
formatex(szURL,sizeof szURL - 1,"<html><body><iframe width=^"100%%^" height=^"100%%^" frameborder=^"0^" scrolling=^"yes^" src=^"http://steamcommunit...",szCommunityID)
show_motd(id,szURL)
}
else
{
client_print(id,print_chat,"Niepoprawne StaemID! Sprawdz czy nie grasz na serwerze LAN'owym czy tez na Non-Steam")
}
return PLUGIN_HANDLED
}
Załączone pliki
MarWit
30.10.2011
Misiaczek ;c
30.10.2011
10-08-08@
11-09-08@That's not possible because '76561197960265728' is a long data-type which is a 64-bit signed two's complement integer and pawn doesn't support that. :-(
So it not possible to play with such large number. You can't use above 2^31, so -2,147,483,648 <-> 2,147,483,648.
Lots of people said it wasn't possible in AMXX,but here is the proof it is.
I used a string-based math like in PHP's BCMath. It can do addition of infinite lenght numbers. It will probably work with multiplication,but you would need new functions for division and subtraction. You can use the stocks in this file as you wish.
i gość zagiął cały alliedmoders , nie powiem szacun dla niego
R3X
30.10.2011
Misiaczek ;c
30.10.2011
Nie wiem z którego roku jest ten kod, ale podobne rozwiązanie zastosował joaquimandrade w Steam Friends Highlighter - AlliedModders wątpie, żeby cały allied nie znał algebry wielkich liczb
kod jest z 11-09-08, R3X może nie cały allied ale każdy prawie twierdził iż jest to niemożliwe z powodu ograniczen AMXX
DarkGL
31.10.2011
no to modsy schodzą na psy jak tak odrazu przychodzi na myśl zastosowanie tutaj stringówi gość zagiął cały alliedmoders