Jump to content

ACL Gate Problem


DonPro

Recommended Posts

Hi. i got this ACL gate here, the gate shows up but when i hit the marker it wont go anywhere! im in the ACL group and everything is fine there. but if someone can help me also make this to a Command Handler i would be happy thanks!

local gate = createObject(3114, -3362.0400390625, 2425.9689941406, 9.4750003814697, 0, 0, 270) 
local marker = createMarker(-3364.6000976563, 2414, 10, "cylinder", 1, 255, 255, 255, 0) 
  
function moveGate(psource) 
     local Deadusergroup = getAccountName(getPlayerAccount(psource)) 
     if isObjectInACLGroup("PST_Army"..Deadusergroup, aclGetGroup("Dead")) then 
          moveObject(gate, 5000, -3362.0400390625, 2425.9499511719, 16.540000915527) 
          setTimer(moveBack, 5000, 1) 
     end 
end 
addEventHandler("onMarkerHit", marker, moveGate) 
  
function moveBack() 
     moveObject(gate, 5000, -3362.0400390625, 2425.9689941406, 9.4750003814697) 
end 
  

Link to comment
local gate = createObject(3114, -3362.0400390625, 2425.9689941406, 9.4750003814697, 0, 0, 270) 
local marker = createMarker(-3364.6000976563, 2414, 10, "cylinder", 1, 255, 255, 255, 0) 
  
  
function isAclGroup(p,group) 
if p and getElementType(p) == "player" and type(group) == "string" then  
     local Deadusergroup = getAccountName(getPlayerAccount(p)) 
         if isObjectInACLGroup("user."..Deadusergroup, aclGetGroup(group)) then  
              return true  
      else   
             return false  
            end   
      else 
             return false   
      end 
 end  
  
function moveGate(psource) 
  
     if isAclGroup(psource,group) then 
          moveObject(gate, 5000, -3362.0400390625, 2425.9499511719, 16.540000915527) 
      end 
end 
addEventHandler("onMarkerHit", marker, moveGate) 
  
function moveBack(pp) 
if isAclGroup(pp,group) then  
     moveObject(gate, 5000, -3362.0400390625, 2425.9689941406, 9.4750003814697)  
     end 
end 
addEventHandler("onMarkerLeave", marker, moveBack) 

Link to comment
local gate = createObject(3114, -3362.0400390625, 2425.9689941406, 9.4750003814697, 0, 0, 270) 
local marker = createMarker(-3364.6000976563, 2414, 10, "cylinder", 1, 255, 255, 255, 0) 
  
  
function isAclGroup(p,group) 
if p and getElementType(p) == "player" and type(group) == "string" then  
     local Deadusergroup = getAccountName(getPlayerAccount(p)) 
         if isObjectInACLGroup("user."..Deadusergroup, aclGetGroup(group)) then  
              return true  
      else   
             return false  
            end   
      else 
             return false   
      end 
 end  
  
function moveGate(psource) 
  
     if isAclGroup(psource,group) then 
          moveObject(gate, 5000, -3362.0400390625, 2425.9499511719, 16.540000915527) 
      end 
end 
addEventHandler("onMarkerHit", marker, moveGate) 
  
function moveBack(pp) 
if isAclGroup(pp,group) then  
     moveObject(gate, 5000, -3362.0400390625, 2425.9689941406, 9.4750003814697)  
     end 
end 
addEventHandler("onMarkerLeave", marker, moveBack) 

bro. its still not working :( i put Mark as user and thats what im registred in!

Link to comment
local gate = createObject(980,1810.6999511719, -1891, 15, 0, 0, 90) 
local marker = createMarker(1810.6999511719, -1891, 15, "cylinder", 10, 255, 255, 255, 0) 
  
function moveGate(psource) 
     local Deadusergroup = getAccountName(getPlayerAccount(psource)) 
     if isObjectInACLGroup("user."..Deadusergroup, aclGetGroup("Dead")) then 
          moveObject(gate, 980, 1810.6999511719, -1891, 9.6000003814697) 
          setTimer(moveBack, 5000, 1) -- 
     end 
end 
addEventHandler("onMarkerHit", marker, moveGate) 
  
function moveBack() 
     moveObject(gate, 980, 1810.6999511719, -1891, 15) 
end 
  
addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), onStartup)  

