ValveSoftware / halflife

Half-Life 1 engine based games
Other
3.68k stars 623 forks source link

Bind keys without binds: J, L, P and V #2320

Open oaus opened 5 years ago

oaus commented 5 years ago

Title.

To be able to access these keys through AMXX is it possible that the player already has them by default binded? An example would be: bind "j" "+key_j" bind "l" "+key_l" bind "p" "+key_p" bind "v" "+key_v"

SamVanheer commented 5 years ago

If i understand it correctly you want keys that are by default not bound to anything bound to commands that AMX plugins can implement?

oaus commented 5 years ago

If i understand it correctly you want keys that are by default not bound to anything bound to commands that AMX plugins can implement?

I'm sorry if I have not given myself to understand well.

These default keys do not contain BIND, and the user must manually set bind to access a function created by AMXX.

An Example: https://forums.alliedmods.net/showthread.php?t=41054

+grab - Use: bind key +grab -> The player must place the bind where he wishes:

bind "v" "+grab"

When you can use the "v" key command directly bind "v" "+key_v"

Droads2 commented 5 years ago

Yes, this feature would give more advanced options for scripting, without necessarily using custom binds for the player. @mikela-valve , its possible?

oaus commented 5 years ago

@kisak-valve can you add a Feature Request to this please?

Destro- commented 5 years ago

in pev->buttons there are unused bytes that could be a safer alternative against players who installed unknown cfg

or add a command to ask the client if wants reset bind to default value: ask_reset_bind < key > ( only display if bind value is not the default, do not forget a antiflood and a cvar to disable this )