Garry's Mod

Garry's Mod

Not enough ratings
Hygiene & Toilet for DarkRP
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: ServerContent
Addon Tags: Fun, Roleplay, Realism
File Size
Posted
Updated
4.633 MB
May 25 @ 9:15am
May 25 @ 10:20am
3 Change Notes ( view )

Subscribe to download
Hygiene & Toilet for DarkRP

Description
This addon allows you to add a touch of realism to DarkRP by adding a hygiene mechanic where you have to wash and go to the toilet.

You have two bars on your screen at the top right:
- One that provides hygiene for washing
- One which gives the state for the desire to go to the toilet

To wash you have two entities (the bath and the sink)
For the toilets you only have one which is the toilet
All three are in the “Gmod Hygiene & Toilets” category in the entities section

Clicking on it will reset the hygiene or toilet rate to 100

The toilet, the bath and the sink have their own sound which is launched for you to use, the models used are those already present on GMod (maybe they will have their own models if I have time)

The hygiene and toilet stats are saved in the hygiene_system folder in the data folder of your gmod server to keep the same value if the player disconnects
When the player dies, his hygiene and toilet stats are reset to 100

If the hygiene bar drops to 0, the player will lose life up to 0 without dying there.
If the toilet bar falls to 0, the player will be slowed down while walking, including when sprinting.
(All values are configurable, definitely see instructions below)

By default you have this configuration:
-- How many percentages per second? Here by default 0.01389% therefore 100% every 2 hours (7200 seconds)
HygieneConfig.HygieneDecreaseRate = 0.01389
-- How many percentages per second? Here by default 0.02778% therefore 100% every hour (3600 seconds)
HygieneConfig.ToiletDecreaseRate = 0.02778
-- Damage per second when hygiene reaches 0
HygieneConfig.HygieneDamageRate = 1
--Walking decrease rate when toilet reaches 0 (this slows the player down to 100 (a normal walking speed is 250 in GMod) and also reduces sprinting)
HygieneConfig.ToiletSlowRate = 100

To modify the configuration you must go to the root of your GMod server then the data folder and the "hygiene_system" folder inside you have the player information and the hygiene and toilet statistics but you have a config.json file, open this file to change the values you want.
A server restart is required to apply the changes!

The addon is Perma Props compatible, so you can create public toilets or baths for example

Admin commands:
- set_toilet (value) / Set the toilet value you want
- set_hygiene (value) / Set the hygiene value you want

This is my first addon for GMod that I am developing for my DarkRP server currently, there may be bugs, or missing features, if you encounter bugs or you have ideas to suggest to me, I am open

(The addon is necessary for players to have the sounds of using the entities and soon I hope to have their own models for the entities - obviously it is necessary that the addon be on the server to work)

You can use the addon on your server but please tag me if you modify the addon, I could have charged to have the addon but I preferred to allow everyone to use it