[help] Change the chance on flying out of the car?


is there a way i can make you fly out of the windshield easier then gta 5?


Moved to #development:scripts, please post it in the correct category!


my bad miss clicked the wrong one


I was searching for this awhile back but found very little.


same i could find really anything about flying out of the windshield


SetPedConfigFlag(PlayerPedId(), 32, true)

That should make the ped fly through windshield on a heavy Impact.


yeah i have that set but it takes a stupid huge crash for it to work


I think you should set that to false:

32 - Cannot fly out of vehicle (seat belt)

So true = not fly through window and false is the opposite…

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


oh hmm let me try that


hmm i tried that even doing 200 it doesnt thow me out


@ExoticNx If you go to the link he posted, Putting it to 200 will not work as you are setting the config flag to something that is not there. You need to use 32 as that is the flag for the seatbelt and use true and false to toggle it on and off. I have spent the last hour trying to get it to work and it will not work not sure what could be going on with it if anyone has any idea shoot me a message.

    while true do
      if IsPedInVehicle(GetPlayerPed(-1)) then
        SetPedConfigFlag(GetVehiclePedIsUsing(GetPlayerPed(-1)), 32, true)


There may be another native that needs to be called for the flag to work. But I haven’t seen another one that has anything to do with flying out of cars. I have tried to apply force to your ped while inside the car (of course that didn’t work but was worth the try :smile:)


yeah idk i tried mutipule times to fly out of the car but never could
with it true and false



What he meant was, that when he sets it to false he never flew through the windshield, even when he drove with 200 mph/kmh


Ahh i see @Flatracer


I was talking to my buddy alexguirre and he brought something to my attention that may be the reason its not working.

Since you can’t fly out the window in MP maybe its just disabled with the current framework we are using?


That could be very true cause i tried it again on fivem did 200+ smacked into a guard rail and nothing
but on gta V sp its pretty easy to fly out


Yeah. He says that native works fine in SP.


bummer i was going to try and make a seatbelt script with it


I tried it last year but gave up with no luck. The only way I could see to do it now is by breaking the windshield glass, tping the peds to the hood of the car and the apply force forward from the car at a reasonable speed.