Report Help
#5

Quote:
Originally Posted by ******
Посмотреть сообщение
That's only one string parameter, you don't need sscanf for that. Nick_Phelps wanted an ID too.
Sorry for Bumping it but thought of giving him the Right Code.
pawn Код:
CMD:report(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 2 && PlayerInfo[playerid][pAdmin] < 1338)
    {
        SendClientMessageEx(playerid, COLOR_GRAD2, "You can't submit reports as an administrator.");
        return 1;
    }
    if(PlayerInfo[playerid][pRMuted] != 0)
    {
        ShowPlayerDialog(playerid,7955,DIALOG_STYLE_MSGBOX,"Report blocked","You are blocked from submitting any reports!\n\nTips when reporting:\n- Report what you need, not who you need.\n- Be specific, report exactly what you need.\n- Do not make false reports.\n- Do not flame admins.\n- Report only for in-game items.\n- For shop orders use the /onlineshop command","Close", "");
        return 1;
    }
    if(JustReported[playerid] > 0)
    {
        SendClientMessageEx(playerid, COLOR_GREY, "Wait 25 seconds before sending another report!");
        return 1;
    }
    new text[200],id;
    if(sscanf(params,"us[200]",id,text)) return SendClientMessageEx(playerid, COLOR_GRAD2, "USAGE: /report [playerid/partofname] [text]");
 
    JustReported[playerid] = 1;
    SendReportToQue(playerid, text);
    SendClientMessageEx(playerid, COLOR_YELLOW, "Your report message was sent to the Admins On Duty, please wait patiently!");
    return 1;
}
@Nick -
pawn Код:
SendReportToQue(playerid, text);
This function already shows the player's id who has been reported therefore we do need to pass the reported player's id over here. Use the Code given above.
Reply


Messages In This Thread
Report Help - by Nick_Phelps - 05.05.2013, 12:07
Re: Report Help - by Ballu Miaa - 05.05.2013, 13:08
Re: Report Help - by Nick_Phelps - 05.05.2013, 14:31
Re: Report Help - by kamzaf - 05.05.2013, 16:21
Re: Report Help - by Ballu Miaa - 16.07.2013, 16:27
Re: Report Help - by Tihoy232 - 04.04.2018, 05:52

Forum Jump:


Users browsing this thread: 1 Guest(s)