All pastes #553088 Raw Edit

Something

public text v1 · immutable
·published 2007-06-09 15:48 UTC
rendered paste body
local NOPRIV="You do not have the privalages to use this command"
local OKMSG="Command run successfuly"

function a_map( user, command, args )
	if user:IsGroup("superadmin") or user:IsGroup("admin") then
		local str = ""
		for i = 1, table.getn( args ) do
			str = str .. " " .. args[ i ]
		end

		game.ConsoleCommand( "changelevel "..str.."\n" )
		user:PrintMessage(HUD_PRINTCONSOLE,OKMSG)
	else
		user:PrintMessage(HUD_PRINTCONSOLE,NOPRIV)
	end
end
concommand.Add( "a_map",a_map)

function a_limit( user, command, args )
	if user:IsGroup("superadmin") or user:IsGroup("admin") then
		game.ConsoleCommand( "sbox_max"..args[1].." "..args[2].."\n" )
		user:PrintMessage(HUD_PRINTCONSOLE,OKMSG)
	else
		user:PrintMessage(HUD_PRINTCONSOLE,NOPRIV)
	end
end
concommand.Add( "a_limit",a_limit)

function a_kick( user, command, args )
	if user:IsGroup("superadmin") or user:IsGroup("admin") or user:IsGroup("subadmin") then
		local str = ""
		for i = 1, table.getn( args ) do
			str = str .. " " .. args[ i ]
		end

		game.ConsoleCommand( "kick"..str.."\n" )
		user:PrintMessage(HUD_PRINTCONSOLE,OKMSG)
	else
		user:PrintMessage(HUD_PRINTCONSOLE,NOPRIV)
	end
end
concommand.Add( "a_kick",a_kick)

function a_ban( user, command, args )
	if user:IsGroup("superadmin") then
		local str = ""
		for i = 1, table.getn( args ) do
			str = str .. " " .. args[ i ]
		end

		game.ConsoleCommand( "banid 0"..str.." kick\n" )
		user:PrintMessage(HUD_PRINTCONSOLE,OKMSG)
	else
		user:PrintMessage(HUD_PRINTCONSOLE,NOPRIV)
	end
end
concommand.Add( "a_ban",a_ban)