AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   status cmd hook, client always = 0 (https://forums.alliedmods.net/showthread.php?t=63202)

Seather 11-14-2007 20:50

status cmd hook, client always = 0
 
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.

BAILOPAN 11-14-2007 21:06

Re: status cmd hook, client always = 0
 
Is there a question :o

Seather 11-14-2007 21:10

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

Nican 11-14-2007 22:03

Re: status cmd hook, client always = 0
 
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?

KMFrog 11-14-2007 22:05

Re: status cmd hook, client always = 0
 
what about GetClientUserId(client);

BAILOPAN 11-14-2007 22:06

Re: status cmd hook, client always = 0
 
Are you entering the command in your server console/rcon or client console?

Seather 11-14-2007 22:13

Re: status cmd hook, client always = 0
 
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"

BAILOPAN 11-15-2007 04:14

Re: status cmd hook, client always = 0
 
Interesting... you may wish to file a bug report. Please note what mod you were testing on.

Seather 11-20-2007 18:53

Re: status cmd hook, client always = 0
 
Mod: Counter Strike Source

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

drow 04-28-2009 13:37

Re: status cmd hook, client always = 0
 
This bug never got solved?

Still getting it with sm1.2.0 on mod L4D.


All times are GMT -4. The time now is 20:13.

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