Jump to content

Timeplayer gate


Estevam2d

Recommended Posts

How do I do to open the gate with game time?

but also it has to be in the team;

Sorry bad english...

local gate = createObject(980, 1447.200, 663.869, 11.98, 0, 0, 179) 
local marker = createMarker(1447.5, 664.255, 10.672, "cylinder", 11, 255, 255, 255, 0) 
  
function moveGate(hitPlayer) 
    if getElementType(hitPlayer) == "player" then 
        local theTeam = getPlayerTeam(hitPlayer) 
        if theTeam and getTeamName(theTeam) == "Policia Militar" or getTeamName(theTeam) == "BMV - Staff" then 
            moveObject(gate, 2500, 1427.89, 664.042, 11.98) 
        end 
    end 
end 
addEventHandler("onMarkerHit", marker, moveGate) 
  
function moveBack(leavePlayer) 
    if getElementType(leavePlayer) == "player" then 
        local theTeam = getPlayerTeam(leavePlayer) 
        if theTeam and getTeamName(theTeam) == "Policia Militar" or getTeamName(theTeam) == "BMV - Staff" then 
            moveObject(gate, 2500, 1447.200, 663.869, 11.98) 
        end 
    end 
end 
addEventHandler("onMarkerLeave", marker, moveBack) 

Link to comment

someone help me this not working.

function moveGate(hitPlayer) 
    if getElementType(hitPlayer) == "player" then 
        local theTeam = getPlayerTeam(hitPlayer) 
        local sHour = split( getElementData( hitPlayer, 'PlayTime' ), ":" ) 
        local hour = tonumber( sHour[1] )  
        if not sHour then sHour = '300:0:0' end 
        if theTeam and getTeamName(theTeam) == "R.O.T.A" or getTeamName(theTeam) == "BMV - Staff" then 
            moveObject(gates, 2500, 1509.664, 663.894, 11.98) 
        end 
    end 
end 
addEventHandler("onMarkerHit", markerr, moveGate) 

:cry::cry::cry:

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