console_cmd() vs client_cmd()
What's the difference between how client_cmd() and console_cmd() work (other than the fact that console_cmd() allows format()-type strings)?
|
They both do support format type strings AFAIK. But the difference is that if you pass an index of 0 to console_cmd, it will execute a command on the server and if you pass 0 to client_cmd, it will execute the command on all players in the server. Other than that, they do the same thing.
|
Additionally (on a slightly different note), I believe functions registered with register_clcmd can only be called by clients in the game, as opposed to functions registered with register_concmd that can be called by the server, ie: someone using rcon from a program like HLSW.
|
Quote:
|
| All times are GMT -4. The time now is 19:15. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.