Raised This Month: $120 Target: $400
 30% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
Author
hitmany
Senior Member
Join Date: Jul 2010
Plugin ID:
4383
Plugin Version:
0.3
Plugin Category:
General Purpose
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Rotates sv_server_graphic1 banners
    Old 10-12-2014 , 16:32   [CS:GO] Rotate server graphics banners (v0.3, 2015-3-8)
    Reply With Quote #1

    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.
    Attached Files
    File Type: txt graphics.txt (138 Bytes, 2116 views)
    File Type: sp Get Plugin or Get Source (sv_server_graphic_rotator.sp - 3256 views - 2.0 KB)

    Last edited by hitmany; 11-20-2016 at 15:53. Reason: added notice
    hitmany is offline
    Afonia
    Member
    Join Date: Jun 2014
    Old 10-30-2014 , 15:44   Re: [CS:GO] Rotate server graphics banners (v0.2, 2014-10-13)
    Reply With Quote #2

    Where to lay down a picture to show ????
    Afonia is offline
    Send a message via Skype™ to Afonia
    hitmany
    Senior Member
    Join Date: Jul 2010
    Old 10-31-2014 , 04:00   Re: [CS:GO] Rotate server graphics banners (v0.2, 2014-10-13)
    Reply With Quote #3

    Quote:
    Originally Posted by Afonia View Post
    Where to lay down a picture to show ????
    Quote:
    Originally Posted by hitmany View Post
    360x60 px image file (must be 16k or smaller) in /csgo/
    hitmany is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 12-10-2014 , 12:15   Re: [CS:GO] Rotate server graphics banners (v0.2, 2014-10-13)
    Reply With Quote #4

    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)
    __________________

    Last edited by Mitchell; 12-10-2014 at 12:18.
    Mitchell is offline
    SparkyCode
    Junior Member
    Join Date: Dec 2014
    Old 12-28-2014 , 23:02   Re: [CS:GO] Rotate server graphics banners (v0.2, 2014-10-13)
    Reply With Quote #5

    Does it work?
    SparkyCode is offline
    hitmany
    Senior Member
    Join Date: Jul 2010
    Old 12-29-2014 , 07:46   Re: [CS:GO] Rotate server graphics banners (v0.2, 2014-10-13)
    Reply With Quote #6

    Mitchell, thank you.

    SparkyCode, yes. Just check it.
    hitmany is offline
    ELIOFF
    New Member
    Join Date: Dec 2011
    Location: Rosario
    Old 01-09-2015 , 19:26   Re: [CS:GO] Rotate server graphics banners (v0.2, 2014-10-13)
    Reply With Quote #7

    Hi, I have a problem.
    We introduce explaining all files, modify the "txt" file.
    When I enter the server does not appear banners
    ELIOFF is offline
    Send a message via MSN to ELIOFF Send a message via Skype™ to ELIOFF
    hitmany
    Senior Member
    Join Date: Jul 2010
    Old 01-10-2015 , 02:56   Re: [CS:GO] Rotate server graphics banners (v0.2, 2014-10-13)
    Reply With Quote #8

    Quote:
    Originally Posted by ELIOFF View Post
    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?
    hitmany is offline
    ELIOFF
    New Member
    Join Date: Dec 2011
    Location: Rosario
    Old 01-10-2015 , 04:25   Re: [CS:GO] Rotate server graphics banners (v0.2, 2014-10-13)
    Reply With Quote #9

    Quote:
    Originally Posted by hitmany View Post
    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
    ELIOFF is offline
    Send a message via MSN to ELIOFF Send a message via Skype™ to ELIOFF
    hitmany
    Senior Member
    Join Date: Jul 2010
    Old 01-11-2015 , 09:58   Re: [CS:GO] Rotate server graphics banners (v0.2, 2014-10-13)
    Reply With Quote #10

    Quote:
    Originally Posted by ELIOFF View Post
    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

    Last edited by hitmany; 01-11-2015 at 10:01.
    hitmany is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 16:44.


    Powered by vBulletin®
    Copyright ©2000 - 2018, vBulletin Solutions, Inc.
    Theme made by Freecode