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

[Help] How to send a fake command to client


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Infernuz
Member
Join Date: May 2011
Old 11-30-2015 , 00:05   [Help] How to send a fake command to client
Reply With Quote #1

What's the correct way of sending a fake client command to (player / all player) throw module? I have looked into UTIL_FakeClientCommand, but I don't quite understand how to imlement it in my code.

I know that MDLL_ClientCommand(pEdict) is responsible for the execution, but how does it work when it only takes player edict as param?

Thanks.
Infernuz is offline
Send a message via ICQ to Infernuz
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-30-2015 , 00:49   Re: [Help] How to send a fake command to client
Reply With Quote #2

A "fake client command" is fake because it is never sent to the client. It is intended to send a command to the the game DLL as if it was sent by the player (this is why it's called "fake").

If that doesn't help you understand then you'll need to explain what you are actually trying to do.
__________________

Last edited by fysiks; 11-30-2015 at 19:43. Reason: typo
fysiks is offline
Infernuz
Member
Join Date: May 2011
Old 11-30-2015 , 14:37   Re: [Help] How to send a fake command to client
Reply With Quote #3

Alright thanks. That cleared things up .

Then, what I want is to send a command to client, just as client_cmd in amxx does. Am I able to somehow get access to CLIENT_COMMAND pointer? Or it can be done differently?

Last edited by Infernuz; 11-30-2015 at 14:42.
Infernuz is offline
Send a message via ICQ to Infernuz
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-30-2015 , 19:44   Re: [Help] How to send a fake command to client
Reply With Quote #4

If you want to do what client_cmd() does, simply look at the code for client_cmd() in AMX Mod X.
__________________
fysiks 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 18:56.


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