21.08.2014, 16:56
So I have that command and in command I haave the code which set fuel by type of vehicle like trucks etc
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++)
{
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;
}
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]);
}
}