Quote:
Originally Posted by Bridget
Code:
-- Assuming this overrides the base_flag functions.
-- Also assuming the blue flag is named 'blue flag'.
-- Also assuming info_ff_script has an allowed() return function.
function GetNumAllPlayers() return GetTeam(Team.kRed):GetNumPlayers() + GetTeam(Team.kBlue):GetNumPlayers() end
function baseflag:allowed() if GetNumAllPlayers() >= 10 then return true else return false end
function player_ondisconnect()
-- Game still counts the player during this function's execution, I think?
if (GetNumAllPlayers() - 1) < 10 then
GetInfoScriptByName('blue flag'):Return()
BroadCastMessage('The Blue Flag has returned due to player limit being under ten.')
end
end
dunno
|
Did a quick test on this at lunch, and it messed up team/class selection, all 4 teams became available, and no classes were available