Log in to reply
 

Increasing potential key binds for scripts



  • When scripting, it is often a challenge to find keys which aren't being used by GTAV. For example the number keys, D1 to D0, are used for weapons. Alt is used to switch, CTRL for stealth/crouch, etc.
    I have a few scripts i'm working on that employ many keys to increment or decrement variables. To keep things from getting nuts I use subtitles to document what my keys do but I also started using key combinations. I thought this would be a no-brainer, but it actually took a few tries to find the right method to avoid conflict with GTA V's in game key bindings.

    So I thought I would share. Unfortunately I code in VB.Net so I haven't looked for the equivalent in C#. Maybe someone could post it, or I'll figure it out when I have a chance.

    So in VB.NET, here is a working example, using the control key and numpad 1

    If e.Control = True And e.KeyCode = Keys.NumPad1 Then

    This, on the other hand, did not work consistently due to conflict with ctrl key:
    If (e.KeyCode = Keys.NumPad1 AndAlso e.Modifiers = Keys.Control) Then


Log in to reply
 

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.