Jump to content

Alguem ajudar em Por Mais ACL


Recommended Posts

function teleprotect ( thePlayer)

            local Deadusergroup = getAccountName(getPlayerAccount(thePlayer))
             if isObjectInACLGroup("user."..Deadusergroup, aclGetGroup("Console")) then 
	     setElementPosition (thePlayer, 1541.3057861328,-1366.1774902344,329.796875) 
	---------	outputChatBox (' #000000[ #ff0000 /Comando #000000 ]#ffffff ' .. getPlayerName(thePlayer) .. ' #00FF00Foi para Base #000000[ Nome #000000]', getRootElement(), 255,255,255,true) 
	else
	  ----------  outputChatBox (getPlayerName(thePlayer) .. ' #ff0000Somente Quem tem permição da #000000[ Nome #000000 ] #ff0000Pode Ir para Base', source, 255,255,255,true)
   end
end
addCommandHandler ("prisao", teleprotect) 

Alguem ajudar quero por mais de uma acl

Link to comment
  • Other Languages Moderators
acls = {
	"Console",
	"Admin",
	-- Mais quantas quiser...
}

function teleprotect (thePlayer)
	local Deadusergroup = getAccountName(getPlayerAccount(thePlayer))
	for _, acl in ipairs (acls) do
		if isObjectInACLGroup("user."..Deadusergroup, aclGetGroup(acl)) then
			setElementPosition (thePlayer, 1541.3057861328, -1366.1774902344, 329.796875)
			-- outputChatBox ('#000000[ #ff0000 /Comando #000000 ]#ffffff ' .. getPlayerName(thePlayer) .. ' #00FF00Foi para Base #000000[ Nome #000000]', getRootElement(), 255, 255, 255, true)
			return
		end
	end
	-- outputChatBox (getPlayerName(thePlayer) .. '#ff0000Somente Quem tem permissão da #000000[ Nome #000000 ] #ff0000Pode Ir para Base', source, 255, 255, 255, true)
end
addCommandHandler ("prisao", teleprotect)

 

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