A little help with Anti - Money Hack.
#1

Hello,

I have made an Anti- Money Hack. There is one problem though. I want to think that when you gamble the GivePlayerMoney function is called. That means that it would be impossible for players to gamble. Is there an alternative to this?

Thanks in Advance.
Reply
#2

here i post the code i hope its work its untestable check but i hope its work 100% sory for bad english
Quote:

//============================[Anti-Money]======================================
#define ResetMoneyBar ResetPlayerMoney
#define UpdateMoneyBar GivePlayerMoney
//=====================================forwords===== =============================
forward UpdateMoney();
//=============================[Timers]=========================================
SetTimer("UpdateMoney", 1000, 1);
//===========================[Anti-money hack]==================================
stock GivePlayerCash(playerid, money)
{
PlayerInfo[playerid][pCash] += money;
ResetMoneyBar(playerid);
UpdateMoneyBar(playerid,PlayerInfo[playerid][pCash]);
return PlayerInfo[playerid][pCash];
}
stock SetPlayerCash(playerid, money)
{
PlayerInfo[playerid][pCash] = money;
ResetMoneyBar(playerid);
UpdateMoneyBar(playerid,PlayerInfo[playerid][pCash]);
return PlayerInfo[playerid][pCash];
}
stock ResetPlayerCash(playerid)
{
PlayerInfo[playerid][pCash] = 0;
ResetMoneyBar(playerid);
UpdateMoneyBar(playerid,PlayerInfo[playerid][pCash]);
return PlayerInfo[playerid][pCash];
}
stock GetPlayerCash(playerid)
{
return PlayerInfo[playerid][pCash];
}
public UpdateMoney()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(GetPlayerCash(i) != GetPlayerMoney(i))
{
ResetMoneyBar(i);
UpdateMoneyBar(i,PlayerInfo[i][pCash]);
}
}
}
return 1;
}

Reply
#3

This does not give player money when they gamble. Gambling would still call GivePlayerMoney.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)