Jump to content

[LUA] Need some help!


xDrul

Recommended Posts

Yow,

So i've faced some troubles at my script. I'm trying to make an interior door, but for some reason it bugs. The door opens for me, but stays closed for all others. Anyway to fix that / what did I do wrong? D:

allowedClasses = { 
["HQ"] = true, 
} 
  
local marker = createMarker(posX, posY, posZ, "arrow", 1.5, 255, 0, 0) 
setElementInterior(marker, 3) 
local door = createObject(2930, posX, posY, posZ, rotX, rotY, rotZ) 
setElementInterior(door, 3) 
  
function moveTheGate() 
if allowedClasses[(getElementData(source, "Class"))] then 
moveObject(door, 3000, newX, newY, newZ) 
end 
end 
addEventHandler("onClientMarkerHit", getRootElement(), moveTheGate) 
  

Sorry, on my iPad now so i can't post the whole script/xyz and shit.

All help is much 'preciated

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