12.09.2011, 16:55
pawn Код:
CMD:pagar(playerid, params[])
{
new id,sendername[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME], string[128];
if(sscanf(params,"ui", id, Cash)) return SendClientMessage(playerid, COLOR_GREY,"USAGE: /givemoney [playerid/partofname] [ammount]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_GREY,"Invalid player ID");
else
{
GivePlayerMoney(id, Cash);
GetPlayerName(playerid,sendername,sizeof(sendername));
GetPlayerName(id,name,sizeof(name));
format(string,sizeof(string),"Ofereceste a %s uma quantia de %d euros.", name, Cash);
SendClientMessage(id, COLOR_YELLOW, string);
format(string,sizeof(string),"Recebeste uma quantia de %d de %s", Cash, sendername);
SendClientMessage(id, COLOR_YELLOW, string);
}
return 1;
}