Raised This Month: $51 Target: $400
 12% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
S7Jinzo
Junior Member
Join Date: Dec 2019
Old 12-24-2019 , 22:17   Re: [ANY] ServerAdvertisement3 - MultiLang | *UPDATED 16.02.2019* | *VERSION 3.1.3a
Reply With Quote #781

Hi again, so I found a issue with the CFG (config) in Linux server.

When I upload the RAW file without changes to the server and restart the server, it works fine!

When i edit the file in the server and change any information, it breaks the CFG.

Example:

RAW FILE:

"ServerAdvertisements3"
{
"Settings"
{
"ServerName" "[{orange}SERVER{default}]" // Server tag
"ServerType" "default" // Only if MySQL is 1 -> Simply divide messages to groups (e.g. 3 servers uses ServerType surf and 2 servers uses jailbreak)
"Time" "30.0" // Time in seconds
"Languages" "EN;CZ" // List of languages / Keep the main language first (If player connect from Country you did not translated. He will get messages in language which is the first in list).
"Default language" "geoip" // Value = "geoip" or "ingame"
"Log expired messages" "0" // 1 = Enabled -> Messages are loged in Sourcemod's error log
}

EDIT:

{
"Settings"
{
"ServerName" "[{orange}TEST NAME{default}]" // Server tag
"ServerType" "default" // Only if MySQL is 1 -> Simply divide messages to groups (e.g. 3 servers uses ServerType surf and 2 servers uses jailbreak)
"Time" "30.0" // Time in seconds
"Languages" "EN;CZ" // List of languages / Keep the main language first (If player connect from Country you did not translated. He will get messages in language which is the first in list).
"Default language" "geoip" // Value = "geoip" or "ingame"
"Log expired messages" "0" // 1 = Enabled -> Messages are loged in Sourcemod's error log
}



LOG WITHOUT EDIT AND SERVER RESTART -> No issue detected

RCON COMMAND:

sm plugins list -> Shows Up plugin loaded with sucess
sm plugins refresh ServerAdvertisements3.smx: [SM] The plugin list has been refreshed and reloaded.

Boot up server -> Shows up defult Raw message normally

AFTER SIMPLE EDIT AND SERVER RESTART LOG

KeyValues Error: LoadFromBuffer: missing { in file addons/sourcemod/configs/ServerAdvertisements3.cfg

(*Messages*), (*5*),

L 12/25/2019 - 00:00:46: [SM] Exception reported: [SA3] Unable to find Settings in addons/sourcemod/configs/ServerAdvertisements3.cfg

L 12/25/2019 - 00:00:46: [SM] Blaming: ServerAdvertisements3.smx

L 12/25/2019 - 00:00:46: [SM] Call stack trace:

L 12/25/2019 - 00:00:46: [SM] [0] SetFailState

L 12/25/2019 - 00:00:46: [SM] [1] Line 371, D:\Sourcemod\ServerAdvertisements3\ServerAdve rtisements3.sp::LoadConfig

L 12/25/2019 - 00:00:46: [SM] [2] Line 59, D:\Sourcemod\ServerAdvertisements3\ServerAdve rtisements3.sp::OnMapStart


RCON COMMAND:

sm plugins refresh ServerAdvertisements3.smx: same failure from above

sm plugins list -> ServerAdvertisements3.smx (ServerAdvertisements3): [SA3] Unable to find Settings in addons/sourcemod/configs/ServerAdvertisements3.cfg


Issue possibily isolated for this path:


"5" // HUD MESSAGE
{
"enabled" "1"
"maps" "zm_"
"en" "NEW HUD MESSAGE TEXT BY {PLAYERNAME}"
"cz" "NEW HUD MESSAGE TEXT BY {PLAYERNAME}"
"type" "h"
"color" "255 112 0" // RGB (R G B)
"color2" "255 255 51" // RGB (R G B)
"effect" "2" // 0,1,2
"channel" "5" // Any number
"posx" "-1.0" //left to right
"posy" "0.05" //top to bottom
"fadein" "0.2" //Fade in time
"fadeout" "0.2" //Fade out time
"holdtime" "5.0" //Message hold time
}
}
}


Trie to remove HUD section and leave it at the end as:

"4" // Message with "ServerName" option tag
{
"maps" "zm_"
"en" "Message 4"
"cz" "Zprava 4"
"type" "t"
}
}
}

