SA-MP Forums Archive
How To...[+REP] - 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: How To...[+REP] (/showthread.php?tid=330761)



How To...[+REP] - James Coral - 02.04.2012

How To Make Dialog if player Connect then it give Choise "Where You want do Spawn?" choises: "Home" or "Other places"

it means i need Random Spawns and a Dialog and DialogResponse but i dont know how do make it

Someone?


Re: How To...[+REP] - The__ - 02.04.2012

https://sampwiki.blast.hk/wiki/How_to_Create_a_Dialog
https://sampwiki.blast.hk/wiki/ShowPlayerDialog
https://sampwiki.blast.hk/wiki/OnDialogResponse
Enjoy.


Re: How To...[+REP] - blank. - 02.04.2012

Код:
#define DIALOG_SPAWNCHOICE 1

public OnPlayerConnect(playerid)
	{
	ShowPlayerDialog(playerid,DIALOG_SPAWNCHOICE,DIALOG_STYLE_MSGBOX,
				"Where would you like to spawn?"
				"Home",		"Other places");
	}
public OnDialogResponse(playerid,dialogid,response,listitem,inputtext)
	{
	switch(dialogid)
		{
		case DIALOG_SPAWNCHOICE:
			{
			if(response)
				{
				// Player pressed "Home"
				}
			else
				{
				// Player pressed "Other places"
				}
			}
		}
	}
Here you go.