This is the full code:
Код:
Timer:FuelUpdate[15000](playerid)
{
new engine,lights,alarm,doors,bonnet,boot,objective,modelid;
for(new v = 0; v < MAX_VEHICLES; v++) if(GetVehicleModel(v)) {
modelid = GetVehicleModel(v);
GetVehicleParamsEx(v,engine,lights,alarm,doors,bonnet,boot,objective);
switch(modelid) {
case 520, 476, 593, 553, 513, 512, 577, 592, 511, 539, 464, 519: VehicleFuel[v] = 100;
case 509, 481, 510: VehicleFuel[v] = 100, arr_Engine{v} = 1, SetVehicleParamsEx(v,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
}
if(engine == VEHICLE_PARAMS_ON) {
if(VehicleFuel[v] > 0.0 && !IsVIPcar(v) && !IsATruckerCar(v))
{
VehicleFuel[v]-=0.01;
format(erpstring, sizeof(erpstring), "%.2f GAL", VehicleFuel[vehicleid]);
TextDrawSetString(FuelText[playerid],erpstring);
}
}
}
}