SA-MP Forums Archive
[Tutorial] Rules Dialog! - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Tutorial] Rules Dialog! (/showthread.php?tid=235402)



[Tutorial] Rules Dialog! - bestr32 - 05.03.2011

First Find OnPlayerCommandText Callback
and
rename /mycommand to /rules
than delete that //Do something here
Type in the following:
Код:
ShowPlayerDialog(playerid, 10, DIALOG_STYLE_LIST, "Rules", "Never try to cheat\nNever ask admins we choose admins", "OK.", "Leave");
OK. Till we've made that.Now find public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])

add

Код:
	if(dialogid == 10)
	{
		if(response)
		{
		  SendClientMessage(playerid,0x008000FF, "OK. Glad u will understand rules!");
		}
		else
		{
		  SendClientMessage(playerid, 0xFF0000FF, "You selected 'Leave', for that don't understandrules, kick!");
		  Kick(playerid);
		}
		return 1;
	}
Easy wasn't it?


Re: [Tutorial] Rules Dialog! - bestr32 - 05.03.2011

We need #define color 0x008000FF and #define color2 0xFF0000FF also
xD maybe we won't need .. I don't know I am a little clucker sorry.


Re: [Tutorial] Rules Dialog! - bestr32 - 05.03.2011

No, we won't need define them.


Re: [Tutorial] Rules Dialog! - Markx - 05.03.2011

Dont triple post...


Re: [Tutorial] Rules Dialog! - playbox12 - 05.03.2011

Wrong section.
http://forum.sa-mp.com/forumdisplay.php?f=70

Also, this is not a tutorial, you don't explain what everything does, you just make it a C&P.


Re: [Tutorial] Rules Dialog! - alpha500delta - 05.03.2011

He is adding those tutorials in this section everywhere, and this one is a complete failure because it needs to be DIALOG_STYLE_MSGBOX not DIALOG_STYLE_LIST