Posts: 138
Threads: 9
Joined: Oct 2010
Reputation:
0
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 :]
Larsey123IsMe
Unregistered
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;
}
Posts: 138
Threads: 9
Joined: Oct 2010
Reputation:
0
I need my name to make cheats chips of this money has Atachasp he did what he had earlier this cave has a SafeGivePLayerMoney
Posts: 663
Threads: 42
Joined: May 2009
Reputation:
0
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.