Minimap Coords
#99
--[[
Script made by Lee (Discord: l33_) - www.trainorcreations.com
If you want to support my work, feel free to donate at https://trainorcreations.com/donate
PS. Stop ripping off my work and selling it as your own.
]]--
local minimap = modules.game_minimap.minimapWidget
local label = minimap.coords
label = label or g_ui.loadUIFromString([[
Label
id: coords
color: white
font: verdana-11px-rounded
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
text-align: center
margin-right: 3
margin-left: 3
text:
]], minimap)
onPlayerPositionChange(function(newPos, oldPos)
if label and newPos then
label:setText(newPos.x ..', '..newPos.y..', '..newPos.z)
label:setColor("white")
end
end)
singlehotkey("F3", "Get Tile Pos", function()
local tile = getTileUnderCursor()
if tile then
local tilePos = ''
local tmp = tile:getPosition()
tilePos = tmp.x ..', '..tmp.y..', '..tmp.z
label:setText(tilePos)
label:setColor("red")
g_window.setClipboardText(tilePos)
end
end)
12 Jun 2022