03.05.2013, 18:16
so i made the report system dialog,i defined everything,when i type /report ingame,it shows the list but when i pick anything it just dissapears the code
Код:
if(dialogid == REPORT_MENU && response) // By mahdi sharawi
{
switch(listitem)
{
case 0: // report A Player
{
ShowPlayerDialog(playerid,REPORT_PLAYER,DIALOG_STYLE_INPUT ,"Who would you like to report?","Please Insert The Player's name and the Report","Report","Cancel");
}
case 1: // Talk to an admin
{
ShowPlayerDialog(playerid,REPORT_TALK,DIALOG_STYLE_INPUT ,"Which Admin would you like to talk to?","Please Write the admin here","Report","Cancel");
}
case 2: // Report a Bug
{
ShowPlayerDialog(playerid,REPORT_BUG,DIALOG_STYLE_INPUT ,"Report a Bug","Please Insert the bug Description","Report","Cancel");
}
case 3: // Request a Refund
{
new refund[128];
format(refund, sizeof(refund), "%s Is requesting a refund!", GetPlayerNameEx(playerid));
ABroadCast(COLOR_REPORT, refund, 2);
}
}
}
if(dialogid == REPORT_PLAYER)
{
new report[128];
new reported = strlen(inputtext);
format(report, sizeof(report), "[REPORT] %s Has Reported %s", GetPlayerNameEx(playerid), GetPlayerNameEx(reported));
ABroadCast(COLOR_REPORT, report, 2);
JustReported[playerid]=25;
SendClientMessage(playerid, COLOR_WHITE, "Your report has been Successfuly Sent!");
return 1;
}
if(dialogid == REPORT_TALK)
{
new talk[128];
new admin = strlen(inputtext);
format(talk, sizeof(talk), "[Private-Report]%s Would like to talk to You", GetPlayerNameEx(playerid));
SendClientMessage(admin, COLOR_REPORT, talk);
JustReported[playerid]=25;
return 1;
}
if(dialogid == REPORT_BUG)
{
new bugreporter[MAX_PLAYER_NAME];
new bug[128];
format(bugreporter, sizeof(bugreporter), "Name: %s", GetPlayerNameEx(playerid));
format(bug, sizeof(bug), "Bug: %s", inputtext);
new File: fileToWrite = fopen("BugReports.txt", io_append);
fwrite(fileToWrite,"[BUG REPORT]/r/n");
fwrite(fileToWrite, bugreporter);
fwrite(fileToWrite, bug);
fclose(fileToWrite);
return 1;
}


not sure if its what you want though
