dannyvanlierop

SuddenDeath

Nov 30th, 2017
1,187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * This file is in the public domain, furnished "as is", without technical
  3.  * support, and with no warranty, express or implied, as to its usefulness for
  4.  * any purpose.
  5.  *
  6.  * Written by Jessica James <[email protected]>
  7.  */
  8.  
  9. class SuddenDeath extends Rx_Mutator config(AgentMutators);
  10.  
  11. var config int sudden_death_time;
  12.  
  13. function ActivateSuddenDeath()
  14. {
  15.     local Rx_Rcon_Command_SuddenDeath cmd;
  16.     Super.MatchStarting();
  17.     cmd = Rx_Rcon_Command_SuddenDeath(Rx_Game(WorldInfo.Game).RconCommands.GetCommand("suddendeath"));
  18.     if (cmd != None && cmd.bSuddenDeathActivated == false)
  19.     {
  20.         cmd.ActivateSuddenDeath();
  21.         WorldInfo.Game.BroadcastHandler.Broadcast(None, "*WARNING* Sudden Death: Activated *WARNING*", 'Say');
  22.     }
  23. }
  24.  
  25. function MatchStarting()
  26. {
  27.     Super.MatchStarting();
  28.     SetTimer(sudden_death_time, false, 'ActivateSuddenDeath');
  29. }
  30.  
  31. function InitRconCommands()
  32. {
  33.     Rx_Game(WorldInfo.Game).RconCommands.SpawnCommand(class'Rx_Rcon_Command_SuddenDeath');
  34.     Super.InitRconCommands();
  35. }
  36.  
  37. defaultproperties
  38. {
  39. }
Advertisement