SA-MP Forums Archive
Scripting help - 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: Scripting help (/showthread.php?tid=523624)



Scripting help - kirostar - 03.07.2014

I want to do "Next Page" in dialog, it's /cmds and it is too long

please give me example how to make "Next Page"


Re: Scripting help - Stinged - 03.07.2014

You make a button that says 'Next Page' and then when the player clicks it (response or !response), it will show a new dialog having the commands.


Re: Scripting help - kirostar - 03.07.2014

Yes, I know but please give me a code example?


Re: Scripting help - greentarch - 03.07.2014

pawn Код:
#define DIAG_CMDS1 (667)
#define DIAG_CMDS2 (668)
#define DIAG_CMDS3 (669)

CMD:cmds(playerid, params[]) {
    ShowPlayerDialog(playerid, DIAG_CMDS1, DIALOG_STYLE_LIST, "Commands", "/shit\n/pee\n/die\n/kill", "Next page", "Cancel");
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
    if (response) {
        switch (dialogid) {
            case DIAG_CMDS1:
                ShowPlayerDialog(playerid, DIAG_CMDS2, DIALOG_STYLE_LIST, "Commands-2", "page 2\nempty", "Next page", "Cancel");
            case DIAG_CMDS2:
                ShowPlayerDialog(playerid, DIAG_CMDS3, DIALOG_STYLE_LIST, "Commands-3", "page 3\nwhatcha lookin for", "Okay", "");
        }
    }
    return 1;
}



Re: Scripting help - kirostar - 03.07.2014

Ok here is my code of /cmds

how to make that in the next page :

/veh - to spawn a car

Код:
CMD:cmds (playerid)
{
	new bigstring[3000];
    strcat(bigstring, "{FCFFC3}Commands:\n");
    strcat(bigstring, "{6EAAFF}/teleports (/teles) -{FF0000} Command to show all teleports\n");
	ShowPlayerDialog(playerid, DIALOG_CMDS, DIALOG_STYLE_MSGBOX, ""RED"[EsF]Server Commands", bigstring, "OK", "Next Page");
	return 1;
}



Re: Scripting help - kirostar - 03.07.2014

Help Please


Re: Scripting help - kirostar - 03.07.2014

helpp