That is not correct (opposite would be more correct).
First you have to know there are 2 types of clients commands.
'clientside' client commands (disconnect, reconnect, quit, ...)
'sent to server' client commands (buy, drop, status, ...)
For the first type, the only way you have to make client execute it is client_cmd.
client_cmd executes the command in player console.
For the 2nd type of client commands, we have to make a distinction between engine commands and dll commands.
First you have to know that server works with engine (hlds) and dll (cstrike).
engine sends things to dll, and dll sends things to engine.
Metamod intercepts those communications and that is what allows to make addons.
So, there are engine commands and dll commands.
Routine :
- client sends a command
- engine receives it
- if this command is not an engine command, engine sends that command to dll.
Exemple :
client type 'status' in his console
This is an engine command, engine receive, print status in client console.
client type 'rebuy' in his console
This is not an engine command, so once engine has received it, engine sends it to game dll, and this is that action that metamod can intercept.
So, for engine commands, engclient_cmd won't have any effect, you have to use it only for game dll commands.
client_cmd :
for clientside commands (quit, disconnect, ...)
for engine commands (status, ...)
for game dll commands (drop, +jump, nightvision, ...)
engclient_cmd :
for game dll commands (drop, +jump, nightvision, ...)
Note that command sent with engclient_cmd won't be cought by modules or amxx plugins, because that command is not sent to the dll by the engine, but by metamod.
If you want such commands to be hookable, then use client_cmd.
Last, engclient_cmd is sent when plugin sends it, client_cmd is sent to client and then the client sends it back so there is a ping delay.
__________________
Last edited by ConnorMcLeod; 10-17-2012 at 02:05.
|