Advertisement
LostProphet

Vehicle Address

Dec 6th, 2014
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.48 KB | None | 0 0
  1. // Extension methods class:
  2. public static class MemoryReflection
  3. {
  4.     public static int MemoryAddress(this Vehicle vehicle)
  5.     {
  6.         PropertyInfo info = typeof(Vehicle).GetProperty("MemoryAddress", BindingFlags.Instance | BindingFlags.NonPublic);
  7.  
  8.         return (int)info.GetValue(vehicle, null);
  9.     }
  10. }
  11.  
  12. // Anywhere in code:
  13. int address = Player.Character.CurrentVehicle.MemoryAddress();
  14. Game.Console.Print("Current vehicle address in memory: 0x" + address.ToString("X"));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement