Jump to content

help with marker


Machine

Recommended Posts

hello i made this marker to enter a place but problem is how make it in same time out from the place? using same markers

enter = createMarker(1122.7998046875, -2036.8994140625, 70.5, "arrow", 1, 150, 0, 0, 255 )

function teleport(player)

if getElementType(player)=="player" then

if source == enter then

setElementPosition(player, 1107.599609375, -2062.9, -51)

setElementFrozen(player, false)

setTimer(setElementFrozen, 1000, 1, player, false)

end

end

end

addEventHandler("onClientMarkerHit", getRootElement(), teleport)

Link to comment

You would need to create two markers.

enter = createMarker(1122.7998046875, -2036.8994140625, 70.5, "arrow", 1, 150, 0, 0, 255 ) 
leave = createMarker(x, y, z, "arrow", 1, 0, 0, 255) 
  
  
function teleport(client) 
    if not (getElementType(client)=="player") then return end 
    if (source == enter) then 
        setElementPosition(client, 1107.599609375, -2062.9, -51) 
        setElementFrozen(client, false) 
        setTimer(setElementFrozen, 1000, 1, client, false) 
    elseif (source == leave) then 
        --your code 
    end 
end 
addEventHandler("onClientMarkerHit", root, teleport) 

Edited by Guest
Link to comment

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.
×
×
  • Create New...