24.05.2009, 22:52
Ok, I've another similar problem now.
This is meant to get the 'cashsend' (The amount is set in the command) and transfer it from playerid's bank account to giveplayerid's.
Giveplayerid gets the cash ... playerid loses too much.
pawn Code:
BankCash[giveplayerid] = dUserINT(PlayerName(giveplayerid)).("bankcash");
new Total = cashsend + BankCash[giveplayerid];
dUserSetINT(PlayerName(giveplayerid)).("bankcash", Total);
BankCash[giveplayerid]=Total;
new Minus = BankCash[playerid] - cashsend;
BankCash[playerid]=Minus;
dUserSetINT(PlayerName(playerid)).("bankcash", Minus);
Giveplayerid gets the cash ... playerid loses too much.