07.02.2011, 14:11
Quote:
|
You're using a global variable for the timer and not a global player variable, hence why it would only work for the last player you started the timer on (the killtimer part, etc.).
|
Код:
new MinigunCheckTimer[MAX_PLAYERS];
stock AllowMinigunForPlayer(playerid, allow)
{
if(allow) return 1;
MinigunCheckTimer[playerid] = SetTimerEx("MinigunCheck",2000,1,"i",playerid);
return 1;
}
public MinigunCheck(playerid)
{
if(GetPlayerWeapon(playerid) != 38) return 1;
BanEx(playerid,"Minigun Cheat");
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
KillTimer(MinigunCheckTimer[playerid]);
return 1;
}


