[Standalone] [Paid] Sit Anywhere

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)

Try this instead:

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)

work perfectly ty very much

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).

I really like this script and want to purchase, but does this script utilize no clip at all?

also, if someone sits are they invincible?

just curious because ive seen similar scripts and those were problems with them.

Hi Team, first of all this is an awesome script. Well done! Sitting on chairs works really good.

Unfortunately I have an issue with lay down. If I use a bed and choose “Lay Down” then I fall through the map. Any ideas?

Hello!

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.

I’ve made a small showcase here: https://www.youtube.com/watch?v=h6ztW3mW-_8&ab_channel=MadsNaustdal

I hope that answers your question.

Sorry to hear that you are experiencing some issues. I made a guide a while back on how to fix it here: Falling Through the Map - Mads' Resource Documentation

just use ox_sit its free or esx_sit why should you pay for this?

Awesome, that fixed it. Thank you.

giving me an end code error.

theres an ox_sit? lol

Wait there’s a ox_sit?

Work with out 3rd Eye like in the Pizzeria

Your script is not reading these furniture types…

[2325404277] = {
sit = { type = ‘chair2’, seats = {[1] = vector4(-0.6, -0.1, 0.48, 180.0), [2] = vector4(0.5, -0.1, 0.45, 180.0)} },
lay = { type = ‘layside’, teleportIn = true, seats = {[1] = vector4(0.10, -0.2, 0.5, 180.0)} }
}, – bkr_prop_clubhouse_sofa_01a

[276226460] = { sit = { type = ‘barstool’, seats = {[1] = vector4(0.0, 0.15, 0.825, 180.0)} } }, – v_club_vu_chngestool

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?

Gracias!

I’ve never heard of ox_sit (nor could I find it). But I’ll give you a quick comparison between my script, and esx_sit as found here.

esx_sit has 108 different props that you can sit down on, mine has 250 (many more to come in the next update).

esx_sit only allows one person to sit down on any given bench for example, my script allows for multiple people to sit down.

esx_sit does not support any targeting solutions, my script supports qb-target, qTarget and ox_target.

esx_sit only supports sitting down, my script supports laying down as well.

esx_sit has 3 config options, mine has a lot more.

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! :smiley:

What error code?