 |
|
Veteran Member
Join Date: Oct 2004
Location: abort73.com
|

01-13-2005
, 18:49
|
#6
|
What PM was saying is that in cmd_live you call cmd_noaccess. Inside of cmd_noaccess you return PLUGIN_HANDLED, and this stops cmd_noaccess, it does NOT stop cmd_live, since you never put a return statement inside of cmd_live itself. Additionally, the cmd_access function will print "You have no access to this command" by itself, so your entire cmd_noaccess function is useless, and it will be printed twice to the client.
When you call cmd_access, the last parameter is how many parameters the comand has, including the command itself. So if you have a command "amx_command <player> <0|1>" you would have a 3 for the last parameter in cmd_access. 1 is amx_comand, 2 is <player>, and 3 is <0|1>. When you do that, if a player only puts in "amx_command <player>", cmd_access will return an error and show the proper usage. This is also another reason why not to print "You do not have access to this command" yourself, as cmd_access may be false for different reasons. So, technically the last parameter in your case should be 1, although it does work with 0.
__________________
No longer around. Thanks your support, everyone! As always: THIS ONES FOR YOU
3000 PTS
|
|
|
|