Jump to content
Sign in to follow this  
ryansoper

Automatic JIP Script?

Recommended Posts

Is there a script that is automatically run on JIP players? Like init.sqf is automatically run at Initialisation of mission?

Share this post


Link to post
Share on other sites

Ah Ok, is there a way to detect if the script is being run the first time or by a JIP player?

Share this post


Link to post
Share on other sites

Your question is invalid, Init.sqf never runs twice, its just a script that runs once for each client and server and joining players, it is local for each individual client.

Share this post


Link to post
Share on other sites

Put this in init.sqf.

T_INIT = false;
T_Server = false; 
T_Dedicated = false;
T_Client = false; 
T_JIP = false;

//Checks to see if the match is multiplayer or not
if (isMultiplayer) then 
{ 
T_MP = true; 
} 
else 
{ 
T_MP = false
};

//What kind of server
if (isServer) then
{
T_Server = true;
if (!(isNull player)) then 
{ 
	T_Client = true 
};
T_INIT = true;

if (isDedicated) then
{
	T_Dedicated = true;
}
}

//What kind of client
else 
{
//It is a client
T_Client = true;

//JIP Client
if (isNull player) then
{
	T_JIP = true;
	[] spawn { waitUntil { !(isNull player) }; T_INIT = true };
} 
//Init Client
else 
{
	T_INIT = true;
};
};

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  

×