Advertisement
Guest User

Untitled

a guest
Feb 21st, 2020
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.33 KB | None | 0 0
  1. ChecarTeleporteVeiculo(vehicleid, playerid)
  2. {
  3. if(!AntiTeleporteVehicle)
  4. return false
  5. ;
  6.  
  7. if(VeiculoComMotorista[vehicleid] != -1)
  8. return false // Veículo ocupado
  9. ;
  10. if(GetVehicleDistanceFromPoint(vehicleid, VehiclePos_X[vehicleid], VehiclePos_Y[vehicleid], VehiclePos_Z[vehicleid]) > DISTANCIA_TP_VEHICLE)
  11. {
  12. //-> ANTI BUG
  13. if(VeiculoOcupado(vehicleid))
  14. return false
  15. ;
  16.  
  17. switch(GetVehicleModel(vehicleid))
  18. {
  19. case 487, 520, 417, 425, 447, 460,
  20. 464, 465, 469, 476, 488, 497,
  21. 501, 511 , 512, 513, 519, 548,
  22. 553, 563, 577, 592, 593: //Aviões & Helicopteros
  23. {
  24. new Float: distancia_vehicle = GetVehicleDistanceFromPoint(vehicleid, VehiclePos_X[vehicleid], VehiclePos_Y[vehicleid], VehiclePos_Z[vehicleid]);
  25. if(MsgCarSpam)
  26. {
  27. format(StrLog, sizeof StrLog, "Anti-Cheat: Veículo[ID: %d] [%s] Voltou para posição Registrada(Dist: %0.1f) | Player Próximo: %s[%d] [Level: %d]", vehicleid, getVehicleName(vehicleid), distancia_vehicle, PlayerName(playerid), playerid, PlayerInfo[playerid][pLevel]);
  28. ChatAdmin(COR_LIGHTRED, StrLog, 1);
  29. }
  30. SetVehicleToRespawn(vehicleid);
  31. }
  32.  
  33. default: {
  34.  
  35. new Float: distancia_vehicle = GetVehicleDistanceFromPoint(vehicleid, VehiclePos_X[vehicleid], VehiclePos_Y[vehicleid], VehiclePos_Z[vehicleid]);
  36. if(MsgCarSpam)
  37. {
  38. format(StrLog, sizeof StrLog, "Anti-Cheat: Veículo[ID: %d] [%s] Voltou para posição Registrada(Dist: %0.1f) | Player Próximo: %s[%d] [Level: %d]", vehicleid, getVehicleName(vehicleid), distancia_vehicle, PlayerName(playerid), playerid, PlayerInfo[playerid][pLevel]);
  39. ChatAdmin(COR_LIGHTRED, StrLog, 1);
  40. }
  41.  
  42. new Float:ObterPosicao[4], Float:Lataria, blindagem = Blindagem[vehicleid];
  43. GetVehicleHealth(vehicleid, Lataria);
  44.  
  45. ObterPosicao[0] = VehiclePos_X[vehicleid],
  46. ObterPosicao[1] = VehiclePos_Y[vehicleid],
  47. ObterPosicao[2] = VehiclePos_Z[vehicleid],
  48. ObterPosicao[3] = VeiculoPos_Angle[vehicleid];
  49.  
  50. SetVehicleToRespawn(vehicleid); //Proteger contra o cheat de explodir veículo
  51.  
  52. Blindagem[vehicleid] = blindagem;
  53. SetVehiclePosExx(vehicleid, ObterPosicao[0], ObterPosicao[1], ObterPosicao[2]);
  54. SetVehicleZAngle(vehicleid, ObterPosicao[3]);
  55. SetVehicleHealth(vehicleid, Lataria);
  56. return true;
  57. }
  58. }
  59. }
  60. return false;
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement