Garry's Mod

Expression 2 Code: E2 List Reader (EGP)

Submitted by that1nub, , Thread ID: 59393

Thread Closed
08-11-2017, 09:46 AM
#1
This is another shared code by me. This was not hard, but it did take me a while to learn. If you want me to create or share an expression 2 code, just leave a comment!

Code:
@name E2 List Reader (EGP)
@inputs EGP:wirelink
@persist ShowText:array

interval(500)

if(first()|duped()|dupefinished()){
  EGP:egpClear()
  EGP:egpDrawTopLeft(1)
  EGP:egpTextLayout(1,"",vec2(0),vec2(512))  
}
ShowText:clear()
findByClass(entity():type())
List = findToArray()
for(N = 1,List:count()){
  ShownText = " *["+N+"]['"+List:entity(N):owner():name()+"'] '"+List:entity(N):getName()+"' "+round(List:entity(N):cpuUsage()*1000000,0)+" CPU usage"
  ShowText:pushString(ShownText)
  EGP:egpSetText(1,ShowText:concat("\n"))
}
if(List:count() == 0){
  EGP:egpSetText(1,"")  
}
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)