Anti health armour money hack?
#1

Does anyone have anyof these to implent into my GM?

I would prefer VX-RP 2 Anti cheat if anyone has it? thanks.
Reply
#2

i got one
Reply
#3

It's pretty easy to make.

pawn Код:
//Anti-Cheat Info
new AntiCheatTimer;
enum _ACInfo
{
    Float:Health, Float:Armour, Money,
}
new ACInfo[MAX_PLAYERS][_ACInfo];

#define GivePlayerMoney GivePlayerMoneyEx
#define SetPlayerHealth SetPlayerHealthEx
#define SetPlayerArmour SetPlayerArmourEx

public OnGameModeInit()
{
    AntiCheatTimer = SetTimer("AntiCheat",1000,true);
}

public OnGameModeExit()
{
    KillTimer(AntiCheatTimer);
}

forward AntiCheat();
public AntiCheat()
{
    new Float:HP,Float:AP,_Money=GetPlayerMoney(playerid);
    GetPlayerHealth(playerid,HP);
    GetPlayerArmour(playerid,AP);
    if(HP > ACInfo[playerid][Health])
    {
        //Gained health, he used cheats
    }
    else
    {
        ACInfo[playerid][Health] = HP; //If he lost health, set anti-cheat info health to current health
    }
    if(AP > ACInfo[playerid][Armour])
    {
        //Gained armour, he used cheats
    }
    else
    {
        ACInfo[playerid][Health] = HP; //If he lost armour, set anti-cheat info armour to current armour
    }
    if(_Money > ACInfo[playerid][Money])
    {
        //Gained health, he used hacks
    }
    else
    {
        ACInfo[playerid][Money] = _Money; //If he lost money, set anti-cheat info money to current money
    }
    return 1;
}
stock SetPlayerHealthEx(playerid, Float:HP)
{
    SetPlayerHealth(playerid, HP);
    ACInfo[playerid][Health] = HP;
    return 1;
}
stock SetPlayerArmourEx(playerid, Float:AP)
{
    SetPlayerArmour(playerid, AP);
    ACInfo[playerid][Armour] = AP;
    return 1;
}
stock GivePlayerMoneyEx(playerid, money)
{
    GivePlayerMoney(playerid, money);
    ACInfo[playerid][Money] += money;
    return 1;
}
Whipped this up in ~1 minute.
Reply
#4

Quote:
Originally Posted by coole210
Посмотреть сообщение
It's pretty easy to make.
OMG OnPlayerUpdate it calls at every action of the player,just make a custom public with a timer.

Ditch,you can also set custom max values to armor/hp,ex: 90 for both.

If player has 91 or more of armor/hp,it is surely cheating.

Like:

pawn Код:
new Float:health, Float:armour;
GetPlayerHealth(i, health);
GetPlayerArmour(i, armour);
if (health > 90) SetPlayerHealth(i, 90);
if (armour > 90) SetPlayerArmour(i, 90);
Instead of ban him,restore the hp/armour to your custom values.Hope you get the idea.
Reply
#5

Quote:
Originally Posted by Logitech90
Посмотреть сообщение
OMG OnPlayerUpdate it calls at every action of the player,just make a custom public with a timer.
I edited my post, thanks. I wouldn't use OnPlayerUpdate for my anti-cheat either lol
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)