Jump to content

Recommended Posts

Posted

Hello Guys,

  • Welcome again to another tutorial.
  • Very simple, when you climb on top of the vehicle it activates and does not let you fall.

hqdefault.png

Client-side:

mp.events.add('render', gameplay);
function gameplay() {
	const player = mp.players.local;
	if(player.isHangingOnToVehicle()){//do not fall off the vehicle
		player.isRagdoll();
		player.setRagdollFlag(2);
	}
}

good day to you

PS:google traduction

  • Like 1
  • Confused 3
  • 2 weeks later...
Posted

Why do you use "player.isRagdoll()"? That makes no sense.
And are you sure you need setRagdollFlag on every frame? Seems like you would only need to use it once.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...