Jump to content

Recommended Posts

Posted

Hello!

I am wondering how I can create a script where on a key press, I can make an event happen, such as 'L' to unlock/lock a vehicle and more. I am on C#.

Thanks for reading and possibly helping!

Posted

Hi, Thank to @sparx for reply as C#.

and as JS, use this form of script:

/// This form you can get input of your keybind, 0x4C is "L", you can change it to your own key code everything you want.
mp.keys.bind(0x4C, true, function() {
  /// Here write your code as you wish
});

Finally, use this hyper link to find the key code you want

  • Like 1

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...