AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] ServerAdvertisement3 - MultiLang | *UPDATED 05.04.2020* | *VERSION 3.1.4 (https://forums.alliedmods.net/showthread.php?t=248314)

ESK0 09-15-2014 16:40

[ANY] ServerAdvertisement3 - MultiLang | *UPDATED 05.04.2020* | *VERSION 3.1.4
 
Hello guys,

ServerAdvertisements3 is advertisement plugin wich contains a lot of features. It's very easy to use and almost everyone can manage to set it up

Admin Commands:
  • !sa3debug - Messages debug in console for current map
  • !sa3r - Messages reload

Client Commands:
  • !sa3lang - Client can change his language to any available language

Features:
  • Chat messages - Type: T. / Color support
  • Hud messages - Type: H. / R G B color
  • Center text messages - Type: C. / Support only HTML [hex] colors
  • Multi-Language support. LINK (Use Alpha-2 codes)
  • Up to 9 lines per message [\n].
  • Custom tag for message - Keep tag text empty to have message without tag
  • Messages for specific maps (e.g. all,de_dust2,de_inferno, de_, zm_, etc..)
  • Message can be banned for certain maps if you use all,de_,ar_, etc.... ("ignore_maps" "ar_;de_;etc..")
  • Messages for specific flags (e.g. a,b,c,d,z, etc..)
  • Message can be disabled for specific flags (e.g. a,b,c,d,z, etc..) - "ignore" "flag"
  • Enable option per message - Message can be temporarily disabled - By default its enabled
  • Message can be enabled till any date (e.g. Messages for some events or so). -> Added Log expired messages option in Settings part for debugging expired messages.
  • Welcome message - Preview
  • Client can change its language to any available language with !sa3lang command. Language is stored in a cache.

Text variables:
  • {NEXTMAP}
  • {CURRENTMAP}
  • {PLAYERCOUNT}
  • {CURRENTTIME}
  • {SERVERIP}
  • {SERVERNAME}
  • {PLAYERNAME}
  • {ADMINSONLINE}
  • {TIMELEFT}
  • {STEAMID}
  • {CONVAR} ->{mp_friendlyfire},{sv_cheats},...., or convar from any pluigin.
  • {CURRENTDATE}
  • {CURRENTDATE_US}
  • {VIPONLINE} - Flag A

Supported colors: Maybe some will not work or be different.

?CS:GO Only?
Spoiler

?Other games?
Spoiler


Installation:
  • Move ServerAdvertisemen3.cfg to your addons/sourcemod/configs folder.
  • Move ServerAdvertisemen3.smx to addons/sourcemod/plugins folder.
  • Restart server/Change map

Todo list:
  • MySQL support
  • Do you have an idea? Let me know below!

Config editing:
Spoiler

Screens/Previews
Spoiler



Change log:
Code:

Version 3.1.4:

- Server tracker completely removed.

Version 3.1.3a:

- Possible memory leaks fix (testing version)

Version 3.1.3:

- Added Server tracking (List of servers which uses ServerAdvertisement3)
- Added support for more Welcome message types (T, H, C)
- Text variable '{CURRENTMAP}' now support workshop maps
- Added support for No More Room In Hell - MultiColors 2.1.1 or the latest needed for compile.
- Added new color Yellow - MultiColors 2.1.1 or the latest needed for compile.
- Fixed issue when Timer tries to get message from empty ArrayList.
- Added "ServerTracker" option to Settings part of .cfg

Version 3.1.2:

- Fixed typo in Welcome Message part in .cfg -> "Enable" - There is missing d "Enabled"
- Added support for mutiple maps in map restriction
- Added support for banning certain maps if you use all,de_,ar_, etc.... ("ignore_maps" "ar_;de_;etc..")
- Added multi line support for hud messages.. (Type: H)
- Fixed infinite game_text creation if it already exists

Version 3.1.1:

- Increased ServerName size
- Menu memory leak prevention
- CheckCommandAccess performance improvement
- Added SA3_version ConVar for tracking servers which use ServerAdvertisement3
- Message language can be based on ingame language (Option added to !sa3lang)
- Added "effect", "channel" and "color2" to hud message
- Added {CURRENTDATE} and {CURRENTDATE_US} text variable
- Message can be disabled for specific flags (e.g. a,b,c,d,z, etc..)

Version 3.1:

- Added Enable option per message - Message can be temporarily disabled - By default its enabled
- Message can be enabled till any date (e.g. Messages for some events or so). -> Added Log expired messages option in Settings part for debugging expired messages.
- Added welcome message
- Client can change its language to any available language
- Added !sa3lang command with which can client change its language
- Added {CONVAR} text variable
- \n limit increased to 9 since CSGO chat can handle up to 9 messages at once

Version 3.0 hotfix:

- FindString function is case-sensitive - Keep language code in Settings part upper-case

Version 3.0:

- Fully re-scripted
- Hud messages - Type: H. / R G B color - Only single line messages
- Up to 5 lines per message [\n].
- Custom tag for message - Keep tag text empty to have message without tag
- Messages for specific maps (e.g. all,de_dust2,de_inferno, de_, zm_, etc..)
- Messages for specific flags (e.g. a,b,c,d,z, etc..)
- More text variables

Download

TUSK3N1337 09-15-2014 16:46

Re: [CSGO] Automatic Messages
 
Does all of these colors even work in csgo?

I guess this is a rewrite from the advertisements plugin but more focused on csgo?

ESK0 09-15-2014 16:48

Re: [CSGO] Automatic Messages
 
I think yes, but classic Red is weird. So use Darkred.

edit:// I am sorry :) But this is my work :)) You will not find anything from advertisements plugin.

TUSK3N1337 09-15-2014 16:55

Re: [CSGO] Automatic Messages
 
Ok nice will try it out tomorrow and see if its any better than the advertisements plugin. Right now im only seeing the colors that would benefit.

Have you fixed the space thingy

"message" "{Darkred}First {default}message"


In advertisement plugin you have to do this add a space before a color.

"message" " {Darkred}First {default}message"

ESK0 09-15-2014 17:00

Re: [CSGO] Automatic Messages
 
Thanks a lot :)) I plan to add a few more things in future :))

