altmp / altv-issues

Issues and roadmap for alt:V project
93 stars 17 forks source link

Add a native that makes it possible to fall out of the vehicle through the windscreen #1676

Open Whitee303 opened 1 year ago

Whitee303 commented 1 year ago

Description of the problem

Add a native that makes it possible to fall out of the vehicle through the windscreen as in FiveM

https://github.com/citizenfx/fivem/blob/22ff65cf6e181d949570bca03b3d15e3e5ed55f1/code/components/extra-natives-five/src/VehicleExtraNatives.cpp#L1148

Desired solution for the problem

-

Alternatives you considered

No response

Additional context

No response

Version

No response

yannbcf commented 1 year ago

There is already a flag to set for it

Doxoh commented 1 year ago

PED_FLAG_CAN_FLY_THRU_WINDSCREEN

https://docs.altv.mp/gta/articles/ped/flags.html

xLuxy commented 1 year ago

PED_FLAG_CAN_FLY_THRU_WINDSCREEN

https://docs.altv.mp/gta/articles/ped/flags.html

He's suggesting to add some sort of method to let a ped fall thru a windscreen programatically. In the code above you could just set max speed to something really low and it would throw you out the vehicle.

// EDIT: It's possible by setting players pos the the vehicles pos and then apply some force and anim.