LoverX Posted July 20, 2020 Posted July 20, 2020 addCommandHandler ( "sumido", function ( thePlayer ) for k, v in ipairs( getAttachedElements( thePlayer ) ) do destroyElement( v ); outputChatBox("Modo sumido ativado!",player,255) end end ) Alguem poderia me ajudar, eu gostaria de adicionar esse comando apenas para um certo grupo da ACL, tipo FAGERAL, por favor me ajudem, sou novo no scripting lua.
Moderators Lord Henry Posted July 20, 2020 Moderators Posted July 20, 2020 Use isso: isObjectInACLGroup 1 Eu te ajudei ou achou meu comentário útil? Não esqueça de deixar um Thanks! 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.
LoverX Posted July 20, 2020 Author Posted July 20, 2020 (edited) coloco isso abaixo da function? eu tentei colocar embaixo do function e nao deu certo Edited July 20, 2020 by LoverX
Blaack Posted July 21, 2020 Posted July 21, 2020 addCommandHandler ( "sumido", function ( thePlayer ) local conta = getAccountName (getPlayerAccount(thePlayer)) if not isObjectInACLGroup ( "user." .. conta, aclGetGroup ( "admin" ) ) then outputChatBox("Permissão negada!",thePlayer,255) return end for k, v in ipairs( getAttachedElements( thePlayer ) ) do destroyElement( v ); outputChatBox("Modo sumido ativado!",thePlayer,255) end end ) 1
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