ANSWER 10 Posted December 7, 2014 (edited) JIPonly.sqf /* Script by Sickboy (sb _at_ 6thSense.eu) Version: v0.1 */ T_INIT = false; T_Server = false; T_Client = false; T_JIP = false; if (playersNumber east + playersNumber west + playersNumber resistance + playersNumber civilian > 0) then { T_MP = true } else { T_MP = false }; if (isServer) then { T_Server = true; if (!(isNull player)) then { T_Client = true }; T_INIT = true; } else { T_Client = true; if (isNull player) then { T_JIP = true; [] spawn { waitUntil { !(isNull player) }; T_INIT = true }; } else { T_INIT = true; }; }; waitUntil {T_INIT}; /* script by me */ // NPC ACTION if (T_JIP) then { if (Mission_State_On) then {removeAllActions missiongiver_1;}; if (not Mission_State_On) then {removeAllActions missiongiver_1;missiongiver_1 addaction ["Mission Dialog","mDialog.sqf"];}; }; sleep 1; // TASK if (T_JIP) then { if (Mission_State_On) then { switch (Mission_Switch) do { case "EXPLOSION" : { /*...code...*/ }; case "HVT" : { /*...code...*/ }; case "SOTANG" : { //task part task_sotang = player createSimpleTask ["kill operation"]; task_sotang setSimpleTaskDestination (getPos task_area); task_sotang setSimpleTaskDescription ["kill all enemy","kill operation","operation area"]; task_sotang setTaskState "Assigned"; player setCurrentTask task_sotang; //marker part sotang_marker = createMarkerLocal ["SotangMarker",getPos task_area]; "SotangMarker" setMarkerShapeLocal "ELLIPSE"; "SotangMarker" setMarkerBrushLocal "Solid"; "SotangMarker" setMarkerColorLocal "ColorRed"; "SotangMarker" setMarkerSizeLocal [200,200]; ["TaskAssigned",["","task created"]] spawn BIS_fnc_showNotification; }; }; } else { switch (Mission_Switch) do { case "EXPLOSION" : { /*...code...*/ }; case "HVT" : { /*...code...*/ }; case "SOTANG" : { // task part player removeSimpleTask task_sotang; task_sotang = nil; publicVariable "task_sotang"; //marker part deleteMarkerLocal "SotangMarker"; sotang_marker = nil; publicVariable "sotang_marker" ["TaskAssigned",["","task deleted"]] spawn BIS_fnc_showNotification; }; }; }; }; purpose of this script is only JIP excution of creation of task which same as in-game player i think T_JIP didnt work and this script excute on every computer when JIP joins game using << ["M_Sqf\JIPonly.sqf","BIS_fnc_execVM",true,true] call BIS_fnc_MP; >> i used this wiki : https://community.bistudio.com/wiki/6thSense.eu:EG Edited December 7, 2014 by ANSWER Share this post Link to post Share on other sites
SilentSpike 84 Posted December 7, 2014 I suggest you simply use the initPlayerLocal.sqf event script. To make the code run only on JIP you can check if (_this select 1) is true. Share this post Link to post Share on other sites
ANSWER 10 Posted December 7, 2014 I suggest you simply use the initPlayerLocal.sqf event script. To make the code run only on JIP you can check if (_this select 1) is true. yeah!!!! it worked thank you SS Share this post Link to post Share on other sites
dreadedentity 278 Posted December 8, 2014 Just gonna leave these here for you (take out the periods) [.php][./php] Share this post Link to post Share on other sites
jshock 513 Posted December 8, 2014 (edited) You could also just use BIS_fnc_setTask, as it has a global parameter, so there would be no need to create it local to each player, and it shouldn't have any issues with JIP (at least from my usage). Edited December 8, 2014 by JShock Share this post Link to post Share on other sites
KernelPanicAkr 13 Posted December 10, 2014 It's just a recomendation... Ident your code, it'll be easy for you and for others to understand, and to see syntax errors at first glance. Share this post Link to post Share on other sites
jshock 513 Posted December 10, 2014 It's just a recomendation... Ident your code, it'll be easy for you and for others to understand, and to see syntax errors at first glance. It probably was, but since he used a spoiler tag instead of PHP or CODE tags, as Dreaded recommended, he lost any possible formating for the code. Share this post Link to post Share on other sites