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
#2

replace
pawn Код:
if (IsPlayerInRangeOfPoint(playerid, 7.5, pInfo[playerid][PreviousX], pInfo[playerid][PreviousY], pInfo[playerid][PreviousZ]))
            {
            }
            else
                SendReportToAdmins(-1, playerid, "Airbreak-hack");
with
pawn Код:
if (!IsPlayerInRangeOfPoint(playerid, 7.5, pInfo[playerid][PreviousX], pInfo[playerid][PreviousY], pInfo[playerid][PreviousZ]))
{
    new vehmodel = GetVehicleModel(GetPlayerVehicleID(playerid));
    if(vehmodel != 592 || vehmodel != 577) SendReportToAdmins(-1, playerid, "Airbreak-hack");
}
Reply
#3

Well, in this way people can hack using Andromada/AT-400 and admins won't get any reports. I know this method already but i didn't use it because of the reason i just said. Aren't there any other ways to fix this and make this system a good working one?
Reply
#4

Try This:

PHP код:
if (GetPlayerVehicleSeat(playerid) == 0)
    {
        if (
pInfo[playerid][PlayerSpeed] < 10)
        {
            if (
GetPlayerInterior(playerid) != pInfo[playerid][PreviousInt])
            {
                switch (
GetPlayerInterior(playerid))
                {
                    case 
0123:
                    {
                        
GetPlayerPos(playeridpInfo[playerid][PreviousX], pInfo[playerid][PreviousY], pInfo[playerid][PreviousZ]);
                        
pInfo[playerid][PreviousInt] = GetPlayerInterior(playerid);
                        return 
1;
                    }
                }
            }
            if (
IsPlayerInRangeOfPoint(playerid7.5pInfo[playerid][PreviousX], pInfo[playerid][PreviousY], pInfo[playerid][PreviousZ]))
            {
                new 
vehmodel GetVehicleModel(GetPlayerVehicleID(playerid));
                if(
vehmodel != 592 || vehmodel != 577)
                {
                    
SendReportToAdmins(-1playerid"Airbreak-hack");
                }
            }
      
        }
    }
    
GetPlayerPos(playeridpInfo[playerid][PreviousX], pInfo[playerid][PreviousY], pInfo[playerid][PreviousZ]);
    
pInfo[playerid][PreviousInt] = GetPlayerInterior(playerid); 
Reply
#5

Quote:
Originally Posted by iOxide
Посмотреть сообщение
Well, in this way people can hack using Andromada/AT-400 and admins won't get any reports. I know this method already but i didn't use it because of the reason i just said. Aren't there any other ways to fix this and make this system a good working one?
i dont really know the speed of andromada / at-400, but you can do something like your code, but with more radius
Reply
#6

I tried almost all the possible ways but non of them worked. I still need to fix this its urgent.
Reply
#7

try this
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;
                    }
                }
            }
new vehmodel = GetVehicleModel(GetPlayerVehicleID(playerid));
            if (!IsPlayerInRangeOfPoint(playerid, 7.5, pInfo[playerid][PreviousX], pInfo[playerid][PreviousY], pInfo[playerid][PreviousZ]) && (vehmodel != 592 || vehmodel != 577))
            SendReportToAdmins(-1, playerid, "Airbreak-hack");
else if (!IsPlayerInRangeOfPoint(playerid, 12.0, pInfo[playerid][PreviousX], pInfo[playerid][PreviousY], pInfo[playerid][PreviousZ]) && (vehmodel == 592 || vehmodel == 577))//increasing range for androm & at400 also if this not works try increasing range a little bit more in this line
        }
    }
    GetPlayerPos(playerid, pInfo[playerid][PreviousX], pInfo[playerid][PreviousY], pInfo[playerid][PreviousZ]);
    pInfo[playerid][PreviousInt] = GetPlayerInterior(playerid);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)