pawn Код:
CMD:pagar(playerid, params[])
{
new id,sendername[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME], string[128];
new Cash;
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;
}
Me corrijam se estiver errado, mais acho que й isso.
@EDIT: ou tenta assim уh
pawn Код:
CMD:pagar(playerid, params[])
{
new id,sendername[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME], string[128];
new Cash;
if(sscanf(params,"ui", id, Cash))
{
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_GREY,"Invalid player ID");
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;
}
else
{
SendClientMessage(playerid, COLOR_GREY,"USAGE: /givemoney [playerid/partofname] [ammount]");
return 1;
}
}