Alex1002 Posted July 10, 2016 Share Posted July 10, 2016 (edited) Answere: It WORKS addEventHandler ( "onPlayerQuit", root, function ( ) local team = getPlayerTeam ( source ) if team then local teamname = getTeamName ( team ) if teamname == "TeamOne" or teamname == "TeamTwo" then if countPlayersInTeam ( team ) - 1 == 0 then if isTimer ( timerCount ) then killTimer ( timerCount ) end end end end end ) Old- Question Hello, how I leave with countPlayersInTeam the number of the players determine and with too low number in a team, time kill ¿¿¿ M.f.G Alex.W Edited July 11, 2016 by Guest Link to comment
Captain Cody Posted July 10, 2016 Share Posted July 10, 2016 team = -- PUT TEAM HERE number = -- PUT NUMBER HERE if countPlayersInTeam(team) < number then Link to comment
Alex1002 Posted July 10, 2016 Author Share Posted July 10, 2016 Thank you very much @CodyL: So how i can cancel the Timer, if the Team less than one¿¿¿ function teamMemberGroup () if (countPlayersInTeam(getTeamFromName("TeamEins")) >= 1) and (countPlayersInTeam(getTeamFromName("TeamZwei")) >= 1) then if not isTimer(timerPlayGame) then timerPlayGame = setTimer (function() outputChatBox("Es funktioniert") end, 6000, 9) elseif (countPlayersInTeam(getTeamFromName("TeamEins")) < 1) or (countPlayersInTeam(getTeamFromName("TeamZwei")) < 1) then if isTimer(timerPlayGame) then outputChatBox("ALLES NUR KASE") killTimer(timerPlayGame) end end end end this doesn't work with killTimer, because the TeamCount is not less 1… M.f.G Alex.W Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now