Files
VnUtest/garrysmod/gamemodes/militaryrp/plugins/extendedspawnmenu/sh_plugin.lua
2026-03-31 10:27:04 +03:00

40 lines
1.4 KiB
Lua
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
PLUGIN.name = "Extended Spawnmenu"
PLUGIN.author = "RB655 (Портирован для Helix)"
PLUGIN.description = "Расширенное спавн-меню с поддержкой звуков и legacy аддонов"
ix.util.Include("cl_spawnmenu.lua")
ix.util.Include("cl_legacy.lua")
-- Конфигурация
ix.config.Add("extSpawnmenuEnabled", true, "Включить расширенное спавн-меню", nil, {
category = "Extended Spawnmenu"
})
ix.config.Add("extSpawnmenuCreateTabs", false, "Создавать отдельные вкладки для категорий", nil, {
category = "Extended Spawnmenu"
})
-- Серверная часть
if SERVER then
util.AddNetworkString("rb655_playsound")
-- Команда для проигрывания звуков всем игрокам
concommand.Add("rb655_playsound_all", function(ply, cmd, args)
if not ply:IsSuperAdmin() or not args[1] or string.Trim(args[1]) == "" then return end
net.Start("rb655_playsound")
net.WriteString(args[1] or "")
net.Broadcast()
end)
end
-- Клиентская часть
if CLIENT then
-- ConVar для совместимости
CreateClientConVar("rb655_create_sm_tabs", "0", true, true)
end
function PLUGIN:Initialize()
print("[Extended Spawnmenu] Расширенное спавн-меню загружено!")
print("[Extended Spawnmenu] Добавлены: Browse Sounds, Materials, Legacy Addons")
end