Skip to content

Connect , Disconnect , Country , City , Message , Sound , Logs , Discord

Notifications You must be signed in to change notification settings

oqyh/cs2-Connect-Disconnect-Sound-GoldKingZ

Repository files navigation

.:[ Join Our Discord For Support ]:.

[CS2] Connect-Disconnect-Sound-GoldKingZ (1.1.7)

Connect , Disconnect , Country , City , Message , Sound , Logs , Discord

cnd

cnd_owner

cnd_discord


πŸ“¦ Dependencies

Metamod:Source

CounterStrikeSharp

MultiAddonManager [Optional: If You Want Custom Sounds]

MySQL [Included in zip]

JSON [Included in zip]

ValvePak [Included in zip]

GeoLite2-City.mmdb [Included in zip]

MaxMind.Db [Included in zip]

MaxMind.GeoIP2 [Included in zip]


πŸ“₯ Installation

Plugin Installation

  1. Download the latest Connect-Disconnect-Sound-GoldKingZ.x.x.x.zip release
  2. Extract contents to your csgo directory
  3. Configure settings in Connect-Disconnect-Sound-GoldKingZ/config/config.json
  4. Restart your server

βš™οΈ Configuration

Important

Main Configuration
../Connect-Disconnect-Sound-GoldKingZ/config/config.json
Chat & Sound Configuration
../Connect-Disconnect-Sound-GoldKingZ/config/connect_disconnect_config.json

πŸ› οΈ config/config.json

