Error in compiler, when making /report command.
#5

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;
}
Reply


Messages In This Thread
Error in compiler, when making /report command. - by Goldino - 28.01.2013, 18:22
Re: Error in compiler, when making /report command. - by Roach_ - 28.01.2013, 18:28
Re: Error in compiler, when making /report command. - by Goldino - 28.01.2013, 18:30
Re: Error in compiler, when making /report command. - by Roach_ - 28.01.2013, 18:44
Re: Error in compiler, when making /report command. - by daniboi229 - 28.01.2013, 23:48
Re: Error in compiler, when making /report command. - by Threshold - 29.01.2013, 00:33

Forum Jump:


Users browsing this thread: 1 Guest(s)