ashishcw

Static Object Pooling from Memroy

Jun 22nd, 2018
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.66 KB | None | 0 0
  1. void ResourceFinder()//This method, I call for every 30 seconds, when player's job queue is not empty.
  2.         {
  3.            
  4.             int count = 0;
  5.  
  6.             foreach (var buildingList in Memory.MemoryAccess.GetCBuildings(Game.Player.Character.Position, 100.0f))
  7.             {
  8.  
  9.                 if (count > Math.Min(49, 50)) break;
  10.                 count++;
  11.                 if (buildingList.ModelName == "prop_tree_stump")
  12.                 {
  13.                     UI.ShowSubtitle("Resource Found");
  14.                 }
  15.                 else
  16.                 {
  17.                     UI.ShowSubtitle("Resource NOT Found");
  18.                 }
  19.             }
  20.         }
Add Comment
Please, Sign In to add comment