29.01.2013, 03:12
Well then it's highly recommended you use sscanf for this kind of command.
Download the latest SSCANF include/plugin and add
to the top of your script. Then your command should be:
Download the latest SSCANF include/plugin and add
pawn Код:
#include <sscanf2>
pawn Код:
CMD:givemoney(playerid, params[])
{
new playerb, amount;
if(sscanf(params, "ui", playerb, amount)) return SendClientMessage(playerid, -1, "USAGE: /givemoney [playerid] [amount]");
if(amount <= 0) return SendClientMessage(playerid, -1, "Invalid money amount.");
if(amount > GetPlayerMoney(playerid)) return SendClientMessage(playerid, -1, "You don't have that much money.");
GivePlayerMoney(playerb, amount);
return 1;
}