Raised This Month: $ Target: $400
 0% 

How to detech "buy" console command.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fireattack
Senior Member
Join Date: Jul 2008
Old 08-10-2010 , 16:13   How to detech "buy" console command.
Reply With Quote #1

That's all, i want detect when a player put "buy" in console.
register_concmd don't work.
fireattack is offline
naven
Veteran Member
Join Date: Jun 2008
Location: Poland, Cieszyn
Old 08-10-2010 , 16:24   Re: How to detech "buy" console command.
Reply With Quote #2

register_clcmd?
__________________
naven.com.pl
"At the end of the day, there are always going to be mental disorders and people who cause violence for no other reason than the fact that they're fucked up and lost. And all we can do is try to learn from it." Corey Taylor.
naven is offline
fireattack
Senior Member
Join Date: Jul 2008
Old 08-10-2010 , 16:29   Re: How to detech "buy" console command.
Reply With Quote #3

God.
fireattack is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-11-2010 , 06:48   Re: How to detech "buy" console command.
Reply With Quote #4

Command is only sent to server when player is in buyzone.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
fireattack
Senior Member
Join Date: Jul 2008
Old 08-11-2010 , 08:20   Re: How to detech "buy" console command.
Reply With Quote #5

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?

Last edited by fireattack; 08-11-2010 at 08:32.
fireattack is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-11-2010 , 09:14   Re: How to detech "buy" console command.
Reply With Quote #6

register_clcmd("buy", "ClientCommand_Buy")

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

- my plugins -
ConnorMcLeod is offline
fireattack
Senior Member
Join Date: Jul 2008
Old 08-11-2010 , 09:32   Re: How to detech "buy" console command.
Reply With Quote #7

That's the problem, i was making a plugin which make a custom buy menu pressing buy key and deleting func_buyzone.
fireattack is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-11-2010 , 10:06   Re: How to detech "buy" console command.
Reply With Quote #8

You can't use "buy" command for this.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Reply


Thread Tools
Display Modes

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


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