You can download the RespawnMod v1.2 from
http://downloads.fallen-ones.net/AA/25/respawnmod%20v1-2.zipFeatures:
- Unlimited Respawn!
- Join Mid-game!
- Automatic Respawn | Credit to Possessed for Automating the Respawn!
- 10 second Spawn Protection/God Mode!
Known Bugs:
- After Respawning SAI(Radar) doesnt work.
- Once in a while you will be stuck in spectator unable to respawn and you have to reconnect to the server or wait till the end of the round to respawn.
Things To Be Added and/or Fixed:
-Fix SAI not working after respawn.
-Fix Ocasionally not being able to respawn.
Assist Sever Name: *** The Fallen Ones | Anti-DDOS | Respawn Server ***
you can email me @
[email protected] with any questions or any bugs you discover that are not already listed here.
NewRespawn.uc:
class NewRespawn extends Mutator;
var bool bJoinedLate;
event PreBeginPlay()
{
Level.Game.BaseMutator.AddMutator(self);
Log("This mod is property of The -iVg^ Instant Velocity Gaming Community ",'RespawnMod');
Log("Original Mod by -{DG}-Crusade (aka 999) Reworked by LEEFFM",'RespawnMod');
Log("LEEFFM's Respawn Mod Is Loaded",'RespawnMod');
Level.bAllowRespawn = true;
Level.bUnlimitedRespawn = true;
Level.bAllowLateJoin = true;
SetTimer(10.0,True);
}
function respawn (PlayerController aPlayer)
{
if (aPlayer.StartSpot == none)
{
bJoinedLate = true;
log("Player Joined Late... Atempting to spawn NewPlayer!",'LEEFFM');
respawn_NewPlayer (aPlayer);
} else
{
respawn_ExsistingPlayer (aPlayer);
}
}
function respawn_NewPlayer (PlayerController aPlayer)
{
local array<AGP_PlayerStart> Spots;
local AGP_PlayerStart StartSpot;
local class<SoldierClass> sclass ;
local class<Pawn> DefaultPlayerClass;
local int i ;
i = 0;
foreach Level.AllActors(Class'AGP_PlayerStart',StartSpot)
{
if (StartSpot.TeamNumber == aPlayer.PlayerReplicationInfo.Team.TeamIndex)
{
Spots[i] = StartSpot;
i++;
}
}
StartSpot = Spots[ Rand(Spots.Length) ];
aPlayer.StartSpot = StartSpot;
StartSpot.UsePlayerStart();
aPlayer.PawnClass = AGP_GameTeamObjective(Level.Game).GetDefaultPlayerClass(aPlayer);
if ( aPlayer.PawnClass != None )
aPlayer.Pawn = Spawn(aPlayer.PawnClass,,,startSpot.Location,startSpot.Rotation);
if( aPlayer.Pawn==None )
{
DefaultPlayerClass = Level.Game.GetDefaultPlayerClass(aPlayer);
aPlayer.Pawn = Spawn(DefaultPlayerClass,,,startSpot.Location,startSpot.Rotation);
}
if ( aPlayer.Pawn == None )
{
log("Couldn't spawn player of type "$aPlayer.PawnClass$" at "$StartSpot);
aPlayer.GotoState('Dead');
return;
}
aPlayer.Pawn.Anchor = StartSpot;
aPlayer.Pawn.LastStartSpot = StartSpot;
aPlayer.Pawn.LastStartTime = Level.TimeSeconds;
aPlayer.PreviousPawnClass = aPlayer.Pawn.Class;
aPlayer.Possess(aPlayer.Pawn);
aPlayer.PawnClass = aPlayer.Pawn.Class;
aPlayer.Pawn.PlayTeleportEffect(true, true);
aPlayer.ClientSetRotation(aPlayer.Pawn.Rotation);
TriggerEvent( StartSpot.Event, StartSpot, aPlayer.Pawn);
sclass = StartSpot.SpawnClass;
HumanController(aPlayer).newTeamClass (sclass) ;
aPlayer.bGodMode = true;
aPlayer.ClientMessage("ÿ[RespawnMod] Spawn Protection Active! You Cannot Take Damage!");
}
function respawn_ExsistingPlayer ( PlayerController aPlayer )
{
local NavigationPoint startSpot;
local class<Pawn> DefaultPlayerClass;
local class<SoldierClass> sclass ;
startSpot = aPlayer.StartSpot;
if ( aPlayer.PawnClass != None )
aPlayer.Pawn = Spawn(aPlayer.PawnClass,,,startSpot.Location,startSpot.Rotation);
if( aPlayer.Pawn==None )
{
DefaultPlayerClass = Level.Game.GetDefaultPlayerClass(aPlayer);
aPlayer.Pawn = Spawn(DefaultPlayerClass,,,startSpot.Location,startSpot.Rotation);
}
if ( aPlayer.Pawn == None )
{
log("Couldn't spawn player of type "$aPlayer.PawnClass$" at "$StartSpot);
aPlayer.GotoState('Dead');
return;
}
aPlayer.Pawn.Anchor = startSpot;
aPlayer.Pawn.LastStartSpot = AGP_PlayerStart(startSpot);
aPlayer.Pawn.LastStartTime = Level.TimeSeconds;
aPlayer.PreviousPawnClass = aPlayer.Pawn.Class;
aPlayer.Possess(aPlayer.Pawn);
aPlayer.PawnClass = aPlayer.Pawn.Class;
aPlayer.Pawn.PlayTeleportEffect(true, true);
aPlayer.ClientSetRotation(aPlayer.Pawn.Rotation);
TriggerEvent( StartSpot.Event, StartSpot, aPlayer.Pawn);
aPlayer.PlayerReplicationInfo.bDead = false;
aPlayer.PlayerReplicationInfo.bOnlySpectator = false;
aPlayer.PlayerReplicationInfo.bOutOfLives = false;
aPlayer.PlayerReplicationInfo.bIsSpectator = false;
HumanController(aPlayer).SetStartupStage(STAGE_MatchInProgress);
AGP_Character(aPlayer.Pawn).GotoState('');
if (bJoinedLate && Level.Game.IsInState('MatchInProgress'))
{
sclass = AGP_PlayerStart(startSpot).SpawnClass;
HumanController(aPlayer).newTeamClass (sclass) ;
} else
{
bJoinedLate = false;
}
aPlayer.bGodMode = true;
aPlayer.ClientMessage("ÿ[RespawnMod] Spawn Protection Active! You Cannot Take Damage!");
}
function Mutate (string MutateString, PlayerController Sender)
{
local array<string> Parts ;
local string Command ;
local string Option ;
Split( MutateString, " ", Parts);
Command = caps(Parts[0]) ;
Option = caps(Parts[1]) ;
switch (Command)
{
case "endgame":
AdminEndGame(HumanController(Sender));
break;
default:
HumanController(Sender).ClientMessage("Invalid Mutate Command!");
break;
}
}
function AdminEndGame (HumanController HC)
{
if (HC.PlayerReplicationInfo.bAdmin)
{
privateset("AGP_GameMultiPlayer bMPCheatsEnabled 1");
HC.ConsoleCommand("Mpcheat silent endgame");
privateset("AGP_GameMultiPlayer bMPCheatsEnabled 0");
}
}
event Timer()
{
local PlayerController PC;
foreach Level.DynamicActors(Class'PlayerController',PC)
{
if (PC != None)
{
if (Level.Game.IsInState('MatchInProgress'))
{
if(PC.PlayerReplicationInfo != None)
{
if (PC.PlayerReplicationInfo.bDead || PC.PlayerReplicationInfo.bOnlySpectator || PC.PlayerReplicationInfo.bIsSpectator)
{
if (PC.StartSpot != none)
{
PC.Pawn.Destroy();
PC.UnPossess();
respawn(PC);
PC.PlayerReplicationInfo.bDead = false;
PC.PlayerReplicationInfo.bOutOfLives = false;
PC.PlayerReplicationInfo.bIsSpectator = false;
} else
{
if (HumanController(PC).bLatecomer)
{
HumanController(PC).bLatecomer = false;
HumanController(PC).NotifyAdminMessage ("You Joined the Server late!, You will be Automatically assigned a team and be Spawned into game!");
} else
{
if (Level.Game.GameReplicationInfo.Teams[0].Size == Level.Game.GameReplicationInfo.Teams[1].Size)
{
ChangeTeam(PC,0);
} else if (Level.Game.GameReplicationInfo.Teams[0].Size < Level.Game.GameReplicationInfo.Teams[1].Size)
{
ChangeTeam(PC,0);
} else if (Level.Game.GameReplicationInfo.Teams[0].Size > Level.Game.GameReplicationInfo.Teams[1].Size)
{
ChangeTeam(PC,1);
}
respawn(PC);
PC.PlayerReplicationInfo.bDead = false;
PC.PlayerReplicationInfo.bOutOfLives = false;
PC.PlayerReplicationInfo.bIsSpectator = false;
}
}
} else if (PC.bGodMode)
{
PC.bGodMode = false;
PC.ClientMessage("ÿ[RespawnMod] Spawn Protection Is No Longer Active!");
}
}
}
}
}
}
function ChangeTeam (PlayerController C, int Team)
{
local int OldTeam;
local int NewTeam;
if (Team < 2)
{
OldTeam = C.PlayerReplicationInfo.Team.TeamIndex ;
NewTeam = Team;
} else
{
return;
}
if (C.PlayerReplicationInfo.Team.TeamIndex == NewTeam)
{
return;
}
C.StartSpot= none;
if (C.PlayerReplicationInfo.Team != None)
{
HumanController(C).PlayerReplicationInfo.Team.RemoveFromTeam(C);
HumanController(C).RequestChangeTeam(NewTeam);
}
if (Level.Game.GameReplicationInfo.Teams[NewTeam].AddToTeam(C))
{
}
}