Tested and functional!

By [N]inja :lol:

Link to comment
local gate = createObject(980,1810.6999511719, -1891, 15, 0, 0, 90) 
local marker = createMarker(1810.6999511719, -1891, 15, "cylinder", 10, 255, 255, 255, 0) 
  
function moveGate(psource) 
     local Deadusergroup = getAccountName(getPlayerAccount(psource)) 
     if isObjectInACLGroup("user."..Deadusergroup, aclGetGroup("Dead")) then 
          moveObject(gate, 980, 1810.6999511719, -1891, 9.6000003814697) 
          setTimer(moveBack, 5000, 1) -- 
     end 
end 
addEventHandler("onMarkerHit", marker, moveGate) 
  
function moveBack() 
     moveObject(gate, 980, 1810.6999511719, -1891, 15) 
end 
  
addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), onStartup)  

Tested and functional!

By [N]inja :lol:

still not working :(

local gate = createObject(3114, -3362.04, 2425.96, 9.47, 0, 0, 270) 
local marker = createMarker(-3364.6500976563, 2414, 10.5, "cylinder", 1, 255, 255, 255, 0) 
  
function moveGate(psource) 
     local Deadusergroup = getAccountName(getPlayerAccount(psource)) 
     if isObjectInACLGroup("user.Mark"..Deadusergroup, aclGetGroup("Dead")) then 
          moveObject(gate, 3114, -3362.0400390625, 2425.9499511719, 16.540000915527) 
          setTimer(moveBack, 5000, 1) -- 
     end 
end 
addEventHandler("onMarkerHit", marker, moveGate) 
  
function moveBack() 
     moveObject(gate, 3114, -3362.0400390625, 2425.9689941406, 9.4750003814697) 
end 
  
addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), onStartup) 

Link to comment
Nothing, just "user."..Deadusergroup

EDIT: That code from Saml1er just works?

none of these codes works for me :/ ive tryed a old i had and that worked, and thats not an ACL group moving gate. but i now trying a moving gate with command and that works to

Link to comment
local gate = createObject(3114, -3362.0400390625, 2425.9689941406, 9.4750003814697, 0, 0, 270) 
local marker = createMarker(-3364.6000976563, 2414, 10, "cylinder", 1, 255, 255, 255, 0) 
  
  
function isAclGroup(p,group) 
if p and getElementType(p) == "player" and type(group) == "string" then  
     local Deadusergroup = getAccountName(getPlayerAccount(p)) 
         if isObjectInACLGroup("user."..Deadusergroup, aclGetGroup(group)) then  
              return true  
      else   
             return false  
            end   
      else 
             return false   
      end 
 end  
  
function moveGate(psource) 
  
     if isAclGroup(psource,group) then 
          moveObject(gate, 5000, -3362.0400390625, 2425.9499511719, 16.540000915527) 
      end 
end 
addEventHandler("onMarkerHit", marker, moveGate) 
  
function moveBack(pp) 
if isAclGroup(pp,group) then  
     moveObject(gate, 5000, -3362.0400390625, 2425.9689941406, 9.4750003814697)  
     end 
end 
addEventHandler("onMarkerLeave", marker, moveBack) 

none of these codes works for me :/ ive tryed a old i had and that worked, and thats not an ACL group moving gate. but i now trying a moving gate with command and that works to
if isAclGroup(psource,group) then 

Did you change 'group' to the ACL name? Doubt it. Are you also in the ACL group which you gave up? Doubt it too.

