25.04.2013, 10:50
Hi I have this code:
And Timer:
And the timer is killed when a player goes out of the vehicle. I have a problem with that. When a player with id 0 goes out of the vehicle a timer is killed for everyone but should only him.
Please Help
Код:
forward UpdateCzasJazdy(playerid); public UpdateCzasJazdy(playerid) { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER){ sekundy[playerid]++; if(sekundy[playerid] == 60) { minuty[playerid]++; sekundy[playerid] = 00; } new str[256]; format(str, sizeof(str), "Czas Jazdy:~w~ %02d:%02d", minuty, sekundy); TextDrawSetString(CzasJazdy[playerid], str); } return 1; }
Код:
TimerPojazd4[playerid] = SetTimerEx("UpdateCzasJazdy", 1111, true,"i",playerid);
Код:
KillTimer(TimerPojazd4[playerid]);