Main Config (Click to expand πŸ”½)
Property Description Values Required
AutoSetPlayerLanguage Auto set player language based on player country true = Yes, false = No -
Reload_CnD_CommandsInGame Commands to reload Connect/Disconnect plugin Console_Commands: css_reloadconnect, css_reloadcnd
Chat_Commands:
-
Reload_CnD_Flags Restricted flags for reload command SteamIDs: ...
Flags: ...
Groups: ...
"" = Everyone
Reload_CnD_CommandsInGame
Reload_CnD_Hide Hide chat after reload command 0 = No
1 = Only after success
2 = Always hide
Reload_CnD_CommandsInGame
EarlyConnection Enable early connection of players true = Yes
false = No
-
IgnoreTheseDisconnectReasons Ignore specific disconnect reasons (see disconnect_reasons.json) Array of codes, e.g., [1,54,55] -
PickSoundsByOrder Play connect/disconnect sounds in order instead of randomly true = Ordered
false = Random
-
RemoveDefaultDisconnect Remove default disconnect message/icon 0 = No
1 = Remove messages
2 = Remove messages + icon
-
DateFormat Date format used in messages e.g., MM-dd-yyyy, dd MM yyyy -
TimeFormat Time format used in messages e.g., HH:mm, HH:mm:ss, hh:mm a -
Connect/Disconnect Sounds Config (Click to expand πŸ”½)
Property Description Values Required
CnDSounds Enable connect/disconnect sounds 0 = No
1 = Yes
2 = Yes, togglable enabled
3 = Yes, togglable disabled
-
CnDSounds_CommandsInGame Commands to toggle sounds (if CnDSounds=2/3) Console_Commands: css_sound, css_sounds
Chat_Commands:
CnDSounds=2 or 3
CnDSounds_Flags Restricted flags for toggle command SteamIDs: ...
Flags: ...
Groups: ...
"" = Everyone
CnDSounds_CommandsInGame
CnDSounds_Hide Hide chat after toggle 0 = No
1 = Only after success
2 = Always hide
CnDSounds_CommandsInGame
Connect/Disconnect Messages Config (Click to expand πŸ”½)
Property Description Values Required
CnDMessages Enable connect/disconnect messages 0 = No
1 = Yes
2 = Yes, togglable enabled
3 = Yes, togglable disabled
-
CnDMessages_CommandsInGame Commands to toggle messages (if CnDMessages=2/3) Console_Commands: css_message, css_messages
Chat_Commands:
CnDMessages=2 or 3
CnDMessages_Flags Restricted flags for toggle command SteamIDs: ...
Flags: ...
Groups: ...
"" = Everyone
CnDMessages_CommandsInGame
CnDMessages_Hide Hide chat after toggle 0 = No
1 = Only after success
2 = Always hide
CnDMessages_CommandsInGame
Locally Config (Click to expand πŸ”½)
Property Description Values Required
Log_Locally_Enable Enable local logging true = Yes
false = No
-
Log_Locally_Connect_Format Connect message format Template placeholders: {DATE}, {TIME}, {PLAYERNAME}, {STEAMID64}, {IP}, {CITY}, etc. Log_Locally_Enable=true
Log_Locally_Disconnect_Format Disconnect message format Template placeholders: {DATE}, {TIME}, {PLAYERNAME}, {STEAMID64}, {IP}, {DISCONNECT_REASON}, etc. Log_Locally_Enable=true
Log_Locally_DateFormat Date format for logs e.g., MM-dd-yyyy, dd MM yyyy Log_Locally_Enable=true
Log_Locally_TimeFormat Time format for logs e.g., HH:mm:ss, hh:mm a Log_Locally_Enable=true
Log_Locally_AutoDeleteLogsMoreThanXdaysOld Auto-delete old logs Number of days (0 = disable) Log_Locally_Enable=true
Cookies_Enable Save player cookies locally 0 = No
1 = On disconnect
2 = On map change
-
Cookies_AutoRemovePlayerOlderThanXDays Auto-delete inactive cookies older than X days Number of days (0 = disable) Cookies_Enable=1 or 2
Discord Config (Click to expand πŸ”½)
Property Description Values Required
Discord_Connect_WebHook Connect webhook URL URL string, "" = disable -
Discord_Connect_Style Connect message style 0 = Disable
1 = Text only
2 = Text+Link
3 = +Profile Pic
4 = +Separate Date/Time
5 = +Server IP
If webhook active
Discord_Connect_SideColor Message side color Hex color code, e.g., 0cff00 Style 2/3/4/5
Discord_Connect_Format Connect message template Placeholders: {PLAYERNAME}, {SHORTCOUNTRY}, {CITY}, etc. Webhook active
Discord_Disconnect_WebHook Disconnect webhook URL URL string, "" = disable -
Discord_Disconnect_Style Disconnect message style Same as connect style Webhook active
Discord_Disconnect_SideColor Message side color Hex color code, e.g., ff0000 Style 2/3/4/5
Discord_Disconnect_Format Disconnect message template Placeholders: {PLAYERNAME}, {SHORTCOUNTRY}, {CITY}, {DISCONNECT_REASON}, etc. Webhook active
Discord_DateFormat Date format for Discord messages e.g., MM-dd-yyyy, dd/MM/yy If any webhook active
Discord_TimeFormat Time format for Discord messages e.g., HH:mm:ss If any webhook active
Discord_FooterImage Footer image URL for messages URL string Style 3/4/5
Discord_UsersWithNoAvatarImage Default avatar for players without avatar URL string Style 5
MySQL Config (Click to expand πŸ”½)
Property Description Values Required
MySql_Enable Enable MySQL 0 = No
1 = Save on disconnect
2 = Save on map change
-
MySql_ConnectionTimeout Connection timeout in seconds Number, e.g., 30 MySql_Enable≠0
MySql_RetryAttempts Retry attempts when connection fails Number, e.g., 3 MySql_Enable≠0
MySql_RetryDelay Delay between retries (seconds) Number, e.g., 2 MySql_Enable≠0
MySql_Servers MySQL server configs Array of servers with Server, Port, Database, Username, Password MySql_Enable≠0
MySql_AutoRemovePlayerOlderThanXDays Auto-delete inactive players older than X days Number of days (0 = disable) MySql_Enable≠0
Utilities Config (Click to expand πŸ”½)
Property Description Values Required
AutoUpdateSignatures Auto-update signatures in ../Connect-Disconnect-Sound-GoldKingZ/gamedata/ true = Yes
false = No
-
AutoUpdateGeoLocation Auto-update geolocation data in ../shared/GoldKingZ/GeoLocation/ true = Yes
false = No
-
AutoUpdateDisconnectReasons Auto-update ../Connect-Disconnect-Sound-GoldKingZ/config/disconnect_reasons.json true = Yes
false = No
-
AutoPrecacheResources Auto precache resources true/false -
AutoPrecacheResources_Folders Folders to auto precache Array: ["materials","models","particles","scripts"] AutoPrecacheResources = true
EnableDebug Enable debug in server console true = Yes
false = No
-

