Jump to content

Freeroam gui


#Paper

Recommended Posts

Just do like this: (its from admin system)

_aclrights = {} 
  
function hasPermissionTo ( object ) 
    if ( _aclrights[object] ) then 
        return true 
    end 
    return false 
end 
  
addEvent ( "aPermissions", true ) 
addEventHandler ( "aPermissions", getLocalPlayer(), function ( table ) 
    for id, right in ipairs ( table ) do 
        _aclrights[right] = true 
        if ( aAdminForm ) then 
            guiSetEnabled ( _guiprotected[right], true ) 
        end 
    end 
end ) 
  
addEventHandler ( "onAdminInitialize", _root, function() 
    if ( #_guiprotected == 0 ) then 
        triggerServerEvent ( "aPermissions", getLocalPlayer() ) 
    end 
end ) 
  

If im right run on client-side! ;)

Link to comment
Just do like this: (its from admin system)
_aclrights = {} 
  
function hasPermissionTo ( object ) 
    if ( _aclrights[object] ) then 
        return true 
    end 
    return false 
end 
  
addEvent ( "aPermissions", true ) 
addEventHandler ( "aPermissions", getLocalPlayer(), function ( table ) 
    for id, right in ipairs ( table ) do 
        _aclrights[right] = true 
        if ( aAdminForm ) then 
            guiSetEnabled ( _guiprotected[right], true ) 
        end 
    end 
end ) 
  
addEventHandler ( "onAdminInitialize", _root, function() 
    if ( #_guiprotected == 0 ) then 
        triggerServerEvent ( "aPermissions", getLocalPlayer() ) 
    end 
end ) 
  

If im right run on client-side! ;)

in what script i should add thi part?

If i add this code the freeroam gui be usable only for admins?

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