Raised This Month: $ Target: $400
 0% 

Bind a key


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
arnaldo_silva
Member
Join Date: Jun 2008
Old 10-25-2009 , 14:06   Bind a key
Reply With Quote #1

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?
__________________

arnaldo_silva is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 10-25-2009 , 14:52   Re: Bind a key
Reply With Quote #2

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

__________________
hleV is offline
Jon
Veteran Member
Join Date: Dec 2007
Old 10-25-2009 , 15:41   Re: Bind a key
Reply With Quote #3

Player buy key is usually B, not M. Team choose is M.
Jon is offline
arnaldo_silva
Member
Join Date: Jun 2008
Old 10-26-2009 , 08:29   Re: Bind a key
Reply With Quote #4

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

__________________

arnaldo_silva is offline
unnyquee
Senior Member
Join Date: Jun 2009
Location: Constanta, Romania
Old 10-26-2009 , 09:25   Re: Bind a key
Reply With Quote #5

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...

__________________
unnyquee is offline
Jon
Veteran Member
Join Date: Dec 2007
Old 10-26-2009 , 11:14   Re: Bind a key
Reply With Quote #6

Quote:
Originally Posted by arnaldo_silva View Post
If i want for exemplo key E how do i use?

only use

like on top?
Ham_Use, Ham_ObjectCaps or FM_CmdStart.
Jon is offline
Zombiezzz
Veteran Member
Join Date: Nov 2009
Location: Nov 2009
Old 12-01-2009 , 20:30   Re: Bind a key
Reply With Quote #7

how do i make a binded button for C o.o
__________________
Zombiezzz is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-01-2009 , 21:40   Re: Bind a key
Reply With Quote #8

Quote:
Originally Posted by Zombiezzz View Post
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.
__________________
fysiks is online now
Zombiezzz
Veteran Member
Join Date: Nov 2009
Location: Nov 2009
Old 12-01-2009 , 21:46   Re: Bind a key
Reply With Quote #9

LOL sorry fysiks but i already figured it out >.> ty anyways tho, u aways help me
__________________
Zombiezzz is offline
platzpatrone
Veteran Member
Join Date: Apr 2007
Location: Germany
Old 12-01-2009 , 23:37   Re: Bind a key
Reply With Quote #10

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 ?
platzpatrone is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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