Need Help with /setmoney ZCMD
#1

Hello again! I am trying to make a /setmoney command using ZCMD. Currently, I have:

Код:
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;
	}
}
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.
Reply


Messages In This Thread
Need Help with /setmoney ZCMD - by darkvsoul36 - 02.12.2012, 05:57
Re: Need Help with /setmoney ZCMD - by [HK]Ryder[AN] - 02.12.2012, 05:58
Re: Need Help with /setmoney ZCMD - by darkvsoul36 - 02.12.2012, 06:03

Forum Jump:


Users browsing this thread: 1 Guest(s)