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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.