Remember that many conditions work only in server. E.g. unit names are only in server side. To solve many problems, I would suggest to use separate scripts for clients without any conditions in them except publicvariables if needed.
I use it like this. In init.sqf I have:
if (isnil("Var1")) then {Var1=false;};
Then during mission a script (ran in server) changes it to true for all clients with:
Var1=true;
publicvariable "Var1";
After that the variable "Var1" is true also for JIP-players and to the end of the mission unless you make the server change it back to false in the same way. This way you can trigger e.g. chatting, but disable it again so players (joined during playing) dont have all the outdated client stuff running superpositioned at mission start.
E.g. I have triggers for client scripts like this:
Condition: Var1 && !(local server)
On Act: _nul = [] execVM "ClientScript1.sqf";
The other challening part is to display tasks right for eneryone. For server and clients, you can use the previous methods, but for JIP-players you need this:
In init.sqf:
if (isnil("VarOBJLZ")) then {VarOBJLZ = 0;};
if (local server) then {} else {_nul = [] execVM "History.sqf";};
History.sqf:
waitUntil {!isNull player};
//-1 not made, 0 created, 1 finished, 2 assigned, 3 failed
if (VarOBJLZ==-1) then {};
if (VarOBJLZ==0) then {
taskLZ = player createSimpleTask [Localize "STR_5OBJLZH"];
taskLZ setSimpleTaskDescription [Localize "STR_5OBJLZ", Localize "STR_5OBJLZH", Localize "STR_5OBJLZW"];
taskLZ setSimpleTaskDestination [10081.2,10312.5,0];
player setCurrentTask taskLZ;
};
if (VarOBJLZ==1) then {
taskLZ = player createSimpleTask [Localize "STR_5OBJLZH"];
taskLZ setSimpleTaskDescription [Localize "STR_5OBJLZ", Localize "STR_5OBJLZH", Localize "STR_5OBJLZW"];
taskLZ setSimpleTaskDestination [10081.2,10312.5,0];
taskLZ settaskstate "SUCCEEDED";
};
if (VarOBJLZ==2) then {};
if (VarOBJLZ==3) then {};
So when new player joins, he gets "taskLZ"-task created. Unless server have changed VarOBJLZ to 1 (with VarOBJLZ=1;
publicvariable "VarLZ"; ), when the joined player have the task created with "succeeded"-status.
Thats the way I have been creating my COOP-missions. I am also only learning MP scripting (so my way could include rookie stuff), but these methods should work right for dedicated and normal servers.