concommand.Add("change_gamemode", function(ply, cmd, args)
if IsValid(ply) and not ply:IsAdmin() then
ply:ChatPrint("Вы не администратор!")
return
end
local gamemode = args[1]
if not gamemode then
ply:ChatPrint("Вы не указали режим!")
return
end
if not file.Exists("gamemodes/" .. gamemode, "GAME") then
ply:ChatPrint("Режим '" .. gamemode .. "' не найден!")
return
end
RunConsoleCommand("gamemode", gamemode)
RunConsoleCommand("changelevel", game.GetMap())
end)