Random quotes
I'm looking for a plugin that can displays random quotes to chat. For example, I have 50 quotes in a file, and it shows one in chat every 5 minutes. Does this exist anywhere?
|
Re: Random quotes
|
Re: Random quotes
It doesn't display things randomly. It goes in order (1, 2, 3, 4). So for every map, you get the same ads over and over again.
|
Re: Random quotes
OK. I'm writing a plugin for you.
Almost done. Maybe finish on tomorrow |
Re: Random quotes
1 Attachment(s)
Faster :3
A config file must be created in configs folder called : facts.txt One fact par line. And that's it ! Also, color code support : this {green}is {red}a {orange}fact {purple}! PHP Code:
|
Re: Random quotes
Thanks, I'll give it a shot.
It seems to work fine. The only minor problem I ran into was when I changed the sm_fact_interval via the console, it didn't update the timer. |
Re: Random quotes
1 Attachment(s)
OK Thank you pro :wink:
Here is fix: PHP Code:
|
Re: Random quotes
Good job guys.
|
Re: Random quotes
I played around with the plugin some. I found if you change the map, the timer continues from the previous map. I've fixed this. Also, it seems that handles are killed when the plugin is unloaded or reloaded.
https://forums.alliedmods.net/showpo...47&postcount=2 https://forums.alliedmods.net/showpo...6&postcount=12 So I removed the OnPluginEnd() method. PHP Code:
|
Re: Random quotes
Yes right, But I think you should kill it in OnMapEnd then create it in OnConfigsExecuted.
EDIT: If you set "TIMER_FLAG_NO_MAPCHANGE" flag on the timer it doesn't need to kill it OnMapEnd & create it when map starts. |
| All times are GMT -4. The time now is 12:28. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.