Advertisement
LostProphet

Which way?

Apr 15th, 2012
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.47 KB | None | 0 0
  1. Way 1:
  2. public static int MemoryAddress(this Ped ped)
  3. {
  4.     PropertyInfo info = typeof(Ped).GetProperty("MemoryAddress", BindingFlags.NonPublic | BindingFlags.Instance);
  5.     var address = info.GetValue(ped, null);
  6.  
  7.     return (int)address;
  8. }
  9.  
  10. Way 2:
  11. public static int MemoryAddress(this Ped ped)
  12. {
  13.     PropertyInfo info = typeof(Ped).GetProperty("MemoryAddress", BindingFlags.NonPublic | BindingFlags.Instance);
  14.     int address = (int)info.GetValue(ped, null);
  15.  
  16.     return address;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement