01.10.2011, 18:37
oh wait, misunderstood. I tought you meant /otvorise and /givemoney.
And don't be so bitchy.
pawn Код:
CMD:givemoney(playerid, params[])
{
if (!IsPlayerAdmin(playerid)) return SendClientMessage(byplayerid, 0xFF0000FF, "Only admins can use this command!");
{
new
playerid,
amount;
if (!sscanf(params, "ui", playerid, amount)) return SendClientMessage(byplayerid, 0xFFFFFFFF, "Usage: /givemoney <player ID/name> <amount>");
{
if (playerid = INVALID_PLAYER_ID) return SendClientMessage(byplayerid, 0xFF0000FF, "Error: no such player");
{
new
message[40];
GivePlayerMoney(playerid, amount);
format(message, sizeof(message), "You got $%d from admin!", amount);
SendClientMessage(playerid, 0x00FF00FF, message);
}
}
}
return 1;
}