SA-MP Forums Archive
Anti money hack - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Anti money hack (/showthread.php?tid=623467)



Anti money hack - bugmenotlol - 01.12.2016

helloo

i have this function to give players moeny
PInfo[playerid][Money];


and this is my current anticheat but not working

PHP код:
public RandomTimer()
{
    for(new 
ii<MAX_PLAYERSi++)
    {
        if(
GetPlayerMoney(i) != PInfo[i][Money])//Money/Cash anti-cheat
        
{
            
ResetPlayerMoney(i);
            
GivePlayerMoney(i,PInfo[i][Money]);
        }
    }

i also need to make it bannable
how to do it ??


Re: Anti money hack - lollypap54 - 01.12.2016

You did good, but you need start that timer, make new giveplayermoney and getplayermoney function, use those everytime you want to do something with money and if you want to be this anti-moneyhack thing bannable, just add it after it detects your money variable doesn't = player money function.
And i suggest using GetPlayerPoolSize(); function, not MAX_PLAYERS. GetPlayerPoolSize() gets max playerid currently on the server, and MAX_PLAYERS is your players limit.


Re: Anti money hack - bugmenotlol - 01.12.2016

can u show me an example of making it
a ma noob


Re: Anti money hack - bugmenotlol - 02.12.2016

anyone ?


Re: Anti money hack - 2xRichard - 18.08.2017

hahahahahaha


Re: Anti money hack - aoky - 19.08.2017

I recommend you use something along the lines of Nex Anti-Cheat, here's a link.

https://sampforum.blast.hk/showthread.php?tid=579963