[Release] [Stand-alone] Seat Shuffle 1.2 [LUA]

Seat Shuffle
This is a stand-alone script that allows you to jump from seat to seat. I tried to make it as clean looking as possible but without the ability to disable the native seat shuffle when there is no driver, it made it very difficult.

Default Control
Shift + C / Sprint + Look Behind

Post any questions and bugs down below.

Have fun :smile:

Direct
Download
Source

7 Likes

Posting a fix here in a second. Forget to change a return value.

Pushed fix. Links updated.

Will try this out for sure, thanks.

1 Like

Nice release man :slight_smile:

1 Like

Could make it so thereā€™s only one threadā€¦ Just something small, otherwise nice releaseā€¦

1 Like

Just tested it. With one thread I would need to run everything every millisecond because of the keybinds. So technically this would be faster with the two.

If you have a better way please show me :smile:

But in the first thread you try to catch a keypress / nonkeypress too.
So you need to check it everytick too so you have to use citizen
.wait(0) instead of citizen.wait(500) otherwise your if statement with ā€œnot controlpressā€ is useless because you can not catch it if you didnt check it every tick.

Actually its everytime false because you can not check if the ControlIsPressed or not.

That would be the case if I were using IsControlJustPressed.

What does this second thread do?

Citizen.CreateThread(function()
    while true do
        if (IsControlPressed(0, 21) and IsControlJustPressed(0, 26)) then
            TaskShuffleToNextVehicleSeat(GetPlayerPed(PlayerId()), GetVehiclePedIsIn(GetPlayerPed(PlayerId())))
        end
        if (IsControlPressed(1, 25) or IsControlPressed(1, 24)) then
            if (IsShuffling()) then
                SetPedIntoVehicle(GetPlayerPed(PlayerId()), GetVehiclePedIsIn(GetPlayerPed(PlayerId())), GetSeatPedIsIn(GetPlayerPed(PlayerId())))
            end
        end
        
        Citizen.Wait(0)
    end
end)

Btw, nice code and nice standalone release cheers.

1 Like

Just some key press checks. The first one does the shuffling and the second one prevents some glitches.

Update 1.2
Added some performance changes.

Make sure to download the new version!
Download

Does this one have the bug similar to others where your character tries to do the ā€œmove seatā€ emote repeatedly?

Sort of. It will just look like the guy is twitching every 1/2 second.

Is it fix for auto seat shuffle?

Great job! Would be great if you can release a version that disable by default the seat shuffle when the car is empty (if i enter by the passenger seat, i should stay there.)

hello is it possible, make between any of the 4 doors?

Does it work with vehicle that has more than 4 seats ?