So I've been trying to get a new map to work properly but it would seem that my server.cfg file keeps getting in the way of the lua file for my map.
In my LUA file, I currently have all classes disabled except for Engineer and I'd like that class to be unlimited so anyone can choose Engineer. However, when I load my map it only allows 3 maximum Engi's per team which is the limit I have in my server.cfg file.
Shouldn't the LUA file take precedence? I mean it allows me to disable classes outright with no problems but as soon as I have a class limit set in my server.cfg file, it takes over.
Here's the code I'm using. I should mention it's in the includes part of my LUA file, originally called base_ctf, I made a copy of it called base_ctf_sg_battle so the original would not get modified. I attempted just bypassing this file altogether by putting this code directly in my map's LUA file to see if that might fix the problem but it does not.
Code:
function startup()
SetGameDescription( "Capture the Flag" )
-- set up team limits on each team
SetPlayerLimit(Team.kBlue, 0)
SetPlayerLimit(Team.kRed, 0)
SetPlayerLimit(Team.kYellow, -1)
SetPlayerLimit(Team.kGreen, -1)
-- CTF maps generally don't have civilians,
-- so override in map LUA file if you want 'em
local team = GetTeam(Team.kBlue)
team:SetClassLimit(Player.kEngineer, 0)
team:SetClassLimit(Player.kScout, -1)
team:SetClassLimit(Player.kSoldier, -1)
team:SetClassLimit(Player.kMedic, -1)
team:SetClassLimit(Player.kSpy, -1)
team:SetClassLimit(Player.kPyro, -1)
team:SetClassLimit(Player.kDemoman, -1)
team:SetClassLimit(Player.kHwguy, -1)
team:SetClassLimit(Player.kCivilian, -1)
team = GetTeam(Team.kRed)
team:SetClassLimit(Player.kEngineer, 0)
team:SetClassLimit(Player.kScout, -1)
team:SetClassLimit(Player.kSoldier, -1)
team:SetClassLimit(Player.kMedic, -1)
team:SetClassLimit(Player.kSpy, -1)
team:SetClassLimit(Player.kPyro, -1)
team:SetClassLimit(Player.kDemoman, -1)
team:SetClassLimit(Player.kHwguy, -1)
team:SetClassLimit(Player.kCivilian, -1)
end