[Tutorial] Rules Dialog!
#1

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?
Reply
#2

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.
Reply
#3

No, we won't need define them.
Reply
#4

Dont triple post...
Reply
#5

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.
Reply
#6

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)