/Class Timer is over /Class Timer is over /Class Timer is over /Class Timer is over /Class Timer is over /Class Timer is over
new CMDClass[MAX_PLAYERS]; new Timer;
public NextMap() { for(new i;i<MAX_PLAYERS;i++) { switch(Map[ID]) { case 0://map 1 { SetPlayerWeather(i,0); SetPlayerTime(i,13,0); SetPlayerInterior(i,0); Timer = SetTimer("dissablecmd",30000,false); TogglePlayerControllable(i, false); ResetPlayerWeapons(i); CMDClass[i] = 0; SetPlayerScore(i, GetPlayerScore(i)+40); gTeam[i] = TEAM_HUMANS; } } } } //and others cases
forward dissablecmd(playerid); public dissablecmd(playerid) { KillTimer(Timer); CMDClass[playerid] = 1; SendClientMessageToAll(COLOR_LIGHTBLUE,"/class time is over"); print("/class time is over"); return 1; }
for(new i;i<MAX_PLAYERS;i++)
forward dissablecmd(playerid);
public dissablecmd(playerid)
{
KillTimer(Timer);
CMDClass[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,"/class time is over");
print("/class time is over");
return 1;
}
Timer = SetTimerEx("dissablecmd",30000,false,"i",i);
dont bump its against the rules!!
pawn Код:
edit also you should be using SetTimerEx pawn Код:
|