Jump to content

Oque tem de errado neste script?


Recommended Posts

coloquei para só o cargo polical abrir o portão mais não abre, nem no cargo policial e nem sem o cargo

function createTheGate () 
 myGate1 = createObject ( 971, 1544.5,-1632,15.89999961853,0,0,267.99499511719 ) 
 myGate2 = createObject ( 971, 1544.7998046875,-1623.2001953125,15.89999961853,0,0,87.989501953125 ) 
 end 
 addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate ) 
 --Open BaseAero 
 function openMyGate ( ) 
if isObjectInACLGroup ( "user."..accountname, aclGetGroup ( "Policial Civil" ) ) then 
 -- if isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( 'Policial Civil' ) ) then 
 moveObject ( myGate1, 2500, 1544.5,-1638.9000244141,15.89999961853 ) 
 moveObject ( myGate2, 2500, 1544.8000488281,-1615.5999755859,15.89999961853 ) 
 else 
 end 
 end 
-- end 
 addCommandHandler("portao",openMyGate) 
  
 --Close BaseAero 
 function movingMyGateBack () 
if isObjectInACLGroup ( "user."..accountname, aclGetGroup ( "Policial Civil" ) ) then 
 moveObject ( myGate1, 2500, 1544.5,-1632,15.89999961853 ) 
 moveObject ( myGate2, 2500, 1544.7998046875,-1623.2001953125,15.89999961853 ) 
else 
 end 
 end 
 addCommandHandler("portaof",movingMyGateBack) 

Link to comment
function createTheGate () 
 myGate1 = createObject(971, 1544.5,-1632,15.89999961853,0,0,267.99499511719) 
 myGate2 = createObject(971, 1544.7998046875,-1623.2001953125,15.89999961853,0,0,87.989501953125) 
end 
addEventHandler("onResourceStart",getResourceRootElement(getThisResource()),createTheGate) 
  
 --Open BaseAero 
function openMyGate(player) 
    local account = getPlayerAccount(player) 
    if account and isObjectInACLGroup ( "user."..getAccountName(account), aclGetGroup ( "Policial Civil" ) ) then 
        moveObject ( myGate1, 2500, 1544.5,-1638.9000244141,15.89999961853 ) 
        moveObject ( myGate2, 2500, 1544.8000488281,-1615.5999755859,15.89999961853 ) 
    end 
end 
addCommandHandler("portao",openMyGate) 
  
 --Close BaseAero 
function movingMyGateBack(player) 
    local account = getPlayerAccount(player) 
    if account and isObjectInACLGroup ( "user."..getAccountName(account), aclGetGroup ( "Policial Civil" ) ) then 
        moveObject ( myGate1, 2500, 1544.5,-1632,15.89999961853 ) 
        moveObject ( myGate2, 2500, 1544.7998046875,-1623.2001953125,15.89999961853 ) 
    end 
end 
addCommandHandler("portaof",movingMyGateBack) 

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