Load Money Help
#1

Hi alls.I Use Anty Money Hack And Player Connect To Server Set Player Money To Zero (0)
How To Fix It? This Is Anti Money hack Timer:
Код:
public MoneyTimer()
{
    new username[MAX_PLAYER_NAME];
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(GetPlayerCash(i) != GetPlayerMoney(i))
            {
                ResetMoneyBar(i);//Resets the money in the original moneybar, Do not remove!
                UpdateMoneyBar(i,GetPlayerCash(i));//Sets the money in the moneybar to the serverside cash, Do not remove!
                new hack = GetPlayerMoney(i) - GetPlayerCash(i);
                GetPlayerName(i,username,sizeof(username));
                printf("%s has picked up/attempted to spawn $%d.", username,hack);
            }
        }
    }
}
Reply
#2

Код:
ResetMoneyBar(i);//Resets the money in the original moneybar, Do not remove!
                UpdateMoneyBar(i,GetPlayerCash(i));//Sets the money in the moneybar to the serverside cash, Do not remove!
When the script removes player money, it then gives back the player money that they currently have, which is now 0.
You need to create a float for the money before giving it back. Try this:
Код:
public MoneyTimer()
{
    new username[MAX_PLAYER_NAME];
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(GetPlayerCash(i) != GetPlayerMoney(i))
            {
				new cash = GetPlayerCash(playerid);
                ResetMoneyBar(i);//Resets the money in the original moneybar, Do not remove!
                UpdateMoneyBar(i,cash);//Sets the money in the moneybar to the serverside cash, Do not remove!
                new hack = GetPlayerMoney(i) - GetPlayerCash(i);
                GetPlayerName(i,username,sizeof(username));
                printf("%s has picked up/attempted to spawn $%d.", username,hack);
            }
        }
    }
}
EDIT: I found the post you used lol
http://forum.sa-mp.com/showthread.ph...er+Sided+Money
Reply
#3

Quote:
Originally Posted by Aerotactics
Посмотреть сообщение
Код:
ResetMoneyBar(i);//Resets the money in the original moneybar, Do not remove!
                UpdateMoneyBar(i,GetPlayerCash(i));//Sets the money in the moneybar to the serverside cash, Do not remove!
When the script removes player money, it then gives back the player money that they currently have, which is now 0.
You need to create a float for the money before giving it back. Try this:
Код:
public MoneyTimer()
{
    new username[MAX_PLAYER_NAME];
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(GetPlayerCash(i) != GetPlayerMoney(i))
            {
				new cash = GetPlayerCash(playerid);
                ResetMoneyBar(i);//Resets the money in the original moneybar, Do not remove!
                UpdateMoneyBar(i,cash);//Sets the money in the moneybar to the serverside cash, Do not remove!
                new hack = GetPlayerMoney(i) - GetPlayerCash(i);
                GetPlayerName(i,username,sizeof(username));
                printf("%s has picked up/attempted to spawn $%d.", username,hack);
            }
        }
    }
}
EDIT: I found the post you used lol
http://forum.sa-mp.com/showthread.ph...er+Sided+Money
Ok TnX + Rep
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)