28.04.2010, 17:11
Since you're using settimerex, you probably need truckmission-timer for all players: truckmission[MAX_PLAYERS]
and you dont need to loop through all players in this timer:
and you dont need to loop through all players in this timer:
pawn Код:
public TruckTimer(playerid)
{
TimeS[playerid]--;
if(TimeS[playerid] < 0)
{
TimeS[playerid] = 59;
TimeM[playerid]--;
if(TimeM[playerid] < 0)
{
SendClientMessage(playerid, COLOR_ORANGE, "[INFO] Time ended, mission aborted.");
KillTimer(truckmission[playerid]);
//the rest code
}
}
new str[10];
format(str, sizeof(str), "%d:%02d", TimeM[playerid], TimeS[playerid]);
TextDrawSetString(Timer[playerid][1], str);
TextDrawShowForPlayer(playerid, Timer[playerid][1]);
}