/teleports | List item - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /teleports | List item (
/showthread.php?tid=203595)
/teleports | List item -
Mr.Jvxmc - 27.12.2010
Hey, again
I'm noob on Dialogs.
I want make so that player types /teleports thne appears a dialog list ex:
pawn Код:
"Stuntzonez"(player click on that)"AA Airport" "LS Airport"
like so
give me like example, and thne i know how to do this
regards.
Mr.Jvxmc
Re: /teleports | List item -
blackwave - 27.12.2010
Command:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/teles",cmdtext,true,10) == 0)
{
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_LIST, "Choose somewhere", "1. Stunt\n2.Airport","Ok","Cancel");
return 1;
}
return 0;
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 0 && response)
{
if(listitem == 0) return ... // Function
if(listitem == 1) return ... // Function
return 1;
}
return 0;
}
Re: /teleports | List item -
Mr.Jvxmc - 27.12.2010
thanks
Re: /teleports | List item -
Mr.Jvxmc - 27.12.2010
explain some more please
Re: /teleports | List item -
blackwave - 27.12.2010
Click here
and
here
Re: /teleports | List item -
Mr.Jvxmc - 27.12.2010
I don't get it
Re: /teleports | List item -
Mr.Jvxmc - 27.12.2010
but if i make like so
like in here
but only tele sys
Re: /teleports | List item -
Mr.Jvxmc - 27.12.2010
pls help
Re: /teleports | List item - [L3th4l] - 27.12.2010
pawn Код:
ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "Teleports", "Los Santos\nSan Fierro\nLas Venturas", "Teleport", "Close");
OnDialogResponse(...)
{
if(dialogid == DIALOGID)
{
switch(listitem) // Switching between items in the dialog list - Currently, only 3 items
{
case 0: SetPlayerPos(playerid, LOS SANTOS COORDINATES);
case 1: SetPlayerPos(playerid, SAN FIERRO COORDINATES);
case 2: SetPlayerPos(playerid, LAS VENTURAS COORDINATES);
}
}
return 1;
}
Re: /teleports | List item -
Mr.Jvxmc - 27.12.2010
Quote:
Originally Posted by [L3th4l]
pawn Код:
ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "Teleports", "Los Santos\nSan Fierro\nLas Venturas", "Teleport", "Close");
OnDialogResponse(...) { if(dialogid == DIALOGID) { switch(listitem) // Switching between items in the dialog list - Currently, only 3 items { case 0: SetPlayerPos(playerid, LOS SANTOS COORDINATES); case 1: SetPlayerPos(playerid, SAN FIERRO COORDINATES); case 2: SetPlayerPos(playerid, LAS VENTURAS COORDINATES); } } return 1; }
|
No, i mean like There are list
Код:
Stuntzones
Jumps
Parkours
Misc
Death Matches
So player click on Stuntzones, and there is
Код:
AA Airport
LS Airport
SF Airport
Hoover Dam
Mount Chilliad
i mean so