28.03.2011, 21:28
You're doing bad the loop, fixed version:
Good luck.
pawn Код:
new Fweapons[] =
{
17, 35, 36, 37, 38, 39, 40, 44, 45
};
public OnPlayerUpdate(playerid)
{
static string[200];
for(new fw; fw < sizeof(Fweapons); fw++)
{
if(GetPlayerWeapon(playerid) == Fweapons[fw] && GetPlayerState(playerid) != PLAYER_STATE_WASTED)
{
format(string,sizeof(string),""#red"%s "#green"(id: %d) "#ice" has been banned by the administrator BOT |"#yellow" Reason: Weapon hacks",GetMyName(playerid),playerid);
GetPlayer(playerid);
ini = INI_Open(playerfile);
INI_WriteString(ini, "Banned", "Yes");
INI_WriteString(ini, "Reason", "Weapon hacks");
INI_Close(ini);
MsgForAll(color,string);
SoundForAll(1148);
Kick(playerid);
}
}
return 1;
}