lindexg 09-16-2014 06:11

Re: [CSGO] Automatic Messages | UPDATED 16.9.14
 
there is an option I couldn't find in other plugins

- possibility to show people advertisements in their native language

thx for the plugin, thought

ESK0 09-16-2014 07:53

Re: [CSGO] Automatic Messages | UPDATED 16.9.14
 
ok :)) Maybe in new version :))

edit// Multi language support is now ready :)) Thanks @lindexg

lindexg 09-16-2014 13:18

Re: [CSGO] Automatic Messages | Multi-Language Support!
 
Thanks you for your efforts, this is great!

Would reply later after testing it on my server..

ESK0 09-16-2014 13:28

Re: [CSGO] Automatic Messages | Multi-Language Support!
 
Thanks :)) I am glad you are interested :)

Let me know about bugs etc.. :)

wxl42640211 09-17-2014 11:29

Re: [CSGO] Automatic Messages | Multi-Language Support!
 
YES,YES,YES
Great!
I like more color!!

ESK0 09-17-2014 11:42

Re: [CSGO] Automatic Messages | Multi-Language Support!
 
Quote:

Originally Posted by wxl42640211 (Post 2200196)
YES,YES,YES
Great!
I like more color!!

Thanks :))

YourMomSE 09-18-2014 03:43

Re: [CS:GO] Automatic Messages | Multi-Language Support!
 
