lubiekeppa Posted March 30, 2013 Posted March 30, 2013 Hello. How do I do that this script was available for the admin? Because now she can use any player. iv = 0 function toggleInvis( source ) if iv == 0 then iv = 1 setPlayerNametagShowing(source, false) setElementAlpha(source, 0) else iv = 0 setPlayerNametagShowing(source, true) setElementAlpha(source, 255) end end addCommandHandler ( "invisible", toggleInvis )
manawydan Posted March 30, 2013 Posted March 30, 2013 iv = 0 function toggleInvis( thePlayer ) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then if iv == 0 then iv = 1 setPlayerNametagShowing(thePlayer, false) setElementAlpha(thePlayer, 0) elseif iv = 0 setPlayerNametagShowing(thePlayer, true) setElementAlpha(thePlayer, 255) end end end addCommandHandler ( "invisible", toggleInvis ) no tested
lubiekeppa Posted March 30, 2013 Author Posted March 30, 2013 It does not work, nothing happens. There is nothing to add to acl.xml?
iPrestege Posted March 30, 2013 Posted March 30, 2013 local iv = true function toggleInvis( player ) local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then if iv then iv = false setPlayerNametagShowing(player,false) setElementAlpha(player,0) else iv = true setPlayerNametagShowing(player,false) setElementAlpha(player,255) end end end addCommandHandler ( "invisible", toggleInvis ) Server side .
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