AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   New Plugin Submissions (https://forums.alliedmods.net/forumdisplay.php?f=26)
-   -   Chat Manager [Admin Prefix & Color Chat] (https://forums.alliedmods.net/showthread.php?t=297952)

MarLeo94 10-13-2018 10:31

Re: Chat Manager [Admin Prefix & Color Chat]
 
[ro] -- @MarLeo94
CM_MENU_TITLE = \y[\rManager de chat\y] \wSetările utilizatorului
CM_MENU_PREFIX = Prefix
CM_MENU_CHAT_COLOR = Culoarea chatului
CM_MENU_CUSTOM_NAME = Nume personalizat
CM_MENU_ENABLED = \y[Activat]
CM_MENU_DISABLED = \r[Dezactivat]

[es] -- @MarLeo94
CM_MENU_TITLE = \y[\rGestor de chat\y] \wAjustes de usuario
CM_MENU_PREFIX = Prefijo
CM_MENU_CHAT_COLOR = Color de chat
CM_MENU_CUSTOM_NAME = Nombre personalizado
CM_MENU_ENABLED = \y[Activado]
CM_MENU_DISABLED = \r[Desactivado]

OciXCrom 10-13-2018 13:47

Re: Chat Manager [Admin Prefix & Color Chat]
 
Added, thanks.

Mordekay 01-01-2019 14:08

Re: Chat Manager [Admin Prefix & Color Chat]
 
Code:

[de]
CM_MENU_TITLE = \y[\rChat Manager\y] \wNutzer Einstellungen
CM_MENU_PREFIX = Namenspräfix
CM_MENU_CHAT_COLOR = Chat Farbe
CM_MENU_CUSTOM_NAME = Benutzerdefinierter Name
CM_MENU_ENABLED = \y[Ein]
CM_MENU_DISABLED = \r[Aus]

German translation

EDIT: do i have to do more than removing the // before the define if i want to show the country-code of players in chat?
The logfile says that the geo-ip file is loaded, but no it does't add anything to chat except the other prefixes.

OciXCrom 01-01-2019 18:29

Re: Chat Manager [Admin Prefix & Color Chat]
 
Added, thanks.

Removing the "//" will only enable the GeoIP placeholders like $city$, $country$, etc. You need to add these placeholders in the [Format Definitions] section in the .ini file in order for them to show in chat.

Mordekay 01-01-2019 19:24

Re: Chat Manager [Admin Prefix & Color Chat]
 
Ah, ok. I think i understand now. Will report if i have problems.

Edit:
Ok, don't know why, but it shows $country$ instead of the country.
Here is the current config for this:
Code:

format_admin = $country$ $dead_prefix$ &x04$admin_prefix$ &x03$custom_name$ &x01: $chat_color$$message$
format_admin_team = $country$ $dead_prefix$ ($team$) &x04$admin_prefix$ &x03$custom_name$ &x01: $chat_color$$message$
format_player = $country$ $dead_prefix$ &x03$custom_name$ &x01: $chat_color$$message$
format_player_team = $country$ $dead_prefix$ ($team$) &x03$custom_name$ &x01: $chat_color$$message$


segru 01-03-2019 15:19

Re: Chat Manager [Admin Prefix & Color Chat]
 
Seems very useful, gonna try installing it and report back!

Mordekay 01-03-2019 15:58

Re: Chat Manager [Admin Prefix & Color Chat]
 
It seems i made an error compiling the plugin, but it shows a question mark instead of the country now. The geo-ip module is loaded.

OciXCrom 01-03-2019 16:02

Re: Chat Manager [Admin Prefix & Color Chat]
 
If you're testing it on a local server, showing a question mark is normal because your IP address is probably local and GeoIP can't determine the country on such address. It should work fine on a public server.

Mordekay 01-03-2019 16:03

Re: Chat Manager [Admin Prefix & Color Chat]
 
It is not a local server, it is my regular public server.

OciXCrom 01-03-2019 18:33

Re: Chat Manager [Admin Prefix & Color Chat]
 
If that's the case, the problem is that GeoIP can't determine where your IP is from. There's nothing that can be done here since it's not the plugin's fault. Some IP addresses will be unknown.

Mordekay 01-04-2019 17:42

Re: Chat Manager [Admin Prefix & Color Chat]
 
We have been 3 today on our server to test it. None of us had the country-tag in front. All of us had the "?". I've already replaced the GeoLite2-Country.mmdb with the latest available version, still no effect.

Alber9091 01-04-2019 21:13

Re: Chat Manager [Admin Prefix & Color Chat]
 
Quote:

Originally Posted by Mordekay (Post 2632860)
We have been 3 today on our server to test it. None of us had the country-tag in front. All of us had the "?". I've already replaced the GeoLite2-Country.mmdb with the latest available version, still no effect.

Try to call anyone from another Region !!! Except yours?

OciXCrom 01-05-2019 08:40

Re: Chat Manager [Admin Prefix & Color Chat]
 
Try the /country command from this plugin and see if it works:

PHP Code:

#include <amxmodx>
#include <geoip>

#if !defined geoip_country_ex
    #define geoip_country_ex geoip_country
#endif

public plugin_init()
{
    
register_plugin("GeoIP Test""1.0""OciXCrom")
    
register_clcmd("say /country""Cmd_Country")
}

public 
Cmd_Country(id)
{
    new 
szCountry[45], szIP[32]
    
get_user_ip(idszIPcharsmax(szIP))
    
geoip_country_ex(szIPszCountrycharsmax(szCountry))
    
client_print(idprint_chat"Your country is %s."szCountry)
    return 
PLUGIN_HANDLED


If it doesn't work as well, the problem is in GeoIP. Tell me which AMXX version you're using.

Mordekay 01-05-2019 10:57

Re: Chat Manager [Admin Prefix & Color Chat]
 
It doesn't show my country.

Code:

rcon amxx modules
Currently loaded modules:
      name                    version    author              status   
 [ 1] Fun                    1.9.0.5235  AMX Mod X Dev Team  running   
 [ 2] CStrike                1.9.0.5235  AMX Mod X Dev Team  running   
 [ 3] CSX                    1.9.0.5235  AMX Mod X Dev Team  running   
 [ 4] MySQL                  1.9.0.5235  AMX Mod X Dev Team  running   
 [ 5] FakeMeta                1.9.0.5235  AMX Mod X Dev Team  running   
 [ 6] Ham Sandwich            1.9.0.5235  AMX Mod X Dev Team  running   
 [ 7] nVault                  1.9.0.5235  AMX Mod X Dev Team  running   
 [ 8] GeoIP                  1.9.0.5235  AMX Mod X Dev Team  running   
8 modules, 8 correct

] rcon amxx version
AMX Mod X 1.9.0.5235 (http://www.amxmodx.org)
Authors:
        David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
        Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
        Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
        Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Dec 18 2018 01:20:00
Built from: https://github.com/alliedmodders/amxmodx/commit/6c53524
Build ID: 5235:6c53524
Core mode: JIT+ASM32

 rcon amxx list
Currently loaded plugins:
      name                    version    author            file            status 
 [  1] AMXBans Core            6.13        YamiKaitou        amxbans_core.am  running 
 [  2] AMXBans Main            6.13        YamiKaitou        amxbans_main.am  running 
 [  3] Admin Commands          1.9.0.5235  AMXX Dev Team    admincmd.amxx    running 
 [  4] Admin Help              1.9.0.5235  AMXX Dev Team    adminhelp.amxx  running 
 [  5] Slots Reservation      1.9.0.5235  AMXX Dev Team    adminslots.amxx  running 
 [  6] Multi-Lingual System    1.9.0.5235  AMXX Dev Team    multilingual.am  running 
 [  7] Menus Front-End        1.9.0.5235  AMXX Dev Team    menufront.amxx  running 
 [  8] Commands Menu          1.9.0.5235  AMXX Dev Team    cmdmenu.amxx    running 
 [  9] Players Menu            1.9.0.5235  AMXX Dev Team    plmenu.amxx      running 
 [ 10] Maps Menu              1.9.0.5235  AMXX Dev Team    mapsmenu.amxx    running 
 [ 11] Plugin Menu            1.9.0.5235  AMXX Dev Team    pluginmenu.amxx  running 
 [ 12] Admin Chat              1.9.0.5235  AMXX Dev Team    adminchat.amxx  running 
 [ 13] Anti Flood              1.9.0.5235  AMXX Dev Team    antiflood.amxx  running 
 [ 14] Scrolling Message      1.9.0.5235  AMXX Dev Team    scrollmsg.amxx  running 

 [ 15] Info. Messages          1.9.0.5235  AMXX Dev Team    imessage.amxx    running 
 [ 16] Admin Votes            1.9.0.5235  AMXX Dev Team    adminvote.amxx  running 
 [ 17] TimeLeft                1.9.0.5235  AMXX Dev Team    timeleft.amxx    running 
 [ 18] Pause Plugins          1.9.0.5235  AMXX Dev Team    pausecfg.amxx    running 
 [ 19] Stats Configuration    1.9.0.5235  AMXX Dev Team    statscfg.amxx    running 
 [ 20] Restrict Weapons        1.9.0.5235  AMXX Dev Team    restmenu.amxx    running 
 [ 21] StatsX                  1.9.0.5235  AMXX Dev Team    statsx.amxx      running 

 [ 22] CS Misc. Stats          1.9.0.5235  AMXX Dev Team    miscstats.amxx  running 
 [ 23] CS Stats Logging        1.9.0.5235  AMXX Dev Team    stats_logging.a  running 
 [ 24] Weapon Physics          2.1        Nomexous          weaponphys.amxx  running 
 [ 25] Drop All Weapons On De  0.4.0      ConnorMcLeod      death_weapons_d  running 
 [ 26] Back Weapons            1.87        hoboman313/cheap  backweapons.amx  running 
 [ 27] Anti Silent-run        1.2        Numb              antisilentrun.a  running 
 [ 28] Reloaded Weapons On Ne  2.1.0      ConnorMcLeod      autoreload_on_n  running 
 [ 29] Galileo                1.1.290    Brad Jones        galileo.amxx    running 

 [ 30] Lame Connection Punish  1.2        MeRcyLeZZ        lame_connection  running 
 [ 31] Reconnect Features      0.2.4 BETA  ConnorMcLeod      reconnect_featu  running 
 [ 32] Files Check            1.0        ConnorMcLeod      filescheck.amxx  running 
 [ 33] Killer's view          0.1.0      ConnorMcLeod      first_person_vi  running 
 [ 34] Grenade/C4 Fixes & Hud  1.2        Numb              grenade_c4_fixe  running 
 [ 35] HLstatsX CE Ingame Plu  1.6.19 (HL  psychonic        hlstatsx_comman  running 
 [ 36] GeoIP Test              1.0        OciXCrom          test.amxx        running 
 [ 37] AMXBans Flagged        6.13        YamiKaitou        amxbans_freeze.  running 
 [ 38] AMXBans Flagged        6.13        YamiKaitou        amxbans_flagged  running 
 [ 39] ATAC                    3.0.1      ATAC Team        atac.amxx        running 
 [ 40] Slap                    1.1        ATAC Team        atac_slap.amxx  running 
 [ 41] Slap2One                1.1        ATAC Team        atac_slap2one.a  running 
 [ 42] Slay                    1.1        ATAC Team        atac_slay.amxx  running 
 [ 43] Spawn Slay              1.0        ATAC Team        atac_spawnslay.  running 
 [ 44] Jail                    1.1        ATAC Team        atac_jail.amxx  running
 [ 45] Chicken                1.0        ATAC Team        atac_chicken.am  stopped 
 [ 46] Bury                    1.0        ATAC Team        atac_bury.amxx  running 
 [ 47] Glow                    1.0        ATAC Team        atac_glow.amxx  running 
 [ 48] Timebomb                1.1        ATAC Team        atac_bomb.amxx  running 
 [ 49] Blind                  1.0        ATAC Team        atac_blind.amxx  running 
 [ 50] Rocket                  1.0        ATAC Team        atac_rocket.amx  running 
 [ 51] Drop                    1.0        ATAC Team        atac_drop.amxx  running 
 [ 52] Fire                    1.0        ATAC Team        atac_fire.amxx  running 
 [ 53] Drug                    1.0        ATAC Team        atac_drug.amxx  running 
 [ 54] Bad Aim                1.1        ATAC Team        atac_badaim.amx  running 
 [ 55] Hud Messages            1.1        ATAC Team        atac_hudmsg.amx  running 
 [ 56] Team Attack            1.0        ATAC Team        atac_ta.amxx    running 
 [ 57] ATAC Commands          1.1        ATAC Team        atac_cmds.amxx  running 
 [ 58] ATAC AMXBans            1.1        ATAC Team        atac_amxbans.am  running 
58 plugins, 57 running


OciXCrom 01-05-2019 15:55

Re: Chat Manager [Admin Prefix & Color Chat]
 
Can you tell me your IP address so I can test with it on different AMXX versions?

Mordekay 01-05-2019 16:10

Re: Chat Manager [Admin Prefix & Color Chat]
 
I don't have a static address, so yes, i'll give you a few of my last ones, just in case.
141.0.12.132
141.0.13.214
84.58.106.189
92.72.253.189
178.1.206.70
92.209.108.100
141.0.12.131
141.0.12.137
141.0.12.139
203.213.79.98

OciXCrom 01-06-2019 09:04

Re: Chat Manager [Admin Prefix & Color Chat]
 
Okay, this is a problem. Just tested on both 1.8.2 and latest 1.9 dev-build. It didn't work on 1.9, but it worked on 1.8.2. Will report this to the AMXX team right away.

Mordekay 01-06-2019 09:12

Re: Chat Manager [Admin Prefix & Color Chat]
 
Thanks!
With this IP it worked: 88.76.10.47
WTF. It is hard to believe that i have to retry my connection 'til i have an IP that works.

segru 01-07-2019 14:15

Re: Chat Manager [Admin Prefix & Color Chat]
 
Amazing contributions you've made Oxi!

OciXCrom 01-07-2019 14:53

Re: Chat Manager [Admin Prefix & Color Chat]
 
@Mordekay - after some discussion, it turned out that the GeoIP files in the latest 1.9 were outdaded or corrupted. To fix the problem, simply download this file and put GeoLite2-Country.mmdb in the data folder. Also, if you want to show cities in chat, you'll need to download this file as well. I assume this will be fixed soon and a new 1.9 dev-build will be released with the files already included.

@segru - thanks!

Mordekay 01-07-2019 17:47

Re: Chat Manager [Admin Prefix & Color Chat]
 
Thanks again for your work!

Dionisc 02-02-2019 17:51

Re: Chat Manager [Admin Prefix & Color Chat]
 
Is it normal that when I'm a spectator, I leave * DEAD * instead of SPECT?

OciXCrom 02-02-2019 19:23

Re: Chat Manager [Admin Prefix & Color Chat]
 
Huh, looks like I totally forgot about that part and didn't notice it this whole time. I'll add the SPEC prefix in the next update.

talibana 02-06-2019 17:50

Re: Chat Manager [Admin Prefix & Color Chat]
 
Hello! From couple of days i have that error in my logs

L 02/03/2019 - 14:08:08: Log file started (file "cstrike/addons/amxmodx/logs/chatmanager_errors.log") (game "cstrike") (amx "1.9.0.5234")
L 02/03/2019 - 14:08:08: Line 1: Data is not in any section: #=========================================== ===#
L 02/03/2019 - 14:40:17: Line 1: Data is not in any section: #=========================================== ===#
L 02/03/2019 - 15:11:31: Line 1: Data is not in any section: #=========================================== ===#
L 02/03/2019 - 15:42:45: Line 1: Data is not in any section: #=========================================== ===#
L 02/03/2019 - 16:14:56: Line 1: Data is not in any section: #=========================================== ===#
L 02/03/2019 - 16:46:10: Line 1: Data is not in any section: #=========================================== ===#
L 02/03/2019 - 17:18:10: Line 1: Data is not in any section: #=========================================== ===#

i am put debug after plugin,bud same error - last amxx / last metamod / last rehlds.

OciXCrom 02-07-2019 12:17

Re: Chat Manager [Admin Prefix & Color Chat]
 
The problem is in the configuration file, not in the .sma, so debug won't help. Attach your ChatManager.ini file so I can see what's wrong.

Nutu_ 02-07-2019 20:08

Re: Chat Manager [Admin Prefix & Color Chat]
 
just a question, how many prefixes could i add? is there a maximum number or its unlimited?

OciXCrom 02-08-2019 03:57

Re: Chat Manager [Admin Prefix & Color Chat]
 
It's unlimited.

Dionisc 03-05-2019 11:52

Re: Chat Manager [Admin Prefix & Color Chat]
 
update? *DEAD* *SPECT*?

Deszzz 05-05-2019 22:45

Re: Chat Manager [Admin Prefix & Color Chat]
 
Is it possible to make all the say_team @ in green?

I kinda understand about the prefixes and how to add them, but Im getting difficult to make it display all in green.

OciXCrom 05-06-2019 09:07

Re: Chat Manager [Admin Prefix & Color Chat]
 
Quote:

Originally Posted by Deszzz (Post 2650513)
Is it possible to make all the say_team @ in green?

I kinda understand about the prefixes and how to add them, but Im getting difficult to make it display all in green.

You need to modify the "format_admin_team" and "format_player_team" setting in the configuration file.
Simply put the green color in the beginning (&x04) and remove any other colors in both settings.

Deszzz 05-11-2019 13:53

Re: Chat Manager [Admin Prefix & Color Chat]
 
Quote:

Originally Posted by OciXCrom (Post 2650572)
You need to modify the "format_admin_team" and "format_player_team" setting in the configuration file.
Simply put the green color in the beginning (&x04) and remove any other colors in both settings.

Sorry, been busy. Hey I tried it, but apparently didnt work, these are my settings:

format_admin = $dead_prefix$ &x04[$rank$] &x03$custom_name$ &x01: $chat_color$$message$
format_admin_team = &x04$dead_prefix$ ($team$) [$rank$] $custom_name$ : $chat_color$$message$
format_player = $dead_prefix$ &x04[$rank$] &x03$custom_name$ &x01: $chat_color$$message$
format_player_team = &x04$dead_prefix$ ($team$)[$rank$] $custom_name$ : $chat_color$$message$

This is the chat Im trying to change:
http://oi63.tinypic.com/izrltu.jpg

OciXCrom 05-11-2019 18:22

Re: Chat Manager [Admin Prefix & Color Chat]
 
The chat on the image is the admin chat, this plugin changes the regular chat. For admin chat, use this - https://forums.alliedmods.net/showthread.php?t=272418

OciXCrom 05-30-2019 15:48

Re: Chat Manager [Admin Prefix & Color Chat]
 
https://img.shields.io/badge/update-...2019-green.svg
  • Added the ability to set an expiration date for the extras.
    • The expiration date can be added in the end of the line where the extra is set.
    • For example, if you want to give a prefix to the player named OciXCrom that will expire on 20.09.2019, you need to type "name" "OciXCrom" "[Prefix]" "20.09.2019" on a new line in the [Admin Prefixes] section.
  • Added a new setting EXPIRATION_DATE_FORMAT that tells the plugin which date format to use with expiration date. By default, it's set to day.month.year.
  • Added a new setting EXPIRATION_DATE_BEHAVIOR that tells the plugin what to do when a specific extra has expired:
    • 0 = ignore the entire line
    • 1 = put a "#" symbol in the beginning of the line
    • 2 = remove the entire line from the file
  • Added the standard *SPEC* prefix for spectators. It can be changed from the new SPEC_PREFIX setting.

If you're updating from an older version and don't want to replace the entire .ini file, simply add these lines in the [Settings] section:

PHP Code:

# The standard spectator prefix.
SPEC_PREFIX = *SPEC*

# Date format for use with expiration dates where available in sections down below.
# For a list of valid parameters, see: http://www.cplusplus.com/reference/ctime/strftime/
EXPIRATION_DATE_FORMAT = %d.%m.%Y

# What to do when the date for a specific extra has expired?
# 0 = ignore the entire line
# 1 = put a "#" symbol in the beginning of the line
# 2 = remove the entire line from the file
# Note that when the setting is non-zero, the entire file will be rewritten after being read.
EXPIRATION_DATE_BEHAVIOR 


marcelowzd 06-09-2019 21:28

Re: Chat Manager [Admin Prefix & Color Chat]
 
Hi, i think i found a bug. When i type just %s, the following happens

Code:

L 06/09/2019 - 22:23:13: String formatted incorrectly - parameter 4 (total 3)
L 06/09/2019 - 22:23:13: [AMXX] Displaying debug trace (plugin "crx_chatmanager.amxx", version "4.4")
L 06/09/2019 - 22:23:13: [AMXX] Run time error 25: parameter error
L 06/09/2019 - 22:23:13: [AMXX]    [0] cromchat.inc::CC_SendMatched (line 264)
L 06/09/2019 - 22:23:13: [AMXX]    [1] crx_chatmanager.sma::Hook_Say (line 742)

This was also happening in an older version that I was using. It was actually what made me update but it still happens.

Temporary fix
PHP Code:

//Inside hook_say

static szArgs[WRITTEN_MESSAGE_SIZE]
read_args(szArgscharsmax(szArgs)); remove_quotes(szArgs)

replace_allszArgscharsmaxszArgs ), "%s""" );
replace_allszArgscharsmaxszArgs ), "%i""" );
replace_allszArgscharsmaxszArgs ), "%d""" );

