Пример #1
0
        public GTA5Entity(IntPtr addr)
        {
            _baseAddr = addr;

            structs = new ReflectStructure(_baseAddr, new Dictionary <string, Dictionary <int, int[]> >()
            {
                { "HEALTH", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { 0x280 } }
                  } },
                { "MAXHEALTH", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { 0x2A0 } }
                  } },
                { "POS_X", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { 0x90 } }
                  } },
                { "POS_Y", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { 0x94 } }
                  } },
                { "POS_Z", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { 0x98 } }
                  } },
                { "iCash", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { 0x15D4 } }
                  } }
            });
        }
Пример #2
0
        public GTAObject(IntPtr addr, bool track = true)
        {
            structs = new ReflectStructure(addr, new Dictionary <string, Dictionary <int, int[]> >()
            {
                { "POS_X", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { 0x10 } }
                  } },
                { "POS_Y", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { 0x14 } }
                  } },
                { "ID", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { 0x40 } }
                  } }
            });

            if (track)
            {
                if (!objects.ContainsKey(addr))
                {
                    objects.Add(addr, this);
                }
            }
        }
Пример #3
0
        public GTA5Entity(int index, bool directTarget = true, IntPtr entityAddr = new IntPtr())
        {
            IntPtr baseAddr = directTarget ? Base.GetPtr(Base.WorldPTR, new int[] { 0x8, 0x2A8 }) : Base.GetPtr(entityAddr, new int[] { 0x2A8 });

            _baseAddr = baseAddr;

            structs = new ReflectStructure(baseAddr, new Dictionary <string, Dictionary <int, int[]> >()
            {
                { "HEALTH", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { (index * 0x18), 0x280 } }
                  } },
                { "MAXHEALTH", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { (index * 0x18), 0x2A0 } }
                  } },
                { "POS_X", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { (index * 0x18), 0x110 } }
                  } },
                { "POS_Y", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { (index * 0x18), 0x114 } }
                  } },
                { "POS_Z", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { (index * 0x18), 0x118 } }
                  } },
                { "ENTITY", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { (index * 0x18) } }
                  } }
            });
        }
Пример #4
0
 public static void Refresh()
 {
     structs._basePTR = Base.WorldPTR;
     structs          = new ReflectStructure(Base.PlayerPTR, new Dictionary <string, Dictionary <int, int[]> >()
     {
         { "Playercount", new Dictionary <int, int[]>()
           {
               { 4, new int[] { 0x178 } }
           } }
     });
 }
Пример #5
0
        public Vehicle(IntPtr addr)
        {
            _baseAddr = addr;

            structs = new ReflectStructure(_baseAddr, new Dictionary <string, Dictionary <int, int[]> >()
            {
                { "HEALTH", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { 0x87C } }
                  } },
                { "POS_X", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { 0x30, 0x50 } }
                  } },
                { "POS_Y", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { 0x30, 0x54 } }
                  } },
                { "POS_Z", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { 0x30, 0x58 } }
                  } },
                { "ACCELERATION", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { 0x8A8, 0x4C } }
                  } },
                { "BREAKFORCE", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { 0x8A8, 0x6C } }
                  } },
                { "CURVE_TRACTION", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { 0x8A8, 0x90 } }
                  } },
                { "DEMOLITION_MULTIPLIER", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { 0x8A8, 0xF8 } }
                  } },
                { "SUSPENSION_FORCE", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { 0x8A8, 0xBC } }
                  } },
                { "GRAVITY", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { 0x8A8, 0xB7C } }
                  } },
            });
        }
Пример #6
0
        private Weapon(IntPtr addr)
        {
            _addr   = Base.GetPtr(addr, new int[] { 0x134 }).ToInt64();
            structs = new ReflectStructure(addr, new Dictionary <string, Dictionary <int, int[]> >()
            {
                { "BPS", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { 0x134 } }
                  } }
            });
            Single bpsVal = this.structs.GetValue <Single>("BPS");

            if (bpsVal > 0.000000000f && !oldBPS.ContainsKey(_addr))
            {
                oldBPS.Add(_addr, bpsVal);
            }
        }
