/cmds help
#1

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)
Reply
#2

Is it a dialog, or a SendClientMessage?
Reply
#3

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");

Reply
#4

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.
Reply
#5

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;
Reply
#6

Read the Wiki, all you need is there: https://sampwiki.blast.hk/wiki/ShowPlayerDialog
Reply
#7

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;
Reply
#8

Ah sorry, I tough it's not that long, Use what konstantinos said
Reply
#9

@Clad i want example to add "Next Page" ?
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)