Jump to content

[HELP] Interior Script


Recommended Posts

marker = createMarker ( 150.84593,  2470.74512, 17.70313, "arrow", 1.5, 0, 0, 255, 255 ) 
function hit( element ) 
if ( source == marker ) then 
setElementInterior( source, 12 ) 
setElementPosition( source, 150.84593,  2470.74512, 17.70313) 
end 
end 
addEventHandler("onMarkerHit", root, hit)  

But when i step on the marker, it doesnt warp me to an interior please help :|

Link to comment

The source of the event "onMarkerHit" is the marker that got hit by the player

so in this case "element" would be the player.

So this would be your new code

marker = createMarker ( 150.84593,  2470.74512, 17.70313, "arrow", 1.5, 0, 0, 255, 255 ) 
function hit( element ) 
if ( source == marker ) then 
setElementInterior( element, 12 ) 
setElementPosition( element, 150.84593,  2470.74512, 17.70313) 
end 
end 
addEventHandler("onMarkerHit", root, hit) 

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...