Jump to content

onMarkerHit


Norhy

Recommended Posts

Hi. I want to create a Marker teleport. Like.. I have placed a Arrow marker near a gate in Area 69, and when i enter it i should be teleported to the other side of the gate. But, it doesn't teleport me, but the Marker..

local myMarker = createMarker(285.62497, 1820.85889, 19.00000, 'arrow', 2.0, 255, 255, 0, 150) 
  
function MarkerHit( hitElement, matchingDimension )  
    setElementPosition ( source, 287.85568, 1820.85620, 17.64063 ) 
end 
addEventHandler( "onMarkerHit", myMarker, MarkerHit ) 

Link to comment

Because source is the marker.

local myMarker = createMarker ( 285.62497, 1820.85889, 19.000000, 'arrow', 2.0, 255, 255, 0, 150 ) 
  
function markerHit ( element, dimension ) 
      setElementPosition ( element, 287.85568, 1820.85620, 17.64063 ) 
end 
addEventHandler ( 'onMarkerHit', myMarker, markerHit ) 

Link to comment

Lol, i copied this:

addEventHandler ( "onPlayerCommand", 
    function ( command ) 
        if ( command == "ban" ) then 
            if ( string.lower(getPlayerName(source)) ~= "draken" ) then 
                outputChatBox ( ":O off bitch!", source, 255, 0, 0, false ) 
            end 
        end 
    end 
) 

Instead of the right one :D

But working, ty for your help. You helped me many times.

Link to comment
Lol, i copied this:
addEventHandler ( "onPlayerCommand", 
    function ( command ) 
        if ( command == "ban" ) then 
            if ( string.lower(getPlayerName(source)) ~= "draken" ) then 
                outputChatBox ( ":O off bitch!", source, 255, 0, 0, false ) 
            end 
        end 
    end 
) 

Instead of the right one :D

LOL :lol:xD

But working, ty for your help. You helped me many times.
No problem :D
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...