Raised This Month: $ Target: $400
 0% 

console_cmd() vs client_cmd()


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BlueRaja
Senior Member
Join Date: Nov 2004
Old 02-08-2005 , 01:15   console_cmd() vs client_cmd()
Reply With Quote #1

What's the difference between how client_cmd() and console_cmd() work (other than the fact that console_cmd() allows format()-type strings)?
__________________
STEPS IN TROUBLESHOOTING <insert anything here>:
1. Narrow down the problem to a specific condition or conditions.
2. Fix it.
BlueRaja is offline
Send a message via AIM to BlueRaja Send a message via MSN to BlueRaja
DS
SourceMod Developer
Join Date: Sep 2004
Location: WI, USA
Old 02-08-2005 , 03:12  
Reply With Quote #2

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.
DS is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-08-2005 , 14:26  
Reply With Quote #3

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.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
BlueRaja
Senior Member
Join Date: Nov 2004
Old 02-08-2005 , 17:56  
Reply With Quote #4

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...
__________________
STEPS IN TROUBLESHOOTING <insert anything here>:
1. Narrow down the problem to a specific condition or conditions.
2. Fix it.
BlueRaja is offline
Send a message via AIM to BlueRaja Send a message via MSN to BlueRaja
Reply


Thread Tools
Display Modes

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 19:15.


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