AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CS:GO] Rotate server graphics banners (v0.3, 2015-3-8) (https://forums.alliedmods.net/showthread.php?t=249814)

hitmany 10-12-2014 15:32

[CS:GO] Rotate server graphics banners (v0.3, 2015-3-8)
 
2 Attachment(s)
Description:

This is a simple plugin based on sv_server_graphic1 cvar. For rotating your graphics banners. Banners are displayed only for spectators.
Plugin changes the banners after a map change.

Screenshot. What is the graphics banners?

Cvars:

sm_graphics_file (def "graphics.txt")
File to read the banners names from. Useful if you're running multiple servers from one installation, and want to use different banners per server.

sm_graphics_random (def "0")
Banners are changing in turns or randomly? 0 - by rotation, 1 - randomly.

Note:

You must remove sv_server_graphic1 cvar from your server configs.
Plugin enables the banner after first map change.
File format png or jpg, image size 360x60 px, file size of the banner is not strictly greater than 16 Kbytes
If the banner is not displayed - disable plugin and put in server.sfg sv_server_graphic1 "yourbanner.png"
Change the map twice and if the banner does not appear to observers banner file against the rules.

Installation:
Drop sv_server_graphic_rotator.smx in addons/sourcemod/plugins/
Drop sv_server_graphic_rotator.sp in addons/sourcemod/scripting/
Drop graphics.txt in addons/sourcemod/configs/
Drop your banners files to /csgo directory
Change your file name in graphics.txt

By default the plugin reads the banners names from configs/graphics.txt, which has this format:
Code:

"Graphics"
{
        "1"
        {
                "file"                "banner.png"
        }
        "2"
        {
                "file"                "steamgroup.png"
        }
}

Changelog
Quote:

2015-3-8 (v0.3)

* Fixed bug with only 1 banner (thanks AlmazON)
* Added FCVAR_NOTIFY cvar "graphicrotator_version"
* SetConVarString used instead ServerCommand

2014-10-13 (v0.2)

* Added sm_graphics_random cvar.
* Fixed bug with rotation after sm_graphics_file changes.

2014-10-12 (v0.1)

* Initial release.

Afonia 10-30-2014 14:44

Re: [CS:GO] Rotate server graphics banners (v0.2, 2014-10-13)
 
Where to lay down a picture to show ????

hitmany 10-31-2014 03:00

Re: [CS:GO] Rotate server graphics banners (v0.2, 2014-10-13)
 
Quote:

Originally Posted by Afonia (Post 2217952)
Where to lay down a picture to show ????

Quote:

Originally Posted by hitmany (Post 2210297)
360x60 px image file (must be 16k or smaller) in /csgo/


Mitchell 12-10-2014 11:15

Re: [CS:GO] Rotate server graphics banners (v0.2, 2014-10-13)
 
Some tips:
- Add version cvar, for some reason you totally skipped out on this. (see: https://forums.alliedmods.net/showthread.php?t=57142)

-Parse the list once as an ADT_Array or even just a keyvalue. That way you are not loading from file ideally twice right after each other when you could have just loaded it and then searched etc. If you need some reference on how to do this I think i could post an example.

-ServerCommand can be replaced with SetConvarString.

Edit:
something like this doesn't really need to use key-value, as it's just a list, although it's probably best to not change it now. but something you could do is readline (ex: https://forums.alliedmods.net/showthread.php?p=1729023)

SparkyCode 12-28-2014 22:02

Re: [CS:GO] Rotate server graphics banners (v0.2, 2014-10-13)
 
Does it work?

hitmany 12-29-2014 06:46

Re: [CS:GO] Rotate server graphics banners (v0.2, 2014-10-13)
 
Mitchell, thank you.

SparkyCode, yes. Just check it.

ELIOFF 01-09-2015 18:26

Re: [CS:GO] Rotate server graphics banners (v0.2, 2014-10-13)
 
Hi, I have a problem.
We introduce explaining all files, modify the "txt" file.
When I enter the server does not appear banners

hitmany 01-10-2015 01:56

Re: [CS:GO] Rotate server graphics banners (v0.2, 2014-10-13)
 
Quote:

Originally Posted by ELIOFF (Post 2247166)
Hi, I have a problem.
We introduce explaining all files, modify the "txt" file.
When I enter the server does not appear banners

Greetings!

You put a png/gif file to a folder /csgo?
File size 360x60 px and not more than 16k?
You specified the correct file name in graphics.txt?

ELIOFF 01-10-2015 03:25

Re: [CS:GO] Rotate server graphics banners (v0.2, 2014-10-13)
 
Quote:

Originally Posted by hitmany (Post 2247291)
Greetings!

You put a png/gif file to a folder /csgo?
File size 360x60 px and not more than 16k?
You specified the correct file name in graphics.txt?

Yep, I've done all these steps

hitmany 01-11-2015 08:58

Re: [CS:GO] Rotate server graphics banners (v0.2, 2014-10-13)
 
Quote:

Originally Posted by ELIOFF (Post 2247302)
Yep, I've done all these steps

Have you tried to change the map after the changes?
File format is png or gif?

Please check sm plugins list.
Please attach your banner here and show your graphics.txt


All times are GMT -4. The time now is 02:38.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.