OnPlayerSpawn teleport 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)
+--- Thread: OnPlayerSpawn teleport dialog (
/showthread.php?tid=484829)
OnPlayerSpawn teleport dialog -
Tjermon - 01.01.2014
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

!
Re: OnPlayerSpawn teleport dialog -
driftg0d - 01.01.2014
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
Re: OnPlayerSpawn teleport dialog -
Tjermon - 01.01.2014
i will try it now
Re: OnPlayerSpawn teleport dialog -
driftg0d - 01.01.2014
Edited: now it should work