SA-MP Forums Archive
Dialog Problems - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dialog Problems (/showthread.php?tid=434674)



Dialog Problems - mahdi499 - 03.05.2013

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;
	}



Re: Dialog Problems - DobbysGamertag - 03.05.2013

I've been having the same issues. I'd love to know why. Everything is defined ok. There's no other dialog ID's conflicting right?


i find using y_hooks fixes it for me not sure if its what you want though


Re: Dialog Problems - mahdi499 - 03.05.2013

Quote:
Originally Posted by DobbysGamertag
Посмотреть сообщение
I've been having the same issues. I'd love to know why. Everything is defined ok. There's no other dialog ID's conflicting right?


i find using y_hooks fixes it for me not sure if its what you want though
My problem is based on the Returns,since it just dissapears instead of showing the other dialogs.


Re: Dialog Problems - RandomDude - 03.05.2013

Quote:
Originally Posted by mahdi499
Посмотреть сообщение
My problem is based on the Returns,since it just dissapears instead of showing the other dialogs.
Thats what I thought when my dialog was messing up but it wasn't it was a really simple fix.
Take all the dialogs you are using and if your gamemode has dialogs take that out and then try it as a FILTERSCRIPT with a basic gm it should work.
The dialogs ids are fucking each other.


Re: Dialog Problems - mahdi499 - 03.05.2013

Quote:
Originally Posted by RandomDude
Посмотреть сообщение
Thats what I thought when my dialog was messing up but it wasn't it was a really simple fix.
Take all the dialogs you are using and if your gamemode has dialogs take that out and then try it as a FILTERSCRIPT with a basic gm it should work.
The dialogs ids are fucking each other.
That'd be a great fix,but i have most of my dialogs based on Enums and things in the gamemode which i can't remove,won't work


Re: Dialog Problems - MattyG - 03.05.2013

You could try changing your dialog ids to different (probably higher) values, making less chance of a collision