AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   TOGs Database Adverts (https://forums.alliedmods.net/showthread.php?t=306807)

ThatOneGuy 04-15-2018 00:24

TOGs Database Adverts
 
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.

Lubricant Jam 04-15-2018 09:39

Re: TOGs Database Adverts
 
How would you go across putting multiple colours in the message? For example.

https://lubricantjam.com/uploads/201...5_14-39-39.jpg

ThatOneGuy 04-15-2018 11:54

Re: TOGs Database Adverts
 
Quote:

Originally Posted by Lubricant Jam (Post 2587830)
How would you go across putting multiple colours in the message? For example.

https://lubricantjam.com/uploads/201...5_14-39-39.jpg

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.

red4911 04-15-2018 19:14

Re: TOGs Database Adverts
 
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)

ThatOneGuy 04-15-2018 22:19

Re: TOGs Database Adverts
 
Quote:

Originally Posted by red4911 (Post 2587903)
Please make the base encoding in utf8

Done.

red4911 04-16-2018 16:21

Re: TOGs Database Adverts
 
Base in utf8, that's what's in the game
http://storage1.static.itmages.ru/i/...84405fe28.jpeg

ThatOneGuy 04-23-2018 21:45

Re: TOGs Database Adverts
 
Quote:

Originally Posted by red4911 (Post 2588024)
Base in utf8, that's what's in the game
http://storage1.static.itmages.ru/i/...84405fe28.jpeg

Hence why I already implemented the suggestion.

red4911 04-24-2018 00:30

Re: TOGs Database Adverts
 
Quote:

Originally Posted by ThatOneGuy (Post 2589105)
Hence why I already implemented the suggestion.

In my game, question marks instead of letters.

http://storage3.static.itmages.ru/i/...e17f6c244.jpeg

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 ...

ThatOneGuy 04-24-2018 22:30

Re: TOGs Database Adverts
 
Quote:

Originally Posted by red4911 (Post 2589115)
In my game, question marks instead of letters.

http://storage3.static.itmages.ru/i/...e17f6c244.jpeg

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.

plock 05-06-2018 02:29

Re: TOGs Database Adverts
 
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 :(


All times are GMT -4. The time now is 22:03.

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