I want to use the epoch events and run a script on the server every 1h.
The script will check how many people are online and will message all of them, based on how many are online.
I've tried 3 different ways to do that and all failed.
Can anyone help a bit ?
I got this so far.
// Sample hello_world.sqf
private ["_message","_unit","_player"];
if (isServer) then
{
_message = format["Hello people."];
diag_log _message; // It doesnt show in the log
[nil,nil,"per",rTITLETEXT,_message] call RE; //testing sending message
sleep(2);
[nil, nil, rHINT, "Hello people."] call RE; // another testing
sleep(2);
_unit = playableUnits select floor(random count playableUnits); //select a random player
_player = _unit getVariable["bodyName", "nil"];
[nil,player,rSideChat,format["Hello %1",_player]] call RE; //yet another test
sleep(2);
};
And in my init.sqf i got this : EpochEvents = [["any","any","any","any",1,"hello_world"],["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"]];
// I know i have 1 min here...but its for testing purposes..
Like i said nothing comes out on the screen whichever method i try.....
Question
Sandbird
I want to use the epoch events and run a script on the server every 1h.
The script will check how many people are online and will message all of them, based on how many are online.
I've tried 3 different ways to do that and all failed.
Can anyone help a bit ?
I got this so far.
And in my init.sqf i got this : EpochEvents = [["any","any","any","any",1,"hello_world"],["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"]];
// I know i have 1 min here...but its for testing purposes..
Like i said nothing comes out on the screen whichever method i try.....
Link to comment
Share on other sites
9 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