Initial: шаблон CS:GO плагина
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
# Compiled plugins
|
||||
plugins/*.smx
|
||||
|
||||
# OS files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
@@ -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
|
||||
```
|
||||
@@ -0,0 +1,35 @@
|
||||
#include <sourcemod>
|
||||
#include <sdktools>
|
||||
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user