Hi Guys, i have a Seach and Destroy server.
If a Team get a point a error will come (it's not a error from my mod):
script runtime error
(see console for details)
file: maps/mp/gametypes/sd.gsc line 1339
script:
Code:updateTeamStatus() { wait 0; // Required for Callback_PlayerDisconnect to complete before updateTeamStatus can execute resettimeout(); oldvalue["allies"] = level.exist["allies"]; oldvalue["axis"] = level.exist["axis"]; level.exist["allies"] = 0; level.exist["axis"] = 0; players = getentarray("player", "classname"); for(i = 0; i < players.size; i++) { player = players[i]; if(isdefined(player.pers["team"]) && player.pers["team"] != "spectator" && player.sessionstate == "playing") level.exist[player.pers["team"]]++; } if(level.exist["allies"]) level.didexist["allies"] = true; if(level.exist["axis"]) level.didexist["axis"] = true; if(level.roundended) return; // if both allies and axis were alive and now they are both dead in the same instance if(oldvalue["allies"] && !level.exist["allies"] && oldvalue["axis"] && !level.exist["axis"]) { if(level.bombplanted) { // if allies planted the bomb, allies win if(level.planting_team == "allies") { iprintln(&"MP_ALLIEDMISSIONACCOMPLISHED"); level thread endRound("allies"); return; } else // axis planted the bomb, axis win { assert(game["attackers"] == "axis"); iprintln(&"MP_AXISMISSIONACCOMPLISHED"); level thread endRound("axis"); return; } } // if there is no bomb planted the round is a draw iprintln(&"MP_ROUNDDRAW"); level thread endRound("draw"); return; } // if allies were alive and now they are not if(oldvalue["allies"] && !level.exist["allies"]) { // if allies planted the bomb, continue the round if(level.bombplanted && level.planting_team == "allies") return; iprintln(&"MP_ALLIESHAVEBEENELIMINATED"); level thread playSoundOnPlayers("mp_announcer_allieselim"); level thread endRound("axis"); return; } // if axis were alive and now they are not if(oldvalue["axis"] && !level.exist["axis"]) { // if axis planted the bomb, continue the round if(level.bombplanted && level.planting_team == "axis") return; iprintln(&"MP_AXISHAVEBEENELIMINATED"); level thread playSoundOnPlayers("mp_announcer_axiselim"); level thread endRound("allies"); return; } }

Reply With Quote
