Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- forward AtualizarVelocimetro(playerid);
- public AtualizarVelocimetro(playerid)
- {
- new Float:Speedo_X,Float:Speedo_Y,Float:Speedo_Z;
- new Float:Speedo_HP;
- for(new i=0; i<MAX_SLOTS; i++)
- {
- if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
- {
- GetPlayerPos(i, Speedo_X, Speedo_Y, Speedo_Z);
- GetPlayerVehicleID(i);
- GetVehicleHealth(GetPlayerVehicleID(i), Speedo_HP);
- new vehicle = GetPlayerVehicleID(i);
- new str1[256],str2[256],str3[256],str4[256],str5[256];
- new LuxZone[MAX_ZONE_NAME];
- GetPlayer2DZone(i, LuxZone, MAX_ZONE_NAME);
- if(SpeedoON[i] == 0)
- {
- TextDrawShowForPlayer(i, fahrzeug[i]);
- TextDrawShowForPlayer(i, kmh[i]);
- TextDrawShowForPlayer(i, hoehe[i]);
- TextDrawShowForPlayer(i, zustand[i]);
- TextDrawShowForPlayer(i, TForum[i]);
- TextDrawShowForPlayer(i, localSFB[i]);
- SpeedoON[i] = 1;
- }
- format(str1,sizeof(str1),"~b~~h~~h~ Veiculo: ~w~%s",vehName[GetVehicleModel(GetPlayerVehicleID(i))-400]);
- TextDrawSetString(fahrzeug[i], str1);
- if(GetSpeedKM(i) >= 300)
- {
- format(str2,sizeof(str2),"~b~~h~~h~ Velocidade: ~w~%d KM/H",GetSpeedKM(i));
- TextDrawSetString(kmh[i], str2);
- new string[128];
- format(string, sizeof(string), "AdmCmd: Atenção %s[ID:%d] está muito veloz, pode estar de Speed-Hack, /tv nele rápido!",PlayerName(playerid),i);
- SendAdminMessage(COLOR_LIGHTRED, string);
- }
- else if(GetSpeedKM(i) >= 130)
- {
- format(str2,sizeof(str2),"~b~~h~~h~ Velocidade: ~w~%d KM/H",GetSpeedKM(i));
- TextDrawSetString(kmh[i], str2);
- }
- else if(GetSpeedKM(i) >= 100)
- {
- format(str2,sizeof(str2),"~b~~h~~h~ Velocidade: ~w~%d KM/H",GetSpeedKM(i));
- TextDrawSetString(kmh[i], str2);
- }
- else if(GetSpeedKM(i) >= 50)
- {
- format(str2,sizeof(str2),"~b~~h~~h~ Velocidade: ~w~%d KM/H",GetSpeedKM(i));
- TextDrawSetString(kmh[i], str2);
- }
- else
- {
- format(str2,sizeof(str2),"~b~~h~~h~ Velocidade: ~w~%d KM/H",GetSpeedKM(i));
- TextDrawSetString(kmh[i], str2);
- }
- if(Gas[vehicle] >= 100)
- {
- format(str3,sizeof(str3),"~b~~h~~h~ Combustivel: ~w~%d%", Gas[vehicle]);
- TextDrawSetString(hoehe[i], str3);
- }
- else if(Gas[vehicle] >= 90)
- {
- format(str3,sizeof(str3),"~b~~h~~h~ Combustivel: ~w~%d%", Gas[vehicle]);
- TextDrawSetString(hoehe[i], str3);
- }
- else if(Gas[vehicle] >= 80)
- {
- format(str3,sizeof(str3),"~b~~h~~h~ Combustivel: ~w~%d%", Gas[vehicle]);
- TextDrawSetString(hoehe[i], str3);
- }
- else if(Gas[vehicle] >= 70)
- {
- format(str3,sizeof(str3),"~b~~h~~h~ Combustivel: ~w~%d%", Gas[vehicle]);
- TextDrawSetString(hoehe[i], str3);
- }
- else if(Gas[vehicle] >= 60)
- {
- format(str3,sizeof(str3),"~b~~h~~h~ Combustivel: ~w~%d%", Gas[vehicle]);
- TextDrawSetString(hoehe[i], str3);
- }
- else if(Gas[vehicle] >= 50)
- {
- format(str3,sizeof(str3),"~b~~h~~h~ Combustivel: ~w~~%d%", Gas[vehicle]);
- TextDrawSetString(hoehe[i], str3);
- }
- else if(Gas[vehicle] >= 40)
- {
- format(str3,sizeof(str3),"~b~~h~~h~ Combustivel: ~w~%d%", Gas[vehicle]);
- TextDrawSetString(hoehe[i], str3);
- }
- else if(Gas[vehicle] >= 30)
- {
- format(str3,sizeof(str3),"~b~~h~~h~ Combustivel: ~w~%d%", Gas[vehicle]);
- TextDrawSetString(hoehe[i], str3);
- }
- else if(Gas[vehicle] >= 20)
- {
- format(str3,sizeof(str3),"~b~~h~~h~ Combustivel: ~w~%d%", Gas[vehicle]);
- TextDrawSetString(hoehe[i], str3);
- }
- else if(Gas[vehicle] <= 10)
- {
- format(str3,sizeof(str3),"~b~~h~~h~ Combustivel: ~w~%d%", Gas[vehicle]);
- TextDrawSetString(hoehe[i], str3);
- }
- else if(Gas[vehicle] >= 0)
- {
- format(str3,sizeof(str3),"~b~~h~~h~ Combustivel: ~w~%d%", Gas[vehicle]);
- TextDrawSetString(hoehe[i], str3);
- }
- else if(Gas[vehicle] == 0)
- {
- format(str3,sizeof(str3),"~b~~h~~h~ Combustivel: ~r~Sem Combustivel", Gas[vehicle]);
- TextDrawSetString(hoehe[i], str3);
- }
- if(Speedo_HP >= 1000)
- {
- format(str4,sizeof(str4),"~b~~h~~h~ Lataria: ~g~~h~~h~--------");
- TextDrawSetString(zustand[i], str4);
- }
- else if(Speedo_HP >= 950)
- {
- format(str4,sizeof(str4),"~b~~h~~h~ Lataria: ~g~~h~~h~-------~y~-");
- TextDrawSetString(zustand[i], str4);
- }
- else if(Speedo_HP >= 900)
- {
- format(str4,sizeof(str4),"~b~~h~~h~ Lataria: ~g~~h~~h~-------");
- TextDrawSetString(zustand[i], str4);
- }
- else if(Speedo_HP >= 850)
- {
- format(str4,sizeof(str4),"~b~~h~~h~ Lataria: ~g~~h~~h~------~y~-");
- TextDrawSetString(zustand[i], str4);
- }
- else if(Speedo_HP >= 800)
- {
- format(str4,sizeof(str4),"~b~~h~~h~ Lataria: ~g~~h~~h~------");
- TextDrawSetString(zustand[i], str4);
- }
- else if(Speedo_HP >= 750)
- {
- format(str4,sizeof(str4),"~b~~h~~h~ Lataria: ~g~~h~~h~-----~y~-");
- TextDrawSetString(zustand[i], str4);
- }
- else if(Speedo_HP >= 700)
- {
- format(str4,sizeof(str4),"~b~~h~~h~ Lataria: ~g~~h~~h~-----");
- TextDrawSetString(zustand[i], str4);
- }
- else if(Speedo_HP >= 650)
- {
- format(str4,sizeof(str4),"~b~~h~~h~ Lataria: ~g~~h~~h~----~y~-");
- TextDrawSetString(zustand[i], str4);
- }
- else if(Speedo_HP >= 600)
- {
- format(str4,sizeof(str4),"~b~~h~~h~ Lataria: ~g~~h~~h~----");
- TextDrawSetString(zustand[i], str4);
- }
- else if(Speedo_HP >= 550)
- {
- format(str4,sizeof(str4),"~b~~h~~h~ Lataria: ~g~~h~~h~---~y~-");
- TextDrawSetString(zustand[i], str4);
- }
- else if(Speedo_HP >= 500)
- {
- format(str4,sizeof(str4),"~b~~h~~h~ Lataria: ~g~~h~~h~---");
- TextDrawSetString(zustand[i], str4);
- }
- else if(Speedo_HP >= 450)
- {
- format(str4,sizeof(str4),"~b~~h~~h~ Lataria: ~g~~h~~h~--~y~-");
- TextDrawSetString(zustand[i], str4);
- }
- else if(Speedo_HP >= 400)
- {
- format(str4,sizeof(str4),"~b~~h~~h~ Lataria: ~g~~h~~h~--");
- TextDrawSetString(zustand[i], str4);
- }
- else if(Speedo_HP >= 380)
- {
- format(str4,sizeof(str4),"~b~~h~~h~ Lataria: ~g~~h~~h~-~y~-");
- TextDrawSetString(zustand[i], str4);
- }
- else if(Speedo_HP >= 350)
- {
- format(str4,sizeof(str4),"~b~~h~~h~ Lataria: ~g~~h~~h~-");
- TextDrawSetString(zustand[i], str4);
- }
- else if(Speedo_HP >= 300)
- {
- format(str4,sizeof(str4),"~b~~h~~h~ Lataria: ~g~~h~~h~-~y~-");
- TextDrawSetString(zustand[i], str4);
- }
- else if(Speedo_HP <= 250)
- {
- format(str4,sizeof(str4),"~b~~h~~h~ Lataria: ~r~X~y~X~r~X~y~X~r~X~y~X~r~X~y~X");
- TextDrawSetString(zustand[i], str4);
- }
- if(Speedo_HP >= 551)
- {
- format(str5,sizeof(str5),"~b~~h~~h~ Local: ~w~%s",LuxZone);
- TextDrawSetString(localSFB[i], str5);
- }
- else if(Speedo_HP >= 361)
- {
- format(str5,sizeof(str5),"~b~~h~~h~ Local: ~w~%s",LuxZone);
- TextDrawSetString(localSFB[i], str5);
- }
- else
- {
- format(str5,sizeof(str5),"~b~~h~~h~ Local: ~w~%s",LuxZone);
- TextDrawSetString(localSFB[i], str5);
- }
- }
- SavePlayerPosV[i][sX] = Speedo_X, SavePlayerPosV[i][sY] = Speedo_Y, SavePlayerPosV[i][sZ] = Speedo_Z;
- }
- for(new i=0; i<MAX_SLOTS; i++)
- {
- if(!IsPlayerInAnyVehicle(i))
- {
- TextDrawHideForPlayer(i, box[i]); TextDrawHideForPlayer(i, fahrzeug[i]); TextDrawHideForPlayer(i, kmh[i]);
- TextDrawHideForPlayer(i, hoehe[i]); TextDrawHideForPlayer(i, zustand[i]); TextDrawHideForPlayer(i, localSFB[i]);
- SpeedoON[i] = 0;
- }
- }
- for(new i=0; i<MAX_SLOTS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(spawnado[i] == 1)
- {
- if(SpeedoON[i] == 1)
- {
- }
- if(SpeedoON[i] == 0)
- {
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment