Garry's Mod

Expression 2 Codes

Submitted by that1nub, , Thread ID: 59391

Thread Closed
08-11-2017, 09:34 AM
#1
I have a code I would like to give away. It is a thing where you can view player's through walls. I am not the original creator, this was given to me. If you want more codes, please let me know!

Code:
@name Chinese Chincery
@inputs EGP:wirelink
@outputs Players:array Vec:vector2
@persist Hud:entity
@trigger
@model models/props_lab/monitor01b.mdl
#[

  _____       .___    ___.      __________        __        ._.
/   \ _____   __| _/____  \_ |__ ___.__. \______  \ ____  ____ | | __ ___________| |
/ \ / \\__ \  / __ |/ __ \  | __ <  | | |    _// _ \_/ ___\| |/ // __ \_ __ \ |
/  Y  \/ __ \_/ /_/ \ ___/  | \_\ \___ | |  |  ( <_> ) \___|  <\ ___/| | \/\|
\____|__ (____ /\____ |\___ > |___ / ____| |____|_ /\____/ \___ >__|_ \\___ >__|  __
    \/   \/   \/  \/    \/\/       \/      \/   \/  \/    \/



_________ .__  .__               _________ .__  .__                
\_  ___ \| |__ |__| ____  ____  ______ ____  \_  ___ \| |__ |__| ____  ____ ___________ ___.__.
/  \ \/| | \| |/  \_/ __ \ / ___// __ \ /  \ \/| | \| |/  \_/ ___\/ __ \_ __ <  | |
\   \___|  Y \ |  | \ ___/ \___ \\ ___/ \   \___|  Y \ |  | \ \__\ ___/| | \/\___ |
\______ /___| /__|___| /\___ >____ >\___ > \______ /___| /__|___| /\___ >___ >__|  / ____|
    \/   \/    \/   \/   \/   \/     \/   \/    \/   \/  \/    \/  
       __   __ _____ .____  .____   ___ ___  _____ _________ ____ __.        
   ______ / \  / \/ _ \ |  |  |  |  /  |  \ / _ \ \_  ___ \|  |/ _| ______    
  /_____/ \  \/\/  / /_\ \|  |  |  | /  ~  \/ /_\ \/  \ \/|   <  /_____/    
  /_____/ \    /  |  \  |___|  |__\  Y  /  |  \   \___|  | \ /_____/    
       \__/\ /\____|__ /_______ \_______ \___|_ /\____|__ /\______ /____|__ \        
          \/     \/    \/    \/   \/     \/    \/    \/        
        
        

       ____  ____________   _______  
       \  \ /  /\_____ \   \  _ \
        \  Y  / / ____/   / /_\ \
        \   / /    \   \ \_/  \
         \___/  \_______ \ /\ \_____ /
                 \/ \/    \/


]#





function egpUpdate()
{
  
  Players = players()
  EGP:egpDrawTopLeft(1)
  
  
  for(I=1,Players:count())
  {
    
    Index1 = 10 + I
    Index2 = 30 + I
    Index3 = 50 + I
    Index4 = 70 + I
    Index5 = 90 + I
    Index6 = 110 + I
    Index7 = 130 + I
    Index8 = 150 + I
    Index9 = 170 + I
    Index10 = 190 + I
    
    Distance = owner():pos():distance(Players[I,entity]:pos())

    
    EGP:egp3DTracker(Index1,Players[I,entity]:pos()+vec(0,0,30))
    EGP:egpCircleOutline(Index2,vec2(0,0),vec2(10,30))
    EGP:egpParent(Index2,Index1)
    EGP:egpColor(Index2,teamColor(Players[I,entity]:team()))
    
    EGP:egpText(Index3,""+Players[I,entity]:name(),vec2(0,-25))
    EGP:egpColor(Index3,teamColor(Players[I,entity]:team()))
    EGP:egpAlign(Index3,1)
    EGP:egpParent(Index3,Index5)
    
    EGP:egpBox(Index5,vec2(-30,-40),vec2(62.5,10))
    EGP:egpColor(Index5,vec(85,85,85))
    EGP:egpParent(Index5,Index1)
    
    EGP:egpBox(Index4,vec2(-30,-40),vec2(Players[I,entity]:health() / 2,10))
    EGP:egpColor(Index4,vec(255,0,0))
    EGP:egpParent(Index4,Index1)
    
    
    EGP:egpText(Index6,""+Players[I,entity]:health(),vec2(0,-10))
    EGP:egpAlign(Index6,1)
    EGP:egpParent(Index6,Index5)
    
    EGP:egpText(Index7,"Meters: "+round(toUnit("m",Distance)),vec2(0,65))
    EGP:egpAlign(Index7,1)
    EGP:egpColor(Index7,vec(192,192,192))
    EGP:egpParent(Index7,Index5)
    
    if(Players[I,entity]:armor() > 0)
    {
      
    EGP:egpBox(Index8,vec2(-30,-30),vec2(Players[I,entity]:armor() / 2,10))
    EGP:egpColor(Index8,vec(0,0,255))
    EGP:egpParent(Index8,Index1)
    
    EGP:egpText(Index9,""+Players[I,entity]:armor(),vec2(0,-10))
    EGP:egpAlign(Index9,1)
    EGP:egpParent(Index9,Index8)

    }
    
    EGP:egpText(Index10,""+Players[I,entity]:weapon():type():replace("m9k_",""):replace("csgo_",""):replace("weapon_",""):replace("sent_",""):replace("_"," "),vec2(0,78))
    EGP:egpAlign(Index10,1)
    EGP:egpColor(Index10,vec(0,100,100))
    EGP:egpParent(Index10,Index5)
    
    
    if(!Players[I,entity]:isValid())
    {
      EGP:egpRemove(Index1)
      EGP:egpRemove(Index2)
      EGP:egpRemove(Index3)
      EGP:egpRemove(Index4)
      EGP:egpRemove(Index5)
      EGP:egpRemove(Index6)
      EGP:egpRemove(Index7)
      EGP:egpRemove(Index8)
      EGP:egpRemove(Index9)
      Index1--
      Index2--
      Index3--
      Index4--
      Index5--
      Index6--
      Index7--
      Index8--
      Index9--
     Players:remove(I)
  
    }
  

  }

}

#ifdef entity:propDraw(number)
D = owner():pos():distance(entity():pos())
Hud = entity():isWeldedTo()
if(D < 100){
  Hud:propDraw(1)
  Hud:propNotSolid(0)
}else{
  Hud:propDraw(0)
  Hud:propNotSolid(1)
}
#endif

  
  


if(first() | clk("reset") | changed(Players:count()))
{
  egpUpdate()
  
  timer("reset",200)
  

}
if(changed(Players:count())){
  
   EGP:egpClear()

}


if(first())
{
  # Vec = egpScrSize(owner())
  
}
This is my very first post. I need to get more post, so please suggest something!
I mainly play Garry's Mod. I specializein creating expression 2s. If you would like a code, please comment on my thread or PM me!

Users browsing this thread: 2 Guest(s)