Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ChecarTeleporteVeiculo(vehicleid, playerid)
- {
- if(!AntiTeleporteVehicle)
- return false
- ;
- if(VeiculoComMotorista[vehicleid] != -1)
- return false // Veículo ocupado
- ;
- if(GetVehicleDistanceFromPoint(vehicleid, VehiclePos_X[vehicleid], VehiclePos_Y[vehicleid], VehiclePos_Z[vehicleid]) > DISTANCIA_TP_VEHICLE)
- {
- //-> ANTI BUG
- if(VeiculoOcupado(vehicleid))
- return false
- ;
- switch(GetVehicleModel(vehicleid))
- {
- case 487, 520, 417, 425, 447, 460,
- 464, 465, 469, 476, 488, 497,
- 501, 511 , 512, 513, 519, 548,
- 553, 563, 577, 592, 593: //Aviões & Helicopteros
- {
- new Float: distancia_vehicle = GetVehicleDistanceFromPoint(vehicleid, VehiclePos_X[vehicleid], VehiclePos_Y[vehicleid], VehiclePos_Z[vehicleid]);
- if(MsgCarSpam)
- {
- 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]);
- ChatAdmin(COR_LIGHTRED, StrLog, 1);
- }
- SetVehicleToRespawn(vehicleid);
- }
- default: {
- new Float: distancia_vehicle = GetVehicleDistanceFromPoint(vehicleid, VehiclePos_X[vehicleid], VehiclePos_Y[vehicleid], VehiclePos_Z[vehicleid]);
- if(MsgCarSpam)
- {
- 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]);
- ChatAdmin(COR_LIGHTRED, StrLog, 1);
- }
- new Float:ObterPosicao[4], Float:Lataria, blindagem = Blindagem[vehicleid];
- GetVehicleHealth(vehicleid, Lataria);
- ObterPosicao[0] = VehiclePos_X[vehicleid],
- ObterPosicao[1] = VehiclePos_Y[vehicleid],
- ObterPosicao[2] = VehiclePos_Z[vehicleid],
- ObterPosicao[3] = VeiculoPos_Angle[vehicleid];
- SetVehicleToRespawn(vehicleid); //Proteger contra o cheat de explodir veículo
- Blindagem[vehicleid] = blindagem;
- SetVehiclePosExx(vehicleid, ObterPosicao[0], ObterPosicao[1], ObterPosicao[2]);
- SetVehicleZAngle(vehicleid, ObterPosicao[3]);
- SetVehicleHealth(vehicleid, Lataria);
- return true;
- }
- }
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement