Jump to content

no problem my first script


Recommended Posts

hi guyz today i finally create a script buy my self its simple script but i feel pro :D

hxVTDPY.png

its a simple script that output outputChatBox text when player hit the marker

and when leave the marker

spacial thank to @Et-win @xXMADEXx and @MAX+

they make me understand lua language :)

at last i hope taht im not breaking forum rules:)

local myMarker = createMarker(2479.3000488281, -1664.0999755859, 13.300000190735, 'cylinder', 2.0, 255, 0, 0, 150)  
  
function MarkerHit( hitElement, matchingDimension )  
    local elementType = getElementType( hitElement )  
    outputChatBox( elementType.." your now inside the marker", getRootElement(), 255, 255, 0 )  
end 
addEventHandler( "onMarkerHit", myMarker, MarkerHit )  
local myMarker = createMarker( 2479.3000488281, -1664.0999755859, 13.300000190735, "cylinder", 2.0, 255, 0, 0, 150 ) 
  
function markerLeave( leaveElement, matchingDimension ) 
        if getElementType( leaveElement ) == "player" then 
          outputChatBox ( "you left the marker", getRootElement(), 255, 255, 0 ) 
        end 
end 
addEventHandler( "onMarkerLeave", myMarker, markerLeave ) 

i have 1 question

# do i have to write


in each script ?

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