Advertisement
Treedestroyed

BroadcastHandler

Mar 22nd, 2018
1,017
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. enum EBossSquad
  2. {
  3.     SQUAD_PATTYHANS,
  4.     SQUAD_KINGS
  5. }
  6.  
  7. var KFGameInfo_HardBoss.EBossSquad BSQEnum;
  8. var config string SpawnBoss;
  9.  
  10. function bool ProcessCommand(string Command, KFPlayerController KFPC, out string CommandResponse)
  11. {
  12.     local bool bCommandSuccess;
  13.     local array<string> CommandBreakdown;
  14.  
  15.    
  16.     bCommandSuccess = false;
  17.     CommandResponse = "Invalid Command";
  18.  
  19.     ParseStringIntoArray(Command, CommandBreakdown, " ", true);
  20.  
  21.     if(KFPC == None || CommandBreakdown.Length == 0
  22.         || (WorldInfo.NetMode != NM_Standalone && !KFPC.PlayerReplicationInfo.bAdmin))
  23.         return false;
  24.        
  25.     if(CommandBreakdown[0] ~= "spawnboss")
  26.     {
  27.         bCommandSuccess = true;
  28.        
  29.         if(CommandBreakdown[1] ~= "PattyHans")
  30.         {  
  31.             SpawnBoss = "PattyHans";
  32.             BossSquadCommand();
  33.             CommandResponse = "Boss Squad: Hans & Patty";  
  34.         }
  35.         else if(CommandBreakdown[1] ~= "Kings")
  36.         {
  37.             SpawnBoss = "Kings";
  38.             BossSquadCommand();
  39.             CommandResponse = "Boss Squad: King Bloat & King Fleshpound";
  40.         }
  41.     }
  42.  
  43.     return bCommandSuccess;
  44. }
  45.  
  46. function BossSquadCommand()
  47. {  
  48.     if(SpawnBoss=="PattyHans")
  49.     {
  50.         BSQEnum = 0;
  51.         SaveConfig();
  52.     }
  53.     if(SpawnBoss=="Kings")
  54.     {
  55.         BSQEnum = 1;
  56.         SaveConfig();
  57.     }
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement