Garry's Mod
No hay suficientes valoraciones
[E2]Hud Element Hider
   
Premiar
Favoritos
Favorito
Quitar
Tipo de contenido: Extensión
Tipo de extensión: Contenido del servidor
Etiqueta de extensión: Diversión
Tamaño
Publicado el
432.000 B
12 MAR 2018 a las 16:55
1 nota sobre cambios ( ver )

Suscríbete para descargar
[E2]Hud Element Hider

En 1 colección creada por NubTheFatMan
Posted Addons
4 artículos
Descripción
This addon allows you to hide HUD elements in expression 2 so you can create a custom HUD element, such as ammo counter, health, and armor. I have also created a more simple way to get information on your gun. Here are all the functions:

showHealth(number True) - Hides health meter. Returns nothing.
showArmor(number True) - Hides armor meter. Returns nothing.
showAmmo(number True) - Hides ammo counter. Returns nothing.
getClip() - Returns ammo left in clip.
maxClip() - Returns the maximum ammo you can have in the clip.
getAmmoLeft() - Returns the ammo that you have left that is not currently in the clip.

This addon is enabled by default. If you wish to disable it for whatever reason, you can hold down Q and go under the utilities tab. Admin>E2 Extensions is where you need to go. Click E2 Extensions, then scroll down and find the hud hider box and uncheck it.

Want to use the HUD used in the screenshot? You may do whatever you want with it, take it as a gift for this addon!
@name EGP Hud @inputs EGP:wirelink if(first()){ showHealth(0) #Hide health showArmor(0) #Hide Armor showAmmo(0) #Hide ammo EGP:egpClear() #Clear everything that exists on the EGP EGP:egpDrawTopLeft(1) #Draws from the top left of your screen EGP:egpBox(1,vec2(0,egpScrH(owner())-160),vec2(1)) #This box is transparent. Origin position for the health and ammo bars EGP:egpAlpha(1,0) EGP:egpWedge(2,EGP:egpPos(1)+vec2(80),vec2(75)) #The red circle around the grey circle with red tint EGP:egpSize(2,360-clamp(owner():health(),0,100)*3.6) EGP:egpAngle(2,90) EGP:egpColor(2,vec(255,62,62)) EGP:egpCircle(3,EGP:egpPos(2),vec2(70)) #Red tinted circle for displaying health percentile EGP:egpColor(3,vec(100,75,75)) EGP:egpWedge(4,EGP:egpPos(2)+vec2(160,0),vec2(75)) #The blue circle around the grey circle with blue tint EGP:egpSize(4,360-clamp(owner():armor(),0,100)*3.6) EGP:egpAngle(4,90) EGP:egpColor(4,vec(98,176,255)) EGP:egpCircle(5,EGP:egpPos(4),vec2(70)) #Blue tinted circle for displaying armor percentile EGP:egpColor(5,vec(75,75,100)) EGP:egpTextLayout(6,clamp(owner():health(),0,100)+"%",EGP:egpPos(2)-vec2(75),vec2(150)) #This will make the health percentile to appear on the circle EGP:egpAlign(6,1,1) EGP:egpFont(6,"Arial") EGP:egpSize(6,60) EGP:egpTextLayout(7,clamp(owner():armor(),0,100)+"%",EGP:egpPos(4)-vec2(75),vec2(150)) #This will make the armor percentile appear on the circle EGP:egpAlign(7,1,1) EGP:egpFont(7,"Arial") EGP:egpSize(7,60) EGP:egpBox(8,egpScrSize(owner())-vec2(305,80),vec2(300,75)) #Blue box outline for gun ammo EGP:egpColor(8,vec(0,150,255)) EGP:egpBox(9,EGP:egpPos(8)+vec2(5),EGP:egpSize(8)-vec2(10)) #Grey box for containing the string of the ammo EGP:egpColor(9,vec(75)) EGP:egpTextLayout(10,getClip()+" / "+maxClip()+" | "+getAmmoLeft(),EGP:egpPos(9),EGP:egpSize(9)) #Gets things about ammo EGP:egpAlign(10,1,1) EGP:egpFont(10,"Arial") EGP:egpSize(10,40) } runOnTick(1) #We want this to execute whenever possible. If this leades to server lag, change it to "invterval(number milliseconds)", or search interval in the E2Helper if(changed(owner():isAlive())){ #We want to run the code in here if your alive status is changed if(owner():isAlive()){ #If you respawn, we want the armer and health to show EGP:egpAlpha(2,255) EGP:egpAlpha(3,255) EGP:egpAlpha(4,255) EGP:egpAlpha(5,255) EGP:egpAlpha(6,255) EGP:egpAlpha(7,255) } else { #If you die, we want to hide the armor and health EGP:egpAlpha(2,0) EGP:egpAlpha(3,0) EGP:egpAlpha(4,0) EGP:egpAlpha(5,0) EGP:egpAlpha(6,0) EGP:egpAlpha(7,0) } } EGP:egpSize(2,360-clamp(owner():health(),0,100)*3.6) #Changes the size of the red circle outline EGP:egpSetText(6,clamp(owner():health(),0,999)+"%") #Changes the text you see as the percentile if((owner():armor() > 0) & (owner():isAlive())){ #If armor is greater than 0 and you're alive, we want to show the armor meter EGP:egpAlpha(4,255) EGP:egpAlpha(5,255) EGP:egpAlpha(7,255) EGP:egpSize(4,360-clamp(owner():armor(),0,100)*3.6) EGP:egpSetText(7,clamp(owner():armor(),0,999)+"%") } else { #If you have no armor or dead, we want to hide the armor meter EGP:egpAlpha(4,0) EGP:egpAlpha(5,0) EGP:egpAlpha(7,0) } if(maxClip() > 0){ #When the maxclip is greater than 0, that means your weapon has ammo that can be shot EGP:egpAlpha(8,255) EGP:egpAlpha(9,255) EGP:egpAlpha(10,255) EGP:egpSetText(10,getClip()+" / "+maxClip()+" | "+getAmmoLeft()) } else { #If you don't have a weapon, we want to hide the ammo counter EGP:egpAlpha(8,0) EGP:egpAlpha(9,0) EGP:egpAlpha(10,0) }
3 comentarios
HappyRoach 4 ABR 2020 a las 3:10 
He’s not there simply.
NubTheFatMan  [autor] 3 ABR 2020 a las 14:26 
How so? What goes wrong? Did you enable the extension through Utilities > Admin > E2 Extensions?
HappyRoach 3 ABR 2020 a las 13:40 
Dont work