money hack pravention
#3

You can convert all the GivePlayerMoney commands to GivePlayerCash, all the SetPlayerMoney commands to SetPlayerCash, all the GetPlayerMoney commands to GetPlayerCash, and all the ResetPlayerMoney commands to ResetPlayerCash... Then add in some new functions:
Код:
#define ResetMoneyBar ResetPlayerMoney
#define UpdateMoneyBar GivePlayerMoney
 
stock GivePlayerCash(playerid, money)
{
	PlayerInfo[playerid][pCash] += money;
	ResetMoneyBar(playerid);//Resets the money in the original moneybar, Do not remove!
	UpdateMoneyBar(playerid,PlayerInfo[playerid][pCash]);//Sets the money in the moneybar to the serverside cash, Do not remove!
	return PlayerInfo[playerid][pCash];
}
stock SetPlayerCash(playerid, money)
{
	PlayerInfo[playerid][pCash] = money;
	ResetMoneyBar(playerid);//Resets the money in the original moneybar, Do not remove!
	UpdateMoneyBar(playerid,PlayerInfo[playerid][pCash]);//Sets the money in the moneybar to the serverside cash, Do not remove!
	return PlayerInfo[playerid][pCash];
}
stock ResetPlayerCash(playerid)
{
	PlayerInfo[playerid][pCash] = 0;
	ResetMoneyBar(playerid);//Resets the money in the original moneybar, Do not remove!
	UpdateMoneyBar(playerid,PlayerInfo[playerid][pCash]);//Sets the money in the moneybar to the serverside cash, Do not remove!
	return PlayerInfo[playerid][pCash];
}
stock GetPlayerCash(playerid)
{
	return PlayerInfo[playerid][pCash];
}
its a little tricky to do but its called server side cash.

This way when someone hacks money they dont really get it and there money bar will reset to the saved money that the script is using.

Or alternatively use this:
http://forum.sa-mp.com/index.php?topic=121344.0
Reply


Messages In This Thread
money hack pravention - by sggassasin - 16.01.2010, 09:53
Re: money hack pravention - by [HiC]TheKiller - 16.01.2010, 10:27
Re: money hack pravention - by SuperS82 - 16.01.2010, 17:11

Forum Jump:


Users browsing this thread: 1 Guest(s)