grandlarc.pwn 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457
  1. //----------------------------------------------------------
  2. //
  3. // GRAND LARCENY 1.0
  4. // A freeroam gamemode for SA-MP 0.3
  5. //
  6. //----------------------------------------------------------
  7. #include <a_samp>
  8. #include <core>
  9. #include <float>
  10. #include "../include/gl_common.inc"
  11. #include "../include/gl_spawns.inc"
  12. #pragma tabsize 0
  13. //----------------------------------------------------------
  14. #define COLOR_WHITE 0xFFFFFFFF
  15. #define COLOR_NORMAL_PLAYER 0xFF4444FF
  16. #define CITY_LOS_SANTOS 0
  17. #define CITY_SAN_FIERRO 1
  18. #define CITY_LAS_VENTURAS 2
  19. new total_vehicles_from_files=0;
  20. // Class selection globals
  21. new gPlayerCitySelection[MAX_PLAYERS];
  22. new gPlayerHasCitySelected[MAX_PLAYERS];
  23. new gPlayerLastCitySelectionTick[MAX_PLAYERS];
  24. new Text:txtClassSelHelper;
  25. new Text:txtLosSantos;
  26. new Text:txtSanFierro;
  27. new Text:txtLasVenturas;
  28. //----------------------------------------------------------
  29. main()
  30. {
  31. print("\n---------------------------------------");
  32. print("Running Grand Larceny - by the SA-MP team\n");
  33. print("---------------------------------------\n");
  34. }
  35. //----------------------------------------------------------
  36. public OnPlayerConnect(playerid)
  37. {
  38. GameTextForPlayer(playerid,"~w~Grand Larceny",3000,4);
  39. SendClientMessage(playerid,COLOR_WHITE,"Welcome to Grand Larceny");
  40. // class selection init vars
  41. gPlayerCitySelection[playerid] = -1;
  42. gPlayerHasCitySelected[playerid] = 0;
  43. gPlayerLastCitySelectionTick[playerid] = GetTickCount();
  44. //SetPlayerColor(playerid,COLOR_NORMAL_PLAYER);
  45. return 1;
  46. }
  47. //----------------------------------------------------------
  48. public OnPlayerSpawn(playerid)
  49. {
  50. if(IsPlayerNPC(playerid)) return 1;
  51. new randSpawn = 0;
  52. SetPlayerInterior(playerid,0);
  53. TogglePlayerClock(playerid,0);
  54. ResetPlayerMoney(playerid);
  55. GivePlayerMoney(playerid, 30000);
  56. // if they ever return to class selection make them city
  57. // select again first
  58. gPlayerHasCitySelected[playerid] = 0;
  59. if(CITY_LOS_SANTOS == gPlayerCitySelection[playerid]) {
  60. randSpawn = random(sizeof(gRandomSpawns_LosSantos));
  61. SetPlayerPos(playerid,
  62. gRandomSpawns_LosSantos[randSpawn][0],
  63. gRandomSpawns_LosSantos[randSpawn][1],
  64. gRandomSpawns_LosSantos[randSpawn][2]);
  65. SetPlayerFacingAngle(playerid,gRandomSpawns_LosSantos[randSpawn][3]);
  66. }
  67. else if(CITY_SAN_FIERRO == gPlayerCitySelection[playerid]) {
  68. randSpawn = random(sizeof(gRandomSpawns_SanFierro));
  69. SetPlayerPos(playerid,
  70. gRandomSpawns_SanFierro[randSpawn][0],
  71. gRandomSpawns_SanFierro[randSpawn][1],
  72. gRandomSpawns_SanFierro[randSpawn][2]);
  73. SetPlayerFacingAngle(playerid,gRandomSpawns_SanFierro[randSpawn][3]);
  74. }
  75. else if(CITY_LAS_VENTURAS == gPlayerCitySelection[playerid]) {
  76. randSpawn = random(sizeof(gRandomSpawns_LasVenturas));
  77. SetPlayerPos(playerid,
  78. gRandomSpawns_LasVenturas[randSpawn][0],
  79. gRandomSpawns_LasVenturas[randSpawn][1],
  80. gRandomSpawns_LasVenturas[randSpawn][2]);
  81. SetPlayerFacingAngle(playerid,gRandomSpawns_LasVenturas[randSpawn][3]);
  82. }
  83. //SetPlayerColor(playerid,COLOR_NORMAL_PLAYER);
  84. SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL,200);
  85. SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL_SILENCED,200);
  86. SetPlayerSkillLevel(playerid,WEAPONSKILL_DESERT_EAGLE,200);
  87. SetPlayerSkillLevel(playerid,WEAPONSKILL_SHOTGUN,200);
  88. SetPlayerSkillLevel(playerid,WEAPONSKILL_SAWNOFF_SHOTGUN,200);
  89. SetPlayerSkillLevel(playerid,WEAPONSKILL_SPAS12_SHOTGUN,200);
  90. SetPlayerSkillLevel(playerid,WEAPONSKILL_MICRO_UZI,200);
  91. SetPlayerSkillLevel(playerid,WEAPONSKILL_MP5,200);
  92. SetPlayerSkillLevel(playerid,WEAPONSKILL_AK47,200);
  93. SetPlayerSkillLevel(playerid,WEAPONSKILL_M4,200);
  94. SetPlayerSkillLevel(playerid,WEAPONSKILL_SNIPERRIFLE,200);
  95. GivePlayerWeapon(playerid,WEAPON_COLT45,100);
  96. //GivePlayerWeapon(playerid,WEAPON_MP5,100);
  97. //TogglePlayerClock(playerid, 1);
  98. return 1;
  99. }
  100. //----------------------------------------------------------
  101. public OnPlayerDeath(playerid, killerid, reason)
  102. {
  103. new playercash;
  104. if(killerid == INVALID_PLAYER_ID) {
  105. ResetPlayerMoney(playerid);
  106. } else {
  107. playercash = GetPlayerMoney(playerid);
  108. if(playercash > 0) {
  109. GivePlayerMoney(killerid, playercash);
  110. ResetPlayerMoney(playerid);
  111. }
  112. }
  113. return 1;
  114. }
  115. //----------------------------------------------------------
  116. ClassSel_SetupCharSelection(playerid)
  117. {
  118. if(gPlayerCitySelection[playerid] == CITY_LOS_SANTOS) {
  119. SetPlayerInterior(playerid,11);
  120. SetPlayerPos(playerid,508.7362,-87.4335,998.9609);
  121. SetPlayerFacingAngle(playerid,0.0);
  122. SetPlayerCameraPos(playerid,508.7362,-83.4335,998.9609);
  123. SetPlayerCameraLookAt(playerid,508.7362,-87.4335,998.9609);
  124. }
  125. else if(gPlayerCitySelection[playerid] == CITY_SAN_FIERRO) {
  126. SetPlayerInterior(playerid,3);
  127. SetPlayerPos(playerid,-2673.8381,1399.7424,918.3516);
  128. SetPlayerFacingAngle(playerid,181.0);
  129. SetPlayerCameraPos(playerid,-2673.2776,1394.3859,918.3516);
  130. SetPlayerCameraLookAt(playerid,-2673.8381,1399.7424,918.3516);
  131. }
  132. else if(gPlayerCitySelection[playerid] == CITY_LAS_VENTURAS) {
  133. SetPlayerInterior(playerid,3);
  134. SetPlayerPos(playerid,349.0453,193.2271,1014.1797);
  135. SetPlayerFacingAngle(playerid,286.25);
  136. SetPlayerCameraPos(playerid,352.9164,194.5702,1014.1875);
  137. SetPlayerCameraLookAt(playerid,349.0453,193.2271,1014.1797);
  138. }
  139. }
  140. //----------------------------------------------------------
  141. // Used to init textdraws of city names
  142. ClassSel_InitCityNameText(Text:txtInit)
  143. {
  144. TextDrawUseBox(txtInit, 0);
  145. TextDrawLetterSize(txtInit,1.25,3.0);
  146. TextDrawFont(txtInit, 0);
  147. TextDrawSetShadow(txtInit,0);
  148. TextDrawSetOutline(txtInit,1);
  149. TextDrawColor(txtInit,0xEEEEEEFF);
  150. TextDrawBackgroundColor(txtClassSelHelper,0x000000FF);
  151. }
  152. //----------------------------------------------------------
  153. ClassSel_InitTextDraws()
  154. {
  155. // Init our observer helper text display
  156. txtLosSantos = TextDrawCreate(10.0, 380.0, "Los Santos");
  157. ClassSel_InitCityNameText(txtLosSantos);
  158. txtSanFierro = TextDrawCreate(10.0, 380.0, "San Fierro");
  159. ClassSel_InitCityNameText(txtSanFierro);
  160. txtLasVenturas = TextDrawCreate(10.0, 380.0, "Las Venturas");
  161. ClassSel_InitCityNameText(txtLasVenturas);
  162. // Init our observer helper text display
  163. txtClassSelHelper = TextDrawCreate(10.0, 415.0,
  164. " Press ~b~~k~~GO_LEFT~ ~w~or ~b~~k~~GO_RIGHT~ ~w~to switch cities.~n~ Press ~r~~k~~PED_FIREWEAPON~ ~w~to select.");
  165. TextDrawUseBox(txtClassSelHelper, 1);
  166. TextDrawBoxColor(txtClassSelHelper,0x222222BB);
  167. TextDrawLetterSize(txtClassSelHelper,0.3,1.0);
  168. TextDrawTextSize(txtClassSelHelper,400.0,40.0);
  169. TextDrawFont(txtClassSelHelper, 2);
  170. TextDrawSetShadow(txtClassSelHelper,0);
  171. TextDrawSetOutline(txtClassSelHelper,1);
  172. TextDrawBackgroundColor(txtClassSelHelper,0x000000FF);
  173. TextDrawColor(txtClassSelHelper,0xFFFFFFFF);
  174. }
  175. //----------------------------------------------------------
  176. ClassSel_SetupSelectedCity(playerid)
  177. {
  178. if(gPlayerCitySelection[playerid] == -1) {
  179. gPlayerCitySelection[playerid] = CITY_LOS_SANTOS;
  180. }
  181. if(gPlayerCitySelection[playerid] == CITY_LOS_SANTOS) {
  182. SetPlayerInterior(playerid,0);
  183. SetPlayerCameraPos(playerid,1630.6136,-2286.0298,110.0);
  184. SetPlayerCameraLookAt(playerid,1887.6034,-1682.1442,47.6167);
  185. TextDrawShowForPlayer(playerid,txtLosSantos);
  186. TextDrawHideForPlayer(playerid,txtSanFierro);
  187. TextDrawHideForPlayer(playerid,txtLasVenturas);
  188. }
  189. else if(gPlayerCitySelection[playerid] == CITY_SAN_FIERRO) {
  190. SetPlayerInterior(playerid,0);
  191. SetPlayerCameraPos(playerid,-1300.8754,68.0546,129.4823);
  192. SetPlayerCameraLookAt(playerid,-1817.9412,769.3878,132.6589);
  193. TextDrawHideForPlayer(playerid,txtLosSantos);
  194. TextDrawShowForPlayer(playerid,txtSanFierro);
  195. TextDrawHideForPlayer(playerid,txtLasVenturas);
  196. }
  197. else if(gPlayerCitySelection[playerid] == CITY_LAS_VENTURAS) {
  198. SetPlayerInterior(playerid,0);
  199. SetPlayerCameraPos(playerid,1310.6155,1675.9182,110.7390);
  200. SetPlayerCameraLookAt(playerid,2285.2944,1919.3756,68.2275);
  201. TextDrawHideForPlayer(playerid,txtLosSantos);
  202. TextDrawHideForPlayer(playerid,txtSanFierro);
  203. TextDrawShowForPlayer(playerid,txtLasVenturas);
  204. }
  205. }
  206. //----------------------------------------------------------
  207. ClassSel_SwitchToNextCity(playerid)
  208. {
  209. gPlayerCitySelection[playerid]++;
  210. if(gPlayerCitySelection[playerid] > CITY_LAS_VENTURAS) {
  211. gPlayerCitySelection[playerid] = CITY_LOS_SANTOS;
  212. }
  213. PlayerPlaySound(playerid,1052,0.0,0.0,0.0);
  214. gPlayerLastCitySelectionTick[playerid] = GetTickCount();
  215. ClassSel_SetupSelectedCity(playerid);
  216. }
  217. //----------------------------------------------------------
  218. ClassSel_SwitchToPreviousCity(playerid)
  219. {
  220. gPlayerCitySelection[playerid]--;
  221. if(gPlayerCitySelection[playerid] < CITY_LOS_SANTOS) {
  222. gPlayerCitySelection[playerid] = CITY_LAS_VENTURAS;
  223. }
  224. PlayerPlaySound(playerid,1053,0.0,0.0,0.0);
  225. gPlayerLastCitySelectionTick[playerid] = GetTickCount();
  226. ClassSel_SetupSelectedCity(playerid);
  227. }
  228. //----------------------------------------------------------
  229. ClassSel_HandleCitySelection(playerid)
  230. {
  231. new Keys,ud,lr;
  232. GetPlayerKeys(playerid,Keys,ud,lr);
  233. if(gPlayerCitySelection[playerid] == -1) {
  234. ClassSel_SwitchToNextCity(playerid);
  235. return;
  236. }
  237. // only allow new selection every ~500 ms
  238. if( (GetTickCount() - gPlayerLastCitySelectionTick[playerid]) < 500 ) return;
  239. if(Keys & KEY_FIRE) {
  240. gPlayerHasCitySelected[playerid] = 1;
  241. TextDrawHideForPlayer(playerid,txtClassSelHelper);
  242. TextDrawHideForPlayer(playerid,txtLosSantos);
  243. TextDrawHideForPlayer(playerid,txtSanFierro);
  244. TextDrawHideForPlayer(playerid,txtLasVenturas);
  245. TogglePlayerSpectating(playerid,0);
  246. return;
  247. }
  248. if(lr > 0) {
  249. ClassSel_SwitchToNextCity(playerid);
  250. }
  251. else if(lr < 0) {
  252. ClassSel_SwitchToPreviousCity(playerid);
  253. }
  254. }
  255. //----------------------------------------------------------
  256. public OnPlayerRequestClass(playerid, classid)
  257. {
  258. if(IsPlayerNPC(playerid)) return 1;
  259. if(gPlayerHasCitySelected[playerid]) {
  260. ClassSel_SetupCharSelection(playerid);
  261. return 1;
  262. } else {
  263. if(GetPlayerState(playerid) != PLAYER_STATE_SPECTATING) {
  264. TogglePlayerSpectating(playerid,1);
  265. TextDrawShowForPlayer(playerid, txtClassSelHelper);
  266. gPlayerCitySelection[playerid] = -1;
  267. }
  268. }
  269. return 0;
  270. }
  271. //----------------------------------------------------------
  272. public OnGameModeInit()
  273. {
  274. SetGameModeText("Grand Larceny");
  275. ShowPlayerMarkers(PLAYER_MARKERS_MODE_GLOBAL);
  276. ShowNameTags(1);
  277. SetNameTagDrawDistance(40.0);
  278. EnableStuntBonusForAll(0);
  279. DisableInteriorEnterExits();
  280. SetWeather(2);
  281. //LimitGlobalChatRadius(300.0);
  282. ClassSel_InitTextDraws();
  283. // Player Class
  284. AddPlayerClass(1,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  285. AddPlayerClass(2,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  286. AddPlayerClass(269,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  287. AddPlayerClass(270,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  288. AddPlayerClass(271,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  289. AddPlayerClass(272,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  290. AddPlayerClass(47,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  291. AddPlayerClass(48,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  292. AddPlayerClass(49,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  293. AddPlayerClass(50,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  294. AddPlayerClass(51,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  295. AddPlayerClass(52,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  296. AddPlayerClass(53,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  297. AddPlayerClass(54,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  298. AddPlayerClass(55,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  299. AddPlayerClass(56,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  300. AddPlayerClass(57,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  301. AddPlayerClass(58,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  302. AddPlayerClass(68,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  303. AddPlayerClass(69,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  304. AddPlayerClass(70,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  305. AddPlayerClass(71,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  306. AddPlayerClass(72,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  307. AddPlayerClass(73,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  308. AddPlayerClass(75,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  309. AddPlayerClass(76,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  310. AddPlayerClass(78,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  311. AddPlayerClass(79,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  312. AddPlayerClass(80,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  313. AddPlayerClass(81,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  314. AddPlayerClass(82,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  315. AddPlayerClass(83,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  316. AddPlayerClass(84,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  317. AddPlayerClass(85,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  318. AddPlayerClass(87,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  319. AddPlayerClass(88,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  320. AddPlayerClass(89,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  321. AddPlayerClass(91,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  322. AddPlayerClass(92,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  323. AddPlayerClass(93,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  324. AddPlayerClass(95,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  325. AddPlayerClass(96,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  326. AddPlayerClass(97,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  327. AddPlayerClass(98,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  328. AddPlayerClass(99,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  329. // SPECIAL
  330. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/trains.txt");
  331. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/pilots.txt");
  332. // LAS VENTURAS
  333. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_law.txt");
  334. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_airport.txt");
  335. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_gen.txt");
  336. // SAN FIERRO
  337. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_law.txt");
  338. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_airport.txt");
  339. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_gen.txt");
  340. // LOS SANTOS
  341. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_law.txt");
  342. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_airport.txt");
  343. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_gen_inner.txt");
  344. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_gen_outer.txt");
  345. // OTHER AREAS
  346. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/whetstone.txt");
  347. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/bone.txt");
  348. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/flint.txt");
  349. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/tierra.txt");
  350. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/red_county.txt");
  351. printf("Total vehicles from files: %d",total_vehicles_from_files);
  352. return 1;
  353. }
  354. //----------------------------------------------------------
  355. public OnPlayerUpdate(playerid)
  356. {
  357. if(!IsPlayerConnected(playerid)) return 0;
  358. // changing cities by inputs
  359. if( !gPlayerHasCitySelected[playerid] &&
  360. GetPlayerState(playerid) == PLAYER_STATE_SPECTATING ) {
  361. ClassSel_HandleCitySelection(playerid);
  362. return 1;
  363. }
  364. // No weapons in interiors
  365. if(GetPlayerInterior(playerid) != 0 && GetPlayerWeapon(playerid) != 0) {
  366. SetPlayerArmedWeapon(playerid,0); // fists
  367. return 0; // no syncing until they change their weapon
  368. }
  369. // Don't allow minigun
  370. if(GetPlayerWeapon(playerid) == WEAPON_MINIGUN) {
  371. Kick(playerid);
  372. return 0;
  373. }
  374. // No jetpacks allowed
  375. if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK) {
  376. Kick(playerid);
  377. return 0;
  378. }
  379. return 1;
  380. }
  381. //----------------------------------------------------------