Jump to content

HELP 2nd Enter


LasHa

Recommended Posts

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

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

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