Car Fuel System
#2

I would suggest using OnPlayerStateChange for using the timer, and you will need a seperate FuelTimerLower for each player( so don't cancel otherplayers timers)

pawn Код:
new FuelTimerLower[MAX_PLAYERS];
public OnPlayerStateChange(playerid, newstate,oldstate)
{
        if(newstate == PLAYER_STATE_DRIVER)
        {
              FuelTimerLower[playerid] = SetTimerEx("timer_fuel_lower",50000,true,"i",playerid);  
        }
        if(oldstate == PLAYER_STATE_DRIVER)
        {
              KillTimer(FuelTimerLower[playerid]);
        }
}
Then that would start/kill the timer for each different player. also, if you want it so it lowers the carfuel of the car you're in you will need to show us your 'timer_fuel_lower' function
Reply


Messages In This Thread
Car Fuel System - by Tommy_Mandaz - 21.04.2011, 21:46
Re: Car Fuel System - by Haydz - 21.04.2011, 21:51
Re: Car Fuel System - by Tommy_Mandaz - 21.04.2011, 22:03
Re: Car Fuel System - by Vince - 21.04.2011, 22:21
Re: Car Fuel System - by Tommy_Mandaz - 21.04.2011, 22:27
Re: Car Fuel System - by Vince - 21.04.2011, 22:32
Re: Car Fuel System - by Tommy_Mandaz - 21.04.2011, 22:35

Forum Jump:


Users browsing this thread: 1 Guest(s)