10.08.2011, 15:33
i sent you my testing code which worked correct
pawn Код:
#include <a_samp>
// to gamemode ( OnGameModeInit() )
// SetTimer("BadCheck", 1000*5, true);
new BadWeapons[3] =
{
38, 36, 39
};
forward BadCheck();
public BadCheck()
{
new weap, string[128], pname[MAX_PLAYER_NAME], weapname[50];
for(new i=0;i<GetMaxPlayers();i++)
{
if (IsPlayerConnected(i))
{
GetPlayerName(i, pname, sizeof(pname));
weap = GetPlayerWeapon(i);
for(new w; w < sizeof(BadWeapons); w++)
{
if(weap == BadWeapons[w])
{
GetWeaponName(w, weapname, sizeof(weapname));
format(string,sizeof(string), "[ Kick ]%s Kicked For %s.", pname, weapname);
SendClientMessageToAll(-1, string);
ResetPlayerWeapons(i);
Kick(i);
}
return 1;
}
}
}
return 1;
}