03.10.2015, 12:09
When your fuel goes to 0 and you enter in other car it doesn't decrease the fuel:
Код:
public DecreaseFuel() { for(new t=0;t<MAX_PLAYERS;t++) { if(IsPlayerInAnyVehicle(t)) { if(GetPlayerVehicleSeat(t) == 0) { new vid = GetPlayerVehicleID(t); if(GetVehicleComponentInSlot(GetPlayerVehicleID(t),GetVehicleComponentType(1010)) != 1010) { agas[vid]--; } else { agas[vid]--; agas[vid]--; } if(agas[vid] == 15 || agas[vid] == 10 || agas[vid] == 5) { GameTextForPlayer(t, "~r~Low Fuel", 5000, 5); return 1; } if(agas[vid] <= 0) { agas[vid] = 0; GetVehicleParamsEx(vid,engine,lightsss,alarm,doorsss,bonnet,boot,objective); SetVehicleParamsEx(vid,0,lightsss,alarm,doorsss,bonnet,boot,objective); return 1; } } } } return 1; }