Jump to content

Recommended Posts

Posted

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?

  • Moderators
Posted

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

 

Eu te ajudei ou achou meu comentário útil? Não esqueça de deixar um Thanksspacer.png

Minhas contribuições para a comunidade: LordHenry - MTA Wiki Profile
Inscreva-se no meu canal do YouTube: Lord Henry - Entertainment
Discord Oficial do MTA: https://mtasa.com/discord
Blacklist e Whitelist de Scripters: Planilha

Por favor, não me envie mensagens privadas solicitando suporte. Crie um tópico no fórum em vez disso.

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

Please do not PM me with scripting related question nor support, use the forums instead.

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