{"name":"remoteExecutedJIPID","operator":null,"title":"remoteExecutedJIPID","type":"command","url":"https://community.bistudio.com/wiki/remoteExecutedJIPID","revid":369745,"updated":"2024-10-08T15:06:58Z","groups":["Multiplayer"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"2.18"}],"since":{"game":"arma3","name":"Arma 3","version":"2.18"},"arma3_since":"2.18","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Returns JIP ID of the persistent call generated from JIP queue for the joining player (see remoteExec).","syntaxes":[{"syntax":"remoteExecutedJIPID","since":null,"effect":null,"exec":null,"params":[],"returns":{"type":"String","types":["String"],"description":"JIP ID","text":"String - JIP ID"},"form":"nullary","operator":null,"left":null,"right":null}],"examples":[{"text":"```sqf\n_jipid = remoteExecutedJIPID;\n```","code":["_jipid = remoteExecutedJIPID;"]},{"text":"```sqf\n/* \nHave mission with 2 players.\nFirst player starts local server and executes given code\nSecond player joins the server and sees the 'all good' message\nSecond player logs out \nFirst player kills 'bob'\nSecond player joins back and sees 'removing JIP call' message\nSecond player logs out then joins back in, no message as call was removed\n*/\n\nprivate _fnc = \n{\n    if (isRemoteExecutedJIP) then\n    {\n        remoteExecutedJIPID splitString \"|\" params [\"_myID\", \"_netID\"];\n        private _obj = objectFromNetId _netID;\n        if (!alive _obj) then\n        {\n            hint \"object is dead or deleted, removing JIP call\";\n            remoteExec [\"\", remoteExecutedJIPID];\n        }\n        else\n        {\n            hint \"JIP call, all good, doing something\";\n        };\n    };\n};\n\nprivate _bob = group player createUnit [typeOf player, position player, [], 0, \"NONE\"];\nprivate _myID = \"lalala\";\nprivate _jipID = [_myID, netId _bob] joinString \"|\";\n[[], _fnc] remoteExec [\"call\", 0, _jipId];\n```","code":["/* \nHave mission with 2 players.\nFirst player starts local server and executes given code\nSecond player joins the server and sees the 'all good' message\nSecond player logs out \nFirst player kills 'bob'\nSecond player joins back and sees 'removing JIP call' message\nSecond player logs out then joins back in, no message as call was removed\n*/\n\nprivate _fnc = \n{\n\tif (isRemoteExecutedJIP) then\n\t{\n\t\tremoteExecutedJIPID splitString \"|\" params [\"_myID\", \"_netID\"];\n\t\tprivate _obj = objectFromNetId _netID;\n\t\tif (!alive _obj) then\n\t\t{\n\t\t\thint \"object is dead or deleted, removing JIP call\";\n\t\t\tremoteExec [\"\", remoteExecutedJIPID];\n\t\t}\n\t\telse\n\t\t{\n\t\t\thint \"JIP call, all good, doing something\";\n\t\t};\n\t};\n};\n\nprivate _bob = group player createUnit [typeOf player, position player, [], 0, \"NONE\"];\nprivate _myID = \"lalala\";\nprivate _jipID = [_myID, netId _bob] joinString \"|\";\n[[], _fnc] remoteExec [\"call\", 0, _jipId];"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["remoteExecutedOwner","isRemoteExecuted","isRemoteExecutedJIP","remoteExec","remoteExecCall","canSuspend","publicVariableClient","admin","owner","clientOwner","groupOwner","didJIPOwner"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Multiplayer","Introduced with Arma 3 version 2.18","Scripting Commands"]}