Anti-money cheat?
#1

I'm scripting a new gamemode.

I tried to use a nobeit . to get money and then to use those moneys to buy something.


> I get moneys from nobeit.

> i use stats , and on stats i have GetPlayerMoney , those moneys from ****** doesen't appear.
> i use the shop with sob moneys doesen't work.

Question : There isn't working anymore money cheats? on 0.3z? All my includes , plugin are recently upgraded.


So , i need to put a money cheat protection ? if yes can you help me with it ? if no ok.
Reply
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)