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

Your PlayerName function should be like that:
pawn Код:
stock PlayerName(playerid)
{
    new Name[MAX_PLAYER_NAME + 1];
    GetPlayerName(playerid, Name, MAX_PLAYER_NAME + 1);
    return Name;
}
The command:
pawn Код:
CMD:report(playerid, params[])
{
    new player1, str[150], reason[66];
    if(sscanf(params,"us[66]", player1, reason)) return SendClientMessage(playerid, 0x009DFFFF,"USAGE:{FFFFFF} /report [ID] [Reason]");
    if(IsPlayerConnected(player1))
    {
        format(str, sizeof(str),"--|New Report|-- %s has reported. Reason: %s", PlayerName(playerid), PlayerName(player1), reason);
        MessageToAdmins(0x006AFFFF, str);
        SendClientMessage(playerid, 0x0080FFFF,"Your report has been sent to all online Admins. Please be patient!");
    }
    else return SendClientMessage(playerid, 0xFF0000FF, "ERROR:{FFFFFF} This player is not connected");
    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)