12.09.2012, 09:18
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;
}
And please this is not a place for asking scripts.
EDIT: I was too late.