Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Extension methods class:
- public static class MemoryReflection
- {
- public static int MemoryAddress(this Vehicle vehicle)
- {
- PropertyInfo info = typeof(Vehicle).GetProperty("MemoryAddress", BindingFlags.Instance | BindingFlags.NonPublic);
- return (int)info.GetValue(vehicle, null);
- }
- }
- // Anywhere in code:
- int address = Player.Character.CurrentVehicle.MemoryAddress();
- Game.Console.Print("Current vehicle address in memory: 0x" + address.ToString("X"));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement