Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- //////////////////// Regeneration support for your hud ////////////////////
- -- Client lua:
- net.Receive("regen_hp", function()
- if LocalPlayer():IsValid() then
- LocalPlayer().DHPRegen = net.ReadUInt(8)
- end
- end)
- -- Call it with something like this:
- local dhpregen = LocalPlayer().DHPRegen or 0
- print(dhpregen)
- -- //////////////////// Regeneration support for your things ////////////////////
- -- Don't forget to subscribe to syringes first
- -- Server lua:
- target.DHPRegen = (target.DHPRegen and target.DHPRegen or 0) + 20 -- 20 is regeneration amount
- target.LastDHPRegen = CurTime()
- DHPRegenList[target] = true
Advertisement
Add Comment
Please, Sign In to add comment