Heres the script:
Citizen.CreateThread( function ()
while true do
Citizen.Wait(0)
if IsPedInAnyVehicle(PlayerPedId(), false) then
local Vehicle = GetVehiclePedIsIn(PlayerPedId(), false);
if GetPedInVehicleSeat(Vehicle, 0) == PlayerPedId() then
if not GetIsTaskActive(PlayerPedId(), 164) and GetIsTaskActive(PlayerPedId(), 165) then
SetPedIntoVehicle(PlayerPedId(), Vehicle, 0);
end
end
end
end
end)
How would you reduce the performance it takes can you do it any other way then change the Citizen.Wait(0) to a higher number because then it will have time to do the animation.