SA-MP Forums Archive
help i need anti money cheat only! - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: help i need anti money cheat only! (/showthread.php?tid=207353)



help i need anti money cheat only! - Vlad_Riabov - 05.01.2011

hello

i have raven's Roleplay mode and i want to make
anti moeny cheat for this mod if some one make money cheats its reset his money
thanks :]


Re: help i need anti money cheat only! - MTA - 05.01.2011

https://sampwiki.blast.hk/


Re: help i need anti money cheat only! - Larsey123IsMe - 05.01.2011

Well, it works =/ (i hope :O.. not tested)

On Top:
pawn Код:
forward AntiMoneyCheat();

#define MONEY_LIMIT    15000000 //The MAX limit of money.. if he have more that that, then his money get reset.
OnGameModeInit():
pawn Код:
SetTimer("AntiMoneyCheat",1000,1);
Put it where you want:
pawn Код:
public AntiMoneyCheat()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(!IsPlayerAdmin(i) && IsPlayerConnected(i))
        {
            if(GetPlayerMoney(i)>=MONEY_LIMIT)
            {
                new name[MAX_PLAYER_NAME], string[128];
                GetPlayerName(i, name, sizeof(name));
                format(string, sizeof(string), "Anti Cheat: %s(%d) Please dont hack", name, i);
                SendClientMessageToAll(COLOR_ANTIHAX,string);
                ResetPlayerMoney(i); //Resets the player money
            }
        }
    }
    return 0;
}



Re: help i need anti money cheat only! - admantis - 05.01.2011

Quote:
Originally Posted by Larsey123IsMe
Посмотреть сообщение
Well, it works =/ (i hope :O.. not tested)

On Top:
pawn Код:
forward AntiMoneyCheat();

#define MONEY_LIMIT    15000000 //The MAX limit of money.. if he have more that that, then his money get reset.
OnGameModeInit():
pawn Код:
SetTimer("AntiMoneyCheat",1000,1);
Put it where you want:
pawn Код:
public AntiMoneyCheat()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(!IsPlayerAdmin(i) && IsPlayerConnected(i))
        {
            if(GetPlayerMoney(i)>=MONEY_LIMIT)
            {
                new name[MAX_PLAYER_NAME], string[128];
                GetPlayerName(i, name, sizeof(name));
                format(string, sizeof(string), "Anti Cheat: %s(%d) Please dont hack", name, i);
                SendClientMessageToAll(COLOR_ANTIHAX,string);
                ResetPlayerMoney(i); //Resets the player money
            }
        }
    }
    return 0;
}
That is stupid no offense. Why? First people can still hack 10k and not done anything. Second maybe he got them legit like admin give him it or something but legit.


Re: help i need anti money cheat only! - Hiitch - 06.01.2011

Quote:
Originally Posted by Vlad_Riabov
Посмотреть сообщение
hello

i have raven's Roleplay mode and i want to make
anti moeny cheat for this mod if some one make money cheats its reset his money
thanks :]
You're gonna need to be more specific on the amount of 'money' the person needs to have before it is reset. If you mean that you don't want them to have money at all, follow the above snippet.


Re: help i need anti money cheat only! - Souvlaki - 06.01.2011

I didn't really understand what you meant exactly but use server side money like:
https://sampforum.blast.hk/showthread.php?tid=96418


Re: help i need anti money cheat only! - Vlad_Riabov - 06.01.2011

I need my name to make cheats chips of this money has Atachasp he did what he had earlier this cave has a SafeGivePLayerMoney


Re: help i need anti money cheat only! - Infamous - 06.01.2011

Why don't you add a varible that increases and decreases as server cash is given/taken away. If the variable and the players cash don't match up then there is a problem. One thing to bare in mind though is the vedning machines etc.


Re: help i need anti money cheat only! - Vlad_Riabov - 06.01.2011

someone help me please?


Re: help i need anti money cheat only! - [MWR]Blood - 06.01.2011

Use Junkbuster