Guest User

Untitled

a guest
Jan 21st, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.90 KB | None | 0 0
  1. forward AtualizarVelocimetro(playerid);
  2. public AtualizarVelocimetro(playerid)
  3. {
  4. new Float:Speedo_X,Float:Speedo_Y,Float:Speedo_Z;
  5. new Float:Speedo_HP;
  6. for(new i=0; i<MAX_SLOTS; i++)
  7. {
  8. if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
  9. {
  10. GetPlayerPos(i, Speedo_X, Speedo_Y, Speedo_Z);
  11. GetPlayerVehicleID(i);
  12. GetVehicleHealth(GetPlayerVehicleID(i), Speedo_HP);
  13. new vehicle = GetPlayerVehicleID(i);
  14. new str1[256],str2[256],str3[256],str4[256],str5[256];
  15. new LuxZone[MAX_ZONE_NAME];
  16. GetPlayer2DZone(i, LuxZone, MAX_ZONE_NAME);
  17. if(SpeedoON[i] == 0)
  18. {
  19. TextDrawShowForPlayer(i, fahrzeug[i]);
  20. TextDrawShowForPlayer(i, kmh[i]);
  21. TextDrawShowForPlayer(i, hoehe[i]);
  22. TextDrawShowForPlayer(i, zustand[i]);
  23. TextDrawShowForPlayer(i, TForum[i]);
  24. TextDrawShowForPlayer(i, localSFB[i]);
  25. SpeedoON[i] = 1;
  26. }
  27.  
  28. format(str1,sizeof(str1),"~b~~h~~h~ Veiculo: ~w~%s",vehName[GetVehicleModel(GetPlayerVehicleID(i))-400]);
  29. TextDrawSetString(fahrzeug[i], str1);
  30.  
  31. if(GetSpeedKM(i) >= 300)
  32. {
  33. format(str2,sizeof(str2),"~b~~h~~h~ Velocidade: ~w~%d KM/H",GetSpeedKM(i));
  34. TextDrawSetString(kmh[i], str2);
  35. new string[128];
  36. 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);
  37. SendAdminMessage(COLOR_LIGHTRED, string);
  38. }
  39. else if(GetSpeedKM(i) >= 130)
  40. {
  41. format(str2,sizeof(str2),"~b~~h~~h~ Velocidade: ~w~%d KM/H",GetSpeedKM(i));
  42. TextDrawSetString(kmh[i], str2);
  43. }
  44. else if(GetSpeedKM(i) >= 100)
  45. {
  46. format(str2,sizeof(str2),"~b~~h~~h~ Velocidade: ~w~%d KM/H",GetSpeedKM(i));
  47. TextDrawSetString(kmh[i], str2);
  48. }
  49. else if(GetSpeedKM(i) >= 50)
  50. {
  51. format(str2,sizeof(str2),"~b~~h~~h~ Velocidade: ~w~%d KM/H",GetSpeedKM(i));
  52. TextDrawSetString(kmh[i], str2);
  53. }
  54. else
  55. {
  56. format(str2,sizeof(str2),"~b~~h~~h~ Velocidade: ~w~%d KM/H",GetSpeedKM(i));
  57. TextDrawSetString(kmh[i], str2);
  58. }
  59. if(Gas[vehicle] >= 100)
  60. {
  61. format(str3,sizeof(str3),"~b~~h~~h~ Combustivel: ~w~%d%", Gas[vehicle]);
  62. TextDrawSetString(hoehe[i], str3);
  63. }
  64. else if(Gas[vehicle] >= 90)
  65. {
  66. format(str3,sizeof(str3),"~b~~h~~h~ Combustivel: ~w~%d%", Gas[vehicle]);
  67. TextDrawSetString(hoehe[i], str3);
  68. }
  69. else if(Gas[vehicle] >= 80)
  70. {
  71. format(str3,sizeof(str3),"~b~~h~~h~ Combustivel: ~w~%d%", Gas[vehicle]);
  72. TextDrawSetString(hoehe[i], str3);
  73. }
  74. else if(Gas[vehicle] >= 70)
  75. {
  76. format(str3,sizeof(str3),"~b~~h~~h~ Combustivel: ~w~%d%", Gas[vehicle]);
  77. TextDrawSetString(hoehe[i], str3);
  78. }
  79. else if(Gas[vehicle] >= 60)
  80. {
  81. format(str3,sizeof(str3),"~b~~h~~h~ Combustivel: ~w~%d%", Gas[vehicle]);
  82. TextDrawSetString(hoehe[i], str3);
  83. }
  84. else if(Gas[vehicle] >= 50)
  85. {
  86. format(str3,sizeof(str3),"~b~~h~~h~ Combustivel: ~w~~%d%", Gas[vehicle]);
  87. TextDrawSetString(hoehe[i], str3);
  88. }
  89. else if(Gas[vehicle] >= 40)
  90. {
  91. format(str3,sizeof(str3),"~b~~h~~h~ Combustivel: ~w~%d%", Gas[vehicle]);
  92. TextDrawSetString(hoehe[i], str3);
  93. }
  94. else if(Gas[vehicle] >= 30)
  95. {
  96. format(str3,sizeof(str3),"~b~~h~~h~ Combustivel: ~w~%d%", Gas[vehicle]);
  97. TextDrawSetString(hoehe[i], str3);
  98. }
  99. else if(Gas[vehicle] >= 20)
  100. {
  101. format(str3,sizeof(str3),"~b~~h~~h~ Combustivel: ~w~%d%", Gas[vehicle]);
  102. TextDrawSetString(hoehe[i], str3);
  103. }
  104. else if(Gas[vehicle] <= 10)
  105. {
  106. format(str3,sizeof(str3),"~b~~h~~h~ Combustivel: ~w~%d%", Gas[vehicle]);
  107. TextDrawSetString(hoehe[i], str3);
  108. }
  109. else if(Gas[vehicle] >= 0)
  110. {
  111. format(str3,sizeof(str3),"~b~~h~~h~ Combustivel: ~w~%d%", Gas[vehicle]);
  112. TextDrawSetString(hoehe[i], str3);
  113. }
  114. else if(Gas[vehicle] == 0)
  115. {
  116. format(str3,sizeof(str3),"~b~~h~~h~ Combustivel: ~r~Sem Combustivel", Gas[vehicle]);
  117. TextDrawSetString(hoehe[i], str3);
  118. }
  119. if(Speedo_HP >= 1000)
  120. {
  121. format(str4,sizeof(str4),"~b~~h~~h~ Lataria: ~g~~h~~h~--------");
  122. TextDrawSetString(zustand[i], str4);
  123. }
  124. else if(Speedo_HP >= 950)
  125. {
  126. format(str4,sizeof(str4),"~b~~h~~h~ Lataria: ~g~~h~~h~-------~y~-");
  127. TextDrawSetString(zustand[i], str4);
  128. }
  129. else if(Speedo_HP >= 900)
  130. {
  131. format(str4,sizeof(str4),"~b~~h~~h~ Lataria: ~g~~h~~h~-------");
  132. TextDrawSetString(zustand[i], str4);
  133. }
  134. else if(Speedo_HP >= 850)
  135. {
  136. format(str4,sizeof(str4),"~b~~h~~h~ Lataria: ~g~~h~~h~------~y~-");
  137. TextDrawSetString(zustand[i], str4);
  138. }
  139. else if(Speedo_HP >= 800)
  140. {
  141. format(str4,sizeof(str4),"~b~~h~~h~ Lataria: ~g~~h~~h~------");
  142. TextDrawSetString(zustand[i], str4);
  143. }
  144. else if(Speedo_HP >= 750)
  145. {
  146. format(str4,sizeof(str4),"~b~~h~~h~ Lataria: ~g~~h~~h~-----~y~-");
  147. TextDrawSetString(zustand[i], str4);
  148. }
  149. else if(Speedo_HP >= 700)
  150. {
  151. format(str4,sizeof(str4),"~b~~h~~h~ Lataria: ~g~~h~~h~-----");
  152. TextDrawSetString(zustand[i], str4);
  153. }
  154. else if(Speedo_HP >= 650)
  155. {
  156. format(str4,sizeof(str4),"~b~~h~~h~ Lataria: ~g~~h~~h~----~y~-");
  157. TextDrawSetString(zustand[i], str4);
  158. }
  159. else if(Speedo_HP >= 600)
  160. {
  161. format(str4,sizeof(str4),"~b~~h~~h~ Lataria: ~g~~h~~h~----");
  162. TextDrawSetString(zustand[i], str4);
  163. }
  164. else if(Speedo_HP >= 550)
  165. {
  166. format(str4,sizeof(str4),"~b~~h~~h~ Lataria: ~g~~h~~h~---~y~-");
  167. TextDrawSetString(zustand[i], str4);
  168. }
  169. else if(Speedo_HP >= 500)
  170. {
  171. format(str4,sizeof(str4),"~b~~h~~h~ Lataria: ~g~~h~~h~---");
  172. TextDrawSetString(zustand[i], str4);
  173. }
  174. else if(Speedo_HP >= 450)
  175. {
  176. format(str4,sizeof(str4),"~b~~h~~h~ Lataria: ~g~~h~~h~--~y~-");
  177. TextDrawSetString(zustand[i], str4);
  178. }
  179. else if(Speedo_HP >= 400)
  180. {
  181. format(str4,sizeof(str4),"~b~~h~~h~ Lataria: ~g~~h~~h~--");
  182. TextDrawSetString(zustand[i], str4);
  183. }
  184. else if(Speedo_HP >= 380)
  185. {
  186. format(str4,sizeof(str4),"~b~~h~~h~ Lataria: ~g~~h~~h~-~y~-");
  187. TextDrawSetString(zustand[i], str4);
  188. }
  189. else if(Speedo_HP >= 350)
  190. {
  191. format(str4,sizeof(str4),"~b~~h~~h~ Lataria: ~g~~h~~h~-");
  192. TextDrawSetString(zustand[i], str4);
  193. }
  194. else if(Speedo_HP >= 300)
  195. {
  196. format(str4,sizeof(str4),"~b~~h~~h~ Lataria: ~g~~h~~h~-~y~-");
  197. TextDrawSetString(zustand[i], str4);
  198. }
  199. else if(Speedo_HP <= 250)
  200. {
  201. format(str4,sizeof(str4),"~b~~h~~h~ Lataria: ~r~X~y~X~r~X~y~X~r~X~y~X~r~X~y~X");
  202. TextDrawSetString(zustand[i], str4);
  203. }
  204. if(Speedo_HP >= 551)
  205. {
  206. format(str5,sizeof(str5),"~b~~h~~h~ Local: ~w~%s",LuxZone);
  207. TextDrawSetString(localSFB[i], str5);
  208. }
  209. else if(Speedo_HP >= 361)
  210. {
  211. format(str5,sizeof(str5),"~b~~h~~h~ Local: ~w~%s",LuxZone);
  212. TextDrawSetString(localSFB[i], str5);
  213. }
  214. else
  215. {
  216. format(str5,sizeof(str5),"~b~~h~~h~ Local: ~w~%s",LuxZone);
  217. TextDrawSetString(localSFB[i], str5);
  218. }
  219. }
  220. SavePlayerPosV[i][sX] = Speedo_X, SavePlayerPosV[i][sY] = Speedo_Y, SavePlayerPosV[i][sZ] = Speedo_Z;
  221. }
  222. for(new i=0; i<MAX_SLOTS; i++)
  223. {
  224. if(!IsPlayerInAnyVehicle(i))
  225. {
  226. TextDrawHideForPlayer(i, box[i]); TextDrawHideForPlayer(i, fahrzeug[i]); TextDrawHideForPlayer(i, kmh[i]);
  227. TextDrawHideForPlayer(i, hoehe[i]); TextDrawHideForPlayer(i, zustand[i]); TextDrawHideForPlayer(i, localSFB[i]);
  228. SpeedoON[i] = 0;
  229. }
  230. }
  231. for(new i=0; i<MAX_SLOTS; i++)
  232. {
  233. if(IsPlayerConnected(i))
  234. {
  235. if(spawnado[i] == 1)
  236. {
  237. if(SpeedoON[i] == 1)
  238. {
  239. }
  240. if(SpeedoON[i] == 0)
  241. {
  242. }
  243. }
  244. }
  245. }
  246. }
Add Comment
Please, Sign In to add comment