AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Bind a key (https://forums.alliedmods.net/showthread.php?t=107358)

arnaldo_silva 10-25-2009 14:06

Bind a key
 
How can i bind a key like zombie mod. In zombie you press the M key and a menu appears without binding that key. How can i do that?

hleV 10-25-2009 14:52

Re: Bind a key
 
PHP Code:

public plugin_init()
        
register_clcmd("buy""buy");
 
public 
buy(id)
{
        
// Player pressed "buy" (usually M)
        // Your stuff here



Jon 10-25-2009 15:41

Re: Bind a key
 
Player buy key is usually B, not M. Team choose is M.

arnaldo_silva 10-26-2009 08:29

Re: Bind a key
 
If i want for exemplo key E how do i use?

only use

like on top?
PHP Code:

public plugin_init()
        
// this command blocks the key E?
        
register_clcmd("use""use");
 
public 
buy(id)
{
        
// Player pressed "use" (usually E)
        // Your stuff here



unnyquee 10-26-2009 09:25

Re: Bind a key
 
I don't think that "Use" is hookable.. although you can use..
PHP Code:

#include <amxmodx>
#include <amxmisc>

public plugin_init()
{
      
register_plugin("Plugin""Version""Author");
     
      
register_clcmd("+use""cmdUse");
}

public 
cmdUse(index)
{
      
// whatever...



Jon 10-26-2009 11:14

Re: Bind a key
 
Quote:

Originally Posted by arnaldo_silva (Post 972539)
If i want for exemplo key E how do i use?

only use

like on top?

Ham_Use, Ham_ObjectCaps or FM_CmdStart.

Zombiezzz 12-01-2009 20:30

Re: Bind a key
 
how do i make a binded button for C o.o

fysiks 12-01-2009 21:40

Re: Bind a key
 
Quote:

Originally Posted by Zombiezzz (Post 1004545)
how do i make a binded button for C o.o

This has nothing to do with this topic. bind "c" "stuff here", look in config.cfg in your game's directory.

Zombiezzz 12-01-2009 21:46

Re: Bind a key
 
LOL sorry fysiks but i already figured it out >.> ty anyways tho, u aways help me :D

platzpatrone 12-01-2009 23:37

Re: Bind a key
 
question:

what is if a player has his "+use" not on the key "E" ? like he has it binded on key "P" or whatever. so u cant say "Press E to get a strong Hero" on your advertisement chat or anything else

did u mention this ? :shock:


All times are GMT -4. The time now is 17:45.

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