Sign in to follow this  
OsFlash

Surf in Car

Recommended Posts

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 2

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.