Jump to content

BindKey


Pedro001

Recommended Posts

  • 4 weeks later...
On 01/10/2018 at 12:37, Pedro001 said:

Hey guys... ^^ 

How can I make a bindKey that will open a GUI only for the players that is in acl Console? .-. 

Thank you! :3 

Client : 

bindKey( 'your button' , 'down' , 
    function(  )
        triggerServerEvent( 'console' , localPlayer )
    end
)

addEvent( 'a' , true )
addEventHandler( 'a' , root , 
    function(  )
        guiSetVisible( 'Your Gui Window' , not guiGetVisible( window ) )
        showCursor( guiGetVisible( 'Your Gui Window' ) )
    end
)

Server : 

addEvent( 'console' , true )
addEventHandler( 'console' , root , 
    function(  )
        if ( isObjectInACLGroup( 'user.' .. getAccountName( getPlayerAccount( source ) ) , aclGetGroup( 'console' ) ) ) then
            triggerClientEvent( source , 'a' , source )
        else
            outputChatBox( "you don't have premission to do that !!" , source , 255 , 0 , 0 , true )
        end
    end
)

don't forget to replace "your button" and  "Your Gui Window"

Just now, Insigne said:

wait a second

Posted October 1

WTF ?????????

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