[Release] Seatbelt UPDATED

Great script!
Where and how can i add a notification when i’m trying to get out of the car but i still have my seatbelt on ?

1 Like

Hello everyone. I have fixed a problem about you who still can exit the vehicle when the seatbelt is on.

try to open main.lua and go to line 35. then change this code

if beltOn then DisableControlAction(0, 57) end

to this code

 if beltOn then 
	  DisableControlAction(0, 75, true)  -- Disable exit vehicle when stop
	  DisableControlAction(27, 75, true) -- Disable exit vehicle when Driving
	  end

but you can still be thrown if you drive at high speed and hit something

@TehRamsus please update your code with this

Need help!! i still thrown out of car when i’m crash, no matter low or high speed :frowning:

its not work all cars. i dont know why. Example addon/replace cars. Its maybe need change some settings in handling.

Hello! thanks to help. I update this code. And then i add some animation.

So, big thanks!

I already test with default car in game like “Adder, T20, Zentorno” result is same :frowning:
and i just wonder what script doing about this code ::

speedBuffer[2] = speedBuffer[1]
speedBuffer[1] = GetEntitySpeed(car)

  if speedBuffer[2] ~= nil 
     and not beltOn
     and GetEntitySpeedVector(car, true).y > 1.0  
     and speedBuffer[1] > 19.25 
     and (speedBuffer[2] - speedBuffer[1]) > (speedBuffer[1] * 0.255) then
     
    local co = GetEntityCoords(ped)
    local fw = Fwv(ped)
    SetEntityCoords(ped, co.x + fw.x, co.y + fw.y, co.z - 0.47, true, true, true)
    SetEntityVelocity(ped, velBuffer[2].x, velBuffer[2].y, velBuffer[2].z)
    Citizen.Wait(1)
    SetPedToRagdoll(ped, 1000, 1000, 0, 0, 0, 0)
  end

i try many time to put is code in your script but it’s doesn’t work :frowning:
just hope you will hv an idea for this one :slight_smile:

Citizen.CreateThread(function()
    while true do
	Citizen.Wait(0)
      if IsPedInVehicle(GetPlayerPed(-1)) then
        SetPedConfigFlag(GetVehiclePedIsUsing(GetPlayerPed(-1)), 32, true)
        end
    end
end)

Source: http://gtaforums.com/topic/827579-ped-config-flags/

How do i turn everything off when the engine is not running ?
No icon on the screen no sound. Only when the engine is on.

whats the key number for k?

1 Like

How can i make a chat command for this to toggle it ?

when im driving without the seatbelt it wont sling me out of the car when i crash how do i fix this?

I can hear the toggle sound across the map when somebody else is using it LOL

Any way to edit how much damage a player takes if they crash and fly out of the windshield without the belt on? Right now, Players can crash doing insane speeds and get right back up.

how do i change the speed limit when the character gets out through the window?

2 Likes

Thanks a bunch!. So how am I change notification position?

In pNotify script

Thanks!

is it possible instead of when getting in the vehicle the sound goes off and maybe only after you hit 10 mph without it on it starts beeping

Hello, when you hit the car without the seat belt, my player is not ejected from the vehicle, can anyone help me?

how can you force the sound to off when you get out the vehicle i still hear the sound when i get out until it sound finish playing and its off but what i want is force the sound off when outside the vehicle even its not finish playing the sound thank for the reply