Help out a nooby - Not quite grasping something
Hi there, just trying to learn and I have got a long way to go.
I just have a question from reading the wiki: Code:
register_concmd("amx_hp", "cmd_hp", ADMIN_SLAY, "<target> ")If I was to type the command "amx_hp 1" in the console, how would I be able to access the "1"? So for instance in my case, I want to check to see if an admin has already performed said command on him/herself. So I would assume I use a kind of IF statement like: Code:
IF amx_hp = 1 THEN |
Re: Help out a nooby - Not quite grasping something
First, the "<target>" is nothing other than help. In other words, when you do amx_help blah blah, or just type amx_hp (without anything else) it would say Usage: amx_hp <target>. If I changed <target> to player (in the register_concmd line), then in the help menu, it would say: Usage: amx_hp <player>. It's only to help users understand how to use it, and can be omitted altogether.
Also, to find out about the value of HP, you do something with read_argv. You can read-in the value of the parameter passed and do things with it. For example: PHP Code:
Sorry if I explained this horribly |
| All times are GMT -4. The time now is 01:22. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.