Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
You can try alter the
concommand.Add("car_jointeam", function (ply, com, args)
(line 5980)
and/or
function GM:CheckTeamBalance()
(line 6019)
witch are the functions that controle the join and balance of a team
However, know that i think it might broke the part of "new round" of the mod as the change in team will be something like X hunters and 1 props....
Try it and tell us
function GM:TeamsSetupPlayer(ply)
local cops = team.NumPlayers(2)
local robbers = team.NumPlayers(3)
if cops >= 1 then
ply:SetTeam(3)
else
ply:SetTeam(2)
end
end
concommand.Add("car_jointeam", function (ply, com, args)
local curteam = ply:Team()
local newteam = tonumber(args[1] or "") or 0
if newteam == 1 && curteam != 1 then
ply:SetTeam(newteam)
if ply:Alive() then
ply:Kill()
end
local ct = ChatText()
ct:Add(ply:Nick())
ct:Add(" changed team to ")
ct:Add(team.GetName(newteam), team.GetColor(newteam))
ct:SendAll()
elseif newteam >= 2 && newteam <= 3 && newteam != curteam then
local ct = ChatText()
ct:Add("Team full, you cannot join")
ct:Send(ply)
end
end)
function GM:CheckTeamBalance()
if !self.TeamBalanceCheck || self.TeamBalanceCheck < CurTime() then
self.TeamBalanceCheck = CurTime() + 3 * 60 // check every 3 minutes
local hunter = team.NumPlayers(2)
if hunter > 1 then // Il doit y avoir un seul hunter
self.TeamBalanceTimer = CurTime() + 30 // balance in 30 seconds
for k,ply in pairs(player.GetAll()) do
ply:ChatPrint("Auto team balance in 30 seconds")
end
end
end
if self.TeamBalanceTimer && self.TeamBalanceTimer < CurTime() then
self.TeamBalanceTimer = nil
self:BalanceTeams()
end
end
function GM:BalanceTeams(nokill)
local hunter = team.NumPlayers(2)
while hunter > 1 do
local players = team.GetPlayers(2)
local ply = players[math.random(#players)]
ply:SetTeam(3)
if !nokill && ply:Alive() then
ply:Kill()
end
local ct = ChatText()
ct:Add(ply:Nick())
ct:Add(" est devenue un ")
ct:Add(team.GetName(smallerTeam), team.GetColor(smallerTeam))
ct:SendAll()
hunter = hunter - 1
end
end
function GM:SwapTeams()
for k, ply in pairs(player.GetAll()) do
ply:SetTeam(3)
end
local players = team.GetPlayers(3)
local ply = players[math.random(#players)]
ply:SetTeam(2)
if !nokill && ply:Alive() then
ply:Kill()
end
local ct = ChatText()
ct:Add("Teams have been swapped", Color(50, 220, 150))
ct:SendAll()
end
it allows to have only 1 random hunter.
So if you are 5, it will be 1 hunter and 4 props
where is it please?
Where is the sv_teams.lua file when we don't own a server ? I've just downloaded the Prophunters gamemode to play casually with some friends but I don't have a 'Prohunters' folder in steammaps > gamemodes (only base, sandbox and terrortown actually). Thank you !
Found the file once I extracted the .gma file of the extention with "gmad.exe". But what's inside is the exact same thing as I have. Still, built it again, published it for my friends, and there is always equal number of player on each teams.. I don't understand why you have the best prop hunt mode, with no collision bug, nice taunt & all, but not this simplest function of limiting the number of hunters ?
How can I do this ?