Tokio

[HELP] Why not change marker position?

Recommended Posts

This is the code:

Spoiler

function marker()
    local pos = positions[math.random(1,#positions)]
    return createMarker(pos.x,pos.y,pos.z,"cylinder",1.5,255,0,0,160)
end
local mark = marker()
setElementVisibleTo(mark, root, false)

local asdasd = false
function tesssst()
if asdasd == false then
asdasd=true
setElementVisibleTo(mark, root, true)
else
setElementVisibleTo(mark, root, false)
asdasd = false 
end
end
addCommandHandler("asd", tesssst)

 

When i type twice " /asd " the marker position does not change.. How to fix this? :S 

Share this post


Link to post
4 minutes ago, Dimos7 said:

Try setElementPosition

Thank you:DDD

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.