Page 1 of 2
[ANY] Country tag
Posted: Tue May 16, 2017 5:25 pm
by existenz
Hey !
Configuration :If your game support clan tag :
1 - Remove player tag
0 - Don't remove player tag
1 - Enable country tag
0 - Disable country tag
Announce message :
1 - Enable country announce on connection
0 - Disable country announce on connection
1 - Enable country announce with steamid showing
0 - Disable country announce with steamid showing
This new plugin allows you to display an ad to connect players with his country and s
teamid. If the game support clan tag like Csgo and Css set country in clan tag.
I have only test this plugin on Csgo. Tell me if it's not working on other games.
Fill free to send pull request on my git to improve this plugin :)
Sincerly Existenz.
Re: [ANY] Country tag
Posted: Wed May 17, 2017 8:39 am
by Painkiller
Hello Existenz,
I have tested it loads completely normal with Half Life 2 Deathmatch.
But I see nothing in the chat or in the clan tag.
Re: [ANY] Country tag
Posted: Thu May 18, 2017 8:49 am
by Painkiller
It is curious, it just does not indicate anything.
It loads normally, no errors.
Re: [ANY] Country tag
Posted: Thu May 18, 2017 12:32 pm
by satoon101
Have you tried the latest version? I think Ayuto's pull request might have fixed it so it could work on HL2:DM.
*Edit: also, HL2:DM doesn't have clan tags, so that would have no effect anyway.
Re: [ANY] Country tag
Posted: Thu May 18, 2017 12:33 pm
by existenz
Yes i have ask him to try but it doesn't work ... It's really weird
Re: [ANY] Country tag
Posted: Thu May 18, 2017 12:54 pm
by satoon101
There are 2 reasons I can think of.
First, this should only be sending to other players, and not the joining player himself (which makes the most sense anyway). So, you'll have to test with other people joining the server.
Second, the player's address is not found in geoip2's database. I am testing on a local server, and so my IP is my LAN IP, and it encounters the AddressNotFoundError.
Re: [ANY] Country tag
Posted: Thu May 18, 2017 1:23 pm
by Kill
satoon101 wrote:There are 2 reasons I can think of.
First, this should only be sending to other players, and not the joining player himself (which makes the most sense anyway). So, you'll have to test with other people joining the server.
Second, the player's address is not found in geoip2's database. I am testing on a local server, and so my IP is my LAN IP, and it encounters the AddressNotFoundError.
If You use the public IP to connect, it will work. (Tested it myself)
Re: [ANY] Country tag
Posted: Thu May 18, 2017 4:33 pm
by satoon101
Ok, thank you. I'll test that later tonight myself. But, I just mean that maybe the users that Painkiller is testing with don't have IPs that are known in geoip2.
Re: [ANY] Country tag
Posted: Thu May 18, 2017 6:27 pm
by Painkiller
Hi i have test it. Its work.
Show me this in chat: ~ user [Linux] ([U:1:10701000]) connected from Germany.
What makes this wave sign there?
Re: [ANY] Country tag
Posted: Thu May 18, 2017 6:31 pm
by existenz
The '~' is just char that i have add to SayText2 you can remove it here :
https://github.com/VenomzGaming/Sp-Coun ... tag.ini#L2
Re: [ANY] Country tag
Posted: Thu May 18, 2017 7:30 pm
by satoon101
Don't change it in that file directly. If you ever update the plugin on your server, you will overwrite this file. When you first loaded the plugin, it should have created a country_tag_server.ini file in that same directory. The translations system is setup so that it will utilize any overridden translations from the server specific file. So, if you want to change the messages, copy the contents of the country_tag.ini file into the country_tag_server.ini file and make the changes there.
Re: [ANY] Country tag
Posted: Thu May 18, 2017 7:32 pm
by existenz
Thanks ! I don't know that :D
Re: [ANY] Country tag
Posted: Thu May 18, 2017 7:40 pm
by Painkiller
Ok now its work all. Thanks mates.
But i have little error:
Code: Select all
[SP] Loading plugin 'geoip'...
[SP] Caught an Exception:
Traceback (most recent call last):
File "../addons/source-python/packages/source-python/plugins/command.py", line 162, in load_plugin
plugin = self.manager.load(plugin_name)
File "../addons/source-python/packages/source-python/plugins/manager.py", line 193, in load
plugin._load()
File "../addons/source-python/packages/source-python/plugins/instance.py", line 74, in _load
self.module = import_module(self.import_name)
File "../addons/source-python/plugins/geoip/geoip.py", line 11, in <module>
zip_file = ZipFile(BytesIO(data))
File "../addons/source-python/Python3/zipfile.py", line 1026, in __init__
self._RealGetContents()
File "../addons/source-python/Python3/zipfile.py", line 1093, in _RealGetContents
raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file
I installed it again but it always comes back.
But does not seem to disturb but an annoying log in the console
Re: [ANY] Country tag
Posted: Thu May 18, 2017 8:23 pm
by satoon101
The code in that error has nothing to do with this plugin.
Re: [ANY] Country tag
Posted: Thu May 18, 2017 8:56 pm
by Painkiller
I thought about geoip
Edit: aar i find ...

