Sign in to follow this  
alienwave

help with setHandling

Recommended Posts

Posted (edited)

i made command, but when i try it, console returns this: TypeError: player.vehicle.setHandling('fDriveInertia", parseInt(a)); is not a function. What should i do?

mp.events.addCommand('engine', (player, fullText, a) => {
player.vehicle.setHandling("fDriveInertia", parseInt(a));
});
Edited by alienwave

Share this post


Link to post
Share on other sites
Posted (edited)

It means the property setHandling of object vehicle is not a function.

Edit: I'm going to guess that you should create an event in client side code that evokes player.vehicle.setHandling, and callRemote from the command that is registered in server. (I'm new to this, so the details might be off).

Edited by RSX Fenrir

Share this post


Link to post
Share on other sites
Posted (edited)

Try:


mp.events.addCommand('engine', (player, fullText, a) => {

mp.players.local.vehicle.setHandling("fDriveInertia", parseInt(a));

});

 

Edited by Flashrex

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.