1× editiert, zuletzt 04.12.15 13:09:09
Forum
![>](img/i_next.png)
![>](img/icons/cs2d.png)
![>](img/i_next.png)
![>](img/i_next.png)
Script Keys
14 Antworten![Zum Anfang](img/i_first.png)
![Vorherige](img/i_prev.png)
![Nächste](img/i_next.png)
![Zum Anfang](img/i_last.png)
What you want to search for is the serveraction-addhook line.
there should be sth like this:
1
2
3
4
5
6
7
2
3
4
5
6
7
addhook("serveraction","serveractionFunction") function serveractionFunction(id,button) 	if button==1 then 	-- if f2 	elseif button==2 then 	-- if f3 	elseif button==3 then 	-- if f4 	end end
![user](img/i_friend.png)
Which is why when I was working on FreeChoice (my admin script), I'd always leave F2 for admin script menu, F3 for mod menu and F4 for additional actions
![](img/smiles/tongue.gif)
![user](img/i_friend.png)
Usually you can only use F2, F3, F4.
What you want to search for is the serveraction-addhook line.
there should be sth like this:
What you want to search for is the serveraction-addhook line.
there should be sth like this:
1
2
3
4
5
6
7
2
3
4
5
6
7
addhook("serveraction","serveractionFunction") function serveractionFunction(id,button) 	if button==1 then 	-- if f2 	elseif button==2 then 	-- if f3 	elseif button==3 then 	-- if f4 	end end
Got in lua then core then config as
![user](img/i_friend.png)
Aside from this, when you go through the config.cfg file, there are some lines such as these:
1
2
3
2
3
CFG_MENU_SERVERACTION_STATISTICS_ACTION = 1 CFG_MENU_SERVERACTION_ACHIEVEMENTS_ACTION = 2 CFG_MENU_SERVERACTION_BUTTONPRESSING_ACTION = 3
![user](img/i_friend.png)
![](img/smiles/shocked.gif)
There is no 4 or up.
![user](img/i_friend.png)
![cs2d lua hook](img/i_codehelp.png)
CS2D.com hat geschrieben
action: action key 1,2 or 3
![•](img/dot.gif)
So, if we think a little and translate those action keys then the first action key 1 is F2, 2 is F3 and 3 is F4. If that admin script uses only F3 and F4 buttons then what you have to do is to remove 2 and 3 from these lines that I have mentioned above on my post. As
![user](img/i_friend.png)
P.S: By the way, I'd still recommend for you to use an Admin Script that uses commands with say instead with menus (if you want a quick example then take a look at this -
![file](img/i_file.png)
![cs2d](img/icons/cs2d.png)
EDIT: Unless you are doing Mod for CS2D, not script, then you are able for binds.
1× editiert, zuletzt 05.12.15 15:22:44
![Zum Anfang](img/i_first.png)
![Vorherige](img/i_prev.png)
![Nächste](img/i_next.png)
![Zum Anfang](img/i_last.png)