GivePlayerCash - On Mod garages.
#4

Only use the array for the mod shop, the rest was just an example. I'll suggest you to use foreach so it loops through the connected players only.

pawn Код:
public MoneyTimer()
{
    new username[MAX_PLAYER_NAME], money;
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            money = GetPlayerMoney(i);
            if(GetPlayerCash(i) != money)
            {
                if (money < Cash[i] && Player_ModShop{i}) Cash[i] = money;
                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 = money - GetPlayerCash(i);
                GetPlayerName(i,username,sizeof(username));
                printf("%s has picked up/attempted to spawn $%d.", username,hack);
            }
        }
    }
}
Reply


Messages In This Thread
GivePlayerCash - On Mod garages. - by CharlieSanchez - 22.04.2014, 13:12
Re: GivePlayerCash - On Mod garages. - by Konstantinos - 22.04.2014, 13:45
Re: GivePlayerCash - On Mod garages. - by CharlieSanchez - 22.04.2014, 13:56
Re: GivePlayerCash - On Mod garages. - by Konstantinos - 22.04.2014, 14:05
Re: GivePlayerCash - On Mod garages. - by CharlieSanchez - 22.04.2014, 14:12
Re: GivePlayerCash - On Mod garages. - by CharlieSanchez - 22.04.2014, 14:35
Re: GivePlayerCash - On Mod garages. - by Konstantinos - 22.04.2014, 14:52
Re: GivePlayerCash - On Mod garages. - by CharlieSanchez - 22.04.2014, 15:51

Forum Jump:


Users browsing this thread: 1 Guest(s)