CC_RemoveColors(szArgscharsmax(szArgs)) 


Krtola 06-10-2019 00:32

Re: Chat Manager [Admin Prefix & Color Chat]
 
Is it safe to use this plugin when I already have rank sistem that also use chat prefix for players name?

OciXCrom 06-10-2019 07:12

Re: Chat Manager [Admin Prefix & Color Chat]
 
@marcelowzd - I'll have a look into this soon.

@Krtola - if you're using my rank system, it's not a problem because the two plugins are made to work together - you can use the prefix from the rank system in the chat along with the admin prefix. If you're using a different rank system which already adds prefixes in chat - it probably won't work. You can upload that plugin so I can have a look.

Snake. 06-10-2019 10:43

Re: Chat Manager [Admin Prefix & Color Chat]
 
Code:

[tr]
CM_MENU_TITLE = \y[\rChat Yoneticisi\y] \wKullanici Ayarlari
CM_MENU_PREFIX = Onek
CM_MENU_CHAT_COLOR = Chat Rengi
CM_MENU_CUSTOM_NAME = Ozel Isim
CM_MENU_ENABLED = \y[ACIK]
CM_MENU_DISABLED = \r[KAPALI]


OciXCrom 06-10-2019 12:54

Re: Chat Manager [Admin Prefix & Color Chat]
 
