How can I store someones cash and then give it back?
#3

Quote:
Originally Posted by Deroxi
Посмотреть сообщение
Make a function for SetPlayerMoney:
PHP код:
new moneyfirst[MAX_PLAYERS];
stock SetPlayerMoney(playerid,moneyafter) {
 
moneyfirst[playerid]=moneyafter;
 
GivePlayerMoney(playerid,moneyafter-GetPlayerMoney(playerid));

Credits to DracoBlue^

Then make the command with: targetid & amount.
What..? I don't think thats what I'm looking for.
What I want is to do something like this:

Код:
cmd:dosomething(playerid)
{
    command lines and stuff here...
    something to get and store the victim's ID current money here...
    ResetPlayerMoney(ID);
    return 1;
}

cmd:undosomething(playerid)
{
    command lines and stuff here...
    something to give the stored money from the other command back to the victim's ID here...
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)