sharkbait263

MW3 Scrolling News Bar [C#]

Nov 23rd, 2013
989
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.39 KB | None | 0 0
  1. public class Ps3Memory
  2.     {
  3.         public static byte[] BIND = new byte[4];
  4.         public static uint ProcessID;
  5.         public static uint[] processIDs;
  6.         private static string usage;
  7.         public static PS3TMAPI.ConnectStatus connectStatus;
  8.         public static string Status;
  9.      }
  10.  
  11. class MenuItems
  12.         {
  13.             public static int
  14.                 Shader = 0,
  15.                 ScrollBarBackGround = 1;
  16.         }
  17.  
  18. public void NewsBar(uint client, bool state, string Text)
  19.         {
  20.         //NewsBar(client, true, "Text Here");
  21.         //Credits To Bad Luck Brian For Non-Scrolling News Bar!
  22.  
  23.         PS3TMAPI.InitTargetComms();
  24.                 PS3TMAPI.Connect(0, null);
  25.                 PS3TMAPI.GetProcessList(0, out Ps3Memory.processIDs);
  26.                 ulong uProcess = Ps3Memory.processIDs[0];
  27.                 Ps3Memory.ProcessID = Convert.ToUInt32(uProcess);
  28.                 PS3TMAPI.ProcessAttach(0, PS3TMAPI.UnitType.PPU, Ps3Memory.ProcessID);
  29.                 PS3TMAPI.ProcessContinue(0, Ps3Memory.ProcessID);
  30.  
  31.             var scrollspeed = 1; //Scrolling Speed
  32.             if (state == false)
  33.             {
  34.                 for (uint i = 600; i < 605; i++)
  35.                 {
  36.                     ActivateIndex1(false, (int)i, 0);
  37.                 }
  38.             }
  39.             else
  40.             {
  41.                 Huds.StoreIcon(600, client, 2, 1000, 50, 300, 464, 0, MenuItems.ScrollBarBackGround, 255, 255, 255, 240, "Back"); //Background
  42.                 Huds.StoreIcon(601, client, 16, 1000, 5, 300, 440, 0, MenuItems.ScrollBarBackGround, 255, 20, 0, 150, "Back"); //Background
  43.                 Huds.StoreIcon(602, client, 16, 1000, 5, 300, 467, 0, MenuItems.ScrollBarBackGround, 255, 20, 0, 150, "Back"); //Background
  44.                 Huds.StoreTextElem(603, (int)client, Text, 3, 1.3f, 300, 453, 0, MenuItems.Shader, 255, 200, 200, 255, 255, 0, 0, 0, "Front"); //Text
  45.                 for (uint i = 600; i < 603; i++)
  46.                 {
  47.                     ActivateIndex1(true, (int)i, 4);
  48.                 }
  49.                 ActivateIndex1(true, 603, 1);
  50.                 for (int i = 800; i > -400; )
  51.                 {
  52.                     i = i - scrollspeed; //Speed
  53.                     MoveShader(603, i, 453, 0, 0);
  54.                     if (i == -300)
  55.                     {
  56.                         i = 800;
  57.                     }
  58.                 }
  59.             }
  60.         }
Advertisement
Add Comment
Please, Sign In to add comment