I tested it, and most of the colors seem fine, orange is like a goofy off yellow color, but i don't really need it. Issues I see are: The messages are randomized, it never shows them in order on my server, and no other types....I really want the ability to display a welcome hint message saying "Welcome to {Darkred}Arena 1, {Default}check out our site at {Darkred}something.com" right when you join....So far it runs well though...Thanks

ESK0 09-18-2014 04:42

Re: [CS:GO] Automatic Messages | Multi-Language Support!
 
Quote:

Originally Posted by YourMomSE (Post 2200516)
I tested it, and most of the colors seem fine, orange is like a goofy off yellow color, but i don't really need it. Issues I see are: The messages are randomized, it never shows them in order on my server, and no other types....I really want the ability to display a welcome hint message saying "Welcome to {Darkred}Arena 1, {Default}check out our site at {Darkred}something.com" right when you join....So far it runs well though...Thanks

How you mean: Messages are randomized, it never shows then ir order on my sever. Anyway HintMessage doesnt works with colors maybe i will add message types in future If u have some more ideas. Let me know.

Meitis 09-18-2014 05:11

Re: [CS:GO] Automatic Messages | Multi-Language Support!
 
Quote:

Originally Posted by ESK0 (Post 2200541)
HintMessage doesnt works with colors

In CS:GO, hinttext does work with colors, just use <font color='#ff0000'>your message in red</font> with ofcourse #ff0000 being able to be any hexadecimal color.

Small example:
PrintHintText(client, "This is <font color='#ff0000'>red</font>, <font color='#00ff00'>green</font> <font color='#0000ff'>blue</font>");
will just color the "red" text in the color red, "green" text in the color green and "blue" text in the color blue.

ESK0 09-18-2014 05:46

Re: [CS:GO] Automatic Messages | Multi-Language Support!
 
Quote:

Originally Posted by Meitis (Post 2200554)
In CS:GO, hinttext does work with colors, just use <font color='#ff0000'>your message in red</font> with ofcourse #ff0000 being able to be any hexadecimal color.

Small example:
PrintHintText(client, "This is <font color='#ff0000'>red</font>, <font color='#00ff00'>green</font> <font color='#0000ff'>blue</font>");
will just color the "red" text in the color red, "green" text in the color green and "blue" text in the color blue.

CS:GO doesnt accept hex color codes :) Anyway i will not do the welcome message :)

Meitis 09-18-2014 07:05

Re: [CS:GO] Automatic Messages | Multi-Language Support!
 
Hexadecimal colors don't work in normal chat in cs:go, I know, but hexadecimal colors do work in the hinttext like I tried to explain in my previous post. This is for example what the example in my previous post looks like ingame:
http://cloud-4.steampowered.com/ugc/...EE2075A8FA7E6/

ESK0 09-18-2014 07:25

Re: [CS:GO] Automatic Messages | Multi-Language Support!
 
I didnt knew. I am so sorry :)

YourMomSE 09-18-2014 17:42

Re: [CS:GO] Automatic Messages | Multi-Language Support!
 
Im sorry, not hint text, but the alerts, like when you drop your ak47 it gives you an alert, or when bomb is planted it alerts you, those type....Some servers i have been in, as soon as you join an alert pops up saying welcome and such, and uses color to emphasize the server name and website in the alert....then it goes away till u leave and join again

and in terms of the messages being random, when i join my server, it wont display message 1,2,3,4,5,6 it will display 1,2,4,3,6,2,1,4,1,2,1,5 something like that.....You never know what message is going to pop up. I dont know why this is, but it does it on my server. It basically selects whatever message it wants to and displays it rather than cycling messages 1-6 and then over again....

ESK0 09-19-2014 02:18

Re: [CS:GO] Automatic Messages | Multi-Language Support!
 
Quote:

Originally Posted by YourMomSE (Post 2200823)
and in terms of the messages being random, when i join my server, it wont display message 1,2,3,4,5,6 it will display 1,2,4,3,6,2,1,4,1,2,1,5 something like that.....You never know what message is going to pop up. I dont know why this is, but it does it on my server. It basically selects whatever message it wants to and displays it rather than cycling messages 1-6 and then over again....

