• Player Notification Help.
    1 replies, posted
So, i found this code [code] hook.Add( "Think", "LimitedBreath", function() for k, v in pairs( player.GetAll() ) do if v:Alive() then if v:WaterLevel() >= 2 then if v.NextHurt < CurTime() then v:TakeDamage( 3 ) v:EmitSound( Sound( "player/pl_drown" .. math.random( 1, 3 ) .. ".wav" ) ) v:ViewPunch( Vector( math.Rand( -5, 5 ), math.Rand( -5, 5 ), math.Rand( -10, 10 ) ) ) v.NextHurt = CurTime() + 1 end else v.NextHurt = CurTime() + 20 end end end end ) [/code] And it was old, it was on my desktop, think it was from gmod 12, anyway, i decided to edit, as before you died in 10 seconds now i have made it take 20 seconds and im making it take less health than before. But here is the deal i want it to notify the player their dying, i mean the punching effect makes it obvious and yes the health bar goes down but, i want it to be a bit better. I want it to make use of the user notifications. Thanks in advance. Oh and if the creator is here just say, dont want to make it look like im presenting your code as my own :-)
Networking and notification.AddLegacy
Sorry, you need to Log In to post a reply to this thread.