MechSlayer 18 Posted February 16, 2019 Hey, i'd like to create markers from initServer, but it doesn't work. How can I do? if (DArcadia isEqualTo "Ocupado") then { _MarcadorArcadia = createMarker ["ZonaArcadia", [7655.75,6335.19,0]]; _MarcadorArcadia setMarkerShape "ELLIPSE"; _MarcadorArcadia setMarkerSize [200,200]; _MarcadorArcadia setMarkerAlpha 100; ["eos\OpenMe.sqf"] remoteExec ["execVM", 0, true]; } else { deleteVehicle autonomoArcadia; _BanderaArcadia = createMarker ["", [7655.75,6335.19,0]]; _BanderaArcadia setMarkerShape "ICON"; _BanderaArcadia setMarkerType "hd_flag"; _BanderaArcadia setMarkerColor "ColorGreen"; } Share this post Link to post Share on other sites
pierremgi 4913 Posted February 16, 2019 A "if then" in initServer is strange because you're at start and you should know if it's right or not. I guess you want to make a marker when the condition is met while in game. So you need t owait for this event: [] spawn { waitUntil {sleep 1; DArcadia isEqualTo "Ocupado}; _MarcadorArcadia = createMarker ["ZonaArcadia", [7655.75,6335.19,0]]; _MarcadorArcadia setMarkerShape "ELLIPSE"; _MarcadorArcadia setMarkerSize [200,200]; _MarcadorArcadia setMarkerAlpha 100; ["eos\OpenMe.sqf"] remoteExec ["execVM", 0, true]; }; Make sure your condition (DArcadia isEqualTo "Ocupado") is true when you want this marker (ZonaArcadia). The createMarker ["", [7655.75,6335.19,0]] is wrong. Use deleteMarker _MarcadorArcadia. I don't know when you need that. 1 Share this post Link to post Share on other sites
MechSlayer 18 Posted February 16, 2019 Nevermind, fiexd it the initServer.sqf : [] spawn { //Zonas// //Zonas// BD = ["new", "Zonas"] call OO_INIDBI; DArcadia = ["read", ["Estado", "Arcadia"]] call BD; DBagango = ["read", ["Estado", "Bagango"]] call BD; DCayo = ["read", ["Estado", "Cayo"]] call BD; DCorazol = ["read", ["Estado", "Corazol"]] call BD; DIguana = ["read", ["Estado", "Iguana"]] call BD; DObregan = ["read", ["Estado", "Obregan"]] call BD; DOrtego = ["read", ["Estado", "Ortego"]] call BD; DSomato = ["read", ["Estado", "Somato"]] call BD; DTiberia = ["read", ["Estado", "Tiberia"]] call BD; [Ares_fnc_sspawners] remoteExec ["call", 0, true]; ArcadiaLiberado = { ["write", ["Estado", "Arcadia", "Liberado"]] call BD; }; BagangoLiberado = { ["write", ["Estado", "Bagango", "Liberado"]] call BD; }; CayoLiberado = { ["write", ["Estado", "Cayo", "Liberado"]] call BD; }; CorazolLiberado = { ["write", ["Estado", "Corazol", "Liberado"]] call BD; }; IguanaLiberado = { ["write", ["Estado", "Iguana", "Liberado"]] call BD; }; ObreganLiberado = { ["write", ["Estado", "Obregan", "Liberado"]] call BD; }; OrtegoLiberado = { ["write", ["Estado", "Ortego", "Liberado"]] call BD; }; SomatoLiberado = { ["write", ["Estado", "Somato", "Liberado"]] call BD; }; TiberiaLiberado = { ["write", ["Estado", "Tiberia", "Liberado"]] call BD; }; }; and the sspawners.sqf: if (DArcadia isEqualTo "Ocupado") then { MarcadorArcadia = createMarker ["ZonaArcadia", [7655.75,6335.19,0]]; MarcadorArcadia setMarkerShape "ELLIPSE"; MarcadorArcadia setMarkerSize [200,200]; MarcadorArcadia setMarkerAlpha 100; execVM "eos\OpenMe.sqf"; } else { deleteVehicle autonomoArcadia; BanderaArcadia = createMarker ["", [7655.75,6335.19,0]]; BanderaArcadia setMarkerShape "ICON"; BanderaArcadia setMarkerType "hd_flag"; BanderaArcadia setMarkerColor "ColorGreen"; }; Share this post Link to post Share on other sites