Givemoney command issue
#1

Guys, I got this command, and it compiles with no errors/warnings:

Код:
COMMAND:givemoney(playerid, params[])
{
	if (IsPlayerAdmin(playerid))
	{
		new
		  toplayerid,
		  amount;
		if (!sscanf(params, "ii", toplayerid, amount))
		{
		    new
		      message[40];
		    GivePlayerMoney(toplayerid, amount);
		    format(message, sizeof(message), "You got $%d from admin!", amount);
		    SendClientMessage(toplayerid, 0x00FF00FF, message);
		  }
		else SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /givemoney <playerid> <amount>");
	}
	else SendClientMessage(playerid, 0xFF0000FF, "Only admins can use this command!");
	return 1;
}
But in game, it always responds with "Usage: /givemoney <playerid> <amount>".
I'm using the command correctly in game: /givemoney 1 200
The admin check is working fine.

Could you please let me know if there is something wrong with the command? Thanks!
Reply


Messages In This Thread
Givemoney command issue - by matje - 04.12.2016, 17:23
Re: Givemoney command issue - by GoldenLion - 04.12.2016, 17:50
Re: Givemoney command issue - by matje - 04.12.2016, 18:14
Re: Givemoney command issue - by AnthonyDaBestt - 04.12.2016, 18:18
Re: Givemoney command issue - by iLearner - 04.12.2016, 18:19
Re: Givemoney command issue - by RyderX - 04.12.2016, 18:26
Re: Givemoney command issue - by matje - 04.12.2016, 18:30
Re: Givemoney command issue - by RyderX - 04.12.2016, 18:32
Re: Givemoney command issue - by AnthonyDaBestt - 04.12.2016, 18:33

Forum Jump:


Users browsing this thread: 3 Guest(s)