AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Using F1 & F2 to vote? (https://forums.alliedmods.net/showthread.php?t=184218)

Ran321 05-02-2012 11:21

Using F1 & F2 to vote?
 
Does anyone know how to use the keys F1 & F2 to vote? I've seen this done on a few servers, but I can't seem to find anything that shows how to use those keys.

Liverwiz 05-02-2012 11:33

Re: Using F1 & F2 to vote?
 
AMXX doesn't read keys; it reads commands.

Ran321 05-02-2012 12:40

Re: Using F1 & F2 to vote?
 
So is there a way to get it to read the F1 & F2 commands instead of Pressing keys 1 and 2 as such:

register_menucmd(register_menuid("Vote2"),MEN U_KEY_1|MENU_KEY_2,"Vote")

but using F1 and F2 instead?

<VeCo> 05-02-2012 12:50

Re: Using F1 & F2 to vote?
 
Not possible without slowhacking, which is forbidden.

hleV 05-02-2012 13:52

Re: Using F1 & F2 to vote?
 
Quote:

Originally Posted by Ran321 (Post 1700539)
So is there a way to get it to read the F1 & F2 commands instead of Pressing keys 1 and 2 as such:

register_menucmd(register_menuid("Vote2"),MEN U_KEY_1|MENU_KEY_2,"Vote")

but using F1 and F2 instead?

Write in your console:
Code:
bind f1 slot1; bind f2 slot2; etc...
It will only work for YOU ONLY, though.

Ran321 05-02-2012 15:20

Re: Using F1 & F2 to vote?
 
One last question, I have keys 6 & 7 bound as "slot6" and "slot7" is there a way to run a function if those buttons are pushed?

I've tried:

register_clcmd("slot6", "displayHelp")

but it doesn't pick it up (I'm assuming it's not submitting a command to the server and only selecting slot6?). Is it even possible to catch someone pressing 6 bound to "slot6" without slowhacking?

I'm sorry if this is a dumb question, but I can't seem to find anything on the search about this.


All times are GMT -4. The time now is 00:20.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.