public UpdateSpeed(){ new Float:x,Float:y,Float:z; new Float:distance,value,string[256]; for(new i=0; i 1){ value = floatround(value / UpdateSeconds); } // meters an hour if(SpeedMode){ format(string,sizeof(string)," ~y~%dMPH",floatround(value/1600)); } else{ format(string,sizeof(string)," ~y~%dKM/H",floatround(value/1000)); } SavePlayerPos[i][LastX] = x; SavePlayerPos[i][LastY] = y; SavePlayerPos[i][LastZ] = z; } // End is-player-connected } // End for-loop } // eind UpdateSpeed function new SpeedTimer; /////////////////////////////////////////////////////////////////////////////////////////////////// public CheckFuel(playerid) { new Ptmess[32]; new Float:distance,value,string[256]; value = floatround(distance * 3600); for(new i=0;i= 1) { format(Ptmess, sizeof(Ptmess),"~y~%d %", Petrol[Vi]); format(string, sizeof(string), "~y~%d% %dKM/H", Petrol[Vi],floatround(value/1000)); GameTextForPlayer(i, string,10000,6); } else { RemovePlayerFromVehicle(i); SendClientMessage(i, COLOR_RED, "Your vehicle ran out of petrol"); if(Petrol[Vi] < 0) { Petrol[Vi] = 0; } } if(Petrol[i] >= 51) { format(Ptmess, sizeof(Ptmess),"~y~%d %", Petrol[Vi]); format(string, sizeof(string), "~y~%d% %dKM/H", Petrol[Vi],floatround(value/1000)); GameTextForPlayer(i, string,10000,6); } } } } }