Thiago Machado Posted May 6, 2020 Posted May 6, 2020 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?
Other Languages Moderators Lord Henry Posted May 6, 2020 Other Languages Moderators Posted May 6, 2020 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
DNL291 Posted May 7, 2020 Posted May 7, 2020 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.
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