Right Callback for Updating Money?
#6

pawn Код:
public OnPlayerUpdate(playerid)
{
    if(GetPlayerMoney(playerid) != yourMoneyVariable[playerid])
        return OnPlayerMoneyChange(playerid, GetPlayerMoney(playerid), yourMoneyVariable[playerid]), 1;

    return 1;
}

forward OnPlayerMoneyChange(playerid, newmoney, oldmoney);
public OnPlayerMoneyChange(playerid, newmoney, oldmoney)
{
    // Do stuff
    return 1;
}
That should work fine. You can also use it for anticheat and stuff.
Reply


Messages In This Thread
Right Callback for Updating Money? - by Minion - 22.07.2012, 09:21
Re: Right Callback for Updating Money? - by Rudy_ - 22.07.2012, 09:24
Re: Right Callback for Updating Money? - by Kindred - 22.07.2012, 09:25
Re: Right Callback for Updating Money? - by Rudy_ - 22.07.2012, 09:26
Re: Right Callback for Updating Money? - by Kindred - 22.07.2012, 09:28
Re: Right Callback for Updating Money? - by Vince - 22.07.2012, 09:39
Re: Right Callback for Updating Money? - by Minion - 22.07.2012, 11:10

Forum Jump:


Users browsing this thread: 2 Guest(s)