Fiddi 68 Posted March 10, 2018 Hi, I'm having problems figuring out what I'm doing wrong with the command drawIcon. It works in singleplayer and the icon shows up on the map, but in multiplayer it doesn't. It's supposed to be displayed on both the GPS-minimap and the regular map screen. Here's the code I've got so far. It's executed on the init of the unit (fredrik) in question. ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["Draw", { (_this select 0) drawIcon [ "iconManMedic", [0,0,1,1], (getPosWorld fredrik), 0.5 / ctrlMapScale (_this select 0), 0.5 / ctrlMapScale (_this select 0), getDir fredrik, (name fredrik) ]; }]; Any kind of clarification on how to get it to show up on the GPS and in multiplayer would be appreciated! Thanks! Share this post Link to post Share on other sites
HazJ 1289 Posted March 11, 2018 For the GPS: miniMapEH = ((uiNamespace getVariable "RscCustomInfoMiniMap") displayCtrl 101) ctrlAddEventHandler ["Draw", client_fnc_playerMarkers]; Where do you run your code? 1 Share this post Link to post Share on other sites
Fiddi 68 Posted March 11, 2018 3 hours ago, HazJ said: For the GPS: miniMapEH = ((uiNamespace getVariable "RscCustomInfoMiniMap") displayCtrl 101) ctrlAddEventHandler ["Draw", client_fnc_playerMarkers]; Where do you run your code? Thanks for the code! I'm executing it on the players init field inside the editor. But I've tried initServer.sqf and initPlayerLocal.sqf Share this post Link to post Share on other sites
mrcurry 496 Posted March 12, 2018 In initPlayerLocal.Sqf: [] spawn { waitUntil {!isNull findDisplay 12}; //your script here } ; Share this post Link to post Share on other sites
Fiddi 68 Posted March 13, 2018 16 hours ago, mrcurry said: In initPlayerLocal.Sqf: [] spawn { waitUntil {!isNull findDisplay 12}; //your script here } ; Right, so the display wasn't initialized when the event handler was made. Guess that makes sense. Thanks! Share this post Link to post Share on other sites