Oh okay :)) I will do this :) But about the Welcome message try some other plugin. There is lot of them :)

Edit// Plugin updated, Cyceling messages added.

YourMomSE 09-19-2014 14:17

Re: [CS:GO] Automatic Messages | Multi-Language Support! | *19.9.14*
 
Tested, works awesome, thank you for putting this up there....Just gotta find me one of them welcome alert plugins now!

ESK0 09-19-2014 14:20

Re: [CS:GO] Automatic Messages | Multi-Language Support! | *19.9.14*
 
mmmm.. Maybe i will do it to this.. I don't know right now. Thanks for response and testing :)

Nitro91 09-20-2014 08:01

Re: [CS:GO] Automatic Messages | Multi-Language Support! | *19.9.14*
 
If you put only one advert in, the timer do alot erros, i think you have to protect this. Great work anyways! I only want one more thing, Team colours "{TEAM}".

ESK0 09-20-2014 08:26

Re: [CS:GO] Automatic Messages | Multi-Language Support! | *19.9.14*
 
Thanks a lot for report (y)

Edit// Plugin updated. teamcolor added, errors are fixed now.

Nitro91 09-20-2014 15:25

Re: [CS:GO] Automatic Messages | Multi-Language Support! | *20.9.14*
 
Thx for quick response! But it dont work for me...

Code:

"default"      "{GREEN}[Info] {teamcolor}Welcome on the {DEFAULT}GoG AWP Server{teamcolor}!"
"de"            "{GREEN}[Info] {teamcolor}Willkommen auf dem {DEFAULT}GoG AWP Server{teamcolor}!"

http://extra.gog-clan.com/advertbug.png

Second Problem, a Admin from "Danemark" didnt see any adverts. I saw allways the Adverts in german but he didnt saw anything.
Add me in Steam if you want. LINK

Bara 09-20-2014 15:54

Re: [CS:GO] Automatic Messages | Multi-Language Support! | *20.9.14*
 
2 Attachment(s)
Here teamcolor Bug has been fixed.

Screen: http://steamcommunity.com/sharedfile.../?id=316543718

ESK0 09-20-2014 18:35

Re: [CS:GO] Automatic Messages | Multi-Language Support! | *20.9.14*
 
Quote:

Originally Posted by Nitro91 (Post 2201693)
Thx for quick response! But it dont work for me...

Code:

"default"      "{GREEN}[Info] {teamcolor}Welcome on the {DEFAULT}GoG AWP Server{teamcolor}!"
"de"            "{GREEN}[Info] {teamcolor}Willkommen auf dem {DEFAULT}GoG AWP Server{teamcolor}!"

http://extra.gog-clan.com/advertbug.png

Second Problem, a Admin from "Danemark" didnt see any adverts. I saw allways the Adverts in german but he didnt saw anything.
Add me in Steam if you want. LINK

Plugin is focused on CS:GO so that's the reason why teamcolors doesn't works right :) And maybe that's why your admin from Denmark didn't saw any Adverts or try to update GeoIP data.

Quote:

Originally Posted by Bara (Post 2201699)
Here teamcolor Bug has been fixed.

Screen: http://steamcommunity.com/sharedfile.../?id=316543718

Thanks for do it for CS:S :)

Nitro91 09-21-2014 06:21

Re: [CS:GO] Automatic Messages | Multi-Language Support! | *20.9.14*
 
Can you please add complete cs:s support? I think everyone will like it!

ESK0 09-21-2014 10:12

Re: [CS:GO] Automatic Messages | Multi-Language Support! | *20.9.14*
 
I am sorry, i don't have CS:S. So I can not how to test it.

skinheadxtreme 09-23-2014 15:33

