Jump to content

[AJUDA] PAINEL ABRIR EM DUAS ACL


Recommended Posts

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

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

  • Thanks 1
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...