Raised This Month: $ Target: $400
 0% 

How to bind a key ?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
K.K.Lv
Veteran Member
Join Date: Aug 2008
Location: GameFolder
Old 06-04-2009 , 10:26   How to bind a key ?
Reply With Quote #1

Hi ! everybody!
I just want to bind a key to call a menu!
please look at the following code:
PHP Code:
 register_clcmd("amx_info""CmdMenu")
 
//...
public client_putinserver(id)
{
 
set_task(4.0"bind_key"id)
 return 
PLUGIN_CONTINUE
}
 
public 
bind_key(id)
{
 
client_cmd(id"bind l amx_info")
//...
}
 
public 
CmdMenu(id)
{
 
//..

but when i press the "L" key, will print "unknow command: amx_info" in the console!
do I wrong ??
please tell me the mistake!!
thanks for you all!!!!

Last edited by K.K.Lv; 06-04-2009 at 10:29.
K.K.Lv is offline
Send a message via MSN to K.K.Lv
 



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 14:05.


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