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=520968)



Scripting help - kirostar - 21.06.2014

i made /cmds but it's too long and is full height and if i added 1 more command it will not show the other commands, so how to make page 2? with the same command (/cmds) It is a dialog

I know that i must do response but how to it :/

ex:
Код:
CMD:cmds (playerid)
{
new bigstring[3000];
strcat(bigstring, "{FCFFC3}Commands:\n");
ShowPlayerDialog(playerid, DIALOG_CMDS, DIALOG_STYLE_MSGBOX, ""RED"[EsF]Server Commands", bigstring, "OK", "");
return 1;
}



Re: Scripting help - Rittik - 21.06.2014

Код:
CMD:cmds (playerid)
{
new bigstring[3000];
strcat(bigstring, "{FCFFC3}Commands:\n");
ShowPlayerDialog(playerid, DIALOG_CMDS, DIALOG_STYLE_MSGBOX, ""RED"[EsF]Server Commands", bigstring, "Page 2", "Cancel");
return 1;
}
Under OnDialogResponse

Код:
if(dialogid == DIALOG_CMDS)
{
if(response)
{
ShowPlayerDialog(playerid,DIALOG_CMDS1,DIALOG_STYLE_MSGBOX,"Page 2","write something here","Back","Cancel");
}
return 1;
}

if(dialogid == DIALOG_CMDS1)
{
if(response)
{
ShowPlayerDialog(playerid, DIALOG_CMDS, DIALOG_STYLE_MSGBOX, ""RED"[EsF]Server Commands", bigstring, "Page 2", "Cancel");
}
return 1;
}
Do not forget to define DIALOG_CMDS1.