OnPlayerSpawn teleport dialog
#2

I'll try.

Код:
public OnPlayerSpawn(playerid)
{
	ShowPlayerDialog(playerid,DIALOG_ID_TELEPORT,DIALOG_STYLE_LIST,"Teleport","Select your teleport:\n1. Option 1\n2. Option 2\n3. Option 3","Ok","Cancel");
	return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) 
{
	if(dialogid == DIALOG_ID_TELEPORT)
	{
		switch(listitem)
		{
			case 0:
			{
				SetPlayerPos(playerid,posx,posy,posz);
				SendClientMessage(playerid,-1,"TPed to Option 1!");
			}
			case 1:
			{
				SetPlayerPos(playerid,posx,posy,posz);
				SendClientMessage(playerid,-1,"TPed to Option 2!");
			}
			case 2:
			{
				SetPlayerPos(playerid,posx,posy,posz);
				SendClientMessage(playerid,-1,"TPed to Option 3!");
			}
		}
	}
	return 1;
}
and add
Код:
#define DIALOG_ID_TELEPORT 1500
Reply


Messages In This Thread
OnPlayerSpawn teleport dialog - by Tjermon - 01.01.2014, 18:49
Re: OnPlayerSpawn teleport dialog - by driftg0d - 01.01.2014, 18:54
Re: OnPlayerSpawn teleport dialog - by Tjermon - 01.01.2014, 19:03
Re: OnPlayerSpawn teleport dialog - by driftg0d - 01.01.2014, 20:15

Forum Jump:


Users browsing this thread: 1 Guest(s)