Hey, I was wondering if a talented scripter to make a mod that prevents someone from shuffling their seat when the driver exits their vehicle. Essentially making it so passengers don’t change seats in a vehicle.
i second this, been looking for a working one for awhile.
I’ve been trying to work on this but the script is still buggy.
If the player has an animation in progress, he won’t change his seat. It’s the only way I found to prevent that kind of behaviour ^^
Care to show an example?
just task an animation to the ped (TaskPedAnimation or somehing like this)
Hey there,
Do we agree with the fact that this native CAN_SHUFFLE_SEAT is broken or at least not preventing the player to shuffle ?
I’ve tried this, it’s going up to CanShuffleSeat but it doesn’t looks like to take it in count.
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
local ped = GetPlayerPed( -1 )
local vehicle = GetVehiclePedIsIn( ped, false )if ( DoesEntityExist( ped ) and not IsEntityDead( ped ) ) then if ( IsPedSittingInAnyVehicle( ped ) ) then if IsVehicleSeatFree(vehicle, -1) then CanShuffleSeat( vehicle, false) end end end
end
end)
Okay, i’ve manage to trick this way
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
local ped = GetPlayerPed( -1 )
local vehicle = GetVehiclePedIsIn( ped, false )
local passenger = GetPedInVehicleSeat(vehicle, 0)if ( DoesEntityExist( ped ) and not IsEntityDead( ped ) ) then if ( IsPedSittingInAnyVehicle( ped ) ) then if IsVehicleSeatFree(vehicle, -1) then if ped == passenger then SetPedIntoVehicle(ped, vehicle, 0) end end end end
end
end)
It’s teleporting the ped if he is a passenger on the passenger seat, the only issue is that because of the teleportation the passenger can’t aim nor shoot with a weapon while teleporting.