Black2 Posted November 16, 2015 Share Posted November 16, 2015 Hello,I wanted to stay off the button and stay activated only for those who belong to a group acl Any idea ? Thx Link to comment
S3Nn4oXx Posted November 16, 2015 Share Posted November 16, 2015 guiGetEnabled guiSetEnabled getAccountName isGuestAccount getPlayerAccount isObjectInACLGroup aclGetGroup ==Triggers triggerServerEvent triggerClientEvent Link to comment
iPrestege Posted November 16, 2015 Share Posted November 16, 2015 You can use : -- # ServerSide 'onPlayerLogin' -- Event getPlayerAccount getAccountName isObjectInACLGroup aclGetGroup triggerClientEvent -- # ClientSide guiSetEnabled guiGetEnabled When the player login check the acl group and if the player was in that acl make a trigger to client to enable the key. Ex : -- # ServerSide : addEventHandler ( 'onPlayerLogin',root, function ( ) if isObjectInACLGroup( 'user.' ..getAccountName ( getPlayerAccount ( source ) ), aclGetGroup ( 'Console' ) ) then triggerClientEvent ( source,'ActiveGuiElement',source ) end end ) -- # ClientSide : addEvent ( 'ActiveGuiElement' ) addEventHandler ( 'ActiveGuiElement',root, function ( ) if guiGetEnabled ( ..... ) == ( true ) then return false end guiSetEnabled ( ..... ) end ) I hope that it helps . Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now