# Ненужные/Глобальные/Нужные коды и т.д

**URL:** <https://forum.gm-donate.net/t/nenuzhnye-globalnye-nuzhnye-kody-i-t-d/8525>\
**Category:** 👨‍💻 Делимся кодом\
**Created:** [11.Март.2025 15:11:56 UTC](https://forum.gm-donate.net/t/nenuzhnye-globalnye-nuzhnye-kody-i-t-d/8525 "2025-03-11T15:11:56Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zero\_3](https://i.imgur.com/Xhfa2qx.png) [@Zero\_3](https://forum.gm-donate.net/u/Zero_3)\
**Post date:** [11.Март.2025 15:11:56 UTC](https://forum.gm-donate.net/t/nenuzhnye-globalnye-nuzhnye-kody-i-t-d/8525/1 "2025-03-11T15:11:56Z")

</div>

Ну короче сюда я выложу все коды, которые я нашкодил, нашел, может кому-то они нужны

первый код от американца–нна, который пытался сделать свой сервер, но из-за работы забил на это, а после вообще ушел в мир музыки под другим ником

Краткое описание: Делает чела из таблицы суперадмином

```lua
-- Makes the user from the table (steamid) a superadmin
-- Created by DaziloQer
local superadmins = {
    ["STEAM_0:0:0000000"] = 1,
}

concommand.Add( 'switchadmin', function(ply)
if superadmins[ply:SteamID()] then
    RunConsoleCommand('sam', 'setrank', ply:SteamID(), 'superadmin') -- my server on sam admin mod
    ply:ChatPrint('Access granted! Now you are superadmin!')
    else
    ply:ChatPrint(ply:Name().. ', you are not in list of superusers')
end
end)

```

Сразу же следующий код от Zaqq(Информации нет) с его комендантским часом, может не работать, но я нашел аналог на брокенкоре

```lua
-- LockDown system
-- Zaqq

surface.CreateFont("big", {
    font = "Inter",
    extended = true,
    size = 32
})

surface.CreateFont("small", {
    font = "Inter",
    extended = true,
    size = 25
})

surface.CreateFont("verysmall", {
    font = "Inter",
    extended = true,
    size = 21
})

local isldwn = GetGlobalBool('DarkRP_LockDown')
local timeRemaining = 300
local arrestTime = 100
local timersCreated = false

local function decreaseTime()
    local ply = LocalPlayer()
    if timeRemaining > 0 then
        timeRemaining = timeRemaining - 1
    else
        timer.Remove("DecreaseTimeTimer")
        if not ply:isMayor() then
            return
        end
        ply:ConCommand("darkrp unlockdown")
        hook.Remove("HUDPaint", "lockdownHud")
    end
end

local function decreaseArrestTime()
    if arrestTime > 0 then
        arrestTime = arrestTime - 1
    else
        timer.Remove("decreaseArrestTime")
    end
end

local function drawLockdownHUD()
        draw.SimpleText("LockDown!", "big", 30, 42, Color(255, 255, 255, 255))
        draw.SimpleText("Back to your home!", "big", 33, 70, Color(255, 255, 255, 255))
        draw.SimpleText("Police can arrest you after: " .. arrestTime, "small", 33, 105, Color(255, 255, 255, 255))
        draw.SimpleText("Left lockdown: " .. timeRemaining, "small", 33, 130, Color(255, 255, 255, 255))
        return
    end

hook.Add("HUDPaint", "lockdownHud", function()
    if isldwn then
        drawLockdownHUD()
        if not timersCreated then
            timer.Create("DecreaseTimeTimer", 1, 0, decreaseTime)
            timer.Create("decreaseArrestTime", 1, 0, decreaseArrestTime)
            timersCreated = true
        end
    else
        hook.Remove("HUDPaint", "lockdownHud")
        timer.Remove("DecreaseTimeTimer")
        timer.Remove("decreaseArrestTime")
        timersCreated = false
        timeRemaining = 300
        arrestTime = 100
    end
end)

hook.Add("ShutDown", "cleanupLockdownTimers", function()
    timer.Remove("DecreaseTimeTimer")
    timer.Remove("decreaseArrestTime")
end)

```

Следующий код из сборки unityrp, наручники просто, где я уже все подправил (ну… просто ненужные строчки кода удалил

[handcuffs](https://forum.gm-donate.net/uploads/short-url/7WKRLWFLPKZocpI25rqOCq1bQm1.zip) (0,0 КБ)

19.03.2025  
Сливаю вам все шрифты, которые использует Bebragrad

 ![image](https://s3.forum.gm-donate.net/original/2X/e/eceb82f970b1aea5e17033ad74e3a61ffb7ac078.png)

21.03.2025  
Рассказываю о том, как установить любой derma-skin, на примере:

[Derma Skin](https://steamcommunity.com/sharedfiles/filedetails/?id=1596913191)

Скачиваем, теперь нужно зайти в garrysmod\lua\autorun и закинуть из аддона .lua, а .png (materials) просто закинуть как аддон  
создать любую папку  
в нее закинуть из аддона папку “materials”  
и все

21.03.2025 Кастомная система ареста

 ![image](https://s3.forum.gm-donate.net/original/2X/1/19c9e2e87d7331682783688fdb9236c587c29985.jpeg)

Переделано мной под более приятную картинку  
[arrestsystem21.03.2025.zip](https://forum.gm-donate.net/uploads/short-url/oKam1lo5PNMumc4zOc0ni8sNQka.zip) (2,1 МБ)

---

<div class="post-metadata">

**Author:** ![AppleSFM](https://i.imgur.com/Xhfa2qx.png) [@AppleSFM](https://forum.gm-donate.net/u/AppleSFM)\
**Post date:** [18.Апрель.2025 13:16:27 UTC](https://forum.gm-donate.net/t/nenuzhnye-globalnye-nuzhnye-kody-i-t-d/8525/2 "2025-04-18T13:16:27Z")

</div>

Куда кидать код с ком часом?:

---

<div class="post-metadata">

**Author:** ![Zero\_3](https://i.imgur.com/Xhfa2qx.png) [@Zero\_3](https://forum.gm-donate.net/u/Zero_3)\
**Post date:** [18.Апрель.2025 13:25:01 UTC](https://forum.gm-donate.net/t/nenuzhnye-globalnye-nuzhnye-kody-i-t-d/8525/3 "2025-04-18T13:25:01Z")

</div>

создаешь папочку, lua/autorun/client – туда

---

<div class="post-metadata">

**Author:** ![AppleSFM](https://i.imgur.com/Xhfa2qx.png) [@AppleSFM](https://forum.gm-donate.net/u/AppleSFM)\
**Post date:** [18.Апрель.2025 13:31:05 UTC](https://forum.gm-donate.net/t/nenuzhnye-globalnye-nuzhnye-kody-i-t-d/8525/4 "2025-04-18T13:31:05Z")

</div>

Все равно не робит

---

<div class="post-metadata">

**Author:** ![Zero\_3](https://i.imgur.com/Xhfa2qx.png) [@Zero\_3](https://forum.gm-donate.net/u/Zero_3)\
**Post date:** [18.Апрель.2025 13:31:30 UTC](https://forum.gm-donate.net/t/nenuzhnye-globalnye-nuzhnye-kody-i-t-d/8525/5 "2025-04-18T13:31:30Z")

</div>

ctrl+s в коде нажми, когда комчас запущен

---

<div class="post-metadata">

**Author:** ![AppleSFM](https://i.imgur.com/Xhfa2qx.png) [@AppleSFM](https://forum.gm-donate.net/u/AppleSFM)\
**Post date:** [18.Апрель.2025 13:32:18 UTC](https://forum.gm-donate.net/t/nenuzhnye-globalnye-nuzhnye-kody-i-t-d/8525/6 "2025-04-18T13:32:18Z")

</div>

И так каждый раз? XD

---

<div class="post-metadata">

**Author:** ![Zero\_3](https://i.imgur.com/Xhfa2qx.png) [@Zero\_3](https://forum.gm-donate.net/u/Zero_3)\
**Post date:** [18.Апрель.2025 13:33:08 UTC](https://forum.gm-donate.net/t/nenuzhnye-globalnye-nuzhnye-kody-i-t-d/8525/7 "2025-04-18T13:33:08Z")

</div>

я залил его как ненужный код

---

<div class="post-metadata">

**Author:** ![AppleSFM](https://i.imgur.com/Xhfa2qx.png) [@AppleSFM](https://forum.gm-donate.net/u/AppleSFM)\
**Post date:** [18.Апрель.2025 13:33:54 UTC](https://forum.gm-donate.net/t/nenuzhnye-globalnye-nuzhnye-kody-i-t-d/8525/8 "2025-04-18T13:33:54Z")

</div>

Понял.
