Controls?


#1

Under the controls listed here https://wiki.fivem.net/wiki/Controls does anyone know the key number for Numpad0 and Numpad2?


#2

There’s no “keys” so, unless the user has an action bound to Numpad0 and Numpad2, you can’t use them.

There was a brilliant answer by someone (I forget their username) that explained this:

FiveM lets you bind on actions/events, not the key itself. Lets say you want to use left shift, you don’t bind left shift, you link it to input_sprint, which is usually left shift. If the user changes the sprint key to M, then your code changes with it, because it’s still input_sprint.

Which lets you insert/change code for sprinting, without having to know what key they are using. People can bind sprint to ANY key, and your code still works, because it’s bound to “input_sprint” not left_shift.