Jump to content

portão automático em interior e dimensão


Recommended Posts

como faço para colocar esse script de portão automático dentro de um interior/dimensão 

local gate = createObject(16775, 246, 72.599609375, 1004.799987793, 0, 0, 0) 
local marker = createMarker(246, 72.599609375, 1004.799987793, "cylinder", 8, 0, 0, 0, 0) 
  
function moveGate(thePlayer) 
     if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)) , aclGetGroup("Policial")) then 
          moveObject(gate, 3000, 246, 72.599609375, 1004.799987793) 
     end 
end 
addEventHandler("onMarkerHit", marker, moveGate) 
  
function move_back_gate() 
     moveObject(gate, 3000, 246, 72.599609375, 1007.2) 
end 
addEventHandler("onMarkerLeave", marker, move_back_gate) 

 

Edited by Lord Henry
Script convertido de texto para Lua.
Link to comment
  • Other Languages Moderators
-- Colocar o portão em uma dimensão e interior. (troque o 0)
setElementDimension (gate, 0)
setElementInterior (gate,  0)

-- Colocar o marker em uma dimensão e interior. (troque o 0)
setElementDimension (marker, 0)
setElementInterior (marker,  0)

 

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