AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to detech "buy" console command. (https://forums.alliedmods.net/showthread.php?t=134961)

fireattack 08-10-2010 16:13

How to detech "buy" console command.
 
That's all, i want detect when a player put "buy" in console.
register_concmd don't work.

naven 08-10-2010 16:24

Re: How to detech "buy" console command.
 
register_clcmd?

fireattack 08-10-2010 16:29

Re: How to detech "buy" console command.
 
God.

ConnorMcLeod 08-11-2010 06:48

Re: How to detech "buy" console command.
 
Command is only sent to server when player is in buyzone.

fireattack 08-11-2010 08:20

Re: How to detech "buy" console command.
 
I can't detect with a event, because there isn't a event for that in HL1.

I have tried with this.

PHP Code:

public client_command(id
{
    new 
arg[13];
    
read_argv0arg 12 );
 
    if ( 
equal"buy"arg ) || equal"autobuy"arg ) ) 
        
client_printidprint_chat"I used buy command" );
 


But nothing.

I try with cmd_buy and a clcmd and nothing.

I'm getting crazy, it's impossible?

ConnorMcLeod 08-11-2010 09:14

Re: How to detech "buy" console command.
 
register_clcmd("buy", "ClientCommand_Buy")

This works all fine, you have to be alive and in buyzone so it works.

fireattack 08-11-2010 09:32

Re: How to detech "buy" console command.
 
That's the problem, i was making a plugin which make a custom buy menu pressing buy key and deleting func_buyzone.

ConnorMcLeod 08-11-2010 10:06

Re: How to detech "buy" console command.
 
You can't use "buy" command for this.


All times are GMT -4. The time now is 21:53.

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