Raised This Month: $32 Target: $400
 8% 

New line in chat/center/ShowStatus


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 04-19-2017 , 06:04   New line in chat/center/ShowStatus
Reply With Quote #1

Is it possible? I've seen new line being possible in center message at least on one server.
I've tried with \n on center message with no luck. How to do it? And how about the others? Proof:
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
PartialCloning
Senior Member
Join Date: Dec 2015
Old 04-19-2017 , 09:13   Re: New line in chat/center/ShowStatus
Reply With Quote #2

Code:
^n
PartialCloning is offline
redivcram
Veteran Member
Join Date: Jul 2014
Location: Serbia
Old 04-19-2017 , 09:52   Re: New line in chat/center/ShowStatus
Reply With Quote #3

^

PHP Code:
client_print(idprint_center"An enemy is near you!^nAn enemy is near you!"); 
redivcram is offline
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 04-19-2017 , 11:28   Re: New line in chat/center/ShowStatus
Reply With Quote #4

PHP Code:
client_print(clientprint_center"Some^rSome"); 
Or
PHP Code:
message_begin(MSG_ONESVC_CENTERPRINT_client);
write_string("Some^nSome");
message_end(); 
__________________
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 04-19-2017 , 14:14   Re: New line in chat/center/ShowStatus
Reply With Quote #5

Basically you use ^r instead of ^n in center messages.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 04-19-2017 , 14:28   Re: New line in chat/center/ShowStatus
Reply With Quote #6

Thanks. How about ShowStatus text? The shit that shows "Friend: Bla Health: 100%". Is it possible to new line it too?
Edit: also, the chat?
__________________

Last edited by georgik57; 04-19-2017 at 14:32.
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 04-19-2017 , 14:49   Re: New line in chat/center/ShowStatus
Reply With Quote #7

For the chat, simply display another chat message. For ShowStatus - if none of the regular "tricks" don't work (^n, ^r), you probably can't.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
PartialCloning
Senior Member
Join Date: Dec 2015
Old 04-19-2017 , 15:48   Re: New line in chat/center/ShowStatus
Reply With Quote #8

Quote:
Originally Posted by OciXCrom View Post
Basically you use ^r instead of ^n in center messages.
Not really. ^n works for me using engclient_print. Like PRoSToTeM@ mentioned it seems to depend on what method you use to print the message.
PartialCloning is offline
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 04-19-2017 , 15:50   Re: New line in chat/center/ShowStatus
Reply With Quote #9

Quote:
Originally Posted by PartialCloning View Post
Not really. ^n works for me using engclient_print.
Yep, engclient_print uses svc_centerprint. I forgot about engclient_print, it is more clear than sending svc_centerprint.
__________________

Last edited by PRoSToTeM@; 04-19-2017 at 15:52.
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 04-19-2017 , 16:09   Re: New line in chat/center/ShowStatus
Reply With Quote #10

Regarding multiple chat messages, it's not a good idea to spam MSG_ONE messages. They can easily overflow the client. Is there no way at all of making it go to the next line?

Are there any other special characters like ^n and ^r new-line related?

Would trying them both at once make any difference? If yes, which one of them should be first?

I've read the titles.txt and resource/cstrike_english.txt files and they seem to be using \n only for new lines.
I know that in AMXX, \ is used to mark the continuation of a line, no matter if it is located inside a string or not, so I'm guessing that when I'm trying to send "An enemy is near you!\nAn enemy is near you!" AMXX messes with it?
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:05.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode