dobrograd-13-06-2022/garrysmod/addons/gmod-sweps/lua/weapons/dbg_punisher/init.lua
Jonny_Bro (Nikita) e4d5311906 first commit
2023-11-16 15:01:19 +05:00

23 lines
1,014 B
Lua

AddCSLuaFile 'shared.lua'
AddCSLuaFile 'cl_init.lua'
include 'shared.lua'
netstream.Hook('dbg-punisher.kick', function(ply, target)
if not (ply:IsAdmin() and IsValid(target) and target:IsPlayer()) then return end
serverguard.command.Run(ply, 'kick', true, target:SteamID(), 'Нарушение атмосферы')
end)
netstream.Hook('dbg-punisher.mute', function(ply, target)
if not (ply:IsAdmin() and IsValid(target) and target:IsPlayer()) then return end
if not target:GetDBVar('sgMuted') then
serverguard.command.Run(ply, 'mute', true, target:SteamID(), 15)
serverguard.command.Run(ply, 'gag', true, target:SteamID(), 15)
ply:Notify('ooc', L.gag_and_mute:format(target:Name()))
target:Notify('ooc', ply:Name() .. L.gag_and_mute2)
else
serverguard.command.Run(ply, 'unmute', true, target:SteamID())
serverguard.command.Run(ply, 'ungag', true, target:SteamID())
ply:Notify('ooc', L.ungag_and_unmute:format(target:Name()))
target:Notify('ooc', ply:Name() .. L.ungag_and_unmute2)
end
end)