Get two arguments
So I'm having this issue. I want to gag the player I type in as the first argument and the second argument should be stored in the "reason" variable so I can use that as reason on the gag.
But when I type "!tgag trum test" then the reason is "trum test". How can I seperate the first argument from the second? PHP Code:
Thanks in advanced! |
Re: Get two arguments
Use GetCmdArg. They start at index 1 as 0 is the command like it says on the page.
Also you are currently muting the player that sends the command. You can use FindTarget to find a player. Make sure you properly check the return value. |
Re: Get two arguments
Quote:
|
Re: Get two arguments
Quote:
PHP Code:
|
Re: Get two arguments
Ahh, cool of you to share. Really helped me understand!
|
All times are GMT -4. The time now is 05:49. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.