say number motd number
1 Attachment(s)
how I do to send a random number.
to a page with motd? PHP Code:
Attachment 181368 https://forums.alliedmods.net/attach...1&d=1589412649 |
Re: say number motd number
Read the argument string (read_args()) and then get the number from the string and use it for your URL.
Also, if you have a predefined number of commands that work, you need to register all of them to call that same function. If the number is fully arbitrary, then you need to hook "say" and then process the the arg string to first check that it matches your command (i.e. "top") and then call your MOTD if it does. Also, you mean arbitrary number, not random number. |
Re: say number motd number
bump, can someone do this
|
Re: say number motd number
Here ya go. Add as many register_clcmd() functions as needed with a different number and update with your URL.
PHP Code:
|
Re: say number motd number
I need this to be done with a loop, the rank can go from 1 to 2000...
it will be very difficult to declare 2000 register_clcmd ... |
Re: say number motd number
Would have been nice to know. Updated above. I'm not sure if there is any limitations to registering commands like this, if it causes issues, we can switch how it's done to not require all the registered commands.
|
Re: say number motd number
https://www.youtube.com/embed/4h-kEsfcVNk would you be able to do the same thing without registering so many commands? |
Re: say number motd number
https://i.imgur.com/TAJKm1x.png
Code:
|
Re: say number motd number
in this case
Code:
|
Re: say number motd number
You are doing way more formatting than you need to do, no formatting related to "text" is required. Should also validate the number before showing the MOTD. Also, returning PLUGIN_HANDLED unconditionally in a "say" hook will prevent all normal chat messages from showing.
PHP Code:
|
All times are GMT -4. The time now is 00:19. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.