[HELP] 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Dialog (
/showthread.php?tid=198191)
[HELP] Dialog - Larsey123IsMe - 11.12.2010
How can i change it so i need to press at "The Commands", then the other "COMMAND" show, Like this:
1. Click on playerID
2. Then
THIS! show up
3. After you clicked on "MY COMMANDS"
4. Then should
THIS! show
pawn Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
if(IsPlayerAdmin(playerid))
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "COMMAND?", "COMMAND\nCOMMAND\nCOMMAND\nCOMMAND\nCOMMAND\nCOMMAND\nCOMMAND\nCOMMAND\nCOMMAND\nCOMMAND\nCOMMAND\nCOMMAND\nCOMMAND", "ok", "Cancel");
new id = strval(tmp);
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,0xFF0000FF,"Invalid ID");
}
return 0;
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
{
switch(dialogid)
{
case 1:
{
switch(listitem)
{
case 0:
{
//my command
}
case 1:
{
//my command
}
case 2:
{
//my command
}
case 3:
{
//my command
}
case 4:
{
//my command
}
case 5:
{
//my command
}
case 6:
{
//my command
}
case 7:
{
//my command
}
case 8:
{
//my command
}
case 9:
{
//my command
}
case 10:
{
//my command
}
case 11:
{
//my command
}
case 12:
{
//my command
}
}
}
}
}
return 1;
}
Re: [HELP] Dialog - Larsey123IsMe - 11.12.2010
I have searched on ******/forum/wiki dont dont find anything =/ soo, you know how to fo this?
Re: [HELP] Dialog -
Lynn - 11.12.2010
I'm not quite sure what you're wanting.
Please explain a bit better.
Re: [HELP] Dialog - Larsey123IsMe - 11.12.2010
My english isent soo goo so IDK how to explain it better...
ClickOnPlyer ---> "The Commands" ---> "Commad"
---------------------------------------"Commad"
Re: [HELP] Dialog -
WillyP - 11.12.2010
Oh, that's easy.
Just make dialogs spawn under dialog responses.
Re: [HELP] Dialog -
Lynn - 11.12.2010
Yes, under each response, do anther:
Dialog, with the information you want.
Re: [HELP] Dialog -
XePloiT - 11.12.2010
pawn Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
if(IsPlayerAdmin(playerid))
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "COMMAND?", "MyCommands", "ok", "Cancel");
new id = strval(tmp);
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,0xFF0000FF,"Invalid ID");
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid==1) ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "COMMAND?", "Command\n.....", "ok", "Cancel");
else if(dialogid==2)
{
//all the commands
}
return 1;
}