/cmds 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: /cmds help (
/showthread.php?tid=520121)
/cmds help -
kirostar - 17.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)
Re: /cmds help -
Mey6155 - 17.06.2014
Is it a dialog, or a SendClientMessage?
Re: /cmds help -
Clad - 17.06.2014
You can make a dialog with a lot of lines. use \n to go to next line
Quote:
new mes1[] = "\t\t\t\t\t\t CMDS Help\n\n {F88017}Full list of Cmds.";
new mes2[] = "\n Add cmds";
new mes3[] = "\n Add cmds";
new mes4[] = "\n Add cmds";
new mes5[] = "\n Add cmds";
format(string, sizeof(string),"%s %s %s %s %s",mes1,mes2,mes3,mes4,mes5);
ShowPlayerDialog(playerid, DIALOG_STYLE_MSGBOX,"Server Cmds.",string,"","Thanks");
|
Re: /cmds help -
Konstantinos - 17.06.2014
You can add few command and in the buttons, make the one "Next Page" and the other "Cancel". If in that dialogid, there is response (clicked on next page), show the rest commands.
Re: /cmds help -
kirostar - 17.06.2014
It's a dialog and i want to add "Next Page" how to add it?
Pic:
Code Ex:
Код:
CMD:commands (playerid) return cmd_cmds(playerid);
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", "");
return 1;
Re: /cmds help -
Konstantinos - 17.06.2014
Read the Wiki, all you need is there:
https://sampwiki.blast.hk/wiki/ShowPlayerDialog
Re: /cmds help -
kirostar - 17.06.2014
I'm only don't know how to do "Next Page" can you tell me with that code?
Код:
CMD:cmds (playerid)
{
new bigstring[3000];
strcat(bigstring, "{FCFFC3}Commands:\n");
strcat(bigstring, "{6EAAFF}/teleports (/teles) -{FF0000} Command to show all teleports\n");
strcat(bigstring, "{6EAAFF}/changename -{FF0000} To Change your name (MUST CHANGE IT IN SA-MP CLIENT)\n");
strcat(bigstring, "{6EAAFF}/givemoney (/givecash) -{FF0000} To send money/cash to another player\n");
ShowPlayerDialog(playerid, DIALOG_CMDS, DIALOG_STYLE_MSGBOX, ""RED"[EsF]Server Commands", bigstring, "OK", "");
return 1;
Re: /cmds help -
Clad - 17.06.2014
Ah sorry, I tough it's not that long, Use what konstantinos said
Re: /cmds help -
kirostar - 17.06.2014
@Clad i want example to add "Next Page" ?
Re: /cmds help -
Mey6155 - 17.06.2014
You do this:
ShowPlayerDialog(playerid, DIALOG_CMDS, DIALOG_STYLE_MSGBOX, ""RED"[EsF]Server Commands", bigstring, "OK", "Next");
And then OnResponse If he presses the other button, it will show another dialog, and you do back, it shows this dialog.