LoverX Posted July 20, 2020 Share 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. Link to comment
Other Languages Moderators Lord Henry Posted July 20, 2020 Other Languages Moderators Share Posted July 20, 2020 Use isso: isObjectInACLGroup 1 Link to comment
LoverX Posted July 20, 2020 Author Share 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 Link to comment
Blaack Posted July 21, 2020 Share 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 Link to comment
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