Jump to content

Invisible


lubiekeppa

Recommended Posts

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 ) 

Link to comment
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

Link to comment

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 .

Link to comment

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