-- LUA Script -- Shows players co-ordinates on map from a marker point. By perelect 15.04.2015 -- Assign this script to the Marker Point. Set any entity (The Marker Point) to - Static No, Physics No, AllwaysActive Yes. -- Place Marker Point in bottom left corner of the map. Use a small flat item like a can. -- My first script. A big learning curve. function codisplay_init(e) end function codisplay_main(e) -- Detects the player distance from the marker at 0,0,0 (Bottom left of Map) Taken from ai_soldier.lua PlayerDX = g_Entity[e]['x'] - g_PlayerPosX;-- Gets x position of player from the marker. PlayerDY = g_Entity[e]['y'] - g_PlayerPosY;-- Gets y position of player from the marker. PlayerDZ = g_Entity[e]['z'] - g_PlayerPosZ;-- Gets z position of player from the marker. PlayerDist = math.sqrt(math.abs(PlayerDX*PlayerDX)+math.abs(PlayerDY*PlayerDY)+math.abs(PlayerDZ*PlayerDZ)); -- Calculates position. if PlayerDist > 100 then -- Runs the below code, while the player is more than 100 units away from Marker Point. TextColor(1,3,2,"X = "..math.ceil(g_PlayerPosX),255,255,255) -- TextColor(x,y,size,txt,r,g,b) left to right. Taken from global.lua TextColor(5,3,2," West to East",255,255,255) -- prints the text " West to East". TextColor(1,5,2,"Z = "..math.ceil(g_PlayerPosZ),255,255,255) -- TextColor(x,y,size,txt,r,g,b) bottom to top. Taken from global.lua TextColor(5,5,2," South to North",255,255,255) -- prints the text " South to North". TextColor(1,7,2,"Y = "..math.ceil(g_PlayerPosY-545),255,255,255) -- TextColor(x,y,size,txt,r,g,b) sea to ceiling. Taken from global.lua -- The -545 in the above line "(g_PlayerPosY-545)" is the distance from ground level to sea level, adjust to suit your ground level if needed. TextColor(5,7,2," Above Sea level",255,255,255) -- prints the text " Above Sea level". Panel(0,0,12,10) -- Panel(x,y,x2,y2). Taken from global.lua end -- end if end -- end function