Пример #7
0
 public Player(int index)
 {
     structs = new ReflectStructure(Base.PlayerPTR, new Dictionary <string, Dictionary <int, int[]> >()
     {
         { "NICKNAME", new Dictionary <int, int[]>()
           {
               { 32, new int[] { (0x8 * index) + 0x180, 0xA8, 0x7C } }
           } },
         { "RUN_SPEED", new Dictionary <int, int[]>()
           {
               { 4, new int[] { (0x8 * index) + 0x180, 0xA8, 0x14C } }
           } },
         { "WANTED_LEVEL", new Dictionary <int, int[]>()
           {
               { 4, new int[] { (0x8 * index) + 0x180, 0xA8, 0x7F8 } }
           } },
         { "HEALTH", new Dictionary <int, int[]>()
           {
               { 4, new int[] { (0x8 * index) + 0x180, 0x1C8, 0x280 } }
           } },
         { "MAXHEALTH", new Dictionary <int, int[]>()
           {
               { 4, new int[] { (0x8 * index) + 0x180, 0x1C8, 0x2A0 } }
           } },
         { "POS_X", new Dictionary <int, int[]>()
           {
               { 4, new int[] { (0x8 * index) + 0x180, 0xA8, 0x1C8, 0x90 } }
           } },
         { "POS_Y", new Dictionary <int, int[]>()
           {
               { 4, new int[] { (0x8 * index) + 0x180, 0xA8, 0x1C8, 0x94 } }
           } },
         { "POS_Z", new Dictionary <int, int[]>()
           {
               { 4, new int[] { (0x8 * index) + 0x180, 0xA8, 0x1C8, 0x98 } }
           } },
         { "IP", new Dictionary <int, int[]>()
           {
               { 4, new int[] { (0x8 * index) + 0x180, 0xA8, 0x44 } }
           } },
         { "PORT", new Dictionary <int, int[]>()
           {
               { 2, new int[] { (0x8 * index) + 0x180, 0xA8, 0x48 } }
           } }
     });
 }
Пример #8
0
        public static void Refresh()
        {
            structs._basePTR = Base.WorldPTR;
            structs          = new ReflectStructure(Base.WorldPTR, new Dictionary <string, Dictionary <int, int[]> >()
            {
                { "LOCAL_PLAYER_PTR", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { 0x8, 0x0 } }
                  } },
                { "POS_X", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { 0x8, 0x90 } }
                  } },
                { "POS_Y", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { 0x8, 0x94 } }
                  } },
                { "POS_Z", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { 0x8, 0x98 } }
                  } },
                { "HEALTH", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { 0x8, 0x280 } }
                  } },
                { "MAXHEALTH", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { 0x8, 0x2A0 } }
                  } },
                { "ATTACKER_BASE", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { 0x8, 0x2A8 } }
                  } },
                { "ARMOR", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { 0x8, 0x14B0 } }
                  } },

                { "RUN_SPEED", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { 0x8, 0x10B8, 0x14C } }
                  } },
                { "NICKNAME", new Dictionary <int, int[]>()
                  {
                      { 32, new int[] { 0x8, 0x10B8, 0x7C } }
                  } },
                { "Wanted", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { 0x8, 0x10B8, 0x7F8 } }
                  } },

                { "VEHICLE_PLAYER_POS_X", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { 0x8, 0x30, 0x50 } }
                  } },
                { "VEHICLE_PLAYER_POS_Y", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { 0x8, 0x30, 0x54 } }
                  } },
                { "VEHICLE_PLAYER_POS_Z", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { 0x8, 0x30, 0x58 } }
                  } },

                { "IN_VEHICLE", new Dictionary <int, int[]>()
                  {
                      { 4, new int[] { 0x08, 0x146B } }
                  } }
            });
        }