Hey guys i was looking for a good stress system for esx legacy and couldnt find anything, all the old ones dont run on legacy and the esx_basicneeds has changed with legacy so its hard to implement it. I edited “Utku_stress” to run on legacy, removed the bugs/unwanted exports, got a new client main to swap with your esx_basicneeds and included some exports to use and a example item for ox inventory to add/remove the stress, currently its only setup to shoot weapons/parachuting and going stealth, add as many as you like in client. got a install guide if needed!
edit: also added crashing cars, driving over 100mph, sprint duration and fist fighting!
Requirements: Esx Legacy “Im using 1.9.4”, Esx_basicneeds, and a hud that displays stress, im using Dx_hud
Preview: Esx Legacy Stress! - YouTube
Download Link: GitHub - Vihtal/esx-stress: stress system for esx legacy
yikes, ill do some testing tommorow and see what i can find, i just used a gas can to fill up my car with legacy fuel and didnt give me stress, not sure if your fueling up a car or using the weapon to spill gas tho
so it looks like the only gas can i have in my ox weapons/items is the default one
[‘WEAPON_PETROLCAN’] = {
label = ‘Gas Can’,
weight = 1000,
},
legacyfuel is using this one as well it seems
Citizen.CreateThread(function()
local playerPed = PlayerPedId()
local petrolcanHash = GetHashKey(“WEAPON_PETROLCAN”)
while true do
Citizen.Wait(5)
local currentWeapon = GetSelectedPedWeapon(playerPed)
-- Check if the current weapon is weapon_petrolcan
if currentWeapon == petrolcanHash then
DisableControlAction(1, 24, true) -- Disable attack input
DisableControlAction(1, 25, true) -- Disable aim input
DisablePlayerFiring(playerPed, true) -- Disable firing
end
end
local blacklistedWeapons = {
“WEAPON_RPG”, – Add more weapon hashes here if needed
“WEAPON_MINIGUN”,
– Add more weapons you want to blacklist
}
Citizen.CreateThread(function()
while true do
local ped = PlayerPedId()
local status = IsPedShooting(ped)
local silenced = IsPedCurrentWeaponSilenced(ped)
local currentWeapon = GetSelectedPedWeapon(ped)
local isWeaponBlacklisted = false
for _, weaponHash in ipairs(blacklistedWeapons) do
if GetHashKey(weaponHash) == currentWeapon then
isWeaponBlacklisted = true
break
end
end
if status and not silenced and not isWeaponBlacklisted then
TriggerServerEvent("stress:add", 30000) -- Adjust the stress amount as needed
Citizen.Wait(2000)
else
Citizen.Wait(1)
end
end
try this out, im not sure if it will for work for ya or not, also i added some new features like gain stress when driving over 100mph and crashing vehicles
sorry had to translate so not sure if im replying correctly, are you not seeing the hud for stress or just not the shake effect while your stressed out?