04.12.2016, 17:23
Guys, I got this command, and it compiles with no errors/warnings:
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!
Код:
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;
}
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!

