Where did you pre placed the marker? On the editor?
psvialli, don't forget that everything that you put in the editor runs again when JIP players connect. So everything goes back to its original position.
save this as "init_createMarkers.sqf";
and this in the init.sqf of your mission:Code:if (isServer) then { // Setup eventHandler ["TEX_markers", { _marker = _this select 0; //String _pos = _this select 1; //Array _shape = _this select 2; //String _type = _this select 3; //String _size = _this select 4; //Array _color = _this select 5; //String _mkr = createMarker [_marker, _pos]; _marker setMarkerShape _shape; _marker setMarkerType _type; _marker setMarkerSize _size; _marker setMarkerColor _color; }] call CBA_fnc_addEventHandler; //EventHandler // Helper function TEX_fnc_createMarker = { ["TEX_markers", _this] call CBA_fnc_localEvent }; // no need to broadcast, we're already on the server } else { // Helper function TEX_fnc_createMarker = { ["TEX_markers", _this] call CBA_fnc_globalEvent }; // broadcast to execute on server };
Then make sure you create the marker ONLY on the server:Code:call compile preProcessFileLineNumbers "init_CreateMarkers.sqf";
And finally one line below make it persistant:Code:if (isServer) then { ["markerxxx", [5835.1426,3076.4465], "ICON", "mil_objective", [0.5,0.5], "ColorRed"] call TEX_fnc_createMarker; };
Code:["markerxxx", true] call CBA_fnc_setMarkerPersistent;
HOME
Reply With Quote

