Jump to content

Simple Player Marker

Recommended Posts

So i wanted to share a script that make's players navigate a bit easier.

I do not know who created this script its been out there for awhile otherwise i would've share'd his Credits for making this.

In your init.sqf :

// Player Location

execVM "marker.sqf";

Create a file called marker.sqf and paste this code into it:

[] spawn {
		waitUntil{uiSleep 0.2;!isNil "EPOCH_playerEnergyMax"};  //wait for player to load
		_playerPos = createMarkerLocal ["PlayerPOS", position player];  //create marker
		"PlayerPOS" setMarkerTextLocal "";  // Player marker text eg: You
		"PlayerPOS" setMarkerTypeLocal "Select";  // Player Marker icon
		"PlayerPOS" setMarkerColorLocal "ColorBlack";  
			waitUntil {uiSleep 0.2;visibleMap};  //update marker only while map is open
			"PlayerPOS" setMarkerPosLocal position player;

Now paste both .sqf files into your mission.pbo.

I can't remember wich BE filters i added to prevent kicking, But if you need help paste your BE kicks here.



Share this post

Link to post
Share on other sites

You need to change the script, But yea, Group members are already defined by 3d (hexegon) symbols. (not 2d map markers).

But if you really want to, you could try this:


_markers = [];
_members = [];

while {true} do {
    sleep 0.5;
    if(visibleMap) then {
        _members = units (group player);
        //Create markers
            _marker = createMarkerLocal [format["%1_marker",_x],visiblePosition _x];
            _marker setMarkerColorLocal "ColorGreen";
            _marker setMarkerTypeLocal "Mil_dot";
            _marker setMarkerTextLocal format["%1", _x getVariable["realname",name _x]];
            _markers pushBack [_marker,_x];
        } foreach _members;
        while {visibleMap} do {
                _marker = _x select 0;
                _unit = _x select 1;
                if(!isNil "_unit") then {
                    if(!isNull _unit) then {
                        _marker setMarkerPosLocal (visiblePosition _unit);
            } foreach _markers;
            if(!visibleMap) exitWith {};
            sleep 0.02;

        {deleteMarkerLocal (_x select 0);} foreach _markers;
        _markers = [];
        _members = [];

I have not tested it out, Because i posted the similar script on the other mod 'which shall not be named'  and someone else posted this Group marker system.


Share this post

Link to post
Share on other sites

I tried the one from first post and sometimes the marker stucks and when you move it doesnt show your right position. I also changed to mil_dot as marker and blue color but it sometimes appears black.

Thx for the 2nd posting think thats what im looking for will try tomorrow :)

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Similar Content

    • By Ghostman
      Hello how can i enable in infistar "display owner plotpole" if have enable Map Markers - PlotPoleMarkers
    • By chao226
      I am in the process of setting up an epoch server that I rented from gaming deluxe.  Currently on the server when you open your main map your players location is displayed on the map.  This is regardless of a GPS being in the players possession.  I am hoping to set it up so this will only happen when a player has a GPS but am a bit lost in all the scripts and cant seam to find anything.

    • By Stollenwerk
      Hey there,
      I know it has to be very simple, but I'm stuck on this atm.
      Maybe someone can give me a push in the right direction.
      I want to place a global marker and want to delete it again with a trigger, when a player activates the trigger.
      So that's what I got so far:
      _marker = createMarker ["BOX", _object]; _marker setMarkerType "hd_start"; _marker setMarkerColor "ColorRed"; _trigger = createTrigger ["EmptyDetector", "getMarkerPos _marker"]; _trigger setTriggerArea [5, 5, 0, false]; _trigger setTriggerActivation ["ANY", "PRESENT", true]; _trigger setTriggerStatements ["this", "deleteMarker _marker", ""]; I'm pretty sure that the error(s) are in these 2 lines:
      _trigger = createTrigger ["EmptyDetector", "getMarkerPos _marker"]; _trigger setTriggerStatements ["this", "deleteMarker _marker", ""]; I'm not sure what to put in as string code for deactivation. Trigger should be deleted as well of course, after the marker is deleted.
      Thanks in advance.
    • By Desire
      I basically went into my mission.sqm and added my own marker, but it doesn't seem to be working. Anyone know why?
      here is the code.
      class Markers { items=18; class Item0 { position[]={7839.6055,381.33774,8414.7324}; name="center"; type="Empty"; }; class Item1 { position[]={-7245.377,365.98782,19535.367}; name="respawn_west"; type="Empty"; }; class Item2 { position[]={4932.3345,0.39950246,1989.1094}; name="spawn0"; type="Empty"; }; class Item3 { position[]={2236.0391,0.63119155,1923.3735}; name="spawn1"; type="Empty"; }; class Item4 { position[]={8738.1328,0.45720705,2122.1082}; name="spawn2"; type="Empty"; }; class Item5 { position[]={10909.267,0.57597214,2422.3096}; name="spawn3"; type="Empty"; }; class Item6 { position[]={13510.764,0.44504455,5249.3027}; name="spawn4"; type="Empty"; }; class Item7 { position[]={6326.4805,304.99265,7809.4888}; name="Tradercitystary"; text="Trader City Stary"; type="mil_circle"; colorName="ColorBlack"; }; class Item8 { position[]={4361.4937,3,2259.9526}; name="wholesaleSouth"; text="Wholesaler"; type="mil_dot"; colorName="ColorBlack"; }; class Item9 { position[]={13532.614,3.0083523,6355.9497}; name="boatTraderEast"; text="Wholesaler"; type="mil_dot"; colorName="ColorBlack"; }; class Item10 { position[]={7989.3354,0.30462033,2900.9946}; name="BoatDealerSouth"; text="Boat Dealer"; type="mil_dot"; colorName="ColorBlack"; }; class Item11 { position[]={12060.471,158.85699,12638.533}; name="AirVehicles"; text="Aircraft Dealer"; type="mil_dot"; colorName="ColorGreen"; }; class Item12 { position[]={1606.6443,289.70795,7803.5156}; name="BanditDen"; text="Bandit Camp"; type="mil_dot"; colorName="ColorRed"; }; class Item13 { position[]={11447.91,317.27109,11364.536}; name="Klen"; text="Trader City Klen"; type="mil_circle"; colorName="ColorGreen"; }; class Item14 { position[]={13441.16,1.1406164,5429.3013}; name="BoatDealerEast"; text="Boat Dealer"; type="mil_dot"; colorName="ColorBlack"; }; class Item15 { position[]={4064.2258,365.13501,11665.938}; name="TradercityBash"; text="Trader City Bash"; type="mil_circle"; colorName="ColorBlack"; }; class Item16 { position[]={12944.227,210.19823,12766.889}; name="HeroTrader"; text="Hero Camp"; type="mil_dot"; colorName="ColorBlue"; }; class Item17 { position[]={6991.15,5362.56,0}; name="CarSafeSpot"; text="Vehicle Safe Spot"; type="mil_dot"; colorName="ColorGreen"; }; }; Item17 is my custom one.
  • Advertisement
  • Supporters
  • Discord

  • Create New...