Centering dialog lines
#1

So basically "\\c" centers the line in the dialog, for some reason, the last few lines don't center.. from "Level 4 Commands"

PHP Code:
ShowPlayerDialog(playeridDIALOG_AHELPDIALOG_STYLE_MSGBOX"\\cAdmin Help""\\c{FF0000}NOTE: {FFFFFF} You do not have access to higher level commands if you are a lower level.\n\n\\c{FFFF00}Level 1 Commands{FFFFFF}\n\\c/kick, /goto, /achat, /aduty, /ahelp\n\n\\c{FFFF00}Level 2 Commands{FFFFFF}\n\\cN/A\n\n\\c{FFFF00}Level 3 Commands{FFFFFF}\n\\c/ban, /givemoney\n\n\\c{FFFF00}Level 4 Commands{FFFFFF}\n\\c/setscore\n\n\\c{FFFF00}Level 5 Commands{FFFFFF}\n\\c/setadmin""Close"""); 
Reply
#2

be cuse using this \n\ well act like you push enter !
i mean
like
"Something\nsomthing"
"SomeThing\n\
Something"
so using \n\\c will be have some problems
Reply
#3

It depends on how you write the new line characters actually. Doing this it should work:
PHP Code:
ShowPlayerDialog(x999DIALOG_STYLE_MSGBOX"\\cAdmin Help",
    
"\\c{FF0000}NOTE: {FFFFFF} You do not have access to higher level commands if you are a lower level.\n \n\
    \\c{FFFF00}Level 1 Commands{FFFFFF}\n\
    \\c/kick, /goto, /achat, /aduty, /ahelp\n \n\
    \\c{FFFF00}Level 2 Commands{FFFFFF}\n\
    \\cN/A\n \n\
    \\c{FFFF00}Level 3 Commands{FFFFFF}\n\
    \\c/ban, /givemoney\n \n\
    \\c{FFFF00}Level 4 Commands{FFFFFF}\n\
    \\c/setscore\n \n\
    \\c{FFFF00}Level 5 Commands{FFFFFF}\n\
    \\c/setadmin"
,
    
"Close"""
); 
Notice that I let a space between double \n\n. I don't know if this is a bug or if that's how it works, ask Ivan_Ino in his thread.
Reply
#4

Quote:
Originally Posted by RIDE2DAY
View Post
It depends on how you write the new line characters actually. Doing this it should work:
PHP Code:
ShowPlayerDialog(x999DIALOG_STYLE_MSGBOX"\\cAdmin Help",
    
"\\c{FF0000}NOTE: {FFFFFF} You do not have access to higher level commands if you are a lower level.\n \n\
    \\c{FFFF00}Level 1 Commands{FFFFFF}\n\
    \\c/kick, /goto, /achat, /aduty, /ahelp\n \n\
    \\c{FFFF00}Level 2 Commands{FFFFFF}\n\
    \\cN/A\n \n\
    \\c{FFFF00}Level 3 Commands{FFFFFF}\n\
    \\c/ban, /givemoney\n \n\
    \\c{FFFF00}Level 4 Commands{FFFFFF}\n\
    \\c/setscore\n \n\
    \\c{FFFF00}Level 5 Commands{FFFFFF}\n\
    \\c/setadmin"
,
    
"Close"""
); 
Notice that I let a space between double \n\n. I don't know if this is a bug or if that's how it works, ask Ivan_Ino in his thread.
Thanks mate, it worked well.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)