16.11.2016, 19:18
If I'm reading it right, the way you have it set up to remove the player's money is instead of subtracting the amount from the total money he has, you're negating the value rather than removing it from their total money. Negating the value basically changes the amount given to the negative equivalent (i.e. Negating 10 would make it -10, not 0). Also the way GivePlayerMoney is named isn't accurate as it just sets the player's money to that amount rather than adding or subtracting from their total.
The way you'll want to do it is getting the player's current money amount via GetPlayerMoney and subtract from that and do the same with the receiving player but add the amount rather than subtract.
The way you'll want to do it is getting the player's current money amount via GetPlayerMoney and subtract from that and do the same with the receiving player but add the amount rather than subtract.
pawn Код:
GivePlayerMoney(playerid,GetPlayerMoney(playerid)-amount);
GivePlayerMoney(id,GetPlayerMoney(id)+amount);