AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   console_cmd() vs client_cmd() (https://forums.alliedmods.net/showthread.php?t=10088)

BlueRaja 02-08-2005 01:15

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)?

DS 02-08-2005 03:12

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.

XxAvalanchexX 02-08-2005 14:26

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.

BlueRaja 02-08-2005 17:56

Quote:

Originally Posted by XxAvalanchexX
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.

...that's nice...


All times are GMT -4. The time now is 19:15.

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