10.08.2011, 15:15
Hello Everybody.
I made anti guns script.
All script look good but then i take minigun nothing happen.
Script Code In GameMode :
And I Added In OneGameModeInit Timer :
What can be wrong?
I made anti guns script.
All script look good but then i take minigun nothing happen.
Script Code In GameMode :
Код:
new BadWeapons[3] =
{
38, 36, 39
};
forward BadCheck();
public BadCheck()
{
new weap, string[128], pname[MAX_PLAYER_NAME];
for(new i, b = GetMaxPlayers(); i < b; i++)
{
GetPlayerName(i, pname, sizeof(pname));
weap = GetPlayerWeapon(i);
for(new w; w < sizeof(BadWeapons); w++)
{
if(weap == BadWeapons[w])
{
format(string,sizeof(string),"[ Kick ]%s Kicked For %s.", pname, weap);
SendClientMessageToAll(COLOR_RED,string);
ResetPlayerWeapons(i);
Kick(i);
}
return 1;
}
}
return 1;
}
Код:
SetTimer("BadCheck",5000,1);




