16.01.2010, 17:11
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:
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
Код:
#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]; }
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