28.01.2013, 23:48
This should work, i removed your use of the PlayerName(); function from the command as i cannot see how that is coded and to get it to work while testing it was easier to do this method. anyway here is the command
pawn Код:
CMD:report(playerid, params[])
{
new player1, str[150], reason[66], pName[30], p1Name[30];
GetPlayerName(playerid,pName,30);
GetPlayerName(player1,p1Name,30);
if(sscanf(params,"us[66]", player1, reason)) return SendClientMessage(playerid, 0x009DFFFF,"USAGE:{FFFFFF} /report [ID] [Reason]");
if(IsPlayerConnected(player1)) return SendClientMessage(playerid, 0xFF0000FF, "ERROR:{FFFFFF} This player is not connected");
format(str, sizeof(str),"--|New Report|-- %s has reported. Reason: %s", pName, p1Name, reason);
MessageToAdmins(0x006AFFFF, str);
SendClientMessage(playerid, 0x0080FFFF,"Your report has been sent to all online Admins. Please be patient!");
return 1;
}