Jump to content
Sign in to follow this  
farooqaaa

Server side addons?

Recommended Posts

The only one that seems to be working so far is the Zeu Server Briefing addon.

How would I go about doing this: https://dev-heaven.net/projects/serversidescripting/wiki/Example_Messaging

That shows regular messages to clients that are connected to your server but it's working.

I have added it inot the Zeu code but still now luck.

  _handle = []ExecVM "\userconfig\zeu\zeu_A3serverBriefing.hpp";
 waitUntil {scriptDone _handle};
 {Publicvariable _x}foreach ["ZEU_SERVERTITLE",  "ZEU_SERVERINFO"];
 if ( isServer ) then
 {

_init = '
if ( !isDedicated ) then 
{
	zeu_serverbriefing = this;
	[] spawn {

		waitUntil { (!isNull player) && (! isnil "ZEU_SERVERTITLE") && (! isnil "ZEU_SERVERINFO")};
		player createDiarySubject ["zeu_serverPage",ZEU_SERVERTITLE];
		player createDiaryRecord ["zeu_serverPage",["Server Info",ZEU_SERVERINFO]];			
	};

}';
"logic" createUnit [[1,1,1], (createGroup sideLogic), _init, 0.5, "corporal"];

" 
[] spawn {
  		while {true} do {
   			hintSilent ""TeamSpeak IP : xx.xx.xx.xx"";
   			sleep 10;
   			hintSilent ""VoIP enabled"";
       		sleep 10;
       		hintSilent ""Any other information needed"";
   			sleep 300;
  		};
};
" call CreateLogicCode;

 };

Share this post


Link to post
Share on other sites

the easiest way is to add it to your MOTD lines in your server.cfg, and have the time intervals between the lines at 600 ( 5 mins) or whatever time scale you need

alternatively, you could inject it into the briefing script like you tried too, but the correct location would be as shown below

_handle = []ExecVM "\userconfig\zeu\zeu_A3serverBriefing.hpp";

waitUntil {scriptDone _handle};

{Publicvariable _x}foreach ["ZEU_SERVERTITLE", "ZEU_SERVERINFO"];

if ( isServer ) then

{

_init = '

if ( !isDedicated ) then

{

zeu_serverbriefing = this;

[] spawn

{

waitUntil { (!isNull player) && (! isnil "ZEU_SERVERTITLE") && (! isnil "ZEU_SERVERINFO")};

player createDiarySubject ["zeu_serverPage",ZEU_SERVERTITLE];

player createDiaryRecord ["zeu_serverPage",["Server Info",ZEU_SERVERINFO]];

};

//INSERT ADDITIONAL CODE HERE

}';

"logic" createUnit [[1,1,1], (createGroup sideLogic), _init, 0.5, "corporal"];

};

However the whole point of the briefing injection system is so you don't need to do anything like that, just tell them to read the **** Info tab of the briefing over voip or global chat

[] spawn {
while{true}do{sleep 300; player globalchat "Check the briefing for Teamspeak details"};
};

Edited by Terox

Share this post


Link to post
Share on other sites

Thanks a lot. I never thought about that. That clears the server messages part.

But for other stuff I need a while loop going which for some reason doesn't work.

I did put it in the area and the code worked too but it wasn't running as a loop, just once.

My code also had a few sleep calls which were supposed to be executed after a minute but they all executed at once.

Share this post


Link to post
Share on other sites

deleted

Edited by Profecy
never mind.

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  

×