Advertisement
Guest User

Untitled

a guest
Jan 28th, 2020
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.91 KB | None | 0 0
  1. class Rx_Message_Buildings extends UTLocalMessage;
  2.  
  3. var localized array<string> BuildingBroadcastMessages;
  4.  
  5. static function ClientReceive( PlayerController P, optional int Switch, optional PlayerReplicationInfo RelatedPRI_1,
  6. optional PlayerReplicationInfo RelatedPRI_2, optional Object OptionalObject )
  7. {
  8. super.ClientReceive(P,Switch,RelatedPRI_1,RelatedPRI_2,OptionalObject);
  9.  
  10. if(Switch == 2 || Switch == 3 || Switch == 4 || Switch == 5 )
  11. {
  12. if (P.GetTeamNum() == RelatedPRI_1.GetTeamNum() )
  13. {
  14. UTPlayerController(P).PlayAnnouncement(default.Class,Switch,RelatedPRI_1,OptionalObject);
  15. }
  16. }
  17. else
  18. {
  19. UTPlayerController(P).PlayAnnouncement(default.Class,Switch,RelatedPRI_1,OptionalObject);
  20. }
  21. }
  22.  
  23. static function string GetString(
  24. optional int Switch,
  25. optional bool bPRI1HUD,
  26. optional PlayerReplicationInfo RelatedPRI_1,
  27. optional PlayerReplicationInfo RelatedPRI_2,
  28. optional Object OptionalObject
  29. )
  30. {
  31. if ( Rx_Building_Internals(OptionalObject) != None )
  32. return Rx_Building_Internals(OptionalObject).static.GetLocalString(Switch, RelatedPRI_1, RelatedPRI_2);
  33. return "";
  34. }
  35.  
  36. static function SoundNodeWave AnnouncementSound(int MessageIndex, Object OptionalObject, PlayerController PC)
  37. {
  38. if ( MessageIndex == 0 || MessageIndex == 1)
  39. {
  40. return Rx_Building_Team_Internals(OptionalObject).GetAnnouncment(MessageIndex, PC.GetTeamNum());
  41. }
  42. else if( MessageIndex == 2 || MessageIndex == 3 || MessageIndex == 4 || MessageIndex == 5 || MessageIndex == 6 || MessageIndex == 7) // Destruction Imminent(2), Buiding Healed(3), Building Captured (4) or Building Lost (5) only go to teams
  43. {
  44. return Rx_Building_Team_Internals(OptionalObject).GetAnnouncment(MessageIndex, Rx_Building_Team_Internals(OptionalObject).GetTeamNum());
  45. }
  46.  
  47.  
  48. return none;
  49. }
  50.  
  51. static function byte AnnouncementLevel(byte MessageIndex)
  52. {
  53. return 1;
  54. }
  55.  
  56. DefaultProperties
  57. {
  58. AnnouncementVolume=5.0
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement