Anti-money cheat?
#2

if you don't have any anticheat for better security you have to put an anticheat !
you can use junkbuster it will protect your server...not well but good
and for money cheats...
simply you can make server side money !
define new variable for players money and put players money amount in it !
and instead of GetPlayerMoney(playerid) use your custom variable.
and make a new stock instead GivePlayerMoney...
for example you can do this:

pawn Код:
//new variable for players money, On Top of your script.
new PMoney[MAX_PLAYERS];

//When a player join, load his/her money to this variable.
//if you are using Y_INI for saving stats its like this:
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
   INI_Int("Cash",PMoney[playerid]);
return 1;
}
//now you loaded player money into variable.
//for checking player money:
//For example Use
if(PMoney[playerid] > 100)...
//instead of
if(GetPlayerMoney(playerid) > 100)...

//for give money to a player you have to define new function...
stock GivePlayerMoneyEx(playerid, amount)
{
 PMoney[playerid] += amount;
 return GivePlayerMoney(playerid, amount);
}
//Every where in your script you have to change "GivePlayerMoney" To "GivePlayerMoneyEx"
//if you want reset a cheater money you can set a timer or use this in OnPlayerUpdate Callback:

if(GetPlayerMoney(playerid) != PMoney[playerid])
{
 ResetPlayerMoney(playerid);
 GivePlayerMoney(playerid, PMoney[playerid]);
}
Hope i Helped.
Good Luck...
Reply


Messages In This Thread
Anti-money cheat? - by Metharon - 29.10.2014, 15:41
Re: Anti-money cheat? - by M4D - 29.10.2014, 17:24

Forum Jump:


Users browsing this thread: 1 Guest(s)