MSG dialog box!
#1

Hello, I made a dialog box, but how can i make a bigger box with more text? i got this now:

ShowPlayerDialog(playerid,10,DIALOG_STYLE_MSGBOX," Server Rules:","Don't use Hacks/Cheats\nDon't Spamming/Insulting/Discriminate\nDon't abuse bugs or commands!\nDon't dm outside the dmzone!\nDon't ask for admin levels\nBreaking Rules = Warn > Ban\n","Agree","Disagree");

When i add more things, I get a error that the line is to long...
??
Reply
#2

One solution is to cut the string is smaller parts and join those parts together with format:

pawn Код:
new s1[] = "first part of the looooooooooooooong string";
new s2[] = "second part of the loooooooooooong string";
   
new s[1024];
format(s, sizeof s, "%s%s", s1, s2);

ShowPlayerDialog(playerid,10,DIALOG_STYLE_MSGBOX,"Server Rules:",s,"Agree","Disagree");
Another solution is to put the long string in a text file and fread it. You choose.
Reply
#3

lol wtf? can you give a example of it? I tried someshit but didn't work...
Thats not clear for me :P
Reply
#4

pawn Код:
ShowPlayerDialog(playerid,10,DIALOG_STYLE_MSGBOX,"Server Rules:","Don't use Hacks/Cheats\nDon't Spamming/Insulting/Discriminate\nDon't abuse bugs or commands!\nDon't dm outside the dmzone!\nDon't ask for admin levels\nBreaking Rules = Warn > Ban\n","Agree","Disagree");
is the same as
pawn Код:
ShowPlayerDialog(playerid,
10,DIALOG_STYLE_MSGBOX,"Server Rules:",
"Don't use Hacks/Cheats\nDon't Spamming/Insulting/Discriminate\nDon't abuse bugs or commands!\nDon't dm outside the dmzone!\nDon't ask for admin levels\nBreaking Rules = Warn > Ban\n",
"Agree","Disagree");
Reply
#5

Lol yeah this not what i mean I want to make a carlist, so I need something like this:
Код:
	if (strcmp(cmdtext, "/carlist", true) == 0)
	{
ShowPlayerDialog(playerid,5,DIALOG_STYLE_MSGBOX,"Server Rules:",
"A list with vehicle names/ids usage /car to get them!\n",
"sultan 560\nInfernus 411\nTurismo 451 \nSuperGT 506\nFlash  565\n",
"Hotknife 434\n",
"Next","Close");
return 1;
}
ofc this doesnt works, how i can do it then?
Reply
#6

You got it wrong.

pawn Код:
ShowPlayerDialog(playerid, 10, DIALOG_STYLE_MSGBOX, "Server Rules:", "Don't use Hacks/Cheats\nDon't Spamming/Insulting/Discriminate\
\nDon't abuse bugs or commands!\nDon't dm outside the dmzone!\
\nDon't ask for admin levels\nBreaking Rules = Warn > Ban\n"
, "Agree", "Disagree");
Reply
#7

Ok thanks!
Reply
#8

Man I'm sorry but it doesnt work:
Код:
 		ShowPlayerDialog(playerid, 400, DIALOG_STYLE_MSGBOX, "Vehicle Commmads,", "/nos /nitro    - Get Nitro on your car!\
		\n/car [name]    - Spawn a vehicle.\
		\n/Tune       - Tune your vehicle. \
		\n/flip       - Flip your vehicle. \
		\n/repair      - Repairs the visual damage on a vehicle \
		\n/sultan      - Spawn a tuned Sultan\
		\n/nrg       - Create a personaly Nrg-500 \
		\n/lock /unlock   - Unlock or Lock your Vehicle \
		\n/parachute    - Get a parachute \
		\n/carlist     - Get a list with vehicle names and IDs\n", "Ok");
Reply
#9

Re-read my post please, i've edited it since. These are the only 2 solutions, as far as i know.
Reply
#10

Quote:
Originally Posted by 0rb
One solution is to cut the string is smaller parts and join those parts together with format:

pawn Код:
new s1[] = "first part of the looooooooooooooong string";
new s2[] = "second part of the loooooooooooong string";
   
new s[1024];
format(s, sizeof s, "%s%s", s1, s2);

ShowPlayerDialog(playerid,10,DIALOG_STYLE_MSGBOX,"Server Rules:",s,"Agree","Disagree");
Another solution is to put the long string in a text file and fread it. You choose.
hmm why bother with format, just use strcat .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)