Im trying to make a zombie mod but im having problems with the teams.
I want to make it so when everyone spawn they'll get moved to one team, and then a timer will count down from 60 seconds and pick a random zombie and move him to the other team.
The problem im having is that when you suicide or get killed by a zombie, the code that makes everyone spawn on one team when the game starts, is messing up the other code that should make you move teams when you die.
Heres my mod now: http://pastebin.com/9kcEZURV
Looking at the When_died() code there is a for(;;), and without that, it wont move teams when you die.. With the for(;;) the game will either crash with server command overflow, message or it will lag for 5 - 10 seconds.
Help would be appreciated.
I want to make it so when everyone spawn they'll get moved to one team, and then a timer will count down from 60 seconds and pick a random zombie and move him to the other team.
The problem im having is that when you suicide or get killed by a zombie, the code that makes everyone spawn on one team when the game starts, is messing up the other code that should make you move teams when you die.
Heres my mod now: http://pastebin.com/9kcEZURV
Looking at the When_died() code there is a for(;;), and without that, it wont move teams when you die.. With the for(;;) the game will either crash with server command overflow, message or it will lag for 5 - 10 seconds.
Help would be appreciated.