Advertisement
Guest User

Untitled

a guest
Feb 4th, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1.  
  2. private ["_p", "_w", "_coords", "_boxesNear", "_boxcount", "_box"];
  3.  
  4. _p = _this select 0; //player
  5. _w = _this select 1; // worldspace
  6.  
  7. //_humanity = _p getVariable ["humanity",0];
  8.  
  9.  
  10. systemChat (_p getVariable ["lMsg",0]);
  11.  
  12.  
  13. // Make sure there isn't already a box there. You could go in/out of the lobby.
  14. // This could give a false positive, but so what
  15. _coords = _w;
  16.  
  17. _boxesNear = nearestObjects [_coords, ["AmmoBoxBig"], 5];
  18. _boxcount = count _boxesNear;
  19.  
  20. if ((_boxcount) > 0) then {
  21. _box = _boxesNear select 0;
  22.  
  23. // diag_log("DZLD: Found an AmmoBoxBig. Waiting...");
  24.  
  25. titleText ["Warning: Collect your supplies now. The Supply Box will disappear when you walk away!", "PLAIN DOWN", 3];
  26. waitUntil {(_p distance _box) > 6};
  27. deleteVehicle _box;
  28. _box = nil;
  29. // diag_log("DZLD: Removed the AmmoBoxBig.");
  30. titleText ["Your Supply Box has disappeared.", "PLAIN DOWN", 3];
  31. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement