OnPlayerSpawn teleport dialog
#1

Hello guys any one can make a OnPlayerSpawn teleport dialog for me?
With 3 places i can name it and make cordinates for it..

Can anyone?
It have to popup when OnPlayerSpawn

Happy new year !
Reply
#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
#3

i will try it now
Reply
#4

Edited: now it should work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)