Sh4d00w Posted October 31, 2019 Share Posted October 31, 2019 Gostaria de deixar o Painel abrindo em duas ACL ao invés de acionar o player em varias function painel(thePlayer) login = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user."..login, aclGetGroup("TAGBOPE")) then ----- o grupo que vc criou no painel admin triggerClientEvent(thePlayer, "BPAbrir", getRootElement()) else --outputChatBox("#FF0000* #000000[#FF0000ERRO#000000]#FFFFFF- Somente mebros da BOPE podem abrir o painel.", thePlayer, 255, 0, 0, true) end end Link to comment
DNL291 Posted October 31, 2019 Share Posted October 31, 2019 function painel(thePlayer) if isPlayerInACL(thePlayer, "TAGBOPE") or isPlayerInACL(thePlayer, "grupoACL") then ----- o grupo que vc criou no painel admin triggerClientEvent(thePlayer, "BPAbrir", getRootElement()) else --outputChatBox("#FF0000* #000000[#FF0000ERRO#000000]#FFFFFF- Somente mebros da BOPE podem abrir o painel.", thePlayer, 255, 0, 0, true) end end function isPlayerInACL(player, acl) if isElement(player) and getElementType(player) == "player" and aclGetGroup(acl or "") and not isGuestAccount(getPlayerAccount(player)) then local account = getPlayerAccount(player) return isObjectInACLGroup( "user.".. getAccountName(account), aclGetGroup(acl) ) end return false end Em "grupoACL" coloque o segundo grupo permitido. Movido para: https://forum.multitheftauto.com/forum/127-programação-em-Lua/ @Sh4d00w 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