Jump to content

Need Help In Acl Gate Open


B7raani

Recommended Posts

Hey guys i just need little help see this is my code i made but i didnt find any error in it i dont know why still the gate is not openning i made it openning for Dead Acl Group But its not working

local gate = createObject ( 985, 3112.888671875, -1914.9187011719, 1.8218749761581, 0, 0, -80 ) 
local marker = createMarker(3109.8999023438, -1915.0999755859, 1.7999999523163, "cylinder", 1, 255, 255, 255, 140) 
  
function onMarkerHit( leaveElement, matchingDimension ) 
local Deadusergroup = getAccountName ( getPlayerAccount ( psource ) )  
   if isObjectInACLGroup ("user."..Deadusergroup, aclGetGroup ( "Dead" ) ) then  
        moveObject(gate, 5000, 3113, -1921, 2.79999995231635) 
        setTimer(moveBack, 5000, 1) 
    end 
end 
addEventHandler("onMarkerHit", marker, moveGate) 
  
function moveBack() 
    moveObject(gate, 5000, 3113, -1915.19921875, 0.80000001192093, 6.1875) 
end 
  
addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), onStartup)      

Wish You Can Help Me :?

Edited by Guest
Link to comment
local gate = createObject(985, 3112.888671875, -1914.9187011719, 1.8218749761581, 0, 0, -80) 
local marker = createMarker(3109.8999023438, -1915.0999755859, 1.7999999523163, "cylinder", 1, 255, 255, 255, 140) 
  
function moveGate(psource) 
     local Deadusergroup = getAccountName(getPlayerAccount(psource)) 
     if isObjectInACLGroup("user."..Deadusergroup, aclGetGroup("Dead")) then 
          moveObject(gate, 5000, 3113, -1921, 2.79999995231635) 
          setTimer(moveBack, 5000, 1) 
     end 
end 
addEventHandler("onMarkerHit", marker, moveGate) 
  
function moveBack() 
     moveObject(gate, 5000, 3113, -1915.19921875, 0.80000001192093, 6.1875) 
end 

Link to comment

Tapl I Just removed the admin thing and i want to make new one for everybody but its not working wish you help me again

this is the code

tlocal gate = createObject(7033, 1943.2998046875, 848.69921875, 6.7266693115234, 0, 0, 90) 
local marker = createMarker(1947.6999511719, 849.70001220703, 6.6999998092651, "cylinder", 10, 255, 255, 255, 0) 
  
function moveGate(psource) 
          moveObject(gate, 5000, 1937.099609375, 843, 10.39999961853) 
          setTimer(moveBack, 5000, 1) 
     end 
end 
addEventHandler("onMarkerHit", marker, moveGate) 
  
function moveBack() 
     moveObject(gate, 5000, 1943.2998046875, 848.69921875, 6.7266693115234) 
end 

Link to comment
tlocal gate = createObject(7033, 1943.2998046875, 848.69921875, 6.7266693115234, 0, 0, 90) 
local marker = createMarker(1947.6999511719, 849.70001220703, 6.6999998092651, "cylinder", 10, 255, 255, 255, 0) 
  
function moveGate(psource) 
          moveObject(gate, 5000, 1937.099609375, 843, 10.39999961853) 
          setTimer(moveBack, 5000, 1) 
     end 
addEventHandler("onMarkerHit", marker, moveGate) 
  
function moveBack() 
     moveObject(gate, 5000, 1943.2998046875, 848.69921875, 6.7266693115234) 
end 

You had an extra "end".

Link to comment

It's 'local' not 'tlocal' ;)

local gate = createObject(7033, 1943.2998046875, 848.69921875, 6.7266693115234, 0, 0, 90) 
local marker = createMarker(1947.6999511719, 849.70001220703, 6.6999998092651, "cylinder", 10, 255, 255, 255, 0) 
  
function moveGate(psource) 
          moveObject(gate, 5000, 1937.099609375, 843, 10.39999961853) 
          setTimer(moveBack, 5000, 1) 
     end 
addEventHandler("onMarkerHit", marker, moveGate) 
  
function moveBack() 
     moveObject(gate, 5000, 1943.2998046875, 848.69921875, 6.7266693115234) 
end 

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