Advertisement
Guest User

Untitled

a guest
Nov 10th, 2013
679
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.15 KB | None | 0 0
  1. // BASE = 0xDFCDD8
  2.  
  3. public static void WritePlayerVar(string var, float value)
  4. {
  5.     ProcessMemory Mem = new ProcessMemory("arma2oa");
  6.     Mem.StartProcess();
  7.     int local = Mem.ReadInt(BASE);
  8.     local = Mem.ReadInt(local + 0x13A8);
  9.     local = Mem.ReadInt(local + 0x4);
  10.     int num2 = Mem.ReadInt(local + 0x5c0);
  11.     int num3 = Mem.ReadInt(local + 0x5c4);
  12.     for (int i = 0; i < (num3 * 3); i++)
  13.     {
  14.         int num5 = Mem.ReadInt(num2 + (4 * i));
  15.         if ((Mem.ReadInt(num5) <= 0) || (Mem.ReadInt(num5) >= 0x2710))
  16.         {
  17.             int num6 = Mem.ReadInt((num2 + (4 * i)) + 4);
  18.             if ((num6 >= 0) && (num6 <= 0x3e8))
  19.             {
  20.                 int num7 = num5;
  21.                 for (int j = 0; j < (num6 * 5); j++)
  22.                 {
  23.                     int num9 = Mem.ReadInt(num7 + (4 * j));
  24.                     int num11 = Mem.ReadInt((num7 + (4 * j)) + 8);
  25.                     string str = Mem.ReadStringAscii(num9 + 8, 25);
  26.                     if (str == var)
  27.                     {
  28.                         Mem.WriteFloat(num11 + 12, value);
  29.                     }
  30.                 }
  31.             }
  32.         }
  33.     }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement