This is what i tried but not sure if Im on the right track
AddEventHandler('sit:helpTextThread', function(type)
Citizen.CreateThread(function()
exports["qb-core"]:DrawText(Config.Lang.KeyMapping.GetUp, "left")
while metadata[type] do
Citizen.Wait(100)
end
exports["qb-core"]:HideText()
end)
end)
AddEventHandler('sit:helpTextThread', function(type)
CreateThread(function()
exports["qb-core"]:DrawText(string.format(Config.Lang.KeyMapping.GetUp, GetKeyLabel(`getup`)), "left")
while metadata[type] do
Wait(100)
end
exports["qb-core"]:HideText()
end)
end)
(And make sure you are on the newest version of the script as well)
cant seem to get stress reduce to work with ps-hud
-- Reduce stress
if Config.ReduceStress then
TriggerEvent('hud:server:RelieveStress', 0.50) -- keep in mind this is per 500 ms (500 ms = half a second). 60000 = 60 seconds
end
It needs to be TriggerServerEvent as the event you are trying to trigger is on the server.
I also would suggest adding the stress in as its own loop as doing it every 500ms will spam you notifications if you use ps-hud.
So I would do something like this:
AddEventHandler('sit:checkThread', function(type)
CreateThread(function()
Wait(5000)
while metadata[type] do
TriggerServerEvent('hud:server:RelieveStress', math.random(2, 4))
Wait(10000)
end
end)
end)
And then just remove the code around inside Config.ReduceStress as you showed above.
Also, make sure your job isn’t police or ambulance when you test this out as they can’t gain stress (at least by default).
The script does utilize natives such as SetEntityCollision and FreezeEntityPosition for some sitting animations (most are scenarios so they don’t use them at all). But players don’t become invincible and can for example be killed while sitting or lying down.
Are you able to adjust so you can do an emote while sitting? For example if we try to do a beer emote like from rpemotes it will make you stand up if you are sitting with sit script. Eg. Drinking a beer while sitting down. If its not possible I understand.
Sería muy interesante que se actualizada los mapeados que podemos utilizar, no solo los nuevos de GABZ si no de otros creadores, para facilitar las cosas. Si no, como podemos añadir mas asientos?
esx_sit is (obviously) for esx, while my script can be used with any framework, or no framework at all (hence the standalone tag).
Now, there is much more I could mention, but I think that gives a brief overview. But you can always choose what to use, if you are fine with esx_sit, then go ahead!