CS2 Plugin C#
Create a folder for the plugin called Welcome
plugins/Welcome
Config/Welcome/Welcome.json
{
"PluginName": "[Welcome] | ",
"Timer": 10, // Welcome delay
"WelcomePlayerOneEnable": "true", // "true"|"1"/"false"|"0"
"WelcomePlayerAllEnable": "true", // "true"|"1"/"false"|"0"
"DisconnectPlayerAllEnable": "true", // "true"|"1"/"false"|"0"
"WelcomeText": " {RED}---------------------------------{ENTER} {LIGHTBLUE}Welcome on server {PLAYERNAME} {ENTER} Now map: {MAP} {ENTER} Players online: {PLAYERS}/{MAXPLAYERS} {ENTER} {RED}Your IP: {IPUSER} {ENTER} {RED}------------------------------ ", // Greeting for one player
"disconnectAllText": " {RED} {PLAYERNAME} disconnect to reason: {REASON} ", // The message is all when the player is disconnected
"WelcomeAllText": " {RED} {PLAYERNAME} connected to server {ENTER} His IP address: {IPUSER} ", // Announcement of the player's entry
"ConfigVersion": 1
}
Build:
Collect your own:
Installing the Dotnet SDK 8.0
Go to the project folder in cssharp/source in VS Code:
Next, we write in the terminal "dotnet build"
And see if there are any errors:
Next, we upload files from source/welcome/bin/net.8.0:
"WelcomePlayerOneEnable":
"WelcomePlayerAllEnable":
"DisconnectPlayerAllEnable":
Colors: {GREEN} {BLUE} {RED} {SILVER} {MAGENTA} {GOLD} {DEFAULT} {LIGHTBLUE} {LIGHTPURPLE} {LIGHTRED} {LIGHTYELLOW} {YELLOW} {GREY} {LIME} {OLIVE} {ORANGE} {DARKRED} {DARKBLUE} {BLUEGREY} {PURPLE}
Создайте папку для плагина с названием Welcome
plugins/Welcome
Config/Welcome/Welcome.json
{
"PluginName": "[Welcome] | ",
"Timer": 10, // Задержка приветсвия для одного игрока
"WelcomePlayerOneEnable": "true", // "true"|"1"/"false"|"0"
"WelcomePlayerAllEnable": "true", // "true"|"1"/"false"|"0"
"DisconnectPlayerAllEnable": "true", // "true"|"1"/"false"|"0"
"WelcomeText": " {RED}---------------------------------{ENTER} {LIGHTBLUE}Welcome on server {PLAYERNAME} {ENTER} Now map: {MAP} {ENTER} Players online: {PLAYERS}/{MAXPLAYERS} {ENTER} {RED}Your IP: {IPUSER} {ENTER} {RED}------------------------------ ", // Приветсвие для одного игрока
"disconnectAllText": " {RED} {PLAYERNAME} disconnect to reason: {REASON} ", // Уведомление о отключении игрока для всех
"WelcomeAllText": " {RED} {PLAYERNAME} connected to server {ENTER} His IP address: {IPUSER} ", // Уведомление о заходе игрока для всех
"ConfigVersion": 1
}
"WelcomePlayerOneEnable":
"WelcomePlayerAllEnable":
"DisconnectPlayerAllEnable":
Цвета для чата: {GREEN} {BLUE} {RED} {SILVER} {MAGENTA} {GOLD} {DEFAULT} {LIGHTBLUE} {LIGHTPURPLE} {LIGHTRED} {LIGHTYELLOW} {YELLOW} {GREY} {LIME} {OLIVE} {ORANGE} {DARKRED} {DARKBLUE} {BLUEGREY} {PURPLE}
Q: If the plugin doesn't work?
A: Check the operating system, and update the cssharp kernel in the plugin(counterstrikesharp.dll)