AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help about client_cmd (https://forums.alliedmods.net/showthread.php?t=333780)

Macedonia4Ever 08-05-2021 04:09

Help about client_cmd
 
Hello! I am new in amxmodx scripting. I have problem with client_cmd(id, "bind ^"m^" ^"menu^"") this not work for me idk why i need this so much

Xpym4uk76 08-05-2021 07:49

Re: Help about client_cmd
 
Attach the source file please

Dragos 08-05-2021 09:15

Re: Help about client_cmd
 
How fysiks said:

Quote:

Originally Posted by fysiks (Post 2449133)
There is no legitimate reason why you need to set player binds. They can and should set their own key binds. Also, this is considered slowhacking and is not supported here.

Also, If you want to create a menu on the m key, just...


PHP Code:

register_concmd("chooseteam""menues"); 


Macedonia4Ever 08-06-2021 07:30

Re: Help about client_cmd
 
Quote:

Originally Posted by Dragos (Post 2754552)
How fysiks said:



Also, If you want to create a menu on the m key, just...


PHP Code:

register_concmd("chooseteam""menues"); 




yeah i try and this but not work
register_clcmd("chooseteam", "menues");
and with register_clcmd() not work

Dragos 08-06-2021 08:31

Re: Help about client_cmd
 
Quote:

Originally Posted by Macedonia4Ever (Post 2754617)
yeah i try and this but not work
register_clcmd("chooseteam", "menues");
and with register_clcmd() not work

Dude, it's register_concmd, not register_clcmd, using, clcmd won't work because, this is used for register commands, like this "say /commands", and concmd, for console commands "amx_something".

So when you register concmd, and someone typed chooseteam, and because m is default binded for chooseteam, the menu will appear.

This is like the single method to make a menu on key m. Maybe it exists other methods, but this is the simple one.

DJEarthQuake 08-06-2021 08:38

Re: Help about client_cmd
 
Quote:

Originally Posted by Macedonia4Ever (Post 2754535)
Hello! I am new in amxmodx scripting. I have problem with client_cmd(id, "bind ^"m^" ^"menu^"") this not work for me idk why i need this so much

What you are attempting is S L O W hacking and forbidden. What are you trying to accomplish?

jimaway 08-06-2021 09:39

Re: Help about client_cmd
 
Quote:

Originally Posted by Dragos (Post 2754621)
Dude, it's register_concmd, not register_clcmd, using, clcmd won't work because, this is used for register commands, like this "say /commands", and concmd, for console commands "amx_something".

Dude,

register_clcmd registers a console command for client
register_concmd registers a console command for client AND server

i'd say a server wont use the chooseteam console command to open a menu, so register_clcmd is the correct native to use


All times are GMT -4. The time now is 02:30.

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