07.03.2010, 01:46
Quote:
Originally Posted by cessil
well create a timer like this
Код:
SetTimerEx("refillcar",1000,1,"d",playerid); Код:
forward refillcar(playerid); public refillcar(playerid) { Fuel[playerid]++; } like this. top of the script Код:
new refilltimes[MAX_PLAYERS]; new refillcount[MAX_PLAYERS]; new refilltimer[MAX_PLAYERS]; Код:
refilltimes[playerid] = 100-Fuel[playerid]; refillcount[playerid] = 0; killtimer(refilltimer[playerid]); refilltimer[playerid] = SetTimerEx("refillcar",1000,1,"d",playerid); Код:
if(refillcount[playerid] == refilltimes[playerid]) killtimer(refilltimer[playerid]); refillcount[playerid]++; |