Airbreak detection anti-hack
#3

Maybe use the same thing that you used for detecting vehicle airbreak, except don't use the vehicle lines:

pawn Код:
if (GetPlayerVehicleSeat(playerid) == 0)
And use the rest in:
pawn Код:
public OnPlayerUpdate(playerid)
{
        if (APlayerData[playerid][PlayerSpeed] < 10)
        {
            // Check if the player switched interior-id's
            if (GetPlayerInterior(playerid) != APlayerData[playerid][PreviousInt])
            {
                // Check if the new interior is the normal world or any mod-shop
                switch (GetPlayerInterior(playerid))
                {
                    case 0, 1, 2, 3: // Check interiors 0, 1, 2 and 3 (normal world and all mod-shops)
                    {
                        // Store the player's current location and interior-id for the next iteration
                        GetPlayerPos(playerid, APlayerData[playerid][PreviousX], APlayerData[playerid][PreviousY], APlayerData[playerid][PreviousZ]);
                        APlayerData[playerid][PreviousInt] = GetPlayerInterior(playerid);
                        // Exit the function
                        return 1;
                    }
                }
            }

            // Check if the player is still near the same place he was half a second ago
            if (IsPlayerInRangeOfPoint(playerid, 20.0, APlayerData[playerid][PreviousX], APlayerData[playerid][PreviousY], APlayerData[playerid][PreviousZ]))
            {
            }
            else // Send an automated report to the admins so they're informed about it and can take action
                SendReportToAdmins(playerid, "Airbreak-hack", true);
        }
    }
    // Store the player's current location and interior-id for the next iteration
    GetPlayerPos(playerid, APlayerData[playerid][PreviousX], APlayerData[playerid][PreviousY], APlayerData[playerid][PreviousZ]);
    APlayerData[playerid][PreviousInt] = GetPlayerInterior(playerid);

    return 1;
}
Reply


Messages In This Thread
Airbreak detection anti-hack - by SomebodyAndMe - 23.12.2011, 12:51
Re: Airbreak detection anti-hack - by SomebodyAndMe - 30.12.2011, 07:28
Re: Airbreak detection anti-hack - by ToPhrESH - 30.12.2011, 07:47

Forum Jump:


Users browsing this thread: 2 Guest(s)