Anti Teleport hax
#1

Code
pawn Код:
new Float:LastPosition[MAX_PLAYERS][3];
new TeleportWarnings[MAX_PLAYERS];

public OnFilterScriptInit()
{
    SetTimer("Hacks", 1000, true);
    return 1;
}

forward Hacks();
public Hacks()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(!IsPlayerInRangeOfPoint(i, 400.0, LastPosition[i][0], LastPosition[i][1], LastPosition[i][2]) && EnteredInterior[i] == 0 && GetPlayerState(i) != PLAYER_STATE_PASSENGER && GetPlayerSurfingVehicleID(i) == INVALID_VEHICLE_ID)
            {
                SendClientMessage(i, 0xFF0000FF, "You hack :(");
                TeleportWarnings[i] ++;
                if(TeleportWarnings[i] >= 3)
                {
                    BanEx(i, "Teleporting");
                }
            }
            GetPlayerPos(i, LastPosition[i][0], LastPosition[i][1], LastPosition[i][2]);
        }
    }
    return 1;
}

stock SetPlayerPosEx(playerid, Float:X, Float:Y, Float:Z, Float:angle, interiorid = 0)
{
    SetPlayerPos(playerid, X, Y, Z);
    SetPlayerFacingAngle(playerid, angle);
    SetPlayerInterior(playerid, interiorid);
    SetCameraBehindPlayer(playerid);
}
When i use "SetPlayerPosEx" to teleport to a place, then it sais 'You hack '
But it is not supposed to that.

It should say "You hack " only if im not in range of old posision and if i didnt use "SetPlayerPosEx"
Reply


Messages In This Thread
Anti Teleport hax - by Unknown123 - 05.06.2011, 22:29
Re: Anti Teleport hax - by Mauzen - 05.06.2011, 22:45
Re: Anti Teleport hax - by Unknown123 - 05.06.2011, 22:49
Re: Anti Teleport hax - by Mauzen - 05.06.2011, 22:53
Re: Anti Teleport hax - by Unknown123 - 05.06.2011, 23:07

Forum Jump:


Users browsing this thread: 1 Guest(s)