03.04.2015, 01:30
Try this.
PHP код:
CMD:givemoney(playerid, params[])
{
new targetplayer, amount;
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "SERVER: Unknown command.");
if(sscanf(params, "dd", targetplayer, amount)) return SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /givemoney [ID] [AMOUNT]");
if(!IsPlayerConnected(targetplayer)) return SendClientMessage(playerid, COLOR_RED, "ERROR: Player is not connected!");
new string[100];
GivePlayerMoney(targetplayer, amount);
format(string, sizeof(string), "An admin gave you $%d", amount);
SendClientMessage(playerid, COLOR_GREEN, string);
return 1;
}