You'll need to test these of course but here goes.
Example 1Use a line in the init file that runs only on the server to create a variable, like so:
init.sqfif (isServer) then {intro = true; publicVariable "intro";};
Then have a line to check if that variable exists at the start of intro.sqs and exit if it does not. All machines that started with the server will have the variable and any subsequent clients will not and will exit out of the intro.
intro.sqs? (isNil "intro") : exit
;
; Camera Code
;
exit
That should do what you want with a minimum of fuss. If that isn't what you are looking for then try the example below for something more advanced.
Example 2init.sqfif {isServer} then {shark_introStarted = false; publicVariable "shark_introStarted"; _nul = [] execVM "sendnewplayerinfo.sqf";};
if {!isServer} then {_nul = [] execVM "requestnewplayerinfo.sqf";};
requestnewplayerinfo.sqf_infoRecieved = false;
sleep .1;
if (!isNil "shark_introStarted") then
{
_infoRecieved = true;
};
while {!_infoRecieved} do
{
shark_newPlayer = true;
publiceVariable "shark_newPlayer";
sleep 1.2;
_infoRecieved = true;
if (isNil "shark_introStarted") then
{
_infoRecieved = false;
};
};
if (true) exitWith {};
sendnewplayerinfo.sqf
shark_newPlayer = false;
while {true} do
{
sleep 1.1;
if (shark_newPlayer) then
{
shark_introStarted = true;
publicVariable "shark_introStarted";
shark_newPlayer = false;
};
};
intro.sqscutText ["","black faded"]
#checkagain
~ 1.2
? (isNil "shark_introstarted") : goto "checkagain"
? (shark_introstarted) : goto "exitwithout"
;
; intro code here
;
exit
#exitwithout
cutText ["","black in"];
exit