Автор оригинала: GoldKingZ. Источник: https://hlmod.net/resources/cs2-connect-disconnect-sound.4299/
- Требования
- Metamod:Source (2.x)
CounterStrikeSharp
GeoLite2-City.mmdb (Country, City, databases) [[Must Be inside ../addons/counterstrikesharp/plugins/CnD_Sound/GeoLocation/]]
MaxMind.Db (Geo Locations)
MaxMind.GeoIP2 (Geo Locations)
Newtonsoft.Json (Discord WebHook)
- Переменные
- {
// you can use these in Connect or Disconnect Message
//{TIME} == Time Formate "LogInsideFileTimeFormat"
//{DATE} == Date Formate "LogFileDateFormat"
//{PLAYERNAME} == Player Who Joined
//{LONGCOUNTRY} == ex: United Arab Emirates
//{SHORTCOUNTRY} == ex: AE
//{CITY} == ex: Abu Dhabi
//{STEAMID} = STEAM_0:1:122910632
//{STEAMID3} = U:1:245821265
//{STEAMID32} = 245821265
//{STEAMID64} = 76561198206086993
//{IP} = 127.0.0.0
//{REASON} = Disconnect Reason
//Colors Available = {default} {white} {darkred} {green} {lightyellow} {lightblue} {olive} {lime} {red} {lightpurple}
//{purple} {grey} {yellow} {gold} {silver} {blue} {darkblue} {bluegrey} {magenta} {lightred} {orange}
//-----------------------------------------------------------------------------------------
//Add Many Commands You Like And To Disable Any Make It Empty Like This ""
"InGameSoundDisableCommands": "!stopsound,!stopsounds",
// you can test any sound path ingame console type "play <soundpath>"
// Sound Path will in
//To Disable Any Make It Empty Like This ""
"InGameSoundConnect": "sounds/buttons/blip1.vsnd_c",
"InGameSoundDisconnect": "sounds/player/taunt_clap_01.vsnd_c",
//-----------------------------------------------------------------------------------------
// If Its Enabled Logs Will Located in ../addons/counterstrikesharp/plugins/CnD_Sound/logs/
"SendLogToText": false,
// Log File Format .txt or .pdf ect...
"LogFileFormat": ".txt",
// Date and Time Formate
"LogFileDateFormat": "MM-dd-yyyy",
"LogInsideFileTimeFormat": "HH:mm:ss",
//To Disable Any Make It Empty Like This ""
"LogTextFormatConnect": "[{DATE} - {TIME}] {PLAYERNAME} Connected [{SHORTCOUNTRY} - {CITY}] [{STEAMID} - {IP}]",
"LogTextFormatDisconnect": "[{DATE} - {TIME}] {PLAYERNAME} Disconnected [{SHORTCOUNTRY} - {CITY}] [{STEAMID64}] [{STEAMID} - {IP}] [{REASON}]",
//Auto Delete Logs If More Than X (Days) Old
"AutoDeleteLogsMoreThanXdaysOld": 0,
//-----------------------------------------------------------------------------------------
//Send Log To Discord Via WebHookURL
//SendLogToWebHook (0) = Disable
//SendLogToWebHook (1) = Text Only
//SendLogToWebHook (2) = Text With + Name + Hyperlink To Steam Profile
//SendLogToWebHook (3) = Text With + Name + Hyperlink To Steam Profile + Profile Picture
"SendLogToWebHook": 0,
//If SendLogToWebHook (2) or SendLogToWebHook (3) How Would You Side Color Message To Be Check (Color Hex Color Codes) For Colors
"SideColorMessage": "00FFFF",
//Discord WebHook
"WebHookURL": "https://discord.com/api/webhooks/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
//To Disable Any Make It Empty Like This ""
"LogDiscordChatFormatConnect": "{PLAYERNAME} Connected [{SHORTCOUNTRY} - {CITY}]",
"LogDiscordChatFormatDisconnect": "{PLAYERNAME} Disconnected [{SHORTCOUNTRY} - {CITY}] [{REASON}]",
//-----------------------------------------------------------------------------------------
//Send Log To Server Console
"SendLogToServerConsole": false,
//To Disable Any Make It Empty Like This ""
"LogServerConsoleFormatConnect": "Gold KingZ | {PLAYERNAME} Connected [{SHORTCOUNTRY} - {CITY}]",
"LogServerConsoleFormatDisconnect": "Gold KingZ | {PLAYERNAME} Disconnected [{SHORTCOUNTRY} - {CITY}] [{REASON}]",
//-----------------------------------------------------------------------------------------
"ConfigVersion": 1
}
{
//==========================
// Colors
//==========================
//{Yellow} {Gold} {Silver} {Blue} {DarkBlue} {BlueGrey} {Magenta} {LightRed}
//{LightBlue} {Olive} {Lime} {Red} {Purple} {Grey}
//{Default} {White} {Darkred} {Green} {LightYellow}
//==========================
// Message_Connect/Disconnect
//==========================
//Date = {0}
//Time = {1}
//PlayerName = {2}
//SteamID [ex: STEAM_0:1:122910632] = {3}
//SteamID3 [ex: U:1:245821265] = {4}
//SteamID32 [ex: 245821265] = {5}
//SteamID64 [ex: 76561198206086993] = {6}
//IpAddress = {7}
//LongCountry [ex: United Arab Emirates] = {8}
//ShortCountry [ex: AE] = {9}
//City [ex: Abu Dhabi] = {10}
//Disconnect Reason = {11}
//==========================
"InGame_Message_Connect": "{green}Gold KingZ {grey}| {purple}{2} {lime}Connected [{9} - {10}]",
"InGame_Message_Disconnect": "{green}Gold KingZ {grey}| {purple}{2} {red}Disconnected [{11}]",
"InGame_Command_Enabled": "{green}Gold KingZ {grey}| Connect/Disconnect Sounds Has Been {lime}Enabled",
"InGame_Command_Disabled": "{green}Gold KingZ {grey}| Connect/Disconnect Sounds Has Been {darkred}Disabled"
}