how to check if someone is around a coordinate?
#1

hey everyone,

as some of you know, im working on AntiCheat for my server, but now i am stuck at a problem

pawn Код:
if(GetPlayerSpeed(playerid) >= 260 && !IsPlayerInPlane(playerid))
    {
        new Float:x, Float:y, Float:z;
        GetPlayerPos(playerid, x, y , z);
        if(z != 0)
        {
            return 0;
        }
        else
        {
            SetTimerEx("CheckSpeedHacker", 3000, false, "d", playerid);
            PlayerInfo[playerid][Speed] = GetPlayerSpeed(playerid);
        }
    }
how to check if the player's Z coord is around 0? i already tried something like !~, but that gave me errors...

i want to check if someone is NOT around 0 z coords, then it should just return 0, and not go further in the antispeedhack, but if he is around 0 and going 260 mph, then it should...

greets niels
Reply
#2

REMOVED
Reply
#3

pawn Код:
if(-1.0 < z < 1.0)
{
    // z is more than -1 and less than 1.0
}
Reply
#4

ty , sorry for late reply
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)