From 835af37fd43e63aef14ac287648fcc7521e453cc Mon Sep 17 00:00:00 2001 From: deidara Date: Fri, 1 May 2026 06:46:39 +0300 Subject: [PATCH] =?UTF-8?q?Initial:=20=D1=88=D0=B0=D0=B1=D0=BB=D0=BE=D0=BD?= =?UTF-8?q?=20CS:GO=20=D0=BF=D0=BB=D0=B0=D0=B3=D0=B8=D0=BD=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 6 ++++++ README.md | 19 +++++++++++++++++++ scripting/plugin-template.sp | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 scripting/plugin-template.sp diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..82d1df9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +# Compiled plugins +plugins/*.smx + +# OS files +.DS_Store +Thumbs.db diff --git a/README.md b/README.md new file mode 100644 index 0000000..18653f8 --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +# CS:GO SourceMod Plugins + +Репозиторий плагинов для CS:GO / SourceMod. + +## Структура + +``` +scripting/ - исходники (.sp файлы) +scripting/include/ - заголовочные файлы (.inc) +gamedata/ - gamedata файлы (.txt) +configs/ - конфиги плагинов +``` + +## Компиляция + +Скомпилировать через [SourceMod compiler](https://www.sourcemod.net/downloads.php): +``` +spcomp scripting/plugin-name.sp -o plugins/plugin-name.smx +``` diff --git a/scripting/plugin-template.sp b/scripting/plugin-template.sp new file mode 100644 index 0000000..2e7550a --- /dev/null +++ b/scripting/plugin-template.sp @@ -0,0 +1,35 @@ +#include +#include + +#pragma semicolon 1 +#pragma newdecls required + +#define PLUGIN_VERSION "1.0.0" + +public Plugin myinfo = +{ + name = "Plugin Template", + author = "deidara", + description = "Шаблон плагина", + version = PLUGIN_VERSION, + url = "https://37.228.88.57/deidara" +}; + +public void OnPluginStart() +{ + RegConsoleCmd("sm_hello", Cmd_Hello, "Тестовая команда"); + + PrintToServer("[Template] Плагин загружен v%s", PLUGIN_VERSION); +} + +public Action Cmd_Hello(int client, int args) +{ + if (client == 0) + { + PrintToServer("Привет от сервера!"); + return Plugin_Handled; + } + + PrintToChat(client, " \x04[Template]\x01 Привет, \x03%N\x01!", client); + return Plugin_Handled; +}