Re: [CS:GO] Automatic Messages | Multi-Language Support! | *20.9.14*
 
KeyValues Error: RecursiveLoadFromBuffer: got } in key in file addons/sourcemod/configs/OvCAutomaticMessages.ini Messages, 3,

And it only shows the first message

Bara 09-23-2014 15:46

Re: [CS:GO] Automatic Messages | Multi-Language Support! | *20.9.14*
 
Quote:

Originally Posted by skinheadxtreme (Post 2202836)
KeyValues Error: RecursiveLoadFromBuffer: got } in key in file addons/sourcemod/configs/OvCAutomaticMessages.ini Messages, 3,

And it only shows the first message

Upload your OvCAutomaticMessages.ini.

skinheadxtreme 09-23-2014 15:52

Re: [CS:GO] Automatic Messages | Multi-Language Support! | *20.9.14*
 
Code:

// Colors:  ({Red} and {Blue} not working correctly)
// {Default},{Darkred},{Green},{Lightgreen},{Red},{Blue},{Olive},{Lime},
// {Lightred},{Purple},{Grey},{Orange},{Bluegrey},{Lightblue},{Darkblue},
// {Grey2},{Orchid},{Lightred2},{Teamcolor}
//
// Commands:
// {THETIME} - Shows current time, {MAPNAME} - Shows current mapname
//
// Settings:
// MsgCount - How many messages will be showed
// Delay - After how many seconds will be message showed (float)
// TimeForm - Time format (see http://www.cplusplus.com/reference/ctime/strftime/)
// MsgShowType - 1 = Random messages (1,2,4,1,3), 2 = Cycling messages (1,2,3,4)
//
// You can define in which language are messages showed
// It is based on players IP address and use Alpha-2 code
// Available country codes found at: http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes
// If you have issues with IP addresses try another version of GeoIP.dat
// Use parameter "default" if you don't want to use more languages
// 

"Messages"
{
    "Settings"
    {
        "MsgCount"        "1"
        "Delay"            "2.0"
        "MsgShowType"        "1"
        "TimeForm"        "%Hh : %Mm & %Ss"
    }
    "1" // Message number (don't duplicate msg number)
    {
        "default"        "{darkred}First {default}message"        // For all others which are not defined
    }
    "2"
    {
        "default"        "[xTreme-CM.ORG] Current time is {green}{THETIME}"
    }
    "3"
    {
        "default"        "[xTreme-CM.ORG] {lime}You are now playing: {green}{MAPNAME}"
    }
    "4"
    {
        "default"        "[xTreme-CM.ORG] {orange}Visit our website {green}www.xtreme-cm.org"
    }
    "5"
    {
        "default"        "[xTreme-CM.ORG] {purple}Our Teamspeak3 Server {green}ts.xtreme-cm.org"
    }
    "6"
    {
        "default"        "[xTreme-CM.ORG] {grey}Next map is {SM_NEXTMAP} in {TIMELEFT} minutes."
    }
    "7"
    {
        "default"        "[xTreme-CM.ORG] {teamcolor} We need Moderators! Apply here {green}www.xtreme-cm.org"
    }
    "8"
    {
        "default"        "[xTreme-CM.ORG] {teamcolor} Buy VIP write /vip or !vip"
    }
}


ESK0 09-23-2014 16:49

Re: [CS:GO] Automatic Messages | Multi-Language Support! | *20.9.14*
 
Quote:

Originally Posted by skinheadxtreme (Post 2202846)
Code:

