Help with dialog [+REP]
#1

When i write command /help show dialog with 4 pages.

1 page

http://prikachi.com/images.php?images/539/5210539J.png

2 page

http://prikachi.com/images.php?images/540/5210540x.png

3 page

http://prikachi.com/images.php?images/541/5210541j.png

4 page

http://prikachi.com/images.php?images/542/5210542e.png

How to create this dialog?
Reply
#2

Try this might help:
https://sampwiki.blast.hk/wiki/OnDialogResponse
Reply
#3

But gives me error when i add one more 7-8 commands.How to create new line in the dialog,not by "/n"
Reply
#4

This might help
pawn Код:
new str[512];
strcat(str,"Johnsons House (/cj) \nMadd Dogg's Mansion (/mansion) \nAbandones AC tower (/at) \nDenise Bedroom (/denise)");
strcat(str,"\nRyder's House (/ryder) \nBrothel House (/brothel) \nTorreno's Ranch (/torreno) \nJefferson's Motel (/jeff) \nMillie's Bedroom (/millie) \nMichelle Love Nest (/mich)");
strcat(str,"\nSafe House (/safe) \nSafe House 2 (/safe2) \nUnused Safe House (/unsafe)");
strcat(str,"\nBig Smoke Palace (/bigsmoke) \nColonel Furhbers (/colonel)");

ShowPlayerDialog(playerid, DIALOG_HOUSES1, DIALOG_STYLE_LIST,"Houses", str, "Choose", "Back");
Reply
#5

Can you create this for /help command?And how to create other page?
Reply
#6

I'd use the dialog just to navigate (list), but then text draws to display all those commands because of its size. So create a dialog list with sections for your commands and then when the player selects something on the list, use textdraws to display all those commands on the screen. You should also then detect when a player presses a key to destroy those textdraws and return to the dialog list etc.

Bleh, this is kinda advanced stuff though, but just take it one step at a time
Reply
#7

Well, can you give me some code or something because I have no concept of these works, but I need urgently my server without it I can not.
Reply
#8

Please help?
Reply
#9

Eh , first create the first page then, add it to ondialogresponse and if the player pressed Next it shows him a new dialog, etc... it isnt really hard to make
pawn Код:
if(dialogid == D_CMDS1)
    {
        if(response) // Pressing 1st button
        {
            ShowPlayerDialog(playerid, D_CMDS2, ................)
        }
        return 1;
    }
if(dialogid == D_CMDS2)
    {
  ............
and you go as much as you like

read this : https://sampwiki.blast.hk/wiki/OnDialogResponse
Reply
#10

On ".........................." i add the commands?

How to create this dialog on /help command?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)