02.10.2014, 21:32
yea that could work....
I personally wouldn't move it completely but, either just call the function again, or manually set it to 15 when creating the bike
if you don't know what vehicle is created, you could just create a nother function that just sets the fuel of the new vehicle and not of all (it's a little bit more effective, although you might not even notice the difference)
could be like
I personally wouldn't move it completely but, either just call the function again, or manually set it to 15 when creating the bike
if you don't know what vehicle is created, you could just create a nother function that just sets the fuel of the new vehicle and not of all (it's a little bit more effective, although you might not even notice the difference)
could be like
pawn Код:
stock SetVehicleFuel(vehicleid)
{
new modelid = GetVehicleModel(vehicleid);
if(IsATruck(modelid)) Fuel[vehicleid] = 100.0;
else if(IsABus(modelid)) Fuel[vehicleid] = 80.0;
else if(IsABike(modelid)) Fuel[vehicleid] = 15.0;
else Fuel[vehicleid] = 40.0;
return 1;
}