07.01.2012, 00:33
lol really....
pawn Код:
CMD:agivecash(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
new id, money, name[MAX_PLAYER_NAME], aname[MAX_PLAYER_NAME];
if(sscanf(params, "ui", id, money)) return SendClientMessage(playerid, 0xCC0000AA, "USAGE: /givecash <id/partofname> <amount>");
GivePlayerMoney(id, money);
GetPlayerName(playerid, aname, sizeof(aname));
GetPlayerName(id, name, sizeof(name));
format(str,sizeof(str), "Admin %s has given you $%d!", aname, money);
SendClientMessage(id, -1, str);
format(str,sizeof(str), "You have given %s $%d!", name, money);
SendClientMessage(playerid, -1, str);
}
else return SendClientMessage(playerid, 0xCC0000AA, "You aren't an admin!");
return 1;
}
CMD:gc(playerid, params[]) return cmd_agivecash(playerid, params);