πŸ› οΈ config/connect_disconnect_config.json

Connect Disconnect Config (Click to expand πŸ”½)

Configuration

Key Description Values/Examples
CONNECT_MESSAGE_CHAT Connect message template "{Green}{PLAYERNAME} joined"
CONNECT_SOUND_VOLUME Connect sound volume (1-100%) "75%"
CONNECT_SOUND Connect sound file paths ["ui/item_acquired.vsnd"]
DISCONNECT_MESSAGE_CHAT Disconnect message template "{Red}{PLAYERNAME} left"
DISCONNECT_SOUND_VOLUME Disconnect sound volume (1-100%) "60%"
DISCONNECT_SOUND Disconnect sound file paths ["ui/item_drop.vsnd"]

Placeholders

Placeholder Description Example Output
{NEXTLINE} Creates line break in messages "Line1{NEXTLINE}Line2"
{DATE} Current date (from main config format) 12-31-2023
{TIME} Current time (from main config format) 23:59:59
{PLAYERNAME} Player's display name ProPlayer123
{STEAMID} SteamID STEAM_0:1:122910632
{STEAMID3} SteamID3 U:1:245821265
{STEAMID32} SteamID32 245821265
{STEAMID64} SteamID64 76561198206086993
{IP} Player's IP address 123.45.67.89
{CONTINENT} Player's continent Europe, Asia, Africa, North/South America, Australia, Antarctica
{LONGCOUNTRY} Full country name United Arab Emirates
{SHORTCOUNTRY} Country code AE
{CITY} City name Abu Dhabi
{DISCONNECT_REASON} Disconnect reason from disconnect_reasons.json Lost Connection

Colors

Color Tag Example
{Default} {Default}Normal Text
{White} {White}Notification
{Darkred} {Darkred}Banned!
{Green} {Green}Connected
{LightYellow} {LightYellow}Hint Text
{LightBlue} {LightBlue}Server Note
{Olive} {Olive}Team Chat
{Lime} {Lime}Success Message
{Red} {Red}Error!
{LightPurple} {LightPurple}Special Message
{Purple} {Purple}Admin Command
{Grey} {Grey}12:00:00
{Yellow} {Yellow}Warning Message
{Gold} {Gold}[VIP] Player
{Silver} {Silver}Regular Member
{Blue} {Blue}Information
{DarkBlue} {DarkBlue}Moderator Tag
{BlueGrey} {BlueGrey}System Alert
{Magenta} {Magenta}Event Notification
{LightRed} {LightRed}Urgent Alert
{Orange} {Orange}Alert/Warning

πŸ“œ Changelog

πŸ“‹ View Version History (Click to expand πŸ”½)

[1.1.7]

  • Fix Bug On EarlyConnection
  • Fix Bug On Cookies_Enable
  • Fix Bug On CnDSounds 2 And 3
  • Fix Bug On CnDMessages 2 And 3
  • Rework On Get Public Server IP
  • Added AutoPrecacheResources
  • Added AutoPrecacheResources_Folders
  • Added Command gkz_download To Force Download Addons

[1.1.6]

  • Moved GeoLocation To Shared
  • Fix Globals On Reload Plugin Command
  • Fix on CnDSounds 1 Not Play Sound
  • Fix on CnDMessages 1 Not Show Message
  • In connect_disconnect_config.json Changed From {REASON} To {DISCONNECT_REASON}

[1.1.5]

  • Fix Some Bugs And Clean Up
  • Fix CustomHooks
  • Fix config.json
  • Fix RemoveDefaultDisconnect 2 Killfeed Hidden Sometimes
  • Fix On config.json Flags
  • Fix On connect_disconnect_config.json Flags
  • Fix Exploit Colors Names In connect_disconnect_config.json
  • Changed IgnoreTheseDisconnectReasons From string To int
  • Changed PickRandomSounds To PickSoundsByOrder
  • Added AutoSetPlayerLanguage
  • Added Reload_CnD_CommandsInGame
  • Added Reload_CnD_Flags
  • Added Reload_CnD_Hide
  • Added CnDSounds
  • Added CnDSounds_CommandsInGame
  • Added CnDSounds_Flags
  • Added CnDSounds_Hide
  • Added CnDMessages
  • Added CnDMessages_CommandsInGame
  • Added CnDMessages_Flags
  • Added CnDMessages_Hide
  • Added AutoUpdateDisconnectReasons
  • Added MySql Multiple

