06.11.2012, 18:01
Quote:
Use os seguintes cуdigos:
Coloque no topo da sua GM: forward Velocimetro(playerid); Coloque em OnGameModeInit() SetTimer("Velocimetro", 1000, 1); Crie uma nova Public e coloque: public Velocimetro() { new Float:Speedo_HP; for(new i=0; i<MAX_PLAYERS; i++) { if(gPlayerLogged[i] == 1 && IsPlayerInAnyVehicle(i)) { new vehicle = GetPlayerVehicleID(i); GetVehicleHealth(vehicle, Speedo_HP); new string[128]; format(string,sizeof(string),"~>~Nome: ~r~%s~n~~>~~w~Velocidade: ~r~%d KM/h~n~~>~~w~Gasolina: ~r~%d%%~n~~>~~w~Saude: ~r~%0.0f%%~n~~w~~>~Local:~r~%s" ,vehName[GetVehicleModel(vehicle)-400], GetPlayerSpeed(i, true), Gas[vehicle], Speedo_HP/10, ReturnPlayerZone(i)); TextDrawSetString(Speed[i], string); if(TextShow[i] == false) { TextDrawShowForPlayer(i, Speed[i]); TextShow[i] = true; } } else { if(TextShow[i] == true) { TextDrawHideForPlayer(i, Speed[i]); TextShow[i] = false; } } } } Depois sу compilar, espero ter ajudado. |