View Single Post
Alex101192
Senior Member
Join Date: Aug 2018
Old 11-28-2022 , 06:09   Re: [L4D & L4D2] Vote Mode (1.7) [15-Jan-2022]
Reply With Quote #60

I think a good way you can fix this is by first detecting whether players are playing unitedcoop and unitedrealism. Then check if the survivor team is made of 8 survivors, if not, execute sm_forcemode modename based on which one of the 2 is being played.

I tried onmapstart and it just resulted in an endless restart after each and every restart. Counting the survivors however should work, because while you see all the survivors there, only 4 of these are actually playable survivor bots, as the teamspanel is only showing the first 4, meaning the survivor team should be made of 4 units.

The other 4 cannot be shot (shots go right through them), do not appear in the player hud nor are listed in the teamspanel plugin. I think they are effectively not counted in the survivor team number so counting the team number should effectly execute the command and only restart when the mode is actually broken, as opposed to either doing on a loop like my case, or while not in a loop still restarting when it's not broken.

Last edited by Alex101192; 11-28-2022 at 06:11.
Alex101192 is offline