FamiliaSAMP

INCLUDE - MapAndreas [FAMILIASAMP.COM]

Mar 8th, 2016
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. /*
  2. SA-MP MapAndreas Include
  3. Copyright © 2011-2012 RyDeR`
  4. */
  5.  
  6. #if defined _MapAndreas_Included
  7. #endinput
  8. #endif
  9.  
  10. #define _MapAndreas_Included
  11.  
  12. stock Float: GetPointZPos(const Float: fX, const Float: fY, &Float: fZ = 0.0) {
  13. if(!((-3000.0 < fX < 3000.0) && (-3000.0 < fY < 3000.0))) {
  14. return 0.0;
  15. }
  16. static
  17. File: s_hMap
  18. ;
  19. if(!s_hMap) {
  20. s_hMap = fopen("SAfull.hmap", io_read);
  21.  
  22. if(!s_hMap) {
  23. return 0.0;
  24. }
  25. }
  26. new
  27. afZ[1]
  28. ;
  29. fseek(s_hMap, ((6000 * (-floatround(fY, floatround_tozero) + 3000) + (floatround(fX, floatround_tozero) + 3000)) << 1));
  30. fblockread(s_hMap, afZ);
  31.  
  32. return (fZ = ((afZ[0] >>> 16) * 0.01));
  33. }
Add Comment
Please, Sign In to add comment