06.02.2016, 02:07
Hi! How can i make this code like if the Vehicle Engine is turned off, the gas consumption stops.
I tried this but didn't worked.
I tried this but didn't worked.
Quote:
public timer_fuel_lower() { for(new i = 0; i < MAX_PLAYERS; i++) { new vid = GetPlayerVehicleID(i); if (isrefuelling[i]) continue; if (GetPlayerVehicleSeat(i) == 0) { if (Engine[vid] == 1) fuel[vid] = fuel[vid] -1; else fuel[vid] = fuel[vid] -0; if (fuel[vid] < 1) { fuel[vid] = 0; } } } return 1; } |