Advanced Multiple Scrolling Messages
**** AMSM v1.0 ****
Made-from-zero powerful plugin for scrolling messages on the screen
may become a better alternative to default scrollmsg.amxx plugin
******* Features: *******
- This plugin scrolls messages on player's screen
- Messages are stored in a file
- Special amx_sm_add command to add new messages from the console
- Each message may end with a handy color parameter (see example)
- Can show message with changing color ('random' and 'rainbow')
- Each message can contain number of different CVars (see example)
- Most parameters are adjustable
******* USAGE "Fast Start": *******
- Using this plugin is simple as that
+ Add AMSM.amxx to your plugins.ini file
+ Start your server
+ Wait for message to appear
- Alternative usage
+ Add AMSM.amxx to your plugins.ini file
+ Start your server
+ Join to the server as admin with "a" flag or open server's console
+ Add message using amx_sm_add command
+ Wait for your message to appear
Standart message is stored in /cstrike/addons/amxmodx/configs/AMSM.ini by default.
There you can find some examples, and tips.
You can modify it or/and add more message to this file.
Example:
Code:
You're playing on %hostname%. This server uses AMXmodX version %amxmodx_version%. | rainbow
<- this displays message with changing color
Code:
Another message with red color|#FF0000
Or another one | red
Or one more with cvar. sv_cheats=%sv_cheats% | lightgoldenrodyellow
<-more than 50 color names availiable
- Keep in mind that everything could be accurately configured as well - see info in AMSM.sma file
******* CVars: *******
- amx_sm_speed 0.3 values: 0.1 ... 10.0 How fast message is scrolled.
- amx_sm_interval 60 values: 0.1 ... 99999.0 Time between displayings.
- amx_sm_align "center" values: "center","left","right" Horizontal align of scroll area.
- amx_sm_y_position 0.86 values: 0.0 ... 1.0; -1 Vertical position of scroll area on the screen.
- amx_sm_size 340 values: 20 ... 340 Size of scroll area in pixels.
- amx_sm_color "default" values: "default", "rainbow", "random", "white" or any other allowed color name or color in hex format "#FFFFFF". Default color to show parameterless messages
- amx_sm_file "default" values: any file name, (root directory is /cstrike/) Name of file with messages, file is created automatically if not exists.
- amx_sm_flick 1 values: 0 ... 1 Use 0 to deny color pulsations when new "scrolling frame" appears.
- For accurate configuration see info in AMSM.sma file
******* Commands: *******
- amx_sm_add <message> | [color]
Adds Scrolling Message To The List.
Before color parameter must be "|" delimeter.
[color] can be "rainbow","random", any allowed color ("white"), or html-like color code in hex format ("#FFFFFF")
ADMIN_IMMUNITY flag is required by default
Example:
amx_sm_add You're playing on %hostname%. This server uses AMXmodX version %amxmodx_version%. | rainbow
*** Technical Features, And Improvements Over Original, Other Plugins: **
- The code is totally original, lot of research performed
- New resolution independent scrolling conceprion based on text's size in pixels
- Shows warings and keeps CVar values safe
- CVars for accurate plugin control
- Using handy color parameters as color names and html-like hex color codes
- In function 'charpixize' list is statistically normalized
- Some functions may be useful in other plugin projects
******* Changelog: *******
v1.0d
-New synchronized frame displaying
-Rainbow colors reduced to 6 brigthest (orange deleted)
-Added CVar amx_sm_flick to turn on/off "color pulsations" (default - on)
-Some code cleared
-Some hardcodings removed
v1.0c
-Fast color name converting system fixed for AMXX 1.8.1
-Fixed bug with spaces in color parameters
-Some scrolling system updates
-Some hardcodings removed
-Some code optimized
v1.0b
-New fast color name converting system
-Fixed some bugs with 'static's
v1.0a
- Added default message
- Minimal changes in info section
v1.0
- Initial release
ps. additional features and effects may be added by request, i keep in mind some stuff, but as for now let's see what will be with this thread, i hope this won't be deleted at once. If needed i'm ready to open parallel thread in scripting help related to this plugin.
And thank you for reading this huge amount of bad-english text.
The story behind:
Hello Dear Allied Modders Community!
I read this forum for some years, and finally, decided to get some skills in pawn coding. It began when i revised plugins on my server. I've asked myself "What standart plugins can do?". I've decided to check standart scrollmsg.amxx plugin and found out that it has poor abilities, "there must be a better one", i thought .I've searched the forum and found two plugins: first by BMJ, it's approved as i see for now, and second one by tuty and both are standart AMXmodX team's plugin with some extra stuff added, both not handy. So I've imagined how the real scrollmessage plugin should look like, what it must do, how it must be configured, BUT i had literally no experience with pawn scripting, but had some skills in other programming languages. So my research started. First some pawn scripting, then scrolling message plugin, at some point i've made a plugin, but then i understood that i've made the same thing as standart plugn (lol), it had the same problems as original one. The scrolling system itself was not good. Original system deals with x coordinate shifting, and on different screen resolutions there's a great difference, maybe soneone noticed this bug when message stretches to the right, of shortens to the left on large resolutions? So, i've set it for me, that i'll make the right scrolling system. But how? hudmessage could be set only at some x coordinate, and on different resolutions there's great difference! I needed a totally new scrolling conception. Here i've made quite a research of set/show_hudmessage navie, found other problems with it, breaking the lines, symbols had different lengths... lot of work done, and time passed, .. i'll keep the details .. enough said