[HELP] Question about command fillallcars
#1

So I have that command and in command I haave the code which set fuel by type of vehicle like trucks etc

pawn Код:
for(new o; o < MAX_CARS; o++)
        {
            if(IsATruck(GetVehicleModel(o))) Fuel[o] = 100.00;
            else if(IsABus(GetVehicleModel(o))) Fuel[o] = 80.00;
            else if(IsAMotocycle(GetVehicleModel(o))) Fuel[o] = 15.00;
            else Fuel[o] = 40.00;
        }
so that code work after minute or maybe less the fuel textdraw is updated so I want when I fuel the all cars the textdraw is updated when I type the command So in that code above I add likee this


pawn Код:
for(new o; o < MAX_CARS; o++)
        {
foreach(Player,i)
    {
            if(IsATruck(GetVehicleModel(o))) Fuel[o] = 100.00;
            else if(IsABus(GetVehicleModel(o))) Fuel[o] = 80.00;
            else if(IsAMotocycle(GetVehicleModel(o))) Fuel[o] = 15.00;
            else Fuel[o] = 40.00;
new string[64];
            format(string,sizeof string,"%.1fl",Fuel[o]);
            TextDrawSetString(Speedometar0[i],string);
            TextDrawShowForPlayer(i,Speedometar0[i]);
    }
}
Reply


Messages In This Thread
[HELP] Question about command fillallcars - by Luca12 - 21.08.2014, 16:56
Re: [HELP] Question about command fillallcars - by Luca12 - 22.08.2014, 20:00
Re: [HELP] Question about command fillallcars - by BuLLeT[LTU] - 22.08.2014, 21:20
Re: [HELP] Question about command fillallcars - by HazardouS - 22.08.2014, 21:27

Forum Jump:


Users browsing this thread: 1 Guest(s)