Jump to content

Gate locked for gang


Recommended Posts

hello i need a hand , i kinda tried to lock gates for gang but it doesn't work , the gate doesn't move , here's a code i made that didn't work.

function move_at_gate(hitPlayer, matchingDimension) 
        local playerGang = getElementData(hitPlayer) 
        if playerGang then 
                        local gangName = getElementData(source, "gang") 
                        if gangName == "Alpha Team" then 
                moveObject(at_gate, 2000, -2862.0068359375, 468.7, 11.2, 0, 0, 0) 
                end 
        end 
end 
addEventHandler("onMarkerHit", at_marker, move_at_gate) 

Link to comment
function move_at_gate(hitPlayer, matchingDimension) 
    if not ( getElementType ( hitPlayer ) == "player" or matchingDimension ) then 
        return; 
    end 
    local gangName = getElementData(hitPlayer, "gang") 
    if gangName == "Alpha Team" then 
        moveObject(at_gate, 2000, -2862.0068359375, 468.7, 11.2, 0, 0, 0) 
    end 
end 
addEventHandler("onMarkerHit", at_marker, move_at_gate) 

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