Jump to content

[HELP] isObjectInACLGroup


Rio

Recommended Posts

I've been working on making a samsite for my admin base.. I tried everything searching searching fixed the code still i'm getting this error :

   
[2016-04-03 10:04:47] WARNING: WTA-basesamsite\ad_base_s.lua:26: Bad argument @ 'isObjectInACLGroup' [Expected acl-group at argument 2, got boolean] 
[2016-04-03 10:04:53] WARNING: WTA-basesamsite\ad_base_s.lua:60: Bad argument @ 'isObjectInACLGroup' [Expected acl-group at argument 2, got boolean] 
  

My isObjectInACLGroup part Code:

  
function hit ( pla, dim ) 
     
    if getElementType ( pla ) == "player" then 
     
    local vehicle = getPedOccupiedVehicle ( pla ) 
        if vehicle or not vehicle then 
           
            local account = getPlayerAccount ( pla ) 
            if account then 
            local accountname = getAccountName ( account ) 
            if isObjectInACLGroup ( "user." .. tostring(accountname), aclGetGroup ( "Admin" ) ) then 
             
        else  
         
       if isObjectInACLGroup ( "user." .. tostring(accountname), aclGetGroup ( "Super Moderator" ) ) then   
             
        else  
         
       if isObjectInACLGroup ( "user." .. tostring(accountname), aclGetGroup ( "Moderator" ) ) then 
              
                outputChatBox ( "[WTA]Welcome Sir, "..getPlayerName(pla).."!", pla, 0, 150, 0 ) 
                 
        else 
                setElementData ( pla, "inRestrictedArea", "true" ) 
                triggerClientEvent ( pla, "destroyTrepassor", g_root, pla ) 
                outputChatBox ( "***WTA Headquarters Restricted Area!***", pla, 255, 0, 0 ) 
                outputChatBox ( "* "..getPlayerName(pla)..".has entered The WTA Headquarters Restricted Area.Enjoy The Fireworks Bro!", g_root, 70, 251, 45 ) 
                        end  
                    end 
                end 
            end 
        end 
     end 
end 
addEventHandler ( "onColShapeHit", g_base_col, hit ) 
  

Link to comment
  
function hit ( pla, dim ) 
    
    if getElementType ( pla ) == "player" then 
    
    local vehicle = getPedOccupiedVehicle ( pla ) 
        if vehicle or not vehicle then 
          
            local account = getPlayerAccount ( pla ) 
            if account then 
            local accountname = getAccountName ( account ) 
            if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then 
            
        else 
        
       if isObjectInACLGroup ( "user." ..accountname, aclGetGroup ( "Super Moderator" ) ) then  
            
        else 
        
       if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Moderator" ) ) then 
              
                outputChatBox ( "[WTA]Welcome Sir, "..getPlayerName(pla).."!", pla, 0, 150, 0 ) 
                
        else 
                setElementData ( pla, "inRestrictedArea", "true" ) 
                triggerClientEvent ( pla, "destroyTrepassor", g_root, pla ) 
                outputChatBox ( "***WTA Headquarters Restricted Area!***", pla, 255, 0, 0 ) 
                outputChatBox ( "* "..getPlayerName(pla)..".has entered The WTA Headquarters Restricted Area.Enjoy The Fireworks Bro!", g_root, 70, 251, 45 ) 
                        end 
                    end 
                end 
            end 
        end 
     end 
end 
addEventHandler ( "onColShapeHit", g_base_col, hit ) 

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