11.08.2011, 10:50
(
Последний раз редактировалось XGh0stz; 11.08.2011 в 11:31.
)
Код:
forward WeaponTimer(); public WeaponTimer() { new string[256], str1[256], str2[256], str3[256]; new username[MAX_PLAYER_NAME]; for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { for(new w = 0; w < 13; w++) { new tweap, tammo; GetPlayerWeaponData(i, w ,tweap ,tammo); format(str1,sizeof(str1),"wslot%d",w); format(str2,sizeof(str2),"weap%d",tweap); if(GetPVarInt(i,str2) != 1 && tweap != 0)// I've changed THIS line! { GetPlayerName(i,username,sizeof(username)); format(string, 256, "AdmWarning: [%d]%s just try to spawn a weapon",i,username); ABroadCast(COLOR_LIGHTRED,string,1); Kick(i); } } } } }
Just let me know if this works out for you though
(I don't know about the rest of you, but this code blew my mind, maybe I should've waken up completely first...)
Also: You should continue to use PVars where ever possible, it's much easier & more effective