client_cmd() vs. console_cmd()
I don't understand why one is more proper in a certain situation than another, unless they're interchangeable.
Quote:
Quote:
Examples: "voice_enable 0" (for instance, if you were to set this in info_changed to disable use of the microphone, through client-side) "net_graph" "cl_updaterate" etc... From my understanding, console_cmd() would also be used to execute commands such as say and say_team in a certain situation, correct? --- client_cmd(), on the other hand, would be used for things such as amx_slay or other commands that the server executes on the player, because the server has access to all commands, right? I'd be grateful if someone were able to help me decipher these two commands. :) |
They do the same thing, in different ways.
|
Wait so... what are the different ways, and why were there two different commands created to do the same thing?
|
with console_cmd you can exec on players or server console by using 0 for id.
with client_cmd you can only exec on clients. The use of 0 for index will execute on all players. |
Quote:
|
Not true. If you look at the CVS you can see that it uses SERVER_COMMAND() when the index is less than 1
Code:
static cell AMX_NATIVE_CALL console_cmd(AMX *amx, cell *params) /* 2 param */Code:
static cell AMX_NATIVE_CALL client_cmd(AMX *amx, cell *params) /* 2 param */ |
Whoa! Where did you get that information?!
|
That would be the source code to AMXx.
|
Jeez, I feel like a real noob asking this information... but...
Where can I find the source code to AMXx? Here? http://www.tcwonline.org/cgi-bin/viewcvs.cgi This would greatly help me understand the commands that aren't explained very in-depth in the funcwiki. |
All of them are explained in depth.
|
| All times are GMT -4. The time now is 16:42. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.