Admin report dialog
#1

I want to make it to where when a player makes a /report, it gets their input text and updates the admin dialog, adding a new line to it with their input text and when the admin selects it, it will set the player that made the report's "Bit1_Set(g_Report, playerid, false);" so they can make another one and delete the input text for the report from the admin dialog. Can someone help me with that I already have?

pawn Код:
if(dialogid == 10) { // Admin dialog
        if(!response) return 0;
        switch(listitem){
            }
            case 1:{
                ShowPlayerDialog(playerid,15,2,"Admin panel"," REPORTS SHOW UP HERE ","Select","Cancel");
            }
Report CMD

pawn Код:
CMD:report(playerid, params[]){ // report CMD used by player
    if(Bit1_Get(g_Report, playerid) == 1) {
        ShowPlayerDialog(playerid,9,1,"Report", "What do you need assistance with?","Submit", "Cancel");
    }
    else SendClientMessage(playerid,COLOR_RED,"You've already reported!");
    return 1;
}
pawn Код:
if(dialogid == 9) {
        if(!response) return 0;
        Bit1_Set(g_Report, playerid, true);
        new text = (strval(inputtext));
        // update dialog 15 with inputtext
        SendClientMessage(playerid, -1, "You have successfully made a report!");
        return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)