Guest User

Untitled

a guest
Nov 1st, 2017
19
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //////////DO NOT EDIT THE BELOW THREE LINES - IT IS USED BY SUMO TO DETECT IF THIS MAP IS COMPATIBLE////////
  2. // This file was generated using v1.3.3 of the generator.
  3. // This file was generated at Tuesday 9th of February 2016 09:18:36 PM.
  4. // This file is valid for Sumo 3.29 and higher. It will work on no earlier versions.
  5. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  6. // BEGIN YOUR MAP DATA - THIS IS A FULL FILE. IT CONTAINS CORE SUMO / SA:MP DATA AS WELL AS YOUR MAP DATA //
  7.  
  8. #define MAPMAKER "This map is 'Repair Mania' and made by Redirect Left"
  9. #define AUTHOR "Redirect_Left"
  10. #define MAP "Repair Mania"
  11. #include <NO_BIKES> // This is your vehicle loadout. It's an include file in an arrayed format.
  12. #include <SumoCore2_upd3> // Include the current version of the Sumo core (currently SumoCore2, Update 3).
  13. #define MAX_HANGARS 9
  14. new bool:wasrepaired[SUMOSLOTS] = false, bool:flag_set = false, hangar;
  15. enum hangXY{
  16. Float:X,
  17. Float:Y,
  18. Float:Z,
  19. };
  20. new hangars[MAX_HANGARS][hangXY] = {
  21. { -1149.97,279.11,110.75 },
  22. { -1149.97,309.11,110.75 },
  23. { -1299.97,309.11,110.75 },
  24. { -1192.96,216.84,110.75 },
  25. { -1340.97,221.71,110.75 },
  26. { -1411.00,275.18,110.75 },
  27. { -1430.07,359.95,110.75 },
  28. { -1465.21,151.29,110.75 },
  29. { -1505.69,300.67,110.75 }
  30. };
  31.  
  32. forward randomizeHangar();
  33. public randomizeHangar()
  34. {
  35. hangar = random(sizeof(hangars));
  36. for(new i = 0; i < SUMOSLOTS; i++)
  37. {
  38. if(IsPlayerConnected(i)){
  39. SetPlayerMapIcon(i,1,hangars[hangar][X],hangars[hangar][Y],hangars[hangar][Z],53,0,MAPICON_GLOBAL);
  40. }
  41. }
  42. SCM2A(COLOR_BRIGHT_PINK2,"--> First to get to the flag on map will get a free full repair!","03");
  43.  
  44. SetTimer("collectHangar",7500+random(11500));
  45. flag_set = true;
  46. return 1;
  47. }
  48.  
  49. forward collectHangar();
  50. public collectHangar()
  51. {
  52. new collected = 0;
  53. for(new i = 0; i < SUMOSLOTS; i++)
  54. {
  55. if(aInfo[i][Playing] == PLAYING)
  56. {
  57. if(IsPlayerInRangeOfPoint(i,10.0,hangars[hangar][X],hangars[hangar][Y],hangars[hangar][Z]))
  58. {
  59. RepairVehicle(GetPlayerVehicleID(i));
  60. collected = 1;
  61. new string[128];
  62. format(string,sizeof(string),"%s was repaired, first to get to the checkpoint!",PlayerName(i));
  63. SCM2A(COLOR_BRIGHT_PINK2,string,"03");
  64. SetTimer("randomizeHangar",random(50000)+20000,0);
  65. wasrepaired[i] = true;
  66.  
  67. //end the cycle to prevent another player beimg repaired
  68. break;
  69. }
  70. }
  71. }
  72. if(collected == 1)
  73. {
  74. for(new i = 0; i < SUMOSLOTS; i++)
  75. {
  76. if(IsPlayerConnected(i))
  77. RemovePlayerMapIcon(i,1);
  78. }
  79. flag_set = false;
  80. }
  81. else
  82. {
  83. SetTimer("collectHangar",875,0);
  84. }
  85. return 1;
  86. }
  87.  
  88. // Begin bulk map data.
  89. public OnGameModeInit()
  90. {
  91. // Load a skin, at the co-ords you set for SetPlayerPos.
  92. AddPlayerClass(SKIN_ID,-1271.729858,339.254882,118.177223,0.0,0,0,0,0,0,0);
  93.  
  94. // Begin your settings - they align properly when copy pasted into Pawno.exe
  95. Z_FALLOFF = 100;
  96. WIN_TIME = 400;
  97. MapTime = 15;
  98. Weather = SUNNY;
  99. RED_IDENTIFY_TYPE = 2;
  100. GIVE_NITRO = 0;
  101. RANDOM_MODDED_VEHICLES = 1;
  102. MOD_ALL_VEHICLES = 0;
  103. ENABLE_NOT_MOVE_LOSE = 0;
  104. NOT_MOVE_WARNINGS = 3;
  105. ENABLE_REPAIR = 0;
  106. REPAIR_INTERVAL = 0;
  107. REPAIR_AMOUNT = 0;
  108. REPAIR_X = 0;
  109. MAX_ALLOWED_HEALTH = 1000;
  110. ALLOW_RAMP_SPAWNING = 0;
  111. ENABLE_FIRE_TRUCK_RESCUE = 1;
  112.  
  113. // Advanced Settings - Post on forum under map making for any help with these.
  114. MAP_INCLUDES_WEAPONS = 0; // 0 = weapon anti-cheat enabled, 1 = disabled
  115. MAP_USES_SPEED_ALTERATION = 0; // IF YOU USE ANY SORT OF SPEED ALTERATION, YOU MUST PUT 1, ELSE ANTI-CHEAT WILL BAN
  116. AC_DISABLE_HEALTH_DETECTION = 1; // Change to 1 if you're giving or reducing health outside of repair times.
  117. MAX_SPEED_ALLOWED = 125; //(in MPH) Generally you won't need to edit this. Unless you're changing velocity or have very high falling points.
  118. DISABLE_Z_DETECTION = 0; // Disable Z detection altogether, so they can only die, exit vehicle, etc. But never fall off.
  119. ALLOW_EARLY_FINISH = 1; // Do we allow the map to finish early if there are no possible players?
  120. FIRE_TRUCK_RESCUE_AMT = 500; // How much we give to someone who got healed by a S.W.A.T. or Firetruck.
  121. FORCE_DUEL_CAR = 0; // 0 = No forcing, using the normal veh generation, any other = duel will use that vehicle.
  122. DISABLE_RTD = 0; // 0 = Roll the Dice disabled, 1 = enabled
  123.  
  124. DISABLE_DEJAVU = 0;
  125.  
  126.  
  127. // Load your objects
  128. CreateObject(18754,-1147.53,248.15,109.61,0.00,0.00,0.00);
  129. CreateObject(18754,-1396.23,248.15,109.61,0.00,0.00,0.00);
  130. CreateObject(3268,-1149.97,279.11,109.61,0.00,0.00,0.00);
  131. CreateObject(3268,-1149.97,309.11,109.61,0.00,0.00,180.00);
  132. CreateObject(3268,-1299.97,309.11,109.61,0.00,0.00,180.00);
  133. CreateObject(3268,-1192.96,216.84,109.11,0.00,0.00,122.00);
  134. CreateObject(3268,-1340.97,221.71,109.67,0.00,0.00,651.00);
  135. CreateObject(3268,-1411.00,275.18,109.67,0.00,0.00,387.00);
  136. CreateObject(3268,-1430.07,359.95,109.67,0.00,0.00,450.00);
  137. CreateObject(3268,-1465.21,151.29,109.67,0.00,0.00,488.00);
  138. CreateObject(3268,-1505.69,300.67,109.67,0.00,0.00,0.00);
  139. CreateObject(3673,-1255.18,164.11,128.87,0.00,0.00,0.00);
  140. CreateObject(3673,-1280.18,164.11,128.87,0.00,0.00,180.00);
  141. CreateObject(6933,-1248.06,301.16,143.67,0.00,0.00,0.00);
  142. CreateObject(6933,-1255.00,301.16,143.67,0.00,0.00,180.00);
  143. CreateObject(970,-1251.51,300.75,110.68,0.00,0.00,0.00);
  144. CreateObject(970,-1251.51,300.75,111.68,0.00,0.00,0.00);
  145. CreateObject(7236,-1129.85,186.55,135.47,0.00,0.00,0.00);
  146. CreateObject(7236,-1349.85,270.55,135.47,0.00,0.00,51.00);
  147. CreateObject(7024,-1280.02,202.36,114.27,0.00,0.00,0.00);
  148. CreateObject(6930,-1230.11,205.43,117.17,0.00,0.00,3.00);
  149. CreateObject(7019,-1519.99,193.37,113.57,0.00,0.00,0.00);
  150. CreateObject(7019,-1519.99,241.37,113.57,0.00,0.00,0.00);
  151. CreateObject(970,-1496.35,284.24,110.68,0.00,0.00,90.00);
  152. CreateObject(970,-1515.35,284.24,110.68,0.00,0.00,90.00);
  153. CreateObject(7301,-1402.59,279.36,112.66,0.00,0.00,252.19);
  154. CreateObject(6875,-1336.10,324.95,110.11,0.00,0.00,720.00);
  155. CreateObject(6875,-1359.10,338.95,110.11,0.00,0.00,900.00);
  156. CreateObject(3469,-1407.61,214.34,113.11,0.00,0.00,0.00);
  157. CreateObject(3469,-1286.98,261.40,113.11,0.00,0.00,48.00);
  158. CreateObject(3469,-1084.09,308.12,113.11,0.00,0.00,961.00);
  159. CreateObject(3469,-1082.09,222.12,113.11,0.00,0.00,3433.00);
  160. CreateObject(645,-1078.64,306.24,113.28,0.00,0.00,304.00);
  161. CreateObject(645,-1072.64,309.24,113.28,0.00,0.00,304.00);
  162. CreateObject(645,-1090.74,310.24,113.28,0.00,0.00,304.00);
  163. CreateObject(645,-1133.54,197.90,112.88,37.00,-1.00,214.00);
  164. CreateObject(620,-1084.17,228.27,110.11,0.00,0.00,181.00);
  165. CreateObject(620,-1081.17,215.27,110.11,0.00,0.00,181.00);
  166. CreateObject(616,-1193.36,218.86,116.87,0.00,0.00,0.00);
  167. CreateObject(616,-1299.11,270.76,110.11,0.00,0.00,0.00);
  168. CreateObject(616,-1282.11,257.76,110.11,0.00,0.00,0.00);
  169. CreateObject(616,-1441.03,364.61,115.11,0.00,0.00,270.00);
  170. CreateObject(618,-1417.94,361.51,116.11,0.00,0.00,0.00);
  171. CreateObject(645,-1506.97,273.60,115.46,0.00,0.00,0.00);
  172. CreateObject(645,-1506.97,259.60,115.46,0.00,0.00,0.00);
  173. CreateObject(645,-1506.97,199.60,115.46,0.00,0.00,0.00);
  174. CreateObject(645,-1506.97,230.60,115.46,0.00,0.00,0.00);
  175. CreateObject(645,-1506.97,253.60,115.46,0.00,0.00,0.00);
  176. SetupDynamicSpawns();
  177.  
  178.  
  179. // Finished custom settings. Now lets tell Sumo to begin the game, map is finalized.
  180. FinalizeLoading();
  181. //randomize hangar
  182. SetTimer("randomizeHangar",22000,0);
  183. return 1;
  184. }
  185.  
  186. // Begin other required functions.
  187.  
  188. stock OnPlayerRequestClassEx(playerid, classid)
  189. {
  190.  
  191. SetPlayerPos(playerid,-1271.729858,339.254882,118.177223);
  192. SetPlayerCameraPos(playerid,-1271.729858,339.254882,112.177223);
  193. SetPlayerCameraLookAt(playerid,-1271.729858,339.254882,222.177223);
  194. SendClientMessage(playerid,COLOR_GREY,"Press Shift to play"); // Because people are stupid if we don't add this line.
  195.  
  196. return 1;
  197. }
  198.  
  199. // Some extra functions to help you do things in line with the core.
  200. // The below is called at the same time though, so you can add code here as desired - such as resetting map vars, or displaying extra welcome message.
  201. // If you use any of the 'Ex' features, you should removed the #pragma unused section.
  202. stock OnPlayerConEx(playerid)
  203. {
  204. SendClientMessage(playerid,COLOR_AQUA,MAPMAKER);
  205. SendClientMessage(playerid,COLOR_AQUA," "); // blank line for effect.
  206. wasrepaired[playerid] = false;
  207. // RemoveBuildingForPlayer lines would go here, but you didn't create any. If you change your mind, put them here!
  208.  
  209. //show the flag icon for the joined player also
  210. if (flag_set)
  211. {
  212. SetPlayerMapIcon(playerid,1,hangars[hangar][X],hangars[hangar][Y],hangars[hangar][Z],53,0,MAPICON_GLOBAL);
  213. }
  214. return 1;
  215. }
  216.  
  217. // Called when a player has DIED.
  218. stock OnPlayerDeathEx(playerid,killerid,reason)
  219. {
  220. #pragma unused playerid,killerid,reason
  221. return 1;
  222. }
  223.  
  224. // Called when someone is eliminated, reasons are 1 (fell off), 2 (fell off bike/quad), 3 (died), 4 (exited car), 6 (failed to keep moving) (5 is not valid)
  225. stock OnPlayerElimination(playerid,reason,killer)
  226. {
  227. #pragma unused playerid,reason,killer
  228. return 1;
  229. }
  230.  
  231. // Called when someone leaves the game, reasons are 0 (Timed Out), 1 (Player Quit), 2 (Kicked or Banned)
  232. stock OnPlayerDisconnectEx(playerid,reason)
  233. {
  234. #pragma unused playerid,reason
  235. return 1;
  236. }
  237.  
  238. // Called whenever the player & server share data, this is up to 6 or 7 times a second. Used for highly accurate stuff.
  239. // Returning 0 in this function will not sync the player, do not put inefficient code here, you'll lag the server.
  240. stock OnPlayerUpdateEx(playerid)
  241. {
  242. #pragma unused playerid
  243. return 1;
  244. }
  245.  
  246. // Called whenever someone presses a button (key). For a list of keys go to http://wiki.sa-mp.com/wiki/Keys
  247. // useful for triggering something upon keypress.
  248. stock OnPlayerKeyStateChangeEx(playerid, newkeys, oldkeys)
  249. {
  250. #pragma unused playerid, newkeys, oldkeys
  251. return 1;
  252. }
  253.  
  254. // This is called when a player dynamically spawns, this is so you can do specific stuff for certain random spawns
  255. // like say, if they spawn elsewhere, or you need to know which dynamic spawn was chosen. randid = the id chosen
  256. // its the same order as SetupDynamicSpawns is listed in.
  257. stock OnPlayerDynamicSpawn(playerid,spawnid)
  258. {
  259. #pragma unused playerid,spawnid
  260. return 1;
  261. }
  262.  
  263. // The main spawning. The below is called upon spawning for players.
  264. stock OnPlayerSpawnEx(playerid)
  265. {
  266.  
  267. SetPlayerPos(playerid,-1271.729858,339.254882,118.177223);
  268. // Lets do some miscellaneous stuff before we finalise the spawning. This is all required by the Sumo Core, or at least removing it will break things.
  269. TogglePlayerControllable(playerid,0); // Reset to 1 by the sumo core when it says you're ready, and not before.
  270. //////GetRandomSkin(playerid); // Get a new random skin for the player
  271. new veid = random(sizeof(vehiclearray)); // Get random vehicle from the allowed array you specified in loadout.
  272.  
  273. DynamicallySpawnPlayer(playerid,vehiclearray[veid][vehid]);
  274. SpawnedFunction(playerid); // Let sumo core take control again, we're done with them here.
  275. return 1;
  276.  
  277. }
  278. // Setup your dynamic spawns, this puts them into the SumoCore memory to use randomly for later spawns.
  279. SetupDynamicSpawns(){
  280. AddDynamicSpawn(-1485.724487,164.839538,112.610183,90.000000);
  281. AddDynamicSpawn(-1492.704467,174.372604,112.610183,165.839996);
  282. AddDynamicSpawn(-1503.900390,170.597625,112.610183,241.680007);
  283. AddDynamicSpawn(-1503.682861,158.784423,112.610183,317.520019);
  284. AddDynamicSpawn(-1492.355590,155.424102,112.610183,393.360015);
  285. AddDynamicSpawn(-1409.129516,152.772232,113.436950,90.000000);
  286. AddDynamicSpawn(-1416.109497,162.305297,113.436950,165.839996);
  287. AddDynamicSpawn(-1427.305419,158.530319,113.436950,241.680007);
  288. AddDynamicSpawn(-1427.087890,146.717117,113.436950,317.520019);
  289. AddDynamicSpawn(-1415.760620,143.356796,113.436950,393.360015);
  290. AddDynamicSpawn(-1057.625610,335.875701,112.610183,90.000000);
  291. AddDynamicSpawn(-1064.605590,345.408752,112.610183,165.839996);
  292. AddDynamicSpawn(-1075.801513,341.633789,112.610183,241.680007);
  293. AddDynamicSpawn(-1075.583984,329.820587,112.610183,317.520019);
  294. AddDynamicSpawn(-1064.256713,326.460266,112.610183,393.360015);
  295. AddDynamicSpawn(-1205.800048,343.125335,112.176155,90.000000);
  296. AddDynamicSpawn(-1212.780029,352.658386,112.176155,165.839996);
  297. AddDynamicSpawn(-1223.975952,348.883422,112.176155,241.680007);
  298. AddDynamicSpawn(-1223.758422,337.070220,112.176155,317.520019);
  299. AddDynamicSpawn(-1212.431152,333.709899,112.176155,393.360015);
  300. AddDynamicSpawn(-1271.729858,339.254882,112.177223,90.000000);
  301. AddDynamicSpawn(-1278.709838,348.787933,112.177223,165.839996);
  302. AddDynamicSpawn(-1289.905761,345.012969,112.177223,241.680007);
  303. AddDynamicSpawn(-1289.688232,333.199768,112.177223,317.520019);
  304. AddDynamicSpawn(-1278.360961,329.839447,112.177223,393.360015);
  305. AddDynamicSpawn(-1194.939575,160.044769,112.179084,90.000000);
  306. AddDynamicSpawn(-1201.919555,169.577835,112.179084,165.839996);
  307. AddDynamicSpawn(-1213.115478,165.802856,112.179084,241.680007);
  308. AddDynamicSpawn(-1212.897949,153.989654,112.179084,317.520019);
  309. AddDynamicSpawn(-1201.570678,150.629333,112.179084,393.360015);
  310. AddDynamicSpawn(-1093.440185,150.738388,112.178527,90.000000);
  311. AddDynamicSpawn(-1100.420166,160.271453,112.178527,165.839996);
  312. AddDynamicSpawn(-1111.616088,156.496475,112.178527,241.680007);
  313. AddDynamicSpawn(-1111.398559,144.683273,112.178527,317.520019);
  314. AddDynamicSpawn(-1100.071289,141.322952,112.178527,393.360015);
  315. AddDynamicSpawn(-1351.834960,165.500793,112.179626,90.000000);
  316. AddDynamicSpawn(-1358.814941,175.033859,112.179626,165.839996);
  317. AddDynamicSpawn(-1370.010864,171.258880,112.179626,241.680007);
  318. AddDynamicSpawn(-1369.793334,159.445678,112.179626,317.520019);
  319. AddDynamicSpawn(-1358.466064,156.085357,112.179626,393.360015);
  320. AddDynamicSpawn(-1136.494384,342.383544,112.175735,90.000000);
  321. AddDynamicSpawn(-1143.474365,351.916595,112.175735,165.839996);
  322. AddDynamicSpawn(-1154.670288,348.141632,112.175735,241.680007);
  323. AddDynamicSpawn(-1154.452758,336.328430,112.175735,317.520019);
  324. AddDynamicSpawn(-1143.125488,332.968109,112.175735,393.360015);
  325.  
  326. }
  327. // Called when a player wins the game.
  328. OnPlayerWinGame(playerid,bool:was_overtime)
  329. {
  330. #pragma unused was_overtime
  331. if(wasrepaired[playerid] == true && !achInfo[playerid][ACH_PITSTOP])
  332. {
  333. AwardAchievement(playerid,ACH_PITSTOP,"Pitstop");
  334. }
  335. return 1;
  336. }
  337. // End of file.
RAW Paste Data