Vehicle Fuel
#6

You are looping through whole function with "i" use vehicle id... for vehicles
EDIT:JUST SAW YOUR REPLY

EDIT2: Try that this is how i use it:
pawn Код:
function Decreasing_Fuel()
{
    for(new i=0;i<MAX_PLAYERS;i++)
     {
        if (isrefuelling[i]) continue;
        new vid = GetPlayerVehicleID(i);
        new engine, lights, alarm, doors, bonnet, boot, objective;
        GetVehicleParamsEx(vid, engine, lights, alarm, doors, bonnet, boot, objective);
        if (GetPlayerVehicleSeat(i) == 0)
        {
            fuel[vid] = fuel[vid] -1;
            if (fuel[vid]<1)
            {
                fuel[vid] = 0;
                SetVehicleParamsEx(vid, 0, lights, alarm, doors, bonnet, boot, objective);
                GameTextForPlayer(i,"~r~You are out of ~w~fuel~r~!",5000,3);
            }
        }
        new string[125];format(string,sizeof string,"Vehicle Fuel:%i",fuel[vid]);
        TextDrawSetString(td_fuel[i],string);
    }
    return 1;
}
Reply


Messages In This Thread
Vehicle Fuel - by BornHuman - 16.01.2015, 02:08
Re: Vehicle Fuel - by vassilis - 16.01.2015, 02:10
Re: Vehicle Fuel - by BornHuman - 16.01.2015, 02:12
Re: Vehicle Fuel - by vassilis - 16.01.2015, 02:13
Re: Vehicle Fuel - by BornHuman - 16.01.2015, 02:17
Re: Vehicle Fuel - by vassilis - 16.01.2015, 02:19

Forum Jump:


Users browsing this thread: 1 Guest(s)