Raised This Month: $18 Target: $400
 4% 

TOGs Database Adverts


Post New Thread Reply   
 
Thread Tools Display Modes
Author
ThatOneGuy
Veteran Member
Join Date: Jul 2012
Location: Oregon, USA
Plugin ID:
6095
Plugin Version:
1.3.5
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Custom server announcements with colors controlled via databases
    Old 04-15-2018 , 00:24   TOGs Database Adverts
    Reply With Quote #1

    I'm attempting to release (which takes a good bit of time) a bunch of my older/smaller plugins that have just been sitting around and others might want them.
    I don't plan on supporting all of them, as I don't currently have the time for that, but wanted to make them available to others. By now, some of these may have similar plugins released by others - I don't intend on checking.

    Plugin Description:

    TOGs Database Adverts
    Custom server announcements and colors, controlled via databases.

    * Colors work with Source 2009 games supporting hex (CS:S, TF2, etc.), CS:GO, and Insurgency.
    * Configurable for frequency of adverts.
    * The database setups can each be made for specific server(s), or apply to all servers, and ordered by another column.


    Download Package
    Source Code



    See Github repository for plugin details and instructions.
    __________________

    Last edited by ThatOneGuy; 02-17-2020 at 15:58. Reason: Update to 1.3.5
    ThatOneGuy is offline
    Lubricant Jam
    AlliedModders Donor
    Join Date: Oct 2016
    Location: United Kingdom
    Old 04-15-2018 , 09:39   Re: TOGs Database Adverts
    Reply With Quote #2

    How would you go across putting multiple colours in the message? For example.

    Lubricant Jam is offline
    ThatOneGuy
    Veteran Member
    Join Date: Jul 2012
    Location: Oregon, USA
    Old 04-15-2018 , 11:54   Re: TOGs Database Adverts
    Reply With Quote #3

    Quote:
    Originally Posted by Lubricant Jam View Post
    How would you go across putting multiple colours in the message? For example.

    Back when I coded this, the requestor only wanted single colors, so that is all that was added. To edit it for multiple colors, you could drop the `colorcode` field from the database, put them in line with the message itself, then process the message. If you do so, add a pull request and I'll update it with your contribution. Else, I might grab something like that from some of my other plugins.

    EDIT: I pushed an update for you adding in the inline color processing, etc. See change log in the source code. Note: `colorcode` was dropped from the database table structure now.
    __________________

    Last edited by ThatOneGuy; 04-15-2018 at 12:54.
    ThatOneGuy is offline
    red4911
    Senior Member
    Join Date: Sep 2010
    Location: Russia
    Old 04-15-2018 , 19:14   Re: TOGs Database Adverts
    Reply With Quote #4

    Please make the base encoding in utf8

    Quote:
    L 04/16/2018 - 02:10:11: SourceMod error session started
    L 04/16/2018 - 02:10:11: Info (map "awp_lego2") (file "errors_20180416.log")
    L 04/16/2018 - 02:10:11: [SM] Exception reported: Invalid index 0 (count: 0)
    L 04/16/2018 - 02:10:11: [SM] Blaming: togsdbadverts.smx
    L 04/16/2018 - 02:10:11: [SM] Call stack trace:
    L 04/16/2018 - 02:10:11: [SM] [0] ArrayList.GetString
    L 04/16/2018 - 02:10:11: [SM] [1] Line 168, D:\Coding\SM_Scripting\scripting1_8\togsdbadv erts.sp::TimerCB_DisplayAdvert
    L 04/16/2018 - 02:10:16: [SM] Exception reported: Invalid index 0 (count: 0)
    red4911 is offline
    ThatOneGuy
    Veteran Member
    Join Date: Jul 2012
    Location: Oregon, USA
    Old 04-15-2018 , 22:19   Re: TOGs Database Adverts
    Reply With Quote #5

    Quote:
    Originally Posted by red4911 View Post
    Please make the base encoding in utf8
    Done.
    __________________
    ThatOneGuy is offline
    red4911
    Senior Member
    Join Date: Sep 2010
    Location: Russia
    Old 04-16-2018 , 16:21   Re: TOGs Database Adverts
    Reply With Quote #6

    Base in utf8, that's what's in the game
    red4911 is offline
    ThatOneGuy
    Veteran Member
    Join Date: Jul 2012
    Location: Oregon, USA
    Old 04-23-2018 , 21:45   Re: TOGs Database Adverts
    Reply With Quote #7

    Quote:
    Originally Posted by red4911 View Post
    Base in utf8, that's what's in the game
    Hence why I already implemented the suggestion.
    __________________
    ThatOneGuy is offline
    red4911
    Senior Member
    Join Date: Sep 2010
    Location: Russia
    Old 04-24-2018 , 00:30   Re: TOGs Database Adverts
    Reply With Quote #8

    Quote:
    Originally Posted by ThatOneGuy View Post
    Hence why I already implemented the suggestion.
    In my game, question marks instead of letters.



    error compile

    Quote:
    //SourceMod Batch Compiler
    // by the SourceMod Dev Team


    //// togsdbadverts.sp
    //
    // C:\Users\sourcemod\scripting\togsdbadverts.sp (1) : erro
    r 010: invalid function or declaration
    //
    // 1 Error.
    //
    // Compilation Time: 0,48 sec
    // ----------------------------------------

    Press enter to exit ...

    Last edited by red4911; 04-24-2018 at 00:34.
    red4911 is offline
    ThatOneGuy
    Veteran Member
    Join Date: Jul 2012
    Location: Oregon, USA
    Old 04-24-2018 , 22:30   Re: TOGs Database Adverts
    Reply With Quote #9

    Quote:
    Originally Posted by red4911 View Post
    In my game, question marks instead of letters.



    error compile
    Compiles fine for me using the source code in github. Your compile error got cut off. Also, if you already made a database, drop the tables so they are re-created.
    __________________
    ThatOneGuy is offline
    plock
    Senior Member
    Join Date: Feb 2016
    Location: noitacoL
    Old 05-06-2018 , 02:29   Re: TOGs Database Adverts
    Reply With Quote #10

    I'm having some issues letters like:

    They show as *************************** (squares in game).

    Tried with collations: utf8_unicode_ci and utf8_general_ci

    I use utf8_unicode_ci in most of my databases and I don't have any problem with it
    __________________
    ~tuturu

    Owner/Developer at Kniv
    My Steam Profile
    plock 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 02:38.


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