[Snippet] You need a Help Command to your plugin? Look Here :)
3 Attachment(s)
Hi, i actually using this on my plugins, this is a small code to detect what commands you are using in your plugin and put in a MOTD file.
Let's learn: PHP Code:
We need a functions to work with code above: You can use more functions of course.. PHP Code:
PHP Code:
|
Re: [Snippet] You need a Help Command to your plugin? Look Here :)
This should be useful, but what about adding a better style to the motd ?
|
Re: [Snippet] You need a Help Command to your plugin? Look Here :)
Quote:
Ps. Test if the Code:
<style type='text/css' |
Re: [Snippet] You need a Help Command to your plugin? Look Here :)
What about adding the way to get the MOTD window from cstrike directory (and also show how to make it from the configs folder), instead of formating it directly in the code. I think this way is much useful, too, because the user won't need to redact the .sma itself, but just the .txt file in his folder.
|
Re: [Snippet] You need a Help Command to your plugin? Look Here :)
If you want to edit the design several times, you van use a cvar too :)
Ah i forgot, you can format the MOTD in plugins_cfg to advoid re-formatting the motd every time when an player put .help in their console. I will be correct this later on main post... |
Re: [Snippet] You need a Help Command to your plugin? Look Here :)
Quote:
|
Re: [Snippet] You need a Help Command to your plugin? Look Here :)
Quote:
I will add a example using plugin_cfg to store MOTD into a global string to avoid the plugin to compile MOTD every time when any player uses help command. |
Re: [Snippet] You need a Help Command to your plugin? Look Here :)
Quote:
|
Re: [Snippet] You need a Help Command to your plugin? Look Here :)
Sorry. I misunderstood you. I thought this plugin was about scripting commands. I was confused after reading title, I thought You need help for commands in your plugin? LMAO! But I was more confused when I read about that motd. Haha.
|
All times are GMT -4. The time now is 13:16. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.