What I’m trying to do is copy a thing that was in a roleplay mod so that it is stand-alone, and works seperately.
What the feature was is that you could type a command, and you’d go invisible, and in noclip.
I copied out the two functions and renamed the convar.
I know this is probably massively wrong, but I’d really like to get this working.
function meta:Observe( bool ) self:GetTable().ObserveMode = bool; self:SetNoDraw( bool ); if( self:GetActiveWeapon() and self:GetActiveWeapon():IsValid() ) then self:GetActiveWeapon():SetNoDraw( bool ); end self:SetNotSolid( bool ); if ( bool ) then self:SetMoveType( 8 ) self:GodEnable(); else self:SetMoveType( 2 ); self:GodDisable(); end end function AdminObserve( ply, cmd, arg ) if( ply:EntIndex() ~= 0 and not ply:IsSuperAdmin() ) then return; end if( ply:GetTable().ObserveMode ) then ply:Observe( false ); else ply:Observe( true ); end end concommand.Add( "admin_observe", AdminObserve );