Rusty

Periodic server messages

Recommended Posts

Good evening. I'm looking to somehow get my server to periodically post messages in chat to advertise. Is there a plugin that can do this? I've searched on the topic but the closest thing I could find was displaying messages on screen. I appreciate the help.

Share this post


Link to post
Share on other sites
On 3/27/2020 at 5:15 AM, Kreator said:

exec( "say Chat print" );

How often will it say that with that command?

Share this post


Link to post
Share on other sites

Here is an example, every 45 seconds (level.delay) the message will be displayed and it will loop until the player disconnects

 

#include maps\mp\gametypes\_hud_util;

init()
{
	level.delay = 45;
	level thread server_messages();
}

server_messages()
{	

	self endon("disconnect");

	while(1)
	{
	
		wait level.delay;
		
		exec ("say Msg 1");
	
		wait level.delay;
	
		exec ("say Msg 2");

	}
}

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.