[Support] GSC: Spectators?
-
Farzadwrote on Apr 6, 2020, 5:05 PM last edited by Mr. Android Apr 7, 2020, 7:23 PM
checkAllowSpectating() { wait ( 0.05 ); update = false; if ( !level.aliveCount[ game["attackers"] ] ) { level.spectateOverride[game["attackers"]].allowEnemySpectate = 1; update = true; } if ( !level.aliveCount[ game["defenders"] ] ) { level.spectateOverride[game["defenders"]].allowEnemySpectate = 1; update = true; } if ( update ) maps\mp\gametypes\_spectating::updateSpectateSettings(); }
-If I wanted to set spectators to an automatic team, axis or allies, would this be the right code to do it, I think It’s not?
-
If you don't know if it's the right/wrong code for it: test it.
-
Farzad what is your code? the code to go in spectator mode?
Use this to go in spectator modegoInSpectator(){ self maps\mp\gametypes\_spectating::setSpectatePermissions(); self allowSpectateTeam( "freelook", true ); self.sessionstate = "spectator"; }
-
Farzadreplied to Sorex on Apr 6, 2020, 6:09 PM last edited by Farzad Apr 6, 2020, 9:10 PM
Sorex With SnD, you can’t just spawn in if you connect late and the round has started.. I’m looking to auto set any spectators (people who connect late to the round and can’t spawn in) to allies or axis
3/4