Stinky Peds – A Dirt System You Never Knew You Needed
Ever looked at a player and thought:
“Wow… he looks like he hasn’t showered since the tutorial.”
Well, now you can prove it.
Stinky Peds (or whatever you wanna call it) is a lightweight and hilarious immersion script that brings personal hygiene into your server. Every player starts with a dirt level of 0, but as time goes on without cleaning up, things get… noticeable.
How It Works: Dirt increases over time (every 30 minutes) or via external triggers, up to a max of 200. At 100+ dirt, a swarm of flies starts orbiting the player. Gross (and funny). Jump into water and press [E] to clean yourself with a nice little scrubbing animation. Showering reduces dirt by 50. So fresh, so clean. Use /checkdirt to see just how filthy you’ve become. The system handles a database table for you—automatically creates and updates it, no setup needed. Fully synced across all clients—everyone will know.
Features:
Fully configurable & easy to expand if you know what you’re doing
Clean and optimized (as much as possible)
No config file included—figure it out yourself, champ
First script after jumping back into FiveM dev
You can enable/disable NPC reactions to your stinky ped
Why tho?
Because RP should sometimes be a little funky.
Okay, real talk: I just got back into FiveM scripting and this is my comeback project.
it also comes with a lil cooldown, so npc’s won’t spam animations
make sure to disable the npc reactions if you don’t run npc’s on your server
-- Set this to true if you want npc's to react to your stinky ass ped
local useNpcReactions = true
this threads needs a little bit more performance optimization, but I’ve seen worse
it spikes up to 0.03 ms (when the thread runs with its checks to play the animation),
but i’ll keep optimizing it.
Thanks! Yes, that’s definitely possible. I could make nearby player peds react to smelly players too, similar to how NPCs do. Could be synced via dirt level shared over the network - I’ll look into that and implement it in the future
I have made some slight changes to it. Now players will take some actions on the dirty values of other players and can use props for cleaning.
I have to say this is a very good idea, the same idea as the olfactory system I’m try to do conceiving client.lua (18.5 KB) server.lua (6.8 KB)
@David_Lugo asked if its possible, to let people shower inside showers. I mean, that definetly would make sense. I just stumbled across one major issue regarding “shower-detection”;
There’s no standardized or built-in way to determine whether an interior actually contains a shower or bathroom area, lol (Who would of thought?!?! (why tf would you even need such a function at all))
Anyways, if you have a better way of detecting showers, let me know thru a pull request <3