Tbol
Well-Known Member
- Joined
- Apr 7, 2019
- Messages
- 592
- Reaction score
- 64
Hello wrote this simple script, at first i wanted to create it onStartup instead of onLogin because onLogin it loops on every login and i have quite a few onlogin scripts already so idk if its actually smart to use this code or not, or i can ignore it because it have equal to zero impact
LUA:
local minimapMarkers = {
{x = 106, y = 174, z = 7, icon = 3, description = "Star Icon"},
{x = 150, y = 120, z = 7, icon = MAPMARK_SWORD, description = "Sword Icon"},
{x = 200, y = 130, z = 7, icon = MAPMARK_FLAG, description = "Flag Icon"},
{x = 250, y = 140, z = 7, icon = MAPMARK_QUESTION, description = "Question Mark Icon"},
}
local function addMarkersToPlayer(player)
for _, marker in ipairs(minimapMarkers) do
local pos = Position(marker.x, marker.y, marker.z)
player:addMapMark(pos, marker.icon, marker.description)
end
end
function onLogin(player)
addMarkersToPlayer(player)
return true
end