Link to comment
local gate = createObject(3114, -3362.0400390625, 2425.9689941406, 9.4750003814697, 0, 0, 270) 
local marker = createMarker(-3364.6000976563, 2414, 10, "cylinder", 1, 255, 255, 255, 0) 
  
  
function isAclGroup(p,group) 
if p and getElementType(p) == "player" and type(group) == "string" then  
     local Deadusergroup = getAccountName(getPlayerAccount(p)) 
         if isObjectInACLGroup("user."..Deadusergroup, aclGetGroup(group)) then  
              return true  
      else   
             return false  
            end   
      else 
             return false   
      end 
 end  
  
function moveGate(psource) 
  
     if isAclGroup(psource,group) then 
          moveObject(gate, 5000, -3362.0400390625, 2425.9499511719, 16.540000915527) 
      end 
end 
addEventHandler("onMarkerHit", marker, moveGate) 
  
function moveBack(pp) 
if isAclGroup(pp,group) then  
     moveObject(gate, 5000, -3362.0400390625, 2425.9689941406, 9.4750003814697)  
     end 
end 
addEventHandler("onMarkerLeave", marker, moveBack) 

none of these codes works for me :/ ive tryed a old i had and that worked, and thats not an ACL group moving gate. but i now trying a moving gate with command and that works to
if isAclGroup(psource,group) then 

Did you change 'group' to the ACL name? Doubt it. Are you also in the ACL group which you gave up? Doubt it too.

   "PST_Army"> 
        "user.Mark"> 
    

Link to comment
Reshow the script, doubt that it is correct to be honest. Also, restarted the server and checked or it is still in the ACL file?

ACL group is still up if i understand u right. ehm but the gate wont work, i see the gate at the spot i want it, but it wont work. heh

Link to comment
shouldn't this be;
if isAclGroup(psource,group) then 

changed too

if isObjectInACLGroup(psource,group) then 

LUA is case sensitive and I thought that all ACL functions were caps.^

+ isAclGroup doesn't exist

Check the script again, it's a own made function...

Any debugscript 3 errors? Repost script?

bad arguments osv, thats the error i get up :P

osv? There isn't any 'osv' text in this script? Are you even sure it's this script? Otherwise post the whole error.......

Link to comment
shouldn't this be;
if isAclGroup(psource,group) then 

changed too

if isObjectInACLGroup(psource,group) then 

LUA is case sensitive and I thought that all ACL functions were caps.^

+ isAclGroup doesn't exist

Check the script again, it's a own made function...

Any debugscript 3 errors? Repost script?

bad arguments osv, thats the error i get up :P

osv? There isn't any 'osv' text in this script? Are you even sure it's this script? Otherwise post the whole error.......

sorry (osv) is something we use in norwegian :P hah i will try figger out of this if not i just use commands, thanks for your help everyone! :)

Link to comment

Ah, I haven't seen this topic since a while.

local gate = createObject(3114, -3362.0400390625, 2425.9689941406, 9.4750003814697, 0, 0, 270) 
local marker = createMarker(-3364.6000976563, 2414, 10, "cylinder", 1, 255, 255, 255, 0) 
  
  
function isAclGroup(p,group) 
if p and getElementType(p) == "player" and type(group) == "string" then 
     local Deadusergroup = getAccountName(getPlayerAccount(p)) 
         if isObjectInACLGroup("user."..Deadusergroup, aclGetGroup(group)) then 
              return true 
      else   
             return false 
            end   
      else 
             return false   
      end 
 end 
  
function moveGate(psource) 
     if isAclGroup(psource,"PST_Army") then 
          moveObject(gate, 5000, -3362.0400390625, 2425.9499511719, 16.540000915527) 
      end 
end 
addEventHandler("onMarkerHit", marker, moveGate) 
  
function moveBack(pp) 
     moveObject(gate, 5000, -3362.0400390625, 2425.9689941406, 9.4750003814697) 
end 
addEventHandler("onMarkerLeave", marker, moveBack) 

Everything should work fine now btw your group name was "PST_Army" not "Dead".

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