Now it fails in LOG as: (*Messages*), (*4*),

The file is being edited using Windows notepad and being uploaded to linux server.
If no failure can be indentified in the Raw file, all I can do is try to use another type of notepad to see if it is a key compatibility issue.

I will try Notepadqq to save cfgs next, if any one can issue other type of better program for editing CFG files from windows to linux, i would try it out to.

Can you verify anything different that could set up this failure on the full edited file?

Here is the full edited file (Only changed "Server Name" (nothing else):

"ServerAdvertisements3"
{
"Settings"
{
"ServerName" "[{orange}Test Server{default}]" // Server tag
"ServerType" "default" // Only if MySQL is 1 -> Simply divide messages to groups (e.g. 3 servers uses ServerType surf and 2 servers uses jailbreak)
"Time" "30.0" // Time in seconds
"Languages" "EN;CZ" // List of languages / Keep the main language first (If player connect from Country you did not translated. He will get messages in language which is the first in list).
"Default language" "geoip" // Value = "geoip" or "ingame"
"Log expired messages" "0" // 1 = Enabled -> Messages are loged in Sourcemod's error log
}
"Welcome Message"
{
"Enabled" "1" // 1 = Enabled / 0 = Disabled,
"Type" "T" // Type of message - Only T and C types are supported right now
"en" "{orange}************************************ *** \n{darkred}Welcome to this server {PLAYERNAME}! \n {lime}This server uses ServerAdvertisements3 \n Author: {bluegrey}www.steamcommunity.com/id/esk0\n{orange}******************************* ********"
"cz" "{orange}************************************ *** \n{darkred}Vítej na tomto serveru {PLAYERNAME}! \n {lime}Tento server používá ServerAdvertisements3 \n Autor: {bluegrey}www.steamcommunity.com/id/esk0\n{orange}******************************* ********"
"Delay" "5.0" // Time in seconds after is client connected to server to show message
"flags" "" // Client with this flag will get welcome message - Keep empty for all
}
"Messages"
{
"1"
{
"enabled" "0" // Message is temporarily disabled - Default: 1
"enabledtill" "30.05.2017" // Date DD/MM/YYYY -> Message will be available till 30. May 2017
"maps" "all" //- Default: all
"en" "Current map is: {CURRENTMAP} \n Players online: {PLAYERCOUNT} \n Next map: {NEXTMAP} \n Friendly fire: {mp_friendlyfire} \n Gravity: {sv_gravity}"
"cz" "Momentálně se hraje: {CURRENTMAP} \n Počet hráčů: {PLAYERCOUNT} \n Příští mapa: {NEXTMAP} \n Friendly fire: {mp_friendlyfire} \n Gravitace: {sv_gravity}"
"type" "T"
"tag" "[{darkred}SYSTEM{default}]"
"ignore_maps" "de_inferno;ar_"
}
"2"
{
"enabled" "1" // Message is enabled
"maps" "de_;cs_"
"en" "Message 2"
"cz" "Admini: {ADMINSONLINE}"
"type" "T"
"tag" "[{lime}VIP{default}]"
"ignore" "a"
"ignore_maps" "de_dust2"
}
"3"
{
"maps" "de_;ar_"
"en" "Message 3"
"cz" "<font color='#ff00ff'>Zpráva 3!</font>"
"type" "C"
"tag" "" // Message without tag
}
"4" // Message with "ServerName" option tag
{
"maps" "zm_"
"en" "Message 4"
"cz" "Zprava 4"
"type" "t"
}
"5" // HUD MESSAGE
{
"enabled" "1"
"maps" "zm_"
"en" "NEW HUD MESSAGE TEXT BY {PLAYERNAME}"
"cz" "NEW HUD MESSAGE TEXT BY {PLAYERNAME}"
"type" "h"
"color" "255 112 0" // RGB (R G B)
"color2" "255 255 51" // RGB (R G B)
"effect" "2" // 0,1,2
"channel" "5" // Any number
"posx" "-1.0" //left to right
"posy" "0.05" //top to bottom
"fadein" "0.2" //Fade in time
"fadeout" "0.2" //Fade out time
"holdtime" "5.0" //Message hold time
}
}
}

Last edited by S7Jinzo; 12-24-2019 at 22:18.
S7Jinzo is offline
S7Jinzo
Junior Member
Join Date: Dec 2019
Old 12-25-2019 , 00:34   Re: [ANY] ServerAdvertisement3 - MultiLang | *UPDATED 16.02.2019* | *VERSION 3.1.3a
Reply With Quote #782

OK - FINALLY FIXED!

Here is how it goes, if you are newbie like me and wants to use this plugin:

---Instruction only If you are going to use Linux based server ---

1. Download and install Notepad++ (this will replace your windows notepad)

2. After installing Notepad++. Right click a random notepad document that you have, like a CFG or something and go to properties - > general -> Open with -> Look for Notepad++.exe

3. Open your remote server manager , **In case of FileZila -> go to edit -> Properties -> File edition -> and place the path to your notepad++.exe (Select the option to always use main editor)

4. Once you open ServerAdvertisements3.cfg in notepad++, go to Format and select UTF-8 (WITHOUT BOM)


The role problem with the missing } (that is actually not missing), is due to the code format, as suspected before.

So just change from UTF-8 to UTF-8 (Without BOM)

Have a jolly good christmas!
S7Jinzo is offline
ESK0
BANNED
Join Date: May 2014
Location: Czech Republic
Old 12-25-2019 , 13:38   Re: [ANY] ServerAdvertisement3 - MultiLang | *UPDATED 16.02.2019* | *VERSION 3.1.3a
Reply With Quote #783

Quote:
Originally Posted by S7Jinzo View Post
OK - FINALLY FIXED!

Here is how it goes, if you are newbie like me and wants to use this plugin:

---Instruction only If you are going to use Linux based server ---

1. Download and install Notepad++ (this will replace your windows notepad)

2. After installing Notepad++. Right click a random notepad document that you have, like a CFG or something and go to properties - > general -> Open with -> Look for Notepad++.exe

3. Open your remote server manager , **In case of FileZila -> go to edit -> Properties -> File edition -> and place the path to your notepad++.exe (Select the option to always use main editor)

4. Once you open ServerAdvertisements3.cfg in notepad++, go to Format and select UTF-8 (WITHOUT BOM)


The role problem with the missing } (that is actually not missing), is due to the code format, as suspected before.

So just change from UTF-8 to UTF-8 (Without BOM)

Have a jolly good christmas!
This is already mentioned on main page under "Config editing" and also its same with SteamWorks Please, read the install instructions next time and dont spam my thread.
ESK0 is offline
paulo_crash
AlliedModders Donor
Join Date: May 2016
Location: Brazil
Old 02-08-2020 , 20:36   Re: [ANY] ServerAdvertisement3 - MultiLang | *UPDATED 16.02.2019* | *VERSION 3.1.3a
Reply With Quote #784

Could you ask me a question with the HUD messaging option.
Code:
"10"
    {
      "color" "255 112 0" 		// RGB (R G B)
      "color2" "255 255 51" 	// RGB (R G B)
      "effect" "2" 				// 0,1,2
      "channel" "5" 			// Any number
      "fadein" "0.2" 			// Fade in time
      "fadeout" "0.2"			// Fade out time
    }
Colors, in the case you have these two options, leaving both the message would be colored in the case? Would it be just these two color options?

Effect, Channel FadeIN and FadeOUT, what would be the case?
paulo_crash is offline
Groven
AlliedModders Donor
Join Date: Apr 2011
Location: Sweden
Old 02-11-2020 , 12:19   Re: [ANY] ServerAdvertisement3 - MultiLang | *UPDATED 16.02.2019* | *VERSION 3.1.3a
Reply With Quote #785

How do you add timer to this?

Code:
  "Messages"
  {
    "1"
    {
      "enabled" "0" // Message is temporarily disabled - Default: 1
      "maps" "all" //- Default: all
      "en" "Current map is: {CURRENTMAP} \n Players online: {PLAYERCOUNT} \n Next map: {NEXTMAP}"
      "se"  "Nuvarande Karta: {CURRENTMAP} \n Spelare Online: {PLAYERCOUNT} \n Nästa Karta: {NEXTMAP}"
      "type" "T"
      "Delay" "600.0"
      "tag" "[{lightblue}server{default}]"
    }

Last edited by Groven; 02-11-2020 at 12:26.
Groven is offline
NeptuniaMX
Junior Member
Join Date: Feb 2020
Location: Jakarta, Indonesia
Old 02-16-2020 , 06:09   Re: [ANY] ServerAdvertisement3 - MultiLang | *UPDATED 16.02.2019* | *VERSION 3.1.3a
Reply With Quote #786

Hello mate, i just tested this plugin before adding to my server. Its really a good plugin mate, good job.
Anyway just a quick question. How does the random message cycle works? I still trying to figure it out since there's no random message control on the cfg in cfg/sourcemod. Do i have to configure it on the addons/sourcemod/configs one? Ill wait for your respond. Thx
NeptuniaMX is offline
ESK0
BANNED
Join Date: May 2014
Location: Czech Republic
Old 02-16-2020 , 14:42   Re: [ANY] ServerAdvertisement3 - MultiLang | *UPDATED 16.02.2019* | *VERSION 3.1.3a
Reply With Quote #787

Quote:
Originally Posted by NeptuniaMX View Post
Hello mate, i just tested this plugin before adding to my server. Its really a good plugin mate, good job.
Anyway just a quick question. How does the random message cycle works? I still trying to figure it out since there's no random message control on the cfg in cfg/sourcemod. Do i have to configure it on the addons/sourcemod/configs one? Ill wait for your respond. Thx
Where do you see Random Message option?
ESK0 is offline
paulo_crash
AlliedModders Donor
Join Date: May 2016
Location: Brazil
Old 02-19-2020 , 20:36   Re: [ANY] ServerAdvertisement3 - MultiLang | *UPDATED 16.02.2019* | *VERSION 3.1.3a
Reply With Quote #788

Can I configure a message to appear for the following flag "a" and be ignored by all players who have the flag "d"?

I tried like this:
Code:
"1"
    {
      "pt" 		"{darkblue}{PLAYERNAME} {green}obrigado por comprar nosso {darkred}VIP{green}. Saiba que sem você a {darkred}ZK Servidores™ {green}não poderia existir! ❤"
	  "flags"	"a"
	  "ignore"	"d"
      "type" 	"T"
    }
However the message does not show in any way. Would it be possible to configure something like this?
paulo_crash is offline
NeptuniaMX
Junior Member
Join Date: Feb 2020
Location: Jakarta, Indonesia
Old 02-21-2020 , 05:21   Re: [ANY] ServerAdvertisement3 - MultiLang | *UPDATED 16.02.2019* | *VERSION 3.1.3a
Reply With Quote #789

Quote:
Originally Posted by ESK0 View Post
Where do you see Random Message option?
I mean, how do you set those message to be shown not in order? So i dont have to arrange those messages first in the config files on sourcemod. It would be great if you can randomized the order of the messages on the config. And yea, thanks for your plugin mate.
NeptuniaMX is offline
Groven
AlliedModders Donor
Join Date: Apr 2011
Location: Sweden
Old 02-21-2020 , 12:47   Re: [ANY] ServerAdvertisement3 - MultiLang | *UPDATED 16.02.2019* | *VERSION 3.1.3a
Reply With Quote #790

Anyone can help me with my problem above? On how to add timer to a certian message.
__________________
Groven is offline
Reply



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 23:48.


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