How to get more text for ShowPlayerDialog?
#1

Some of you may know that when you have too much text on the function " ShowPlayerDialog ", you get the error
pawn Код:
error 075: input line too long (after substitutions)
My question is how I can make it so I can get more words, lines and spaces all in ONE dialog box and not have to make a command like /page2 /page3 or some shit like that, AND so I don't have to create a text draw?

Thanks.
Reply
#2

pawn Код:
new DialogText[256];
    strcat(DialogText, "Text .....");
    strcat(DialogText, "text....");
    strcat(DialogText, "text...");
    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "Test Dialog", DialogText, "Ok", "Cancel");
Look how I did in my admin system:
pawn Код:
new DialogText[768];
    strcat(DialogText, "{FF0000}Level 1{FFFFFF} /say /jail /unjail /freeze /unfreeze /slap /mute /unmute /jetpack /ahideout /ip\n");
    strcat(DialogText, "{FF0000}Level 2{FFFFFF} /kick /announce /drop /godmode /megajump /eject /spawn\n");
    strcat(DialogText, "{FF0000}Level 3{FFFFFF} /goto /gethere /rape /killplayer /explode /ban /sethealth /setarmour\n");
    strcat(DialogText, "{FF0000}Level 4{FFFFFF} /healall /armourall /disarm /banip /unbanip\n");
    strcat(DialogText, "{FF0000}Level 5{FFFFFF} /setlevel /kickall /gmx\n");
    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "Admin Commands", DialogText, "OK", "");
I used \n for new line
Reply
#3

768 is a bit high for your admin function. All you need are 402.

http://www.lettercount.com is a great site that lets you count characters
Reply
#4

Quote:
Originally Posted by Krx17
Посмотреть сообщение
768 is a bit high for your admin function. All you need are 402.

http://www.lettercount.com is a great site that lets you count characters
I put here 768 because that dialog will be updating close every week so soon I get those 768.
Ty anyway on link
Reply
#5

Quote:
Originally Posted by Inteso
Посмотреть сообщение
pawn Код:
new DialogText[256];
    strcat(DialogText, "Text .....");
    strcat(DialogText, "text....");
    strcat(DialogText, "text...");
    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "Test Dialog", DialogText, "Ok", "Cancel");
Look how I did in my admin system:
pawn Код:
new DialogText[768];
    strcat(DialogText, "{FF0000}Level 1{FFFFFF} /say /jail /unjail /freeze /unfreeze /slap /mute /unmute /jetpack /ahideout /ip\n");
    strcat(DialogText, "{FF0000}Level 2{FFFFFF} /kick /announce /drop /godmode /megajump /eject /spawn\n");
    strcat(DialogText, "{FF0000}Level 3{FFFFFF} /goto /gethere /rape /killplayer /explode /ban /sethealth /setarmour\n");
    strcat(DialogText, "{FF0000}Level 4{FFFFFF} /healall /armourall /disarm /banip /unbanip\n");
    strcat(DialogText, "{FF0000}Level 5{FFFFFF} /setlevel /kickall /gmx\n");
    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "Admin Commands", DialogText, "OK", "");
I used \n for new line
Ah, thanks a lot
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)