[Ajuda] Por que tб dando falso positivo ANTI TP hack
#1

Fiz um anti TP hack que detecta a distancia do player de tempos em tempos e diz que se tava muito longe em um curto periodo
numa distancia X de carro e Y a pй o player estб de hack e manda o player pra posiзгo antiga que ele tava.

Pra nгo bugar a entrada e saнda de interiores eu substitui todos os setplayerpos por setplayerposex, ajustando com as configuraзхes
do anti hack, mas ainda assim estб dando falsos positivos ao entrar e sair dos interiores...

O que eu to fazendo de errado?

1
PHP Code:
new Float:Xtp[MAX_PLAYERS], Float:Ytp[MAX_PLAYERS], Float:Ztp[MAX_PLAYERS], VWtp[MAX_PLAYERS], INTtp[MAX_PLAYERS];
new 
ContadorTeleport[MAX_PLAYERS]; 
2
PHP Code:
stock SetPlayerPosEx(playerid,Float:x,Float:y,Float:z,Float:angle,int,vwbool:carregar false) {
    
// atualizar anti TP
    
Xtp[playerid] = x;
    
Ytp[playerid] = y;
    
Ztp[playerid] = z;
    
INTtp[playerid] = int;
    
VWtp[playerid] = vw;
    
// 
    
SetPlayerInterior(playerid,int);
    
SetPlayerVirtualWorld(playeridvw);
    
SetPlayerPos(playeridx,y,z);
    
// se tiver sem angulo pre definido, setar camera atrasa do player, se tiver definido carregar, carregar
    
if(angle == 0SetCameraBehindPlayer(playerid);
    if(
carregar == truePlayerCarregando(playerid);
    
// ativar,reativer,zerar o anti tp
    
KillTimer(ContadorTeleport[playerid]);
    
ContadorTeleport[playerid] = SetTimerEx("DetectTeleport"50false"i"playerid);
    return 
1;
}
forward CheckTeleport(playerid); public CheckTeleport(playerid) {
    
KillTimer(ContadorTeleport[playerid]);
    if(
IsPlayerConnected(playerid) && playerid != INVALID_PLAYER_ID) {
        
GetPlayerPos(playeridXtp[playerid], Ytp[playerid], Ztp[playerid]);
        
INTtp[playerid] = GetPlayerInterior(playerid);
        
VWtp[playerid] = GetPlayerVirtualWorld(playerid);
        
ContadorTeleport[playerid] = SetTimerEx("DetectTeleport"6666false"i"playerid);
    }
}
forward DetectTeleport(playerid); public DetectTeleport(playerid) {
    
KillTimer(ContadorTeleport[playerid]);
    if(
gSpectateID[playerid] == 65535 && paused[playerid] == false) {
        new 
Float:rangeMAX 99.9// ON_FOOT
        
if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOTrangeMAX 399.9// ON_VEHICLES
        
if(!IsPlayerInRangeOfPoint(playeridrangeMAXXtp[playerid], Ytp[playerid], Ztp[playerid])) {
            new 
string[128];
            
format(stringsizeof(string), "Xtp[%.4f], Ytp[%.4f], Ztp[%.4f]"Xtp[playerid], Ytp[playerid], Ztp[playerid] );
            
ABroadCast(COLOR_LIGHTGREEN,string,3);
            
format(stringsizeof(string), "TELEPORT HACK: %s TELEPORTADO DE VOLTA"PlayerName(playerid) );
            
ABroadCast(COLOR_LIGHTGREEN,string,3);
            if(
GetPlayerState(playerid) == PLAYER_STATE_ONFOOTSetVehiclePos(GetPlayerVehicleID(playerid), Xtp[playerid], Ytp[playerid]+4Ztp[playerid]);
            else 
SetPlayerPosEx(playeridXtp[playerid], Ytp[playerid], Ztp[playerid], 0INTtp[playerid], VWtp[playerid]);
        }
    }
    
ContadorTeleport[playerid] = SetTimerEx("CheckTeleport"6666false"i"playerid);

Reply


Messages In This Thread
Por que tб dando falso positivo ANTI TP hack - by binnyl - 16.02.2019, 14:58
Re: Por que tб dando falso positivo ANTI TP hack - by Japis - 16.02.2019, 21:14
Re: Por que tб dando falso positivo ANTI TP hack - by binnyl - 01.03.2019, 01:02
Re: Por que tб dando falso positivo ANTI TP hack - by binnyl - 17.03.2019, 19:20
Re: Por que tб dando falso positivo ANTI TP hack - by RodrigoMSR - 17.03.2019, 19:31

Forum Jump:


Users browsing this thread: 1 Guest(s)