Quote:

Originally Posted by Snake. (Post 2655120)
Code:

[tr]
CM_MENU_TITLE = \y[\rChat Yoneticisi\y] \wKullanici Ayarlari
CM_MENU_PREFIX = Onek
CM_MENU_CHAT_COLOR = Chat Rengi
CM_MENU_CUSTOM_NAME = Ozel Isim
CM_MENU_ENABLED = \y[ACIK]
CM_MENU_DISABLED = \r[KAPALI]


Added. Thanks.

Krtola 06-11-2019 05:02

Re: Chat Manager [Admin Prefix & Color Chat]
 
1 Attachment(s)
If u have time....
Anyway, this is used by my friend,I never liked any rank stuff.

I'll suggest to him to use your rank and chrome chat plugins.

OciXCrom 06-11-2019 08:24

Re: Chat Manager [Admin Prefix & Color Chat]
 
Quote:

Originally Posted by Krtola (Post 2655198)
If u have time....
Anyway, this is used by my friend,I never liked any rank stuff.

I'll suggest to him to use your rank and chrome chat plugins.

That rank system completely hardcoded and badly executed. There's no reason not to use mine, it's 100 times better and you can easily configure it as you like, even make it the same as the one you're currently using, plus it will automatically "combine" itself with the chat prefixes. There's no benefit in using the one you're currently using.


All times are GMT -4. The time now is 10:01.

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