Initial commit - RefoselBots
This commit is contained in:
59
lua/autorun/server/refoselbots.lua
Normal file
59
lua/autorun/server/refoselbots.lua
Normal file
@@ -0,0 +1,59 @@
|
||||
--if game.SinglePlayer() or CLIENT then return end
|
||||
|
||||
LeadBot = {}
|
||||
LeadBot.NoNavMesh = {}
|
||||
LeadBot.Models = {} -- Models, leave as {} if random is desired
|
||||
|
||||
--[[-----
|
||||
|
||||
CONFIG START CONFIG START
|
||||
CONFIG START CONFIG START
|
||||
CONFIG START CONFIG START
|
||||
|
||||
--]]-----
|
||||
|
||||
-- Name Prefix
|
||||
|
||||
LeadBot.Prefix = ""
|
||||
|
||||
--[[-----
|
||||
|
||||
CONFIG END CONFIG END
|
||||
CONFIG END CONFIG END
|
||||
CONFIG END CONFIG END
|
||||
|
||||
--]]-----
|
||||
|
||||
include("refoselbots/base.lua")
|
||||
|
||||
-- Modules
|
||||
|
||||
local _, dir = file.Find("refoselbots/modules/*", "LUA")
|
||||
|
||||
for k, v in pairs(dir) do
|
||||
local f = table.Add(file.Find("refoselbots/modules/" .. v .. "/sv_*.lua", "LUA"), file.Find("refoselbots/modules/" .. v .. "/sh_*.lua", "LUA"))
|
||||
f = table.Add(f, file.Find("refoselbots/modules/" .. v .. "/cl_*.lua", "LUA"))
|
||||
for i, o in pairs(f) do
|
||||
local file = "refoselbots/modules/" .. v .. "/" .. o
|
||||
|
||||
if string.StartWith(o, "cl_") then
|
||||
AddCSLuaFile(file)
|
||||
else
|
||||
include(file)
|
||||
if string.StartWith(o, "sh_") then
|
||||
AddCSLuaFile(file)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Configs
|
||||
|
||||
local map = game.GetMap()
|
||||
local gamemode = engine.ActiveGamemode()
|
||||
|
||||
if file.Find("refoselbots/gamemodes/" .. map .. ".lua", "LUA")[1] then
|
||||
include("refoselbots/gamemodes/" .. map .. ".lua")
|
||||
elseif file.Find("refoselbots/gamemodes/" .. gamemode .. ".lua", "LUA")[1] then
|
||||
include("refoselbots/gamemodes/" .. gamemode .. ".lua")
|
||||
end
|
||||
Reference in New Issue
Block a user