Jump to content

help!


WASSIm.

Recommended Posts

hi guys. this script not working. why ?

exports [ "scoreboard" ]:addScoreboardColumn ( "Occupation", root, 2, occupation, 70 ) 
      
function updatePlayersACLscore ( ) 
    for index, player in ipairs ( getElementsByType "player" ) do 
    setElementData ( player, "Occupation", getElementData ( player, "getPlayerACL") ) 
    end 
end 
setTimer ( updatePlayersACLscore, 2500, 0 ) 
  
  
function updatePlayersACL ( ) 
    for index, player in ipairs ( getElementsByType "player" ) do 
     
    local accountname = getAccountName (getPlayerAccount(player)) 
        if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Console" ) ) then 
            setElementData ( player, "getPlayerACL", Console ) 
             
        elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then 
            setElementData ( player, "getPlayerACL", Admin ) 
             
        elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "SuperModerator" ) ) then 
            setElementData ( player, "getPlayerACL", SuperModerator ) 
             
        elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Moderator" ) ) then 
            setElementData ( player, "getPlayerACL", Moderator ) 
             
        elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Soldier" ) ) then 
            setElementData ( player, "getPlayerACL", Soldier ) 
             
        elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Police" ) ) then 
            setElementData ( player, "getPlayerACL", Police ) 
             
        elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Mechanic" ) ) then 
            setElementData ( player, "getPlayerACL", Mechanic ) 
  
        elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Everyone" ) ) then 
            setElementData ( player, "getPlayerACL", Player ) 
             
        elseif isGuestAccount ( getPlayerAccount ( player ) ) then 
            setElementData ( player, "getPlayerACL", Guest ) 
        else 
        setElementData ( player, "getPlayerACL", N/A ) 
        end 
    end 
end 
setTimer ( updatePlayersACL, 500, 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...