mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-17 05:43:46 +03:00
Upload
This commit is contained in:
45
lua/autorun/server/admin_functions.lua
Normal file
45
lua/autorun/server/admin_functions.lua
Normal file
@@ -0,0 +1,45 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
|
||||
--[[---------------------------------------------------------
|
||||
Name: KickId2
|
||||
Desc: Allows admins to use the kickid2 command to kick people.
|
||||
-----------------------------------------------------------]]
|
||||
local function KickId( player, command, arguments )
|
||||
|
||||
if ( !player:IsAdmin() ) then return end
|
||||
|
||||
local id = arguments[1]
|
||||
local reason = arguments[2] or "Kicked"
|
||||
|
||||
RunConsoleCommand( "kickid", id, Format( "%s (%s)", reason, player:Nick() ) )
|
||||
|
||||
end
|
||||
|
||||
concommand.Add( "kickid2", KickId, nil, "", { FCVAR_DONTRECORD } )
|
||||
|
||||
|
||||
--[[---------------------------------------------------------
|
||||
Name: BanId2
|
||||
Desc: Allows admins to use the banid2 command to ban people.
|
||||
-----------------------------------------------------------]]
|
||||
local function BanID( player, command, arguments )
|
||||
|
||||
if ( !player:IsAdmin() ) then return end
|
||||
|
||||
local length = arguments[1]
|
||||
local id = arguments[2]
|
||||
|
||||
RunConsoleCommand( "banid", length, id )
|
||||
|
||||
end
|
||||
|
||||
concommand.Add( "banid2", BanID, nil, "", { FCVAR_DONTRECORD } )
|
||||
Reference in New Issue
Block a user