#3

pawn Код:
forward timer_fuel_lower(playerid);
pawn Код:
public timer_fuel_lower(playerid)
{    
    if(isrefuelling[playerid]) continue;
    new vid = GetPlayerVehicleID(playerid);
    GetVehicleParamsEx(GetPlayerVehicleID(vid),engine,lights,alarm,doors,bonnet,boot,objective);
    if(engine>=1)
    {
        if(fuel[playerid] >= 1)
        {
            fuel[playerid]--;
        }
        else if (fuel[vid]<1)
        {
            fuel[vid] = 0;
            SetVehicleParamsEx(vid,false,0,0,0,0,0,0);
            if(IsPlayerInVehicle(playerid, vid))
            {
                GameTextForPlayer(playerid,"~r~The vehicle ran out of ~w~fuel~r~!",5000,4);
            }
        }
    }
    new string[125];format(string,sizeof string,"Fuel: ~r~%i~g~ pcnt",fuel[vid]);
    TextDrawSetString(td_fuel[playerid],string);
    return 1;
}
Have you tried this or something like this?
Reply


Messages In This Thread
Fuel - by MechaTech - 31.08.2013, 12:34
Re: Fuel - by MechaTech - 01.09.2013, 11:42
Re: Fuel - by RedJohn - 01.09.2013, 11:50
Re: Fuel - by MechaTech - 01.09.2013, 12:25
Re: Fuel - by MechaTech - 02.09.2013, 14:51
Re: Fuel - by MechaTech - 03.09.2013, 14:06
Re: Fuel - by MechaTech - 04.09.2013, 16:34
Re: Fuel - by MechaTech - 07.09.2013, 17:27
Re: Fuel - by MechaTech - 09.09.2013, 07:21

Forum Jump:


Users browsing this thread: 1 Guest(s)