If(isServer)exitWith{};
waitUntil {!isNil "dayz_animalCheck"};
_chattxt = "<Overpoch server>:";
sleep 35;
systemChat format["%1 %2",_chattxt,"Welcome to my Overpoch!"];
sleep 55;
for "_i" from 1 to 16 do {
if !(alive player)exitwith{};
_randmsg = [
"Deploy Bike and Mozzie via toolbox, Press U for earplugs, 0 for autorun, Right Shift for Groups and END for debug toggle",
"Put money in your safe",
"Id like this script please",
"blah blah blah",
"more text here",
"any message you like here",
"and another here",
"please help"
] call BIS_fnc_selectRandom;
systemChat format["%1 %2",_chattxt,_randmsg];
sleep 600;
};
Question
lwbuk
On my old 1051 server I had a script that posted a random message at a given time interval.
It ran off another file called remote_message.
Ive tried it out on 1061 and cant get it to work. If anyone could have a look, It would be awesome.
I know you can achieve simiar with MOTD, but this script is much better IMO.
remote_message.sqf
fnc_remote_message = {
private ["_type", "_message", "_player"];
_type = _this select 0;
_message = _this select 1;
if (count _this > 2) then {
_player = _this select 2;
if (_player == player) then {
switch (_type) do {
case "globalChat": {
player globalChat _message;
};
case "hint": {
hint _message;
};
case "titleCut": {
titleCut [_message, "PLAIN DOWN", 3];
};
case "titleText": {
titleText [_message, "PLAIN DOWN"]; titleFadeOut 10;
};
};
};
} else {
switch (_type) do {
case "hint": {
hint _message;
};
case "titleCut": {
titleCut [_message,"Plain Down",3];
};
case "titleText": {
titleText [_message, "PLAIN DOWN"]; titleFadeOut 10;
};
};
};
};
"customRemoteMessage" addPublicVariableEventHandler {(_this select 1) call fnc_remote_message;};
messages.sqf
If(isServer)exitWith{};
waitUntil {!isNil "dayz_animalCheck"};
_chattxt = "<Overpoch server>:";
sleep 35;
systemChat format["%1 %2",_chattxt,"Welcome to my Overpoch!"];
sleep 55;
for "_i" from 1 to 16 do {
if !(alive player)exitwith{};
_randmsg = [
"Deploy Bike and Mozzie via toolbox, Press U for earplugs, 0 for autorun, Right Shift for Groups and END for debug toggle",
"Put money in your safe",
"Id like this script please",
"blah blah blah",
"more text here",
"any message you like here",
"and another here",
"please help"
] call BIS_fnc_selectRandom;
systemChat format["%1 %2",_chattxt,_randmsg];
sleep 600;
};
Link to comment
Share on other sites
5 answers to this question
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