๐ฉBasic Needs
A comprehensive needs system for FiveM servers that adds realistic player needs including sleep, bladder, and bowel movements.
Features
Realistic sleep system with fatigue effects
Bladder and bowel movement mechanics
Gender-specific animations and sounds
Customizable UI
Framework support for ESX and QB-Core
Progress bar support for multiple systems (ox_lib, mythic_progbar, esx_progressbar, qb-core)
Configurable effects and thresholds
Database persistence
Installation
Download the resource
Import the
sql.sql
file into your databaseAdd the following to your server.cfg:
ensure hate-needs
Configuration
Framework Selection
Config.Framework = "QB" -- Options: "ESX" or "QB"
Sleep System
Config.Needs.Sleep = {
Max = 100,
DecayRate = 0.02, -- Fatigue increase rate
DecayRateRunning = 0.04, -- Fatigue rate while running
EffectsThreshold = 60, -- Mild effects start
SevereEffectsThreshold = 80, -- Severe effects start
RagdollThreshold = 100, -- Pass out threshold
WakeUpValue = 30, -- Reset value after passing out
MinimumToSleep = 30, -- Minimum fatigue to sleep
RecoveryPerTick = 1, -- Fatigue recovery per tick
RecoveryTickTime = 1, -- Recovery tick interval
MaxSleepTime = 120, -- Maximum sleep duration
}
Bladder System
Config.Needs.Pee = {
Max = 100,
IncrementRate = 0.05, -- Bladder fill rate
FoodIncrease = 15, -- Increase from food
DrinkIncrease = 25 -- Increase from drinks
}
Bowel System
Config.Needs.Poop = {
Max = 100,
IncrementRate = 0.03, -- Bowel fill rate
FoodIncrease = 30, -- Increase from food
DrinkIncrease = 5 -- Increase from drinks
}
UI Settings
Config.UseOwnUI = true -- Enable/disable custom UI
Config.UIRefreshInterval = 1000 -- UI update interval
Controls
Config.Controls = {
WakeUp = 73, -- Key to wake up (X)
ToggleUI = 'F7' -- Key to toggle UI
}
Exports
Client Exports
exports['hate-needs']:GetNeeds()
-- Returns current needs values
-- Returns: {sleep: number, pee: number, poop: number, sickness: number}
exports['hate-needs']:IncreaseNeed(type, amount)
-- Increases or decreases a specific need
-- Parameters:
-- type: "pee", "poop", or "sleep"
-- amount: number (positive or negative)
Commands
Admin Commands
/setneed [id] [type] [amount]
-- Sets a specific need for a player
-- Parameters:
-- id: Player server ID
-- type: "pee", "poop", "sleep", or "sickness"
-- amount: 0-100
Player Commands
/sleep -- Sleep to recover fatigue
/pee -- Relieve bladder
/poop -- Relieve bowel
/needs -- Toggle needs UI
Dependencies
oxmysql
One of the following progress bar systems:
ox_lib
mythic_progbar
esx_progressbar
qb-core
Notes
The script is protected with escrow encryption
Client and server files are encrypted
Only config.lua, server/sv_functions.lua, and client/cl_main.lua are accessible for customization
Security Notice
This script is protected by FiveM's escrow system. The client and server-side code is encrypted and cannot be modified.
Last updated