Raised This Month: $ Target: $400
 0% 

[help] set key


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 07-08-2014 , 23:31   [help] set key
#1

i want set key for clcmd
press j instead of /test
please someone can explain me

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

public plugin_init() {

register_plugin(PLUGIN, VERSION, AUTHOR)

register_clcmd("say /test", "cmdTest")
}

public cmdTest (id)
{
client_print(id,print_chat,"Welcome to alliedmods")
}
__________________
Thanks everyone. #miss_you_all
indraraj striker is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 07-08-2014 , 23:35   Re: [help] set key
#2

Not possible to set players keys to commands anymore since latest update.

The client themselves must bind the keys only if they want to.
__________________
Blizzard_87 is offline
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 07-09-2014 , 01:30   Re: [help] set key
#3

Quote:
Originally Posted by Blizzard_87 View Post
Not possible to set players keys to commands anymore since latest update.

The client themselves must bind the keys only if they want to.
k @Blizzard_87

can you write code for bind j key for /test
so players can bind his key am i right ??
__________________
Thanks everyone. #miss_you_all
indraraj striker is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-09-2014 , 01:37   Re: [help] set key
#4

Just have them bind the command to their key the same way that you always do it. If you use "say /test" as the command in register_clcmd() then you simply bind that: bind "key" "say /test"

If you don't want it to be a chat command, simply rename the command to whatever you want and use that in the bind.
__________________

Last edited by fysiks; 07-09-2014 at 01:38.
fysiks is offline
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 07-09-2014 , 10:53   Re: [help] set key
#5

Quote:
Originally Posted by fysiks View Post
Just have them bind the command to their key the same way that you always do it. If you use "say /test" as the command in register_clcmd() then you simply bind that: bind "key" "say /test"

If you don't want it to be a chat command, simply rename the command to whatever you want and use that in the bind.
@fysiks
can u set bind j /test
for my above code
please give me example
__________________
Thanks everyone. #miss_you_all
indraraj striker is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-09-2014 , 11:59   Re: [help] set key
#6

Quote:
Originally Posted by indraraj striker View Post
@fysiks
can u set bind j /test
for my above code
please give me example
You can't do any binding for players. You can only have them bind it them selves.

Have them bind the command "test" (without the slash) and then use register_clcmd("test", "cmdTest").
__________________
fysiks is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 07-09-2014 , 02:53   Re: [help] set key
#7

Quote:
Originally Posted by indraraj striker View Post
k @Blizzard_87

can you write code for bind j key for /test
so players can bind his key am i right ??
No.

Like I said above it doesn't work anymore. You can't force players to bind keys that's final.

Clients are the only ones who can bind there own keys.
__________________
Blizzard_87 is offline
Old 07-09-2014, 01:17
Eagle07
This message has been deleted by YamiKaitou. Reason: no
Old 07-09-2014, 03:02
Eagle07
This message has been deleted by YamiKaitou. Reason: no
Old 07-09-2014, 11:10
Freezo Begin
This message has been deleted by YamiKaitou. Reason: no
Closed Thread



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 21:08.


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