Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Release Forum » [SSGM 4.0 Plugin] Better MSG Console Command
[SSGM 4.0 Plugin] Better MSG Console Command [message #465479] Wed, 04 April 2012 02:34 Go to next message
iRANian is currently offline  iRANian
Messages: 4300
Registered: April 2011
Karma: 0
General (4 Stars)
This plugin replaces the MESSAGE (alias MSG) console command with a version that will display a coloured message and optionally play a sound for scripts 2.9 and higher players, for other players it will rename a player to PrependString (what you want to replace "Host:" with), show a public chat message, then rename him back to his old nick. I haven't tested it thorougly so this plugin might have bugs. Thanks to StealthEye for giving me the idea and showing it is possible to only show the host message to certain clients, and also for fixing a silly error I made. Wink

You can contact me on renegadeforums.com under the nick iRANian.

Changelog:
v2:
-Added a name changing hack to replace "Host:" with PrependString: for players not running scripts 2.9, effectively removing the "Host: message" crap from the server.

To install place 'BetterMSGConsoleCommand.dll' inside your FDS' root folder and add an entry for it under [Plugins] inside SSGM.ini, also add the following to the bottom of SSGM.ini and configure it:

[BetterMSGConsoleCommand]
; These settings affect what's done for players running scripts 2.9 or higher, for other players a normal host message is displayed

DoStringPrepend = false ; prepend a string to the text send to scripts 2.9 and higher players?
PrependString = (Message from Dear Leader): ; the string gets prepended with a white space, e.g. "%s %s", PrependString, Message
SoundFile = message.wav ; an optional WAV file to play when a message appears, keep this empty to not play a sound
ColourRed, = 255 ; The red value of the RGB colour to display the message in
ColourGreen = 250 ; Green value...
ColourBlue = 250 ; I wonder what this is for?


Long time and well respected Renegade community member, programmer, modder and tester.

Scripts 4.0 private beta tester since May 2011.

My Renegade server plugins releases

[Updated on: Thu, 28 June 2012 13:27]

Report message to a moderator

Re: [SSGM 4.0 Plugin] Better MSG Console Command [message #465528 is a reply to message #465479] Wed, 04 April 2012 13:07 Go to previous messageGo to next message
iRANian is currently offline  iRANian
Messages: 4300
Registered: April 2011
Karma: 0
General (4 Stars)
Released a new version with an added hack that renames a player temporarily and shows a message by him for lower than scripts 2.9 players, then changes his nick back to his old nick. This effectively removes the "Host:" crap from the server.

No idea if this hack has any issues so enjoy testing it out for me.


Long time and well respected Renegade community member, programmer, modder and tester.

Scripts 4.0 private beta tester since May 2011.

My Renegade server plugins releases

[Updated on: Wed, 04 April 2012 13:08]

Report message to a moderator

Re: [SSGM 4.0 Plugin] Better MSG Console Command [message #470180 is a reply to message #465479] Thu, 28 June 2012 13:29 Go to previous message
iRANian is currently offline  iRANian
Messages: 4300
Registered: April 2011
Karma: 0
General (4 Stars)
Released v3, v2 was still working with beta 5 but it was crashing because I called a few functions from the FDS directly instead of using functions added by beta 5 to do what I want.

Long time and well respected Renegade community member, programmer, modder and tester.

Scripts 4.0 private beta tester since May 2011.

My Renegade server plugins releases
Previous Topic: Command & Conquer: Tiberium Crystal War v1.50 Released
Next Topic: [CODE] 4.0 server damage hook
Goto Forum:
  


Current Time: Sat Jul 13 18:22:21 MST 2024

Total time taken to generate the page: 0.00626 seconds