[1.1.4]

  • Fix Some Bugs
  • Fix Toggles
  • Fix MySql_AutoRemovePlayerOlderThanXDays = 0
  • Cookies_AutoRemovePlayerOlderThanXDays = 0
  • Removed DisableLoopConnections
  • Added Console css_ ! Commands To Toggle_Messages_CommandsInGame
  • Added Console css_ ! Commands To Toggle_Sounds_CommandsInGame
  • Added IgnoreTheseDisconnectReasons
  • Added Toggle_Messages_Hide
  • Added Toggle_Sounds_Hide

[1.1.3]

  • Removed CompatibilityWithCS2Fixes On By Default
  • Rework On Players Permissions
  • Fix connect_disconnect_config.json When Player Have Flag Not Getting His Disconnect (Message/Sounds/Vol)
  • Fix Default Of CONNECT_SOUND_VOLUME/DISCONNECT_SOUND_VOLUME Value If Not Found Now Its 100% If Not Found

[1.1.2]

  • Added CompatibilityWithCS2Fixes

[1.1.1]

  • Fix Error 'CounterStrikeSharp.API.Core.CCSPlayerController' was not present in the dictionary

[1.1.0]

Core Improvements

  • Reworked plugin architecture for better stability
  • Fixed connection-related lag spikes
  • Added comprehensive config descriptions

Configuration Updates

  • Added EarlyConnection (early player initialization)
  • Added DisableServerHibernate (hibernation control)
  • Added PickRandomSounds (random sound selection)
  • Added RemoveDefaultDisconnect (message+icon removal)
  • Added permission systems for sound/message toggles
  • Added cookie-based player data storage
  • Added MySQL support with auto-cleanup
  • Added automatic signature/geo updates

New Features

  • Added continent tracking ({CONTINENT} placeholder)
  • Added separate Discord disconnect webhook/style
  • Added sound volume controls
  • Added custom disconnect reasons file
  • Added multi-sound support with random selection

Technical Improvements

  • Added proper sound precaching system
  • Added debug mode toggle
  • Added chat message customization
  • Fixed killfeed icon removal

[1.0.9]

General Changes

  • Added DisableLoopConnections anti-spam feature
  • Added RemoveDefaultDisconnect message control
  • Fixed various minor issues

Localization

  • Added console messages for connect/disconnect events
  • Added command permission warnings
  • Added validation messages for SteamID/IP
  • Added geographic unknown state messages

Cookie System

  • Added cookie auto-cleanup via RemovePlayerCookieOlderThanXDays

[1.0.8]

General Changes

  • Fixed in-game sound toggle commands
  • Improved cookie storage path handling

Message Formatting

  • Added connect/disconnect message templates to localization
  • Added {REASON} placeholder for disconnect messages

[1.0.7]

Logging Improvements

  • Fixed log auto-deletion system
  • Added separate connect/disconnect message formats
  • Added sound toggle command system

[1.0.6]

General Maintenance

  • Fixed various stability issues

[1.0.5]

Discord Integration

  • Added webhook send modes (1/2/3)
  • Added customizable message side colors
  • Fixed Discord webhook lag issues

Log Management

  • Implemented log auto-deletion system

[1.0.4]

Console Integration

  • Added server console logging
  • Improved sound file management

Format Fixes

  • Fixed timestamp formatting sequence
  • Improved Steam profile linking in Discord

[1.0.3]

Discord Enhancements

  • Added separate connect/disconnect formats
  • Expanded placeholder support ({TIME}, {DATE}, SteamIDs)

Stability

  • Fixed file write permission issues
  • Improved async task handling

[1.0.2]

Geolocation

  • Added detailed country/city tracking
  • Implemented webhook logging system

[1.0.1]

Security

  • Added IP address logging
  • Improved empty field handling

[1.0.0]

  • Initial plugin release

About

Connect , Disconnect , Country , City , Message , Sound , Logs , Discord

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages