Forum
CS2D Scripts Lua Script KeybindLua Script Keybind
5 replies 1
Only if you change the serveraction key to a key that isn't used by other scripts.
And why wont u add it at f3 or F4 .
Lua scripts: server sided
CS2D separates these two things for security reasons. The server is not able to change settings of clients. Otherwise a troll could setup a server which fucks up the settings of everyone who joins. This could be prevented by keeping the settings for that server only but that's not what I want. It does not feel right to allow the server to force you to use certain key bindings.
tl;dr: No, you can't change the key bindings with Lua script.
"Workaround":
There are however some player actions where you can hook in with Lua (like the use action) and also the serveractions which are bound to F2, F3 and F4 by default.
You can't change that binding but you can react to many of these player actions in your Lua scripts.
romulopina by PM has written
hey bro sup, can you tell me wheres the bind is located in a script? i am using a script for admin and the menu is binded on F2, and for example if i want to run it with a gun game, super hero mod or anything else, most of them the menu is on F2 too but it conflicts...:p
PMed: Man, forum is created for these problems. In scripts buttons are binded in "serveraction" hook. Just change in one of the scripts bind from F2 to F3 and all will be ok
1