Forum

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

Englisch Script Keys

14 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Script Keys

Biusem
User Off Offline

Zitieren
So i installed Simonas Dynamic Achievemnts and Statistics script .. the problem is when i press f3/f4 it opens the tabs from The Admin Script 4.0.2.I need help how to put them to another button
1× editiert, zuletzt 04.12.15 13:09:09

alt Re: Script Keys

Rattle189
User Off Offline

Zitieren
I'm afraid there's no way to remap the keys unless you edit the LUA script itself.

alt Re: Script Keys

Biusem
User Off Offline

Zitieren
Well i just need to know where to enter to edit the LUA script and im done,I think.

alt Re: Script Keys

Bowlinghead
User Off Offline

Zitieren
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:
1
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

alt Re: Script Keys

Rainoth
Moderator Off Offline

Zitieren
You'd want to make a new menu and open it with F2, whereas the button entries will open main menus for either your admin script or user SQ script.

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

alt Re: Script Keys

Biusem
User Off Offline

Zitieren
user Bowlinghead hat geschrieben
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:
1
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 SQ Said but i dont know where to edit bcuz im a n00b at LUA :<

alt Re: Script Keys

GeoB99
Moderator Off Offline

Zitieren
I'd recommend to use rather an Admin Script which the commands can be used with say rather than with menus. This will prevent any further conflicts between two scripts while pressing a key which opens a menu and so forth.

Aside from this, when you go through the config.cfg file, there are some lines such as these:
1
2
3
CFG_MENU_SERVERACTION_STATISTICS_ACTION = 1
CFG_MENU_SERVERACTION_ACHIEVEMENTS_ACTION = 2
CFG_MENU_SERVERACTION_BUTTONPRESSING_ACTION = 3
This is where you have to edit it (the numbers, not the words themselves). Let's say, if we don't want the buttonpressing_action key, ( 3 - which means F4 in that case) then you can remove that number and leave it for another menu from a script.

alt Re: Script Keys

Yates
Reviewer Off Offline

Zitieren
The only possible server actions are F2 (1), F3 (2) and F4 (3).

There is no 4 or up.

alt Re: Script Keys

GeoB99
Moderator Off Offline

Zitieren
@user Biusem: Then you did not get my full point at all. Have you took a look by reading the info of cs2d lua hook serveraction?
CS2D.com hat geschrieben
• action: action key 1,2 or 3

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 Yates already said, there aren't other numbers such as 4, 5, etc. - you name it.

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 cs2d [Yank] Bass Powertool (Admin Script) ).

alt Re: Script Keys

Biusem
User Off Offline

Zitieren
im gonna just install the admin script and that's all.If DC has some freetime and wants to update the game he should really put some more keys.

alt Re: Script Keys

SQ
Moderator Off Offline

Zitieren
I will release an achievements update where I will allow to use optional say commands.

alt Re: Script Keys

Biusem
User Off Offline

Zitieren
But cant i like bind them to letters ? That's a question i didnt ask.

alt Re: Script Keys

Gaios
Reviewer Off Offline

Zitieren
You can use E and G, I'm not sure about F. For them are USE and DROP hooks + FLASHLIGHT.

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 Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht