AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Executing FakeClient comands (https://forums.alliedmods.net/showthread.php?t=64634)

USvER 12-19-2007 20:28

Executing FakeClient comands
 
Hi again

dllfunc (DLLFunc_ClientCommand, pClient)

How to pass a command in ClientCommand? %)

Drak 12-19-2007 22:27

Re: Executing FakeClient comands
 
The "DLLFunc_ClientCommand" is just the forward, called when a player uses a client command.
To execute a command on a client, there's: "client_cmd(id,"COMMAND");"

USvER 12-19-2007 23:32

Re: Executing FakeClient comands
 
Quote:

dllfunc - Calls a Half-Life engine DLL function.

Syntax:
dllfunc ( type, [ ... ] )

Type:
Native

Notes:
type is an DllFunc_*
Quote:

Originally Posted by fakemeta_const.inc
...
/* Used with dllfunc()
*/
enum
{
...
DLLFunc_ClientCommand, // void ) (edict_t *pEntity);
...


Drak 12-19-2007 23:41

Re: Executing FakeClient comands
 
Okay for one. Your original question makes no sense. And what you just said again make no sense.

USvER 12-20-2007 00:41

Re: Executing FakeClient comands
 
ClientCommand is a MOD function called by Engine when client passes command in console.

register_forward (FM_ClientCommand, "ClientCommand", 0) // Hook of ClientCommand
dllfunc (DLLFunc_ClientCommand, pClient) // Call of ClientCommand

Correct me if I'm wrong.

I don't need to execute a command on a client, I need to execute a command as client.

Fake clients don't have network connection to server... so client_cmd can't do...
engclient_cmd on description exactly that function which I search but she for some reason does not work with "menuselect"

[ --<-@ ] Black Rose 12-20-2007 04:56

Re: Executing FakeClient comands
 
Bots doesn't have menus(?)

USvER 12-20-2007 12:50

Re: Executing FakeClient comands
 
From POD Bot:
FakeClientCommand (pBot->pEdict, "menuselect %d\n", pBot->bot_team);

FakeClientCommand call MDLL_ClientCommand...

params must be in argc,argv
so it's unposible to use that function =(

I think it's time to program for metamod... it's more powerfull

ConnorMcLeod 12-20-2007 13:17

Re: Executing FakeClient comands
 
May be this could help you : http://forums.space-headed.net/viewtopic.php?t=131

USvER 12-20-2007 14:36

Re: Executing FakeClient comands
 
w0w
tnx

Orangutanz 12-22-2007 07:58

Re: Executing FakeClient comands
 
Quote:

Originally Posted by [ --<-@ ] Black Rose (Post 565177)
Bots doesn't have menus(?)

Bots see everything a player can see (even the crappy VGUI welcome screen).
After all a bot is a player, just controlled server-side that's all.


All times are GMT -4. The time now is 11:00.

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