Oxygen bar underwater


That is my first topic and sorry for that english level ^^

I have GMod from steam recently and i love play on perilous map like a sinking boat. but, that not really fun with the default conf, no O² bar and can’t drown.

I already search on the workshop but i found nothing, i tried to set the Half life 2 difficulty but that not work.

If anyone know a plug-in with an oxygen bar, can you share it ? (and explain how to install it, i’m a noob for install custom mod)

Thank you =)

If this doesn’t exist I’d be interested in making and releasing it

This seems more of a lua request but yeah I had nothing to do so,

Its pretty simple just it needs to be installed in the servers addons folder

Nice, very simple indeed.

One thing I noticed though, line 24 os sv_oxygen.lua
[lua]elseif v:GetNWInt(“Oxygen”) != 100 then [/lua]
If the oxygen manages to go over 100 (eg, goes from 99 to 101), it will keep increasing.‘Not equal’ should be ‘less than’, or clamp the values it gets set to.

[editline]31st December 2013[/editline]

Nevermind, that would never occur since you are subtracting and adding the same amount (OxygenRate). If you had different values for how much oxygen it used and how it regenerated, then you could hit the issue I described.

Didn’t think about changing the variables anyway I clamped it now ( same URL )