GivePlayerMoney Problem
#5

Код:
GivePlayerMoney(playerid,GetPlayerMoney(playerid)-200);
Further Details for anyone who might come across this post with similar problems: The above code doesn't work because GetPlayerMoney(800) - 200 is 600, so it's the same as: GivePlayerMoney(playerid,600);
Thus giving the player $600 on top of what he already has... You must reset the Player's Money in order to get it back to 0, then give the altered money as shown in the code below:

Код:
new money;
money=GetPlayerMoney(playerid);
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid,money-200);
EDIT: Fixed & Explained
Reply


Messages In This Thread
GivePlayerMoney Problem - by BizzyD - 11.04.2011, 12:50
Re: GivePlayerMoney Problem - by CyNiC - 11.04.2011, 12:53
Re: GivePlayerMoney Problem - by aircombat - 11.04.2011, 12:56
Re: GivePlayerMoney Problem - by BizzyD - 11.04.2011, 13:21
Re: GivePlayerMoney Problem - by XGh0stz - 11.04.2011, 13:29
Re: GivePlayerMoney Problem - by BizzyD - 11.04.2011, 13:35
AW: GivePlayerMoney Problem - by xerox8521 - 11.04.2011, 13:37
Re: AW: GivePlayerMoney Problem - by XGh0stz - 11.04.2011, 13:42
Re: GivePlayerMoney Problem - by BizzyD - 11.04.2011, 13:43
Re: GivePlayerMoney Problem - by BizzyD - 11.04.2011, 13:45

Forum Jump:


Users browsing this thread: 3 Guest(s)