02.12.2012, 05:57
Hello again! I am trying to make a /setmoney command using ZCMD. Currently, I have:
At the moment, all that it does is give the player a certain amount of money. So if the player had 100 dollars, and I used the command /setmoney [playerid] 200, it would leave the player with 300 dollars. I would like to type in "/setmoney [playerid] 200" and it would set the player's money to 200, no matter what the initial value. Could someone help me with this? From what I checked in my Pawno.exe there is no SetPlayerMoney function. Help would be appreciated. Thank you in advance.
Код:
CMD:setmoney(playerid, params[]) { new target; new money; if(sscanf(params, "ui", target, money)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /setmoney [playerid] [amount]"); { GivePlayerMoney(target, money); return 1; } }