Jump to content

[Request] Manual execution of Epoch Events [Solved]


Sandbird

Recommended Posts

To allow admins to manually start events. Something like this:

Spawning event:

server_adminspawnEvent = compile preprocessFileLineNumbers '\z\addons\dayz_server\compile\server_adminspawnEvent.sqf';
['mycustomEvent'] spawn server_adminspawnEvent;

server_adminspawnEvent.sqf

private ["_date","_key","_result","_outcome","_handle","_datestr","_event"];
diag_log("MANUAL EPOCH EVENT INIT");
_event = _this select 0;

while {true} do {
	_key = "CHILD:307:";
	_result = _key call server_hiveReadWrite;
	_outcome = _result select 0;
	if(_outcome == "PASS") then {
		_date = _result select 1;
		_datestr  = str(_date);
		diag_log ("RUNNING EVENT: " + (_event) + " on " + _datestr);
		_handle = [] execVM "\z\addons\dayz_server\modules\" + (_event) + ".sqf";
	};
	sleep 10;
};

If its not too much to ask....

Link to comment
Share on other sites

Ye that would be cool.. I have kind of coded it together myself with Infistars tools but it would be a thing that should be in by default

 

How did you manage to execute the script in infistar ?

I was trying to do it with my code above but the script is in the dayz_server.pbo while infistar executes commands on client.

I always get script not found.

Link to comment
Share on other sites

proof or it doesnt exist :D lol

Cant find it...what do you mean ?

If you mean this: then you need to read the 1st post again.

 

Events cannot be manually executed from the Client cause the file is in the dayz_server and the spawn script doesnt take any parameters the way it is.

We have to use publicvariableserver tricks to make it work....so why go through all this trouble...when the script could be manipulated to accept parameters OR just add a new spawn event script instead.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Discord

×
×
  • Create New...