// Colors:  ({Red} and {Blue} not working correctly)
// {Default},{Darkred},{Green},{Lightgreen},{Red},{Blue},{Olive},{Lime},
// {Lightred},{Purple},{Grey},{Orange},{Bluegrey},{Lightblue},{Darkblue},
// {Grey2},{Orchid},{Lightred2},{Teamcolor}
//
// Commands:
// {THETIME} - Shows current time, {MAPNAME} - Shows current mapname
//
// Settings:
// MsgCount - How many messages will be showed
// Delay - After how many seconds will be message showed (float)
// TimeForm - Time format (see http://www.cplusplus.com/reference/ctime/strftime/)
// MsgShowType - 1 = Random messages (1,2,4,1,3), 2 = Cycling messages (1,2,3,4)
//
// You can define in which language are messages showed
// It is based on players IP address and use Alpha-2 code
// Available country codes found at: http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes
// If you have issues with IP addresses try another version of GeoIP.dat
// Use parameter "default" if you don't want to use more languages
// 

"Messages"
{
    "Settings"
    {
        "MsgCount"        "1"
        "Delay"            "2.0"
        "MsgShowType"        "1"
        "TimeForm"        "%Hh : %Mm & %Ss"
    }
    "1" // Message number (don't duplicate msg number)
    {
        "default"        "{darkred}First {default}message"        // For all others which are not defined
    }
    "2"
    {
        "default"        "[xTreme-CM.ORG] Current time is {green}{THETIME}"
    }
    "3"
    {
        "default"        "[xTreme-CM.ORG] {lime}You are now playing: {green}{MAPNAME}"
    }
    "4"
    {
        "default"        "[xTreme-CM.ORG] {orange}Visit our website {green}www.xtreme-cm.org"
    }
    "5"
    {
        "default"        "[xTreme-CM.ORG] {purple}Our Teamspeak3 Server {green}ts.xtreme-cm.org"
    }
    "6"
    {
        "default"        "[xTreme-CM.ORG] {grey}Next map is {SM_NEXTMAP} in {TIMELEFT} minutes."
    }
    "7"
    {
        "default"        "[xTreme-CM.ORG] {teamcolor} We need Moderators! Apply here {green}www.xtreme-cm.org"
    }
    "8"
    {
        "default"        "[xTreme-CM.ORG] {teamcolor} Buy VIP write /vip or !vip"
    }
}


U have to change MsgCount to 8..

Spyrek 09-27-2014 15:59

Re: [CS:GO/CS:S] Automatic Messages | Multi-Language Support! | *23.9.14*
 
Can you add flags support like in advertisements?
For example if message have flag "s", players with this flags won't see the message.

ESK0 09-28-2014 02:29

Re: [CS:GO/CS:S] Automatic Messages | Multi-Language Support! | *23.9.14*
 
So why u don't use advertisements then ?

Spyrek 10-01-2014 12:08

Re: [CS:GO/CS:S] Automatic Messages | Multi-Language Support! | *23.9.14*
 
I like your version because of more colors ;) I'm using advertisements atm.

Radiation 10-31-2014 17:45

Re: [CS:GO/CS:S] Automatic Messages | Multi-Language Support! | *23.9.14*
 
Hi guys !

Plugin Compatible Insurgency (2014) ?

TomXPro 11-01-2014 10:08

Re: [CS:GO/CS:S] Automatic Messages | Multi-Language Support! | *23.9.14*
 
Quote:

Originally Posted by Spyrek (Post 2204404)
Can you add flags support like in advertisements?
For example if message have flag "s", players with this flags won't see the message.

2nd that!

TomXPro 11-01-2014 10:26

Re: [CS:GO/CS:S] Automatic Messages | Multi-Language Support! | *23.9.14*
 
Too bad, colors don't work in Center and Hint messages. :cry:

__
Edit: Sorry, didn't read your hint in the main post.
Could you please give us an example for possible HTML color codes?

TomXPro 11-13-2014 02:30

Re: [CS:GO/CS:S] Automatic Messages | Multi-Language Support! | *23.9.14*
 
No support?

ESK0 11-13-2014 11:10

Re: [CS:GO/CS:S] Automatic Messages | Multi-Language Support! | *23.9.14*
 
For colors in Center or Hint text use html


All times are GMT -4. The time now is 09:11.

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