Dialog
#1

Hi all, this is my problem with dialog, i'm trying to set up a dialog so players can see their commands so i did first one witch is great but the another one doesn't work. I mean, When I type /amoderator, it shows me the dialog with commands but when i type /amoderator2 it shows me the same dialog....any Help?

Код:
if (strcmp("/amoderator", cmdtext, true, 10) == 0)
	{
		new dialog[500];
  		strcat(dialog,"Admin prнkazy:\n\n");
		strcat(dialog,"Moderбtor\n\n");
		strcat(dialog,"/weaps\n");
		strcat(dialog,"/ping\n");
		strcat(dialog,"/ip\n");
		strcat(dialog,"/fix\n");
		strcat(dialog,"/repair\n");
		strcat(dialog,"/addnos\n");
		strcat(dialog,"/tcar\n");
		strcat(dialog,"/saveplace\n");
		strcat(dialog,"/gotoplace\n");
		strcat(dialog,"/saveskin\n");
		strcat(dialog,"/useskin\n");
		strcat(dialog,"/dontuseskin\n");
		strcat(dialog,"/setmytime\n");
		strcat(dialog,"/adminarea\n");
		strcat(dialog,"/lcinfig\n");
		strcat(dialog,"/viplist\n");
		strcat(dialog,"/morning\n");
		strcat(dialog,"/richlist\n");
		strcat(dialog,"/miniguns\n");
		strcat(dialog,"/amoderator\n");
		strcat(dialog,"\n\nKontakt Majitela: lreskjn@gmail.com");
		ShowPlayerDialog(playerid,125,DIALOG_STYLE_MSGBOX,"kjn's Test Server",dialog,"Sign", "Decline");

		return 1;
 }
 	if (strcmp("/amoderator2", cmdtext, true, 10) == 0)
	{
		new dialog[550];
  		strcat(dialog,"Admin prнkazy:\n\n");
		strcat(dialog,"Moderбtor Level 2\n\n");
		strcat(dialog,"/giveweapon\n");
		strcat(dialog,"setcolour\n");
		strcat(dialog,"/burn\n");
		strcat(dialog,"/spawn\n");
		strcat(dialog,"/disarm\n");
		strcat(dialog,"/highlight\n");
		strcat(dialog,"/jetpack\n");
		strcat(dialog,"/flip\n");
		strcat(dialog,"/fu\n");
		strcat(dialog,"/warn\n");
		strcat(dialog,"/slap\n");
		strcat(dialog,"/(un)mute\n");
		strcat(dialog,"/lspec\n");
		strcat(dialog,"/lspecoff\n");
		strcat(dialog,"/lspecvehicle\n");
		strcat(dialog,"/acar\n");
		strcat(dialog,"/abike\n");
		strcat(dialog,"/aheli\n");
		strcat(dialog,"/aboat\n");
		strcat(dialog,"/aplane\n");
		strcat(dialog,"/goto\n");
		strcat(dialog,"/vgoto\n");
		strcat(dialog,"/lgoto\n");
		strcat(dialog,"/lmenu\n");
		strcat(dialog,"/clearchat\n");
		strcat(dialog,"/write\n");
		strcat(dialog,"//announce\n");
		strcat(dialog,"/announce2\n");
		strcat(dialog,"/screen\n");
		strcat(dialog,"/(un)lockcar\n");
		strcat(dialog,"/wanted\n");
		strcat(dialog,"/jailed\n");
		strcat(dialog,"/frozen\n");
		strcat(dialog,"/muted\n");
		strcat(dialog,"/fstyles\n\n");
		strcat(dialog,"Tak isto prнkazy Moderбtora /amoderator\n");
		strcat(dialog,"\n\nKontakt Majitela: lreskjn@gmail.com");
		ShowPlayerDialog(playerid,125,DIALOG_STYLE_MSGBOX,"kjn's Test Server",dialog,"OK", "LogOFF");

		return 1;
 }
Reply
#2

You are using the same Dialog IDs. (125)
Reply
#3

Ohh i see now, what number do you recommend? any?
Reply
#4

You can use any number that you haven't used.
Like, 12987, 31, 13, etc. Just see what Dialog IDs are free.

I usually make defines for them (not sure if I should though) at the top to keep a record, and it is easier to me what the IDs are for.
pawn Код:
#define shopid    1
#define adminmessage    2

//..so on
I am not sure if defines is good for this. I just use them to make it easier and I don't really have much dialogs.
Reply
#5

No, changing the number doesn't worked, it's showing still the same dialog.
Reply
#6

Change it to a DialogID which is not used, a one like 1333.

this may not work, as that DialogID might be used.
Reply
#7

I have only 3 dialogs, I try many different numbers but it still show only the first dialog
Reply
#8

Any one know what's wrong with it?
Reply
#9

Even if I used only a gamemode and the dialogids were not the same, they mixed up and ruin my whole work. After using easydialog by Emmet_, I have no problem at all!

You can find it here: https://sampforum.blast.hk/showthread.php?tid=377140
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)