commit 835af37fd43e63aef14ac287648fcc7521e453cc Author: deidara Date: Fri May 1 06:46:39 2026 +0300 Initial: шаблон CS:GO плагина 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; +}