How to make a /bugreport CMD [REP ++]
#5

pawn Код:
// the command
CMD:bugreport(playerid, params[])
{
    ShowPlayerDialog(playerid, 1212, DIALOG_STYLE_INPUT, "Describe the bug", "Please provide us more information with the bug then click Submit", "Submit", "Close");
    return 1;
}
// the Dialog response
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1212)
    {
        if(response)
        {
            new File:Bugs = fopen("Logs/Bugs.txt", io_append); // change accordingly
            new pName[MAX_PLAYER_NAME], Str[256];
            GetPlayerName(playerid, pName, sizeof(pName));
            format(Str, sizeof(Str), "%s Has Reported The Following Problem : %s", pName, inputtext);
            fwrite(Bugs, Str);
            fclose(Bugs);
            SendClientMessage(playerid, -1, "your bug has been submitted successfully
        }
    }
    return 1;
}
NOTE: i didn't compile the script so if you have any errors tell me

And please this is not a place for asking scripts.

EDIT: I was too late.
Reply


Messages In This Thread
How to make a /bugreport CMD [REP ++] - by NinjaChicken - 12.09.2012, 07:40
Re: How to make a /bugreport CMD [REP ++] - by Roach_ - 12.09.2012, 08:07
Re: How to make a /bugreport CMD [REP ++] - by NinjaChicken - 12.09.2012, 09:01
Re: How to make a /bugreport CMD [REP ++] - by Roach_ - 12.09.2012, 09:16
Re: How to make a /bugreport CMD [REP ++] - by Glint - 12.09.2012, 09:18

Forum Jump:


Users browsing this thread: 2 Guest(s)