Jump to content
Sign in to follow this  
qwertz

How can I display a server message to all players ?

Recommended Posts

As in the title - is there a way to display a chat message to all connected players on a public server every 5 minutes or so ?

Thanks,

qwertz

Share this post


Link to post
Share on other sites
Why not use the message of the day option in server.cfg?

Thanks Deadfast - I use that already, however, this would only display once. I am looking for a way to display messages repeatedly (or even dynamically, i.e. skript based) ?

Share this post


Link to post
Share on other sites

Thanks so far, however, thats not exactly what I am looking for. I know about the motd[] command and use it for the welcome message on the server.

What I mean is a server-side command that can ideally be scripted, i.e. "on [Event] display [Message]". Events could be joining, every x minutes, map change, team killing, leaving and so on and so on ....

If there is no general way to do that, is there a way to display a message on every map change? Can I put a command in the init.sqf of every mission ? If so, what would be the syntax ?

Thanks !

Share this post


Link to post
Share on other sites

Sure, you can edit it into each mission.

Create a script called message.sqf in the mission's root and put this code inside of it:

while {true} do
{
    player globalChat "Message";
    sleep (60*5); //Wait 5 minutes
};

You will need to then execute this script from the init.sqf:

execVM "message.sqf";

Share this post


Link to post
Share on other sites
Sure, you can edit it into each mission.

Create a script called message.sqf in the mission's root and put this code inside of it:

while {true} do
{
    player globalChat "Message";
    sleep (60*5); //Wait 5 minutes
};

You will need to then execute this script from the init.sqf:

execVM "message.sqf";

Thanks Deadfast, will try that out !

Share this post


Link to post
Share on other sites

If you want things that specific, you'll have to search each of them out - onPlayerDis/Connected, 'killed' eventHandler, and repeating countdown trigger with condition 'local player' for the ones you've mentioned - and add them to each mission.

For nifty things a PvP admin such as yourself might like, such as restricintg movement after a tk with a clickable 'I apologise for being a numpty' box, check out Dialog Control (called via eventHandler).

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×