SA-MP Forums Archive
anti teleport problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: anti teleport problem (/showthread.php?tid=606330)



anti teleport problem - ShoortyFl - 02.05.2016

I have a problem with anti cp teleport hack, it works great, except, sometimes it kicks user that isnt a cheater, and i cant figure out a problem:

enter checkpoint:

pawn Код:
if(IsPlayerInAnyVehicle(playerid))
    {
        new Float: Vx, Float: Vy, Float: Vz;
        GetVehiclePos(GetPlayerVehicleID(playerid), Vx, Vy, Vz);
        if(GetDistance(Vx, Vy, Vz, AntiCP[playerid][0], AntiCP[playerid][1], AntiCP[playerid][2]) > 20)
        {
            new dialog[500];
            format(dialog, sizeof(dialog), ""COL_RED"________________________KICK INFO________________________");
            format(dialog, sizeof(dialog), "%s\n\n"COL_WHITE"Administrator: "COL_RED"Aquarius\n"COL_WHITE"Datum: "COL_RED"%s", dialog, TimeDate());
            format(dialog, sizeof(dialog), "%s\n"COL_WHITE"Razlog: "COL_RED"Teleport", dialog);

            SPD(playerid, 9999, DIALOG_STYLE_MSGBOX, "Kick Info", dialog, "Uredu", "");
            KikujIgraca(playerid);
            return 1;
        }
    }
    else
    {
        if(!IsPlayerInRangeOfPoint(playerid, 10.0, AntiCP[playerid][0], AntiCP[playerid][1], AntiCP[playerid][2]))
        {
            new dialog[500];
            format(dialog, sizeof(dialog), ""COL_RED"________________________KICK INFO________________________");
            format(dialog, sizeof(dialog), "%s\n\n"COL_WHITE"Administrator: "COL_RED"Aquarius\n"COL_WHITE"Datum: "COL_RED"%s", dialog, TimeDate());
            format(dialog, sizeof(dialog), "%s\n"COL_WHITE"Razlog: "COL_RED"Teleport", dialog);

            SPD(playerid, 9999, DIALOG_STYLE_MSGBOX, "Kick Info", dialog, "Uredu", "");
            KikujIgraca(playerid);
            return 1;
        }
    }
pawn Код:
stock c_SetPlayerCheckpoint(playerid, Float: x, Float: y, Float: z, Float: size)
{
    AntiCP[playerid][0] = x;
    AntiCP[playerid][1] = y;
    AntiCP[playerid][2] = z;
    return SetPlayerCheckpoint(playerid, x, y, z, size);
}



Re: anti teleport problem - ShoortyFl - 05.05.2016

Anyone /