Forum

> > CS2D > Scripts > Lua Script Keybind
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Lua Script Keybind

5 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Lua Script Keybind

romulopina
User Off Offline

Zitieren
Is there a way to change script's keybinds? like, usually the normal keybinds are f2,f3,f4 but per example, for people that have 2 scripts with the commands table binded on f2, only one table will run so i want to know how can i change it

alt Re: Lua Script Keybind

GeoB99
Moderator Off Offline

Zitieren
I don't know if is possible at all, two scripts that use same serveraction key F2 can lead to conflict and won't work propely.
Only if you change the serveraction key to a key that isn't used by other scripts.

alt Re: Lua Script Keybind

CaneCorso
User Off Offline

Zitieren
Yes yes its possible . I already made a script which open menu using E
And why wont u add it at f3 or F4 .

alt Re: Lua Script Keybind

The Gajos
BANNED Off Offline

Zitieren
Oh my friend... you can bind 2 menus in one button (eg.: F2). I don't know how you want to change the binds but it's possible to do a dobule click for eg.: F2 to get 2nd menu, anyway I know how to do that what I said.

alt Re: Lua Script Keybind

DC
Admin Off Offline

Zitieren
Key bindings: local client setting
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.

alt Re: Lua Script Keybind

The Gajos
BANNED Off Offline

Zitieren
user romulopina by PM hat geschrieben
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
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht