.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Bot Coding (http://forums.bots-united.com/forumdisplay.php?f=24)
-   -   Executing command on other clients? (http://forums.bots-united.com/showthread.php?t=1409)

stefanhendriks 18-04-2004 13:13

Executing command on other clients?
 
Hey all,

I've been playing around with the 'speak' command (like POD uses). It works for me as a host. But i want it to execute it on other human players too. So they all hear the same as the host.

I know it should be possible, i have seen several admin mods and also statsme works great with this. (like the bomb timer, etc).

Is there any way to do this?

@$3.1415rin 18-04-2004 13:22

Re: Executing command on other clients?
 
I think it was enginefunc_s::pfnClientCommand

Cheeseh 18-04-2004 15:01

Re: Executing command on other clients?
 
theres also

CLIENT_COMMAND(pEdict,command);

which does basically the same thing as what aspirin said :P

stefanhendriks 18-04-2004 15:15

Re: Executing command on other clients?
 
You must be kidding me? I probably looked not far enough. I found:

CLIENT_COMMAND(pEdict);

that was it. But i did not know you could do this:

CLIENT_COMMAND(pEdict, <command>);

@$3.1415rin 18-04-2004 16:31

Re: Executing command on other clients?
 
dunno about that macro, but in the enginefuncs its defined another way :

void pfnClientCommand( edict_t* pEdict, char* szFmt, ... );


stefanhendriks 18-04-2004 17:09

Re: Executing command on other clients?
 
lol, well i looked a bit further and u're right :)

Rick 18-04-2004 20:28

Re: Executing command on other clients?
 
FakeClientCommand also works.....

botman 19-04-2004 14:47

Re: Executing command on other clients?
 
"FakeClientCommand also works....."

Works for what? It won't execute commands on the client (I should know, since I created it).

I think you're confused about what FakeClientCommand() does.

botman

Whistler 19-04-2004 15:01

Re: Executing command on other clients?
 
Code:

if (!IsABot(pEdict)) {
    CLIENT_COMMAND(pEdict, "play sound/xxx/xxx.wav\n");
 }

Don't use the 'speak' command, since that's a server side command

stefanhendriks 19-04-2004 18:20

Re: Executing command on other clients?
 
speak works for clients and for servers afaik. Its just something to make that cool voice play.


All times are GMT +2. The time now is 23:26.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.