Ronizzz Posted April 12, 2017 Share Posted April 12, 2017 (edited) Hi, guys i have a problem doing a little vip panel. I want to do a type of whitelist to use it but with ACL'S groups. The problem is the next attempt to call global 'isPlayerInACL'(a nil value) Spoiler -----------PANEL VIP --------- bindKey ( "x", "down", function whitelist( ) local state = ( not guiGetVisible ( Ventana )) guiSetVisible ( Ventana, state ) showCursor ( state ) end ) Spoiler function whitelist (thePlayer) local thePlayer = getPlayerAccount if isPlayerInACL(thePlayer, "VIP") then outputChatBox("Access Granted!") else outputChatBox("Access Denied!") end end addCommandHandler("panelvip", whitelist) Edited April 12, 2017 by Ronizzz Link to comment
Oussema Posted April 13, 2017 Share Posted April 13, 2017 you forget to add the code of isPlayerInACl :v function isPlayerInACL ( player, acl ) local account = getPlayerAccount ( player ) if ( isGuestAccount ( account ) ) then return false end return isObjectInACLGroup ( "user."..getAccountName ( account ), aclGetGroup ( acl ) ) end function whitelist (thePlayer) local thePlayer = getPlayerAccount if isPlayerInACL(thePlayer, "VIP") then outputChatBox("Access Granted!") else outputChatBox("Access Denied!") end end addCommandHandler("panelvip", whitelist) 1 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