24.07.2014, 03:13
I see that this is wrong! if u make the timer under OnVehicleSpawn callback, it will decrease the vehicle's fuel even with no driver in the vehicle. So you better use it under OnPlayerStateChange like:
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
{
FuelTimer[playerid] = SetTimerEx("Fuel_Down", FUEL_TIMER_MIN * 60000, true, "i", playerid);
}
return 1;
}