Raised This Month: $51 Target: $400
 12% 

status cmd hook, client always = 0


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Seather
Member
Join Date: Oct 2004
Old 11-14-2007 , 20:50   status cmd hook, client always = 0
Reply With Quote #1

Code:
//goal: status hooks + blocks + replies to user
public OnPluginStart()
{
	//try these from both client and server console
	RegConsoleCmd("blah", Command_Say)//perfect
	RegConsoleCmd("status", Command_Say)//hooks + blocks, but client always = 0
	RegConsoleCmd("say", Command_Say)//perfect
}
 
public Action:Command_Say(client, args)
{
	PrintToConsole(client, "client %d", client)
	return Plugin_Handled
}
I'm almost done with a plugin replicates the status cmd.

Last edited by Seather; 11-14-2007 at 21:03.
Seather is offline
BAILOPAN
Join Date: Jan 2004
Old 11-14-2007 , 21:06   Re: status cmd hook, client always = 0
Reply With Quote #2

Is there a question
__________________
egg
BAILOPAN is offline
Seather
Member
Join Date: Oct 2004
Old 11-14-2007 , 21:10   Re: status cmd hook, client always = 0
Reply With Quote #3

yeah, i need some way of getting the right client number when i hook status, right now i'm only able to get 0

Last edited by Seather; 11-14-2007 at 21:23.
Seather is offline
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 11-14-2007 , 22:03   Re: status cmd hook, client always = 0
Reply With Quote #4

If you are even able to see anything and client = 0, you must have being executing that from the server console

Even in game it prints 0?
__________________
http://www.nican132.com
I require reputation!
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
KMFrog
Senior Member
Join Date: Oct 2007
Old 11-14-2007 , 22:05   Re: status cmd hook, client always = 0
Reply With Quote #5

what about GetClientUserId(client);
KMFrog is offline
BAILOPAN
Join Date: Jan 2004
Old 11-14-2007 , 22:06   Re: status cmd hook, client always = 0
Reply With Quote #6

Are you entering the command in your server console/rcon or client console?
__________________
egg
BAILOPAN is offline
Seather
Member
Join Date: Oct 2004
Old 11-14-2007 , 22:13   Re: status cmd hook, client always = 0
Reply With Quote #7

i type it in my client console and i get a 0 output in my server console

case 1: ok
type in client console: "say"
client console outputs: "client 1"

case 2: bugged
type in client console: "status"
server console outputs: "client 0"

case 3: ok
type in server console: "status"
server console outputs: "client 0"

Last edited by Seather; 11-14-2007 at 22:18.
Seather is offline
BAILOPAN
Join Date: Jan 2004
Old 11-15-2007 , 04:14   Re: status cmd hook, client always = 0
Reply With Quote #8

Interesting... you may wish to file a bug report. Please note what mod you were testing on.
__________________
egg
BAILOPAN is offline
Seather
Member
Join Date: Oct 2004
Old 11-20-2007 , 18:53   Re: status cmd hook, client always = 0
Reply With Quote #9

Mod: Counter Strike Source

edit: bug submitted http://bugs.alliedmods.net/index.php...s&task_id=1196

Last edited by Seather; 11-20-2007 at 19:10.
Seather is offline
drow
Junior Member
Join Date: Feb 2009
Old 04-28-2009 , 13:37   Re: status cmd hook, client always = 0
Reply With Quote #10

This bug never got solved?

Still getting it with sm1.2.0 on mod L4D.

Last edited by drow; 04-28-2009 at 13:53.
drow is offline
Reply



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 16:31.


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