Edit2: For other color codes in the country_tag.ini
It also work hax colors.
http://www.farb-tabelle.de/de/farbtabelle.htmCode: Select all
[Connect Announce]
en = " \x0700FF00{name} \x07FFFF00connected from \x0700FF00{country}."
fr = " \x0700FF00{name} \x07FFFF00vient de \x0700FF00{country}."
[Connect Announce Steamid]
en = " \x0700FF00{name} \x07FF0000({steamid}) \x07FFFF00connected from \x0700FF00{country}."
fr = " \x0700FF00{name} \x07FF0000({steamid}) \x07FFFF00vient de \x0700FF00{country}."
Re: [ANY] Country tag
Posted: Tue Oct 03, 2017 10:07 am
by Painkiller
Code: Select all
[SP] Loading plugin 'country_tag'...
L 10/03/2017 - 11:59:40: server_cvar: "sv_tags" "increased_maxplayers"
L 10/03/2017 - 11:59:40: server_cvar: "sv_tags" "increased_maxplayers"
[SP] Caught an Exception:
Traceback (most recent call last):
File "../addons/source-python/packages/source-python/plugins/command.py", line 162, in load_plugin
plugin = self.manager.load(plugin_name)
File "../addons/source-python/packages/source-python/plugins/manager.py", line 193, in load
plugin._load()
File "../addons/source-python/packages/source-python/plugins/instance.py", line 74, in _load
self.module = import_module(self.import_name)
File "../addons/source-python/plugins/country_tag/country_tag.py", line 3, in <module>
import geoip2.database
ModuleNotFoundError: No module named 'geoip2'
[SP] Plugin 'country_tag' was unable to be loaded.
Re: [ANY] Country tag
Posted: Tue Oct 03, 2017 10:47 am
by Ayuto
Looks like you didn't fully installed this plugin, because the custom package "geoip2" is missing, which is actually included in the download. What steps did you take to install the plugin?
Re: [ANY] Country tag
Posted: Tue Oct 03, 2017 2:13 pm
by Painkiller
ok, now its work thanks .
Re: [ANY] Country tag
Posted: Fri Dec 08, 2017 9:38 am
by Manifest
Hey Existenz, nice to see you over here too, I didn't know you used this forum! :-)
I noticed your connect announce uses translations and I made a Danish translation for the version I will be using and thought I would post it here so that you can implement it into your plugin as default, if you so desire. :-)
Code: Select all
[Connect Announce]
da = "~ \x04{name} \x01tilsluttede fra \x0b{country}."
[Connect Announce Steamid]
da = "~ \x04{name} \x01({steamid}) tilsluttede fra \x0b{country}."
Re: [ANY] Country tag
Posted: Fri Dec 08, 2017 11:10 pm
by satoon101
I went ahead and created a pull request, because existenz hasn't been on in a few months and probably won't see this post.