rendered paste bodypublic speed(){
for(new i = 0; i <= MAX_PLAYERS; i++){
if(IsPlayerConnected(i)){
if(IsPlayerInAnyVehicle(i)){
new dis, string[256];
if(gSpeedo[i] == 1) {
dis = PlayerToCoord(i, gLastX[i], gLastY[i], gLastZ[i]);
dis = dis * 60;
dis = dis * 60;
dis = floatround(dis / 1000);
format(string, sizeof(string), "%i km/h", dis);
TextDrawDestroy(showspeed[i]);
showspeed[i] = TextDrawCreate(550, 50, string);
TextDrawSetShadow(showspeed[i], 0);
TextDrawColor(showspeed[i], COLOR_GREEN);
TextDrawSetOutline(showspeed[i], 1);
TextDrawShowForPlayer(i, showspeed[i]);
GetPlayerPos(i, gLastX[i], gLastY[i], gLastZ[i]);
}
if(gSpeedo[i] == 2) {
dis = PlayerToCoord(i, gLastX[i], gLastY[i], gLastZ[i]);
dis = dis / 1;
dis = dis * 2;
format(string, sizeof(string), "%i mp/h", dis);
TextDrawDestroy(showspeed[i]);
showspeed[i] = TextDrawCreate(550, 50, string);
TextDrawSetShadow(showspeed[i], 0);
TextDrawColor(showspeed[i], COLOR_GREEN);
TextDrawSetOutline(showspeed[i], 1);
TextDrawShowForPlayer(i, showspeed[i]);
GetPlayerPos(i, gLastX[i], gLastY[i], gLastZ[i]);
}
}
}
}
}