Jump to content

Recommended Posts

Seria possivel modificar

 if ( isObjectInACLGroup ("user."..accName, aclGetGroup ( GroupName2 ) ) or isObjectInACLGroup ("user."..accName, aclGetGroup ( GroupName5 ) ) or isObjectInACLGroup ("user."..accName, aclGetGroup ( GroupName4 ) ) ) then

Para ao inves de acl, ser time?

Link to comment
  • Other Languages Moderators

Sim, é possível.

Use getPlayerTeam e compare com getTeamFromName

if (getPlayerTeam(thePlayer)) and (getTeamFromName ("Time")) then
    if (getPlayerTeam(thePlayer) == getTeamFromName ("Time")) then
        -- Code.
    end
else
    outputChatBox ("Jogador não está em um time ou então o time especificado não existe.")
end

 

Link to comment
local allowedTeams = { ["team1"] = true, ["team2"] = true, ["team3"] = true }

local team = getPlayerTeam(player)
if team and allowedTeams[getTeamName(team)] then
    outputChatBox("com permissão", player)
else
    outputChatBox("Sem permissão", player)
end

Usando uma tabela para listar os times com permissão.

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