LeonardoBradoks

UpdateRadar

Oct 5th, 2018
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 0 0
  1. public UpdateRadar() {
  2. for(new i = 0, j = GetPlayerPoolSize(); i <= j; ++i) {
  3. if(IsPlayerInAnyVehicle(i) && PlayerBradoks[i][pMulta] == false) {
  4. if(IsPlayerInRangeOfPoint(i, 11.0, 2046.2222,1339.4756,10.6719) || IsPlayerInRangeOfPoint(i, 11.0, 2068.6826,1417.1683,10.6719)) {
  5. if(GetVehicleSpeed(VeiculoBradoks[GetPlayerVehicleID(i)][vVeiculoIDX]) >= 61) {
  6. new string[128], Taxa = 20, Tempo = 20;
  7. SendClientMessage(i, -1, "{FF0000}•{FFFFFF}»{FFD700}------------------------- {FF0000}RADAR {FFD700}-------------------------{FF0000}•{FFFFFF}«");
  8. format(string, sizeof(string), "{FF0000}•{FFFFFF}»{FFD700} Veículo %s", GetVehicleName(VeiculoBradoks[GetPlayerVehicleID(i)][vVeiculoIDX]));
  9. SendClientMessage(i, -1, string);
  10. format(string, sizeof(string), "{FF0000}•{FFFFFF}»{FFD700} Placa %s", GetVehicleNumberPlateEx(VeiculoBradoks[GetPlayerVehicleID(i)][vVeiculoIDX]));
  11. SendClientMessage(i, -1, string);
  12. SendClientMessage(i, -1, "{FF0000}•{FFFFFF}»{FFD700} Velocidade Permitida 60 KM/H");
  13. format(string, sizeof(string), "{FF0000}•{FFFFFF}»{FFD700} Velocidade Registrada %d KM/H", GetVehicleSpeed(VeiculoBradoks[GetPlayerVehicleID(i)][vVeiculoIDX]));
  14. SendClientMessage(i, -1, string);
  15. format(string, sizeof(string), "{FF0000}•{FFFFFF}»{FFD700} Valor da Multa %d", ((GetVehicleSpeed(VeiculoBradoks[GetPlayerVehicleID(i)][vVeiculoIDX]) * Taxa * Tempo) /100));
  16. SendClientMessage(i, -1, string);
  17. SendClientMessage(i, -1, "{FF0000}•{FFFFFF}»{FFD700}------------------------- {FF0000}RADAR {FFD700}-------------------------{FF0000}•{FFFFFF}«");
  18. VeiculoBradoks[GetPlayerVehicleID(i)][vValorMulta] += ((GetVehicleSpeed(VeiculoBradoks[GetPlayerVehicleID(i)][vVeiculoIDX]) * Taxa * Tempo) /100);
  19. VeiculoBradoks[GetPlayerVehicleID(i)][vTotalMultas]++;
  20. PlayerBradoks[i][pMulta] = true;
  21. PlayerBradoks[i][pTimerMulta] = SetTimerEx("LiberarPlayerMulta", 2000, false, "i", i);
  22. return 1;
  23. } else {
  24. new string[128];
  25. format(string, sizeof(string), "{FF0000}•{FFFFFF}»{FFD700} Velocidade Registrada: %d KM/H", GetVehicleSpeed(VeiculoBradoks[GetPlayerVehicleID(i)][vVeiculoIDX]));
  26. SendClientMessage(i, -1, string);
  27. PlayerBradoks[i][pMulta] = true;
  28. PlayerBradoks[i][pTimerMulta] = SetTimerEx("LiberarPlayerMulta", 2000, false, "i", i);
  29. return 1;
  30. }
  31. }
  32. }
  33. }
  34. return 1;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment