LasHa Posted May 5, 2015 Share Posted May 5, 2015 Hello guys! i have a simple question. I'm begginer scripter so i need help with Marker. I made script and when Infernus hit marker and stay for 3 sec the driver gets 5k and marker color changes to green but how to prevent people from getting money or changing marker color on the second enter. Link to comment
xXMADEXx Posted May 5, 2015 Share Posted May 5, 2015 Create a table, and put their player element in the marker. Example: local enteredPlayers = { } local marker = createMarker ( 0, 0, 0, "cylinder", 3, 255, 0, 0, 120 ); addEventHandler ( "onMarkerHit", marker, function ( p ) if ( getElementType ( p ) ~= "player" ) then return end if ( enteredPlayers [ p ] ) then return outputChatBox ( "You've already entered the marker.", p ); end -- Rest of your code end ); Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now