register_concmd
If proper argument does not being pass while executing a command "Command Info" should be printed, but I need to manually check the argument count and print message. Kindly correct me with my following code snippet.
Code:
register_concmd("amx_cmd", "FnCommands", ADMIN_IMMUNITY, "Command Info") |
Re: register_concmd
cmd_access already do that. Just change 1 to 2.
|
Re: register_concmd
OOPS. I got it. Need to change this if(!cmd_access(id, level, cid, 1)) to if(!cmd_access(id, level, cid, <no of expected arguments>))
Am I correct, got it after I posted. LOL. |
Re: register_concmd
Yes. It's 2 because the first argument is the command itself and then the second is the real command argument that should be passed to work.
|
Re: register_concmd
And if I want the command to accept 2 or more arguments then it should be 3 or more
|
Re: register_concmd
Quote:
|
Re: register_concmd
PHP Code:
PHP Code:
|
| All times are GMT -4. The time now is 06:07. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.