Some problems.
#1

I have this code to detect and send an Airbreak-Hack report to admins. Its working fine but i got small issue. Whenever a player enters an Andromada or AT-400, it sends a fake Airbreak-Hack report to admins. Its pretty annoying since i have AT-400 and Andromada for pilot class and my admins need to /spec them every time. Anyone can help me how to fix it? Or if there are some good Anti-Airbreak, it would be nice cause this one is not really as good as other servers have.

pawn Код:
if (GetPlayerVehicleSeat(playerid) == 0)
    {
        if (pInfo[playerid][PlayerSpeed] < 10)
        {
            if (GetPlayerInterior(playerid) != pInfo[playerid][PreviousInt])
            {
                switch (GetPlayerInterior(playerid))
                {
                    case 0, 1, 2, 3:
                    {
                        GetPlayerPos(playerid, pInfo[playerid][PreviousX], pInfo[playerid][PreviousY], pInfo[playerid][PreviousZ]);
                        pInfo[playerid][PreviousInt] = GetPlayerInterior(playerid);
                        return 1;
                    }
                }
            }
            if (IsPlayerInRangeOfPoint(playerid, 7.5, pInfo[playerid][PreviousX], pInfo[playerid][PreviousY], pInfo[playerid][PreviousZ]))
            {
            }
            else
                SendReportToAdmins(-1, playerid, "Airbreak-hack");
        }
    }
    GetPlayerPos(playerid, pInfo[playerid][PreviousX], pInfo[playerid][PreviousY], pInfo[playerid][PreviousZ]);
    pInfo[playerid][PreviousInt] = GetPlayerInterior(playerid);
I have this code under my GlobalCheck function which has 1000 milliseconds timer running.

PS: I want to ask something, is it a good idea to create a stock for getting a name of the player? I mean something like
pawn Код:
stock GetName(playerid)
{
  new name[MAX_PLAYER_NAME];
  GetPlayerName(playerid, name, sizeof(name));
  return name;
}
Then use GetName(target), GetName(playerid) to those scripts which takes the player names, cmds and other scripts? I saw some of the gamemode is using it, i just want to know if its better than creating a separate name variable and using GetPlayerName function every time you create a command.
Reply


Messages In This Thread
Some problems. - by iOxide - 29.06.2014, 05:08
Re: Some problems. - by AiRaLoKa - 29.06.2014, 06:02
Re: Some problems. - by iOxide - 29.06.2014, 06:15
Re: Some problems. - by Pboachie - 29.06.2014, 06:17
Re: Some problems. - by AiRaLoKa - 29.06.2014, 06:20
Re: Some problems. - by iOxide - 29.06.2014, 08:18
Re: Some problems. - by BroZeus - 29.06.2014, 10:34

Forum Jump:


Users browsing this thread: 1 Guest(s)