forward SubFuel();public SubFuel(){ new i; new engine,lights,alarm,doors,bonnet,boot,objective; new veh = GetPlayerVehicleID(i); while (i != GetMaxPlayers()) { if (IsPlayerInAnyVehicle(i)){ new string[128]; if(Benzin[GetPlayerVehicleID(i)] <0) Benzin[GetPlayerVehicleID(i)] = 0; if(IsPlayerInAnyVehicle(i)) { Benzin[GetPlayerVehicleID(i)]-=1; format(string, 128, \"Benzin: %d%%\", Benzin[GetPlayerVehicleID(i)]); TextDrawSetString(Fuel, string), TextDrawShowForPlayer(i, Fuel), TextDrawShowForPlayer(i, BlackBox), TextDrawTextSize(Moving, (354.0 - (Benzin[GetPlayerVehicleID(i)] / DIVBY)), 0.000000), TextDrawShowForPlayer(i, Moving); } if (Benzin[GetPlayerVehicleID(i)] < 1) { Benzin[GetPlayerVehicleID(i)] = 0; GameTextForPlayer(i, \"~n~~n~~n~~n~~n~~n~~n~~r~Kifogyott az üzemanyag!\", 4000, 3); GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective); SetVehicleParamsEx(veh,false,lights,alarm,doors,bonnet,boot,objective); }}else{ TextDrawHideForPlayer(i, Fuel), TextDrawHideForPlayer(i, BlackBox), TextDrawHideForPlayer(i, Moving);}++i; } return 1;}
forward SubFuel();public SubFuel(){ for(new i = 0; i < MAX_PLAYERS; i++) new engine,lights,alarm,doors,bonnet,boot,objective; new veh = GetPlayerVehicleID(i); { if (IsPlayerInAnyVehicle(i)) { new string[128]; if(Benzin[GetPlayerVehicleID(i)] <0) Benzin[GetPlayerVehicleID(i)] = 0; if(IsPlayerInAnyVehicle(i)) { Benzin[GetPlayerVehicleID(i)]-=1; format(string, 128, \"Benzin: %d%%\", Benzin[GetPlayerVehicleID(i)]); TextDrawSetString(Fuel, string), TextDrawShowForPlayer(i, Fuel), TextDrawShowForPlayer(i, BlackBox), TextDrawTextSize(Moving, (354.0 - (Benzin[GetPlayerVehicleID(i)] / DIVBY)), 0.000000), TextDrawShowForPlayer(i, Moving); } if (Benzin[GetPlayerVehicleID(i)] < 1) { Benzin[GetPlayerVehicleID(i)] = 0; GameTextForPlayer(i, \"~n~~n~~n~~n~~n~~n~~n~~r~Kifogyott az üzemanyag!\", 4000, 3); GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective); SetVehicleParamsEx(veh,false,lights,alarm,doors,bonnet,boot,objective); } } else { TextDrawHideForPlayer(i, Fuel), TextDrawHideForPlayer(i, BlackBox), TextDrawHideForPlayer(i, Moving); } ++i; } return 1;}