Advertisement
Lighnat0r

GTA SA Firefighter Determine Spawn Location

Dec 30th, 2013
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.01 KB | None | 0 0
  1. FIREFIGHTER
  2. -------------------------------------------------------------------------------------
  3.  
  4. PICK SPAWN COORDINATES::
  5. {
  6. SpawnZoneRadius := 60*CurrentFirefighterLevel
  7. If SpawnZoneRadius < 170.0
  8. SpawnZoneRadius = 170.0
  9. SpawnZoneCurrentLevelLowerX := PlayerX-SpawnZoneRadius
  10. If SpawnZoneCurrentLevelLowerX < SpawnZoneLowerX
  11. SpawnZoneCurrentLevelLowerX := SpawnZoneLowerX
  12. SpawnZoneCurrentLevelUpperX := PlayerX+SpawnZoneRadius
  13. If SpawnZoneCurrentLevelUpperX < SpawnZoneUpperX
  14. SpawnZoneCurrentLevelUpperX := SpawnZoneUpperX
  15. SpawnZoneCurrentLevelLowerY := PlayerY-SpawnZoneRadius
  16. If SpawnZoneCurrentLevelLowerY < SpawnZoneLowerY
  17. SpawnZoneCurrentLevelLowerY := SpawnZoneLowerY
  18. SpawnZoneCurrentLevelUpperY := PlayerY+SpawnZoneRadius
  19. If SpawnZoneCurrentLevelUpperY < SpawnZoneUpperY
  20. SpawnZoneCurrentLevelLowerX := SpawnZoneUpperY
  21. }
  22.  
  23. FirePotentialX := Get a random X on the road between SpawnZoneCurrentLevelLowerX and SpawnZoneCurrentLevelUpperX
  24. FirePotentialY := Get a random Y on the road between SpawnZoneCurrentLevelLowerY and SpawnZoneCurrentLevelUpperY
  25. FirePotentialZ := PlayerZ
  26.  
  27. If Distance between Player and Potential Fire Spawn < 140.0
  28. Goto PICK SPAWN COORDINATES
  29.  
  30. For 0 cities unlocked:
  31. {
  32. ; Check that the fire doesn't spawn in an area which hasn't been unlocked.
  33.  
  34. if ((FirePotentialX < 78.4427) AND (FirePotentialY < -699.519))
  35. Goto PICK SPAWN COORDINATES
  36. if ((FirePotentialX < -252.6557) AND (FirePotentialY < -285.766))
  37. Goto PICK SPAWN COORDINATES
  38. if (FirePotentialX < -948.3447)
  39. Goto PICK SPAWN COORDINATES
  40. if ((FirePotentialX > 1473.448) AND (FirePotentialY > 403.7353))
  41. Goto PICK SPAWN COORDINATES
  42. if (FirePotentialY > 578.6325)
  43. Goto PICK SPAWN COORDINATES
  44. if ((FirePotentialX < 837.5551) AND (FirePotentialY > 347.4097))
  45. Goto PICK SPAWN COORDINATES
  46. }
  47.  
  48. For 1 city unlocked:
  49. {
  50. ; Check that the fire doesn't spawn in an area which hasn't been unlocked.
  51.  
  52. if ((FirePotentialX > 1473.448) AND (FirePotentialY > 403.7353))
  53. Goto PICK SPAWN COORDINATES
  54. if ((FirePotentialX > -1528.498) AND (FirePotentialY > 578.6325))
  55. Goto PICK SPAWN COORDINATES
  56. if ((-1528.498 < FirePotentialX < 837.5551) AND (FirePotentialY > 347.4097))
  57. Goto PICK SPAWN COORDINATES
  58. if (FirePotentialY > 1380.0)
  59. Goto PICK SPAWN COORDINATES
  60. }
  61.  
  62. ; Check that the fire doesn't spawn in a location where it can't (such as water?).
  63.  
  64. if ((1970.0 < FirePotentialX < 2150.0) AND (-2670.0 < FirePotentialY < -2274.0))
  65. Goto PICK SPAWN COORDINATES
  66. if ((1590.0 < FirePotentialX < 2150.0) AND (-2670.0 < FirePotentialY < -2397.0))
  67. Goto PICK SPAWN COORDINATES
  68. if ((-1737.0 < FirePotentialX < -1070.0) AND (-590.0 < FirePotentialY < -185.0))
  69. Goto PICK SPAWN COORDINATES
  70. if ((-1600.0 < FirePotentialX < -1081.0) AND (-185.0 < FirePotentialY < 415.0))
  71. Goto PICK SPAWN COORDINATES
  72. if ((1500.0 < FirePotentialX < 1733.0) AND (1529.0 < FirePotentialY < 1702.0))
  73. Goto PICK SPAWN COORDINATES
  74.  
  75. if Distance between Potential Fire Spawn and Other Fires < 25.0
  76. Goto PICK SPAWN COORDINATES
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement