Cherdenko Posted May 22, 2017 Report Share Posted May 22, 2017 puts out pre-defined server messages in a random order Spoiler needs to be called with execVM "YOUR\PATH\msg.sqf"; in the if (!isDedicated) then { Section safe the folowing as msg.sqf //rewritten by Cherdenko if(isServer)exitWith{}; //waitUntil {!isNull (findDisplay 46)}; // Makes the script start when player is ingame waitUntil {scriptDone progress_monitor}; //this is the text before the message "" for nothing _chattxt = "[YOUR SERVERNAME HERE]: "; //init sleep to let the player spawn in and start playing, before we send the first message sleep 25; //Send an initial message systemChat format["%1 %2",_chattxt,"Welcome to [YOUR SERVER HERE]"]; // this is the first message it send sleep 25; //Send the messages for "_i" from 1 to 4 do { // steps need to equal lines //if player dies, we exit the scope ending the script if !(alive player)exitwith{}; _randmsg = [ /* messages here within "", */ "Put", "your", "messages", "here" //last entry does not get a comma (,) at the end or script will fail ] call BIS_fnc_selectRandom; systemChat format["%1 %2",_chattxt,_randmsg]; sleep 600; // change to anytime you want to, to reduce the delay or make it higher !in seconds! }; and you are good to go lwbuk, oldmatechoc and juandayz 3 Link to comment Share on other sites More sharing options...
Relentless Posted May 22, 2017 Report Share Posted May 22, 2017 No offense against you releasing that but I got a question. Do you have an example what users could use it for? I have no idea for what you could need that. :D Link to comment Share on other sites More sharing options...
Cherdenko Posted May 22, 2017 Author Report Share Posted May 22, 2017 @DAmNRelentless I've used it for messages like to announce events and other stuff. also you can put anything you want in there like some keybinds etc. juandayz 1 Link to comment Share on other sites More sharing options...
lwbuk Posted May 22, 2017 Report Share Posted May 22, 2017 I used to use something similar to announce various rules and FAQs during the course of a session. Used to do it with battleye but no one pays attention to the red text, so doing it via side/system/global chat is much better. Good job. oldmatechoc and juandayz 2 Link to comment Share on other sites More sharing options...
juandayz Posted May 22, 2017 Report Share Posted May 22, 2017 its very usefull @Cherdenko i hate bec reds msgs so TNKS FOR SHARE! Cherdenko 1 Link to comment Share on other sites More sharing options...
oldmatechoc Posted May 23, 2017 Report Share Posted May 23, 2017 if they still ignore the messages... something like playSound "Radio_Message_Sound"; might get their attention Hooty 1 Link to comment Share on other sites More sharing options...
nova Posted September 27, 2017 Report Share Posted September 27, 2017 needs to be called with execVM "YOUR\PATH\msg.sqf"; in the if (!isDedicated) then { where do you put this? init.sqf? @Cherdenko Link to comment Share on other sites More sharing options...
juandayz Posted September 27, 2017 Report Share Posted September 27, 2017 @nova For example: If u put the msg.sqf into Your Server Root/Mpmissions\Your instance\msg\ then open your init.sqf and find: execFSM "\z\addons\dayz_code\system\player_monitor.fsm"; just below paste: execVM "msg\msg.sqf"; *NOTE: if u wanna use dynamicText function then into msg.sqf //find: systemChat format["%1 %2",_chattxt,_randmsg]; //change by: [format["<t size='0.5' color='#D01000'>%1</t><br/><t size='0.5'>%2</t>",_chattxt,_randmsg],0,0,2,2] spawn BIS_fnc_dynamicText; ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Another way to make something similar, without externals scripts is using the motd line located in your : serverRoot\your instance\ config.cfg this line: motd[] = {"DayZ Epoch","Have fun!"}; motdInterval = 0; then change this line by: motd[] = { "My first Msg", "My second Msg", "My 3 Msg", "My 4 Msg"//last line without "," }; motdInterval = 120;//time in seconds between each msg. Cherdenko and nova 1 1 Link to comment Share on other sites More sharing options...
nova Posted September 28, 2017 Report Share Posted September 28, 2017 @juandayz thank you very much! juandayz 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now