Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
snkman

onPlayerConnected

Recommended Posts

Hey guys,

well once again some questions about the JIP and onPlayerConnected.

Yes i know we already have some threads about this but they all do handle the onPlayerConnected in combination with a Init.sqf/Init.sqs.

I would like to know under which conditions the onplayerConnected is triggered by the server.

Is it only triggered if the mission already is in progress? So if the server time is > 0?

For example i have a AddOn which includes a module with a EH init.

So in MP bouth player ( Client ) and Server ( Dedicated ) do execute the EH init of the module.

Then i have following code:

GL4_Initialize = False;

if (isServer) then
{
      GL4_Initialize = True;

      onPlayerConnected "publicVariable ""GL4_Initialize"" ";
}
else
{
      waitUntil { (GL4_Initialize) };
};

Okay this is just a simple example but if i'm right and the onPlayerConnected is only triggered after the mission was started on the server then this should work fine.

Is that correct?

Share this post


Link to post
Share on other sites
Sign in to follow this  

×