SA-MP Forums Archive
Money anticheat - 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: Money anticheat (/showthread.php?tid=560644)



Money anticheat - Brandon001 - 29.01.2015

Hello everyone, a money of anticheatre would be my need that the becheatelt deducts it money. Would be good ,that if it is adminrendszerrel I put the player's money or money in another place give would not deduct it then for him for him. (LuxAdmin I am useful.)
Ahead thank you for the help.


Re: Money anticheat - CalvinC - 29.01.2015

Your english is very hard to understand, but making an anti money cheat system is very easy.
First make a variable to store the player's money in.
When you give or take money from a player with GivePlayerMoney, set the variable value to the amount you give/take.
pawn Код:
GivePlayerMoney(playerid, 200);
VariableName[playerid] = 200;
And under OnGameModeInit, set a repeating timer to check if your money variable has the same value as the players money (GetPlayerMoney).