Black_White

GTA SA AMUNAT Source by Black & White

Feb 6th, 2019
651
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 63.66 KB | None | 0 0
  1. //-------------External script 60 (AMMU)---------------
  2. // Author: Black & White
  3.  
  4. :AMUNAT
  5. CONST
  6. // To execute at the beginning main.scm
  7. WEAPON_SKILL_POOR = 0
  8. WEAPON_SKILL_STD = 1
  9. WEAPON_SKILL_PRO = 2
  10. WEAPON_SKILL_COP = 3
  11.  
  12. // eWeaponType
  13. WEAPON_NONE = -1
  14. WEAPON_UNARMED = 0
  15. WEAPON_BRASSKNUCKLE = 1
  16. WEAPON_GOLFCLUB = 2
  17. WEAPON_NIGHTSTICK = 3
  18. WEAPON_KNIFE = 4
  19. WEAPON_BASEBALLBAT = 5
  20. WEAPON_SHOVEL = 6
  21. WEAPON_POOLCUE = 7
  22. WEAPON_KATANA = 8
  23. WEAPON_CHAINSAW = 9
  24. WEAPON_DILDO1 = 10
  25. WEAPON_DILDO2 = 11
  26. WEAPON_VIBE1 = 12
  27. WEAPON_VIBE2 = 13
  28. WEAPON_FLOWERS = 14
  29. WEAPON_CANE = 15
  30. WEAPON_GRENADE = 16
  31. WEAPON_TEARGAS = 17
  32. WEAPON_MOLOTOV = 18
  33. WEAPON_ROCKET = 19
  34. WEAPON_ROCKET_HS = 20
  35. WEAPON_FREEFALL_BOMB = 21
  36. WEAPON_PISTOL = 22
  37. WEAPON_PISTOL_SILENCED = 23
  38. WEAPON_DESERT_EAGLE = 24
  39. WEAPON_SHOTGUN = 25
  40. WEAPON_SAWNOFF = 26
  41. WEAPON_SPAS12 = 27
  42. WEAPON_MICRO_UZI = 28
  43. WEAPON_MP5 = 29
  44. WEAPON_AK47 = 30
  45. WEAPON_M4 = 31
  46. WEAPON_SPARROW_GUN = 31
  47. WEAPON_SEASPARROW_GUN = 31
  48. WEAPON_TEC9 = 32
  49. WEAPON_COUNTRYRIFLE = 33
  50. WEAPON_SNIPERRIFLE = 34
  51. WEAPON_RLAUNCHER = 35
  52. WEAPON_RLAUNCHER_HS = 36
  53. WEAPON_FTHROWER = 37
  54. WEAPON_FIRE = 37
  55. WEAPON_MINIGUN = 38
  56. WEAPON_HUNTER_GUN = 38
  57. WEAPON_SATCHEL_CHARGE = 39
  58. WEAPON_DETONATOR = 40
  59. WEAPON_SPRAYCAN = 41
  60. WEAPON_EXTINGUISHER = 42
  61. WEAPON_CAMERA = 43
  62. WEAPON_NIGHTVISION = 44
  63. WEAPON_INFRARED = 45
  64. WEAPON_PARACHUTE = 46
  65. WEAPON_LAST_TYPE = 47
  66. WEAPON_ARMOUR = 48
  67. WEAPON_VEHICLE = 49
  68. WEAPON_HELI_BLADES = 50
  69. WEAPON_EXPLOSION = 51
  70. WEAPON_COP_HELI_GUN = 52
  71. WEAPON_DROWN = 53
  72. WEAPON_FALL = 54
  73. WEAPON_SAVED_NONE = 55
  74. WEAPON_MELEE = 56
  75. WEAPON_ANY = 57
  76. WEAPON_FLARE = 58
  77.  
  78. PANEL_ROW_UNLOCK = 0
  79. PANEL_ROW_LOCK = 1
  80. PANEL_ROW_BOUGHT = 2
  81.  
  82. ALIGN_CENTRE = 0
  83. ALIGN_LEFT = 1
  84. ALIGN_RIGHT = 2
  85.  
  86. LANGUAGE_AMERICAN = 0
  87. LANGUAGE_FRENCH = 1
  88. LANGUAGE_GERMAN = 2
  89. LANGUAGE_ITALIAN = 3
  90. LANGUAGE_SPANISH = 4
  91.  
  92. NULL = 0
  93. END
  94. VAR
  95. // To execute at the beginning main.scm
  96. $PLAYER_CHAR : Player
  97. $PLAYER_ACTOR : Actor
  98. $Shops_Player_Cash : Int
  99. $X_Buy_Marker : Float
  100. $Y_Buy_Marker : Float
  101. $Z_Buy_Marker : Float
  102. $2426 : array 12 of Integer
  103. $2438 : array 12 of Integer
  104. $2450 : array 12 of String
  105. $2755 : Float
  106. $2756 : Float
  107. $2757 : Float
  108. END
  109.  
  110. VAR
  111. $AMMU_Seller : Actor
  112. $Seller_Model : Model
  113. $9543 : Object
  114. $9585 : Float = 0.0
  115. $9586 : Float = 0.0
  116. $9587 : Float = 0.0
  117. $AMMU_X_Offset : Float = 0.0
  118. $AMMU_Y_Offset : Float = 0.0
  119. $AMMU_Z_Offset : Float = 0.0
  120. $X_Camera : Float = 0.0
  121. $Y_Camera : Float = 0.0
  122. $Z_Camera : Float = 0.0
  123. $AMMU_X_Aim_Camera : Float = 0.0
  124. $AMMU_Y_Aim_Camera : Float = 0.0
  125. $AMMU_Z_Aim_Camera : Float = 0.0
  126. $AMMU_Seller_Animation_Time : Float = 0.0
  127. $AMMU_Seller_Angle : Float = 0.0
  128. $AMMU_X_Seller : Float = 0.0
  129. $AMMU_Y_Seller : Float = 0.0
  130. $AMMU_Z_Seller : Float = 0.0
  131. $flag_AMMU_Seller_Attack_Player : Int = False
  132. $AMMU_Available_Weapons : Int
  133. $AMMU_Selected_Weapon_Weapon_Group : Int
  134. $AMMU_Stage : Int = 0
  135. $AMMU_Selected_Weapon : Int
  136. $AMMU_Weapon_Cost : Int
  137.  
  138. $9575 : Float = 0.0
  139. $9576 : Float = 0.0
  140. $9577 : Float = 0.0
  141. $9572 : Int = 0
  142. $9573 : Int = 0
  143. $9574 : Int = 0
  144. $9578 : Int
  145. $2418 : Int = False
  146. $2422 : Int = False
  147. $2545 : Int = False
  148. $2544 : Int = False
  149. $9595 : Int = 0
  150. $9594 : Int = 0
  151. $9596 : Int = False
  152. $9616 : Int = 0
  153. $9597 : Int = 0
  154. $2515 : Int = 0
  155. $9598 : Int = 0
  156. $9599 : Int = 0
  157. $9600 : Int = 0
  158. $9601 : Int = 0
  159. $9602 : Int = 0
  160. $9603 : Int = 0
  161. $9604 : Int = 0
  162. $9605 : Int = 0
  163. $9606 : Int = 0
  164. $9607 : Int = False
  165. $9608 : Int = False
  166. $9609 : Int = False
  167. $9610 : Int = False
  168. $9611 : Int = False
  169. $9612 : Int = False
  170. $9613 : Int = False
  171. $9614 : Int = False
  172. $9615 : Int = False
  173. $9617 : array 3 of Integer // Pistols array
  174. $9620 : array 3 of Integer // Shotguns array
  175. $9623 : array 2 of Integer // Micro SMGs array
  176. $9625 : array 1 of Integer // SMGs array
  177. $9626 : array 2 of Integer // Assaults array
  178. $9628 : array 2 of Integer // Rifles array
  179. $9630 : array 2 of Integer // Throwns array
  180. $9632 : array 1 of Integer // Armours array
  181. $9633 : array 3 of Integer // Selected category array
  182. $9636 : Int = 0
  183. $9637 : Int = 0
  184. $9638 : Int = 0
  185. END
  186.  
  187. $Seller_Model = #WMYAMMO
  188. $Seller_Model.Load()
  189. #COLT45.Load()
  190. #TEC9.Load()
  191. #MICRO_UZI.Load()
  192. #CHROMEGUN.Load()
  193. #GRENADE.Load()
  194. #ARMOUR.Load()
  195. #MP5LNG.Load()
  196. #SAWNOFF.Load()
  197. #SILENCED.Load()
  198. #SATCHEL.Load()
  199. #BOMB.Load()
  200. #CUNTGUN.Load()
  201. #SNIPER.Load()
  202. #AK47.Load()
  203. #M4.Load()
  204. #DESERT_EAGLE.Load()
  205. #SHOTGSPA.Load()
  206. 038B: load_requested_models
  207. set_wb_check_to 0
  208. thread 'AMUNAT'
  209.  
  210. WHILE TRUE
  211. wait 0
  212. IF $PLAYER_CHAR.Defined()
  213. THEN
  214. IF 8844: NOT string s$Current_Shop_GXT_Name empty
  215. THEN
  216. IF $AMMU_Stage > 0
  217. THEN
  218. IF 0A0F: new_language_set
  219. THEN
  220. 03E6: remove_text_box
  221. 08DA: remove_panel $2419
  222. 08DA: remove_panel $2423
  223. 08DA: remove_panel $2421
  224. 08DA: remove_panel $2417
  225. $2420 = False
  226. $2424 = False
  227. $2418 = False
  228. $2422 = False
  229. 09FB: $Current_Language = current_language
  230. END
  231. END
  232.  
  233. IF $AMMU_Stage == 0
  234. THEN
  235. IF s$Current_Shop_GXT_Name == 'AMMUN1'
  236. THEN
  237. $AMMU_X_Offset = 0.0
  238. $AMMU_Y_Offset = 0.0
  239. $AMMU_Z_Offset = 0.0
  240. $AMMU_Player_Angle = 180.0
  241. $AMMU_Seller_Angle = 0.0
  242. $Show_Shop_Sphere = True
  243. s$AMMU_Interior_Name = s$Current_Shop_GXT_Name
  244. $9584 = 0
  245. $AMMU_Stage = 1
  246. END
  247. IF s$Current_Shop_GXT_Name == 'AMMUN2'
  248. THEN
  249. $AMMU_X_Offset = -0.765
  250. $AMMU_Y_Offset = -42.311
  251. $AMMU_Z_Offset = -0.013
  252. $AMMU_Player_Angle = 180.0
  253. $AMMU_Seller_Angle = 0.0
  254. $Show_Shop_Sphere = True
  255. s$AMMU_Interior_Name = s$Current_Shop_GXT_Name
  256. $9584 = 0
  257. $AMMU_Stage = 1
  258. END
  259. IF s$Current_Shop_GXT_Name == 'AMMUN3'
  260. THEN
  261. $AMMU_X_Offset = -6.264
  262. $AMMU_Y_Offset = -71.34
  263. $AMMU_Z_Offset = -0.002
  264. $AMMU_Player_Angle = 180.0
  265. $AMMU_Seller_Angle = 0.0
  266. $Show_Shop_Sphere = True
  267. s$AMMU_Interior_Name = s$Current_Shop_GXT_Name
  268. $9584 = 0
  269. $AMMU_Stage = 1
  270. END
  271. IF s$Current_Shop_GXT_Name == 'AMMUN4'
  272. THEN
  273. $AMMU_X_Offset = 11.642
  274. $AMMU_Y_Offset = -102.936
  275. $AMMU_Z_Offset = -1.929
  276. $AMMU_Player_Angle = 180.0
  277. $AMMU_Seller_Angle = 0.0
  278. $Show_Shop_Sphere = True
  279. s$AMMU_Interior_Name = s$Current_Shop_GXT_Name
  280. $AMMU_Stage = 1
  281. END
  282. IF s$Current_Shop_GXT_Name == 'AMMUN5'
  283. THEN
  284. $AMMU_X_Offset = 16.285
  285. $AMMU_Y_Offset = -127.781
  286. $AMMU_Z_Offset = -1.929
  287. $AMMU_Player_Angle = 180.0
  288. $AMMU_Seller_Angle = 0.0
  289. $Show_Shop_Sphere = True
  290. s$AMMU_Interior_Name = s$Current_Shop_GXT_Name
  291. $AMMU_Stage = 1
  292. END
  293. END
  294.  
  295. IF $AMMU_Stage == 1
  296. THEN
  297. 03F0: enable_text_draw True
  298. 08F8: display_stat_update_box False
  299. $X_Buy_Marker = 296.506
  300. $X_Buy_Marker += $AMMU_X_Offset
  301. $Y_Buy_Marker = -38.168
  302. $Y_Buy_Marker += $AMMU_Y_Offset
  303. $Z_Buy_Marker = 1000.547
  304. $Z_Buy_Marker += $AMMU_Z_Offset
  305. $AMMU_X_Seller = 296.506
  306. $AMMU_X_Seller += $AMMU_X_Offset
  307. $AMMU_Y_Seller = -40.35
  308. $AMMU_Y_Seller += $AMMU_Y_Offset
  309. $AMMU_Z_Seller = 1000.54
  310. $AMMU_Z_Seller += $AMMU_Z_Offset
  311. $X_Camera = 296.585
  312. $X_Camera += $AMMU_X_Offset
  313. $Y_Camera = -38.345
  314. $Y_Camera += $AMMU_Y_Offset
  315. $Z_Camera = 1002.236
  316. $Z_Camera += $AMMU_Z_Offset
  317. $AMMU_X_Aim_Camera = 296.501
  318. $AMMU_X_Aim_Camera += $AMMU_X_Offset
  319. $AMMU_Y_Aim_Camera = -39.298
  320. $AMMU_Y_Aim_Camera += $AMMU_Y_Offset
  321. $AMMU_Z_Aim_Camera = 1001.943
  322. $AMMU_Z_Aim_Camera += $AMMU_Z_Offset
  323. $AMMU_Seller.Create(CivMale, $Seller_Model, $AMMU_X_Seller, $AMMU_Y_Seller, $AMMU_Z_Seller)
  324. $AMMU_Seller.Angle = $AMMU_Seller_Angle
  325. 02A9: set_actor $AMMU_Seller immune_to_nonplayer 1
  326. 060B: set_actor $AMMU_Seller decision_maker_to 65542
  327. IF $Casino_Total_Passed_Missions > 2
  328. THEN
  329. 075F: store_shopping_data_entries_number_to $AMMU_Available_Weapons
  330. IF $2574 == False
  331. THEN
  332. 03E5: show_text_box 'NEWWEAP'
  333. $2574 = True
  334. END
  335. ELSE
  336. IF $Toreno_Total_Passed_Missions > 7
  337. THEN
  338. $AMMU_Available_Weapons = 15
  339. IF $2573 == False
  340. THEN
  341. 03E5: show_text_box 'NEWWEAP'
  342. $2573 = True
  343. END
  344. ELSE
  345. IF $Syndicate_Total_Passed_Missions > 9
  346. THEN
  347. $AMMU_Available_Weapons = 14
  348. IF $2572 == False
  349. THEN
  350. 03E5: show_text_box 'NEWWEAP'
  351. $2572 = True
  352. END
  353. ELSE
  354. IF $Wuzimu_Total_Passed_Missions > 0
  355. THEN
  356. $AMMU_Available_Weapons = 13
  357. IF $2571 == False
  358. THEN
  359. 03E5: show_text_box 'NEWWEAP'
  360. $2571 = True
  361. END
  362. ELSE
  363. IF $Syndicate_Total_Passed_Missions > 7
  364. THEN
  365. $AMMU_Available_Weapons = 12
  366. IF $2570 == False
  367. THEN
  368. 03E5: show_text_box 'NEWWEAP'
  369. $2570 = True
  370. END
  371. ELSE
  372. IF $Truth_Total_Passed_Missions > 0
  373. THEN
  374. $AMMU_Available_Weapons = 11
  375. IF $2569 == False
  376. THEN
  377. 03E5: show_text_box 'NEWWEAP'
  378. $2569 = True
  379. END
  380. ELSE
  381. IF $All_Catalina_missions_passed == 1
  382. THEN
  383. $AMMU_Available_Weapons = 10
  384. IF $2568 == False
  385. THEN
  386. 03E5: show_text_box 'NEWWEAP'
  387. $2568 = True
  388. END
  389. ELSE
  390. IF $OG_Loc_Total_Passed_Missions > 4
  391. THEN
  392. $AMMU_Available_Weapons = 9
  393. IF $2567 == False
  394. THEN
  395. 03E5: show_text_box 'NEWWEAP'
  396. $2567 = True
  397. END
  398. ELSE
  399. IF $Smoke_Total_Passed_Missions > 3
  400. THEN
  401. $AMMU_Available_Weapons = 8
  402. IF $2566 == False
  403. THEN
  404. 03E5: show_text_box 'NEWWEAP'
  405. $2566 = True
  406. END
  407. ELSE
  408. IF $Ryder_Total_Passed_Missions > 2
  409. THEN
  410. $AMMU_Available_Weapons = 7
  411. IF $2565 == False
  412. THEN
  413. 03E5: show_text_box 'NEWWEAP'
  414. $2565 = True
  415. END
  416. ELSE
  417. IF 2 > $LS_FINAL_Total_Passed_Missions
  418. THEN
  419. $AMMU_Available_Weapons = 6
  420. IF $2564 == False
  421. THEN
  422. 03E5: show_text_box 'NEWWEAP'
  423. $2564 = True
  424. END
  425. END
  426. END
  427. END
  428. END
  429. END
  430. END
  431. END
  432. END
  433. END
  434. END
  435. END
  436. $AMMU_Stage = 2
  437. END
  438.  
  439. IF $AMMU_Stage == 2
  440. THEN
  441. 07B0: get_active_shop_name_to s$Current_Shop_GXT_Name
  442. IF s$Current_Shop_GXT_Name <> s$AMMU_Interior_Name
  443. THEN
  444. gosub @AMUNAT_END_THREAD
  445. END
  446. IF NOT $AMMU_Seller.Dead()
  447. THEN
  448. IF $flag_AMMU_Seller_Attack_Player == False
  449. THEN
  450. IF $9584 == 0
  451. THEN
  452. 0812: AS_actor $AMMU_Seller perform_animation "SHP_TRAY_POSE" IFP "WEAPONS" framedelta 1000.0 loopA 1 lockX 0 lockY 0 lockF 0 time -1 // versionB
  453. $AMMU_Seller_Animation_Time = 0.0
  454. $9584 = 1
  455. END
  456. IF $ONMISSION_Shooting == False
  457. THEN
  458. IF OR
  459. 02E0: actor $PLAYER_ACTOR firing_weapon
  460. 0457: player $PLAYER_CHAR aiming_at_actor $AMMU_Seller
  461. 031D: actor $AMMU_Seller hit_by_weapon WEAPON_ANY
  462. THEN
  463. 09D5: play_sound_of_actor $AMMU_Seller soundslot 327 unknown_flags 0 0 1 as $10081 // extended 0947
  464. 05BA: AS_actor $AMMU_Seller move_mouth 5 ms
  465. 081A: set_actor $AMMU_Seller weapon_skill_to WEAPON_SKILL_PRO
  466. $AMMU_Seller.GiveWeaponAndAmmo(WEAPON_PISTOL, 30000)
  467. $AMMU_Seller.WeaponAccuracy = 80
  468. 0638: AS_actor $AMMU_Seller stay_put True
  469. 05E2: AS_actor $AMMU_Seller kill_actor $PLAYER_ACTOR
  470. $Show_Shop_Sphere = False
  471. $flag_AMMU_Seller_Attack_Player = True
  472. ELSE
  473. $Show_Shop_Sphere = True
  474. IF 0102: actor $PLAYER_ACTOR in_sphere $X_Buy_Marker $Y_Buy_Marker $Z_Buy_Marker radius 1.0 1.0 4.0 sphere $Show_Shop_Sphere stopped_on_foot
  475. THEN
  476. IF $PLAYER_CHAR.Controllable()
  477. THEN
  478. $9584 = 0
  479. $AMMU_Stage = 3
  480. END
  481. END
  482. END
  483. ELSE
  484. IF OR
  485. 0457: player $PLAYER_CHAR aiming_at_actor $AMMU_Seller
  486. 031D: actor $AMMU_Seller hit_by_weapon WEAPON_ANY
  487. THEN
  488. 09D5: play_sound_of_actor $AMMU_Seller soundslot 327 unknown_flags 0 0 1 as $10081 // extended 0947
  489. 05BA: AS_actor $AMMU_Seller move_mouth 5 ms
  490. 081A: set_actor $AMMU_Seller weapon_skill_to WEAPON_SKILL_PRO
  491. $AMMU_Seller.GiveWeaponAndAmmo(WEAPON_PISTOL, 30000)
  492. $AMMU_Seller.WeaponAccuracy = 80
  493. 0638: AS_actor $AMMU_Seller stay_put True
  494. 05E2: AS_actor $AMMU_Seller kill_actor $PLAYER_ACTOR
  495. $Show_Shop_Sphere = False
  496. $flag_AMMU_Seller_Attack_Player = True
  497. ELSE
  498. $Show_Shop_Sphere = True
  499. IF 0102: actor $PLAYER_ACTOR in_sphere $X_Buy_Marker $Y_Buy_Marker $Z_Buy_Marker radius 1.0 1.0 4.0 sphere $Show_Shop_Sphere stopped_on_foot
  500. THEN
  501. $9584 = 0
  502. $AMMU_Stage = 3
  503. END
  504. END
  505. END
  506. ELSE
  507. gosub @AMUNAT_CLEAR
  508. 07B0: get_active_shop_name_to s$Current_Shop_GXT_Name
  509. IF s$Current_Shop_GXT_Name <> s$AMMU_Interior_Name
  510. THEN
  511. gosub @AMUNAT_END_THREAD
  512. END
  513. CONTINUE
  514. END
  515. ELSE
  516. gosub @AMUNAT_CLEAR
  517. 07B0: get_active_shop_name_to s$Current_Shop_GXT_Name
  518. IF s$Current_Shop_GXT_Name <> s$AMMU_Interior_Name
  519. THEN
  520. gosub @AMUNAT_END_THREAD
  521. END
  522. CONTINUE
  523. END
  524. END
  525.  
  526. IF $AMMU_Stage == 3
  527. THEN
  528. $PLAYER_CHAR.CanMove = False
  529. 09BD: allow_other_threads_to_display_text_boxes True
  530. 01B9: set_actor $PLAYER_ACTOR armed_weapon_to 0
  531. 0792: disembark_instantly_actor $PLAYER_ACTOR
  532. 0395: clear_area 1 at $tempvar_X_coord $tempvar_Y_coord $tempvar_Z_coord radius 1.0
  533. 03D5: remove_text 'SHOPNO'
  534. 32@ = 0
  535. $AMMU_Stage = 4
  536. END
  537.  
  538. IF $AMMU_Stage == 4
  539. THEN
  540. IF $AMMU_Seller.Dead()
  541. THEN
  542. gosub @AMUNAT_CLEAR
  543. 07B0: get_active_shop_name_to s$Current_Shop_GXT_Name
  544. IF s$Current_Shop_GXT_Name <> s$AMMU_Interior_Name
  545. THEN
  546. gosub @AMUNAT_END_THREAD
  547. END
  548. CONTINUE
  549. END
  550. IF $9584 == 0
  551. THEN
  552. IF 32@ >= 300
  553. THEN
  554. 08C7: put_actor $PLAYER_ACTOR at $X_Buy_Marker $Y_Buy_Marker $Z_Buy_Marker dont_warp_gang
  555. $PLAYER_ACTOR.Angle = $AMMU_Player_Angle
  556. $AMMU_Seller.StorePos($2755, $2756, $2757)
  557. IF OR
  558. $2755 <> $AMMU_X_Seller
  559. $2756 <> $AMMU_Y_Seller
  560. $2757 <> $AMMU_Z_Seller
  561. THEN
  562. $AMMU_Seller.PutAt($AMMU_X_Seller, $AMMU_Y_Seller, $AMMU_Z_Seller)
  563. $AMMU_Seller.Angle = $AMMU_Seller_Angle
  564. END
  565. Camera.SetPosition($X_Camera, $Y_Camera, $Z_Camera, 0.0, 0.0, 0.0)
  566. Camera.PointAt($AMMU_X_Aim_Camera, $AMMU_Y_Aim_Camera, $AMMU_Z_Aim_Camera, 2)
  567. 09D5: play_sound_of_actor $AMMU_Seller soundslot 333 unknown_flags 0 0 1 as $10081 // extended 0947
  568. IF $2576 == 1
  569. THEN
  570. $2575 = 1
  571. END
  572. IF $PLAYER_CHAR.Defined()
  573. THEN
  574. $PLAYER_ACTOR.StorePos($tempvar_X_coord, $tempvar_Y_coord, $tempvar_Z_coord)
  575. ELSE
  576. gosub @AMUNAT_END_THREAD
  577. CONTINUE
  578. END
  579. 0581: enable_radar False
  580. $AMMU_Stage = 5
  581. $9584 = 0
  582. END
  583. END
  584. END
  585.  
  586. IF $AMMU_Stage == 5
  587. THEN
  588. IF $AMMU_Seller.Dead()
  589. THEN
  590. gosub @AMUNAT_CLEAR
  591. 07B0: get_active_shop_name_to s$Current_Shop_GXT_Name
  592. IF s$Current_Shop_GXT_Name <> s$AMMU_Interior_Name
  593. THEN
  594. gosub @AMUNAT_END_THREAD
  595. END
  596. CONTINUE
  597. END
  598. IF 1 > $9584
  599. THEN
  600. IF $2420 == False
  601. THEN
  602. gosub @AMUNAT_SWITCH_CATEGORY
  603. gosub @AMUNAT_PANEL_CATEGORY
  604. END
  605. END
  606. IF $9584 == 0
  607. THEN
  608. IF 00E1: player 0 pressed_key 16
  609. THEN
  610. $9584 = 3
  611. END
  612. IF 00E1: player 0 pressed_key 15
  613. THEN
  614. $9584 = 1
  615. END
  616. END
  617. IF $9584 == 1
  618. THEN
  619. IF 80E1: NOT player 0 pressed_key 15
  620. THEN
  621. IF $2420 == True
  622. THEN
  623. 03E6: remove_text_box
  624. 08DA: remove_panel $2419
  625. $2420 = False
  626. END
  627. IF $2424 == True
  628. THEN
  629. 03E6: remove_text_box
  630. 08DA: remove_panel $2423
  631. $2424 = False
  632. END
  633. IF $2418 == True
  634. THEN
  635. 03E6: remove_text_box
  636. 08DA: remove_panel $2417
  637. $2418 = False
  638. END
  639. IF $2422 == True
  640. THEN
  641. 08DA: remove_panel $2421
  642. $2422 = False
  643. END
  644. 03D5: remove_text 'AMMUA'
  645. 03D5: remove_text 'SHOPNO'
  646. 03D5: remove_text 'AMMUC'
  647. 03D5: remove_text 'AMMUD'
  648. 09D5: play_sound_of_actor $AMMU_Seller soundslot 331 unknown_flags 0 0 1 as $10081 // extended 0947
  649. Camera.Restore_WithJumpCut()
  650. $PLAYER_CHAR.CanMove = True
  651. 09BD: allow_other_threads_to_display_text_boxes False
  652. 0581: enable_radar True
  653. $9584 = 2
  654. END
  655. END
  656. IF $9584 == 2
  657. THEN
  658. IF $flag_AMMU_Seller_Attack_Player == False
  659. THEN
  660. IF OR
  661. 02E0: actor $PLAYER_ACTOR firing_weapon
  662. 0457: player $PLAYER_CHAR aiming_at_actor $AMMU_Seller
  663. 031D: actor $AMMU_Seller hit_by_weapon WEAPON_ANY
  664. THEN
  665. 09D5: play_sound_of_actor $AMMU_Seller soundslot 327 unknown_flags 0 0 1 as $10081 // extended 0947
  666. 05BA: AS_actor $AMMU_Seller move_mouth 5 ms
  667. 081A: set_actor $AMMU_Seller weapon_skill_to WEAPON_SKILL_PRO
  668. $AMMU_Seller.GiveWeaponAndAmmo(WEAPON_PISTOL, 30000)
  669. $AMMU_Seller.WeaponAccuracy = 80
  670. 0638: AS_actor $AMMU_Seller stay_put True
  671. 05E2: AS_actor $AMMU_Seller kill_actor $PLAYER_ACTOR
  672. $flag_AMMU_Seller_Attack_Player = True
  673. END
  674. END
  675. IF 80FF: NOT actor $PLAYER_ACTOR sphere False in_sphere $X_Buy_Marker $Y_Buy_Marker $Z_Buy_Marker radius 1.0 1.0 4.0 on_foot
  676. THEN
  677. $2420 = False
  678. $2424 = False
  679. $9544 = False
  680. $2418 = False
  681. $2422 = False
  682. $AMMU_Stage = 2
  683. $9584 = 0
  684. END
  685. END
  686. IF $9584 == 3
  687. THEN
  688. IF 80E1: NOT player 0 pressed_key 16
  689. THEN
  690. 08D8: $9637 = panel $2419 selected_row
  691. s$9549 = $2450[$9637]
  692. IF 0 > $9637
  693. THEN
  694. $9637 = 0
  695. END
  696. IF $2420 == True
  697. THEN
  698. 03E6: remove_text_box
  699. 08DA: remove_panel $2419
  700. $2420 = False
  701. END
  702. IF $2424 == False
  703. THEN
  704. gosub @AMUNAT_PANEL_WEAPONS
  705. END
  706. $9584 = 0
  707. $AMMU_Stage = 6
  708. END
  709. END
  710. END
  711.  
  712. IF $AMMU_Stage == 6
  713. THEN
  714. IF $AMMU_Seller.Dead()
  715. THEN
  716. gosub @AMUNAT_CLEAR
  717. 07B0: get_active_shop_name_to s$Current_Shop_GXT_Name
  718. IF s$Current_Shop_GXT_Name <> s$AMMU_Interior_Name
  719. THEN
  720. gosub @AMUNAT_END_THREAD
  721. END
  722. CONTINUE
  723. END
  724. IF 1 > $9584
  725. THEN
  726. IF $2424 == False
  727. THEN
  728. gosub @AMUNAT_PANEL_WEAPONS
  729. END
  730. END
  731. IF $9584 == 0
  732. THEN
  733. IF 00E1: player 0 pressed_key 16
  734. THEN
  735. $9584 = 2
  736. END
  737. IF 00E1: player 0 pressed_key 15
  738. THEN
  739. $9584 = 1
  740. END
  741. END
  742. IF $9584 == 1
  743. THEN
  744. IF 80E1: NOT player 0 pressed_key 15
  745. THEN
  746. IF $2424 == True
  747. THEN
  748. 03E6: remove_text_box
  749. 08DA: remove_panel $2423
  750. $2424 = False
  751. END
  752. IF $2420 == False
  753. THEN
  754. gosub @AMUNAT_SWITCH_CATEGORY
  755. gosub @AMUNAT_PANEL_CATEGORY
  756. END
  757. $9584 = 0
  758. $AMMU_Stage = 5
  759. END
  760. END
  761. IF $9584 == 2
  762. THEN
  763. IF 80E1: NOT player 0 pressed_key 16
  764. THEN
  765. 08D8: $9638 = panel $2423 selected_row
  766. IF 0 > $9638
  767. THEN
  768. $9638 = 0
  769. END
  770. $AMMU_Selected_Weapon = $9633[$9638]
  771. 078C: get_shopping_item_with_textureCRC $AMMU_Selected_Weapon nametag_to s$AMMU_Weapon_Name
  772. 0761: get_shopping_item_with_textureCRC $AMMU_Selected_Weapon price_to $AMMU_Weapon_Cost
  773. IF $AMMU_Selected_Weapon <> WEAPON_ARMOUR
  774. THEN
  775. 0782: get_weapon_with_ID $AMMU_Selected_Weapon weapon_group_to $AMMU_Selected_Weapon_Weapon_Group
  776. 0781: get_weapon_with_ID $AMMU_Selected_Weapon model_to $AMMU_Selected_Weapon_Model
  777. ELSE
  778. $AMMU_Selected_Weapon_Model = #ARMOUR
  779. END
  780. IF $2424 == True
  781. THEN
  782. 03E6: remove_text_box
  783. 08DA: remove_panel $2423
  784. $2424 = False
  785. END
  786. 0812: AS_actor $AMMU_Seller perform_animation "SHP_G_LIFT_IN" IFP "WEAPONS" framedelta 1000.0 loopA 0 lockX 0 lockY 0 lockF 1 time -1 // versionB
  787. $AMMU_Seller_Animation_Time = 0.0
  788. IF $AMMU_Seller.Animation == "SHP_G_LIFT_IN"
  789. THEN
  790. 0613: $AMMU_Seller_Animation_Time = actor $AMMU_Seller animation "SHP_G_LIFT_IN" time
  791. END
  792. $9584 = 3
  793. END
  794. END
  795. IF $9584 == 3
  796. THEN
  797. IF $AMMU_Seller.Animation == "SHP_G_LIFT_IN"
  798. THEN
  799. 0613: $AMMU_Seller_Animation_Time = actor $AMMU_Seller animation "SHP_G_LIFT_IN" time
  800. END
  801. IF $AMMU_Seller_Animation_Time == 1.0
  802. THEN
  803. $9584 = 4
  804. END
  805. END
  806. IF $9584 == 4
  807. THEN
  808. $9543.Create($AMMU_Selected_Weapon_Model, $AMMU_X_Seller, $AMMU_Y_Seller, $AMMU_Z_Seller)
  809. gosub @AMUNAT_ANIMATION_GET
  810. gosub @AMUNAT_ANIMATION_PUT
  811. 070A: AS_actor $AMMU_Seller attach_to_object $9543 offset 0.0 0.0 0.0 on_bone 6 16 perform_animation "NULL" IFP_file "NULL" time 0
  812. $9543.KeepInMemory = False
  813. 0812: AS_actor $AMMU_Seller perform_animation v$9554 IFP "WEAPONS" framedelta 1000.0 loopA 0 lockX 0 lockY 0 lockF 1 time -1 // versionB
  814. $AMMU_Seller_Animation_Time = 0.0
  815. IF $AMMU_Seller.Animation == v$9554
  816. THEN
  817. 0613: $AMMU_Seller_Animation_Time = actor $AMMU_Seller animation v$9554 time
  818. END
  819. $9584 = 5
  820. END
  821. IF $9584 == 5
  822. THEN
  823. IF $AMMU_Seller.Animation == v$9554
  824. THEN
  825. 0613: $AMMU_Seller_Animation_Time = actor $AMMU_Seller animation v$9554 time
  826. END
  827. IF $AMMU_Seller_Animation_Time == 1.0
  828. THEN
  829. 070B: set_actor $AMMU_Seller onbone_attached_object_operation 0
  830. 097A: play_audio_at $tempvar_X_coord $tempvar_Y_coord $tempvar_Z_coord event 1131
  831. $9543.PutAt($9585, $9586, $9587)
  832. $9543.KeepInMemory = True
  833. 0812: AS_actor $AMMU_Seller perform_animation v$9558 IFP "WEAPONS" framedelta 1000.0 loopA 0 lockX 0 lockY 0 lockF 1 time -1 // versionB
  834. $AMMU_Seller_Animation_Time = 0.0
  835. IF $AMMU_Seller.Animation == v$9558
  836. THEN
  837. 0613: $AMMU_Seller_Animation_Time = actor $AMMU_Seller animation v$9558 time
  838. END
  839. $9584 = 6
  840. END
  841. END
  842. IF $9584 == 6
  843. THEN
  844. IF $AMMU_Seller.Animation == v$9558
  845. THEN
  846. 0613: $AMMU_Seller_Animation_Time = actor $AMMU_Seller animation v$9558 time
  847. END
  848. IF $AMMU_Seller_Animation_Time == 1.0
  849. THEN
  850. 0812: AS_actor $AMMU_Seller perform_animation "SHP_TRAY_POSE" IFP "WEAPONS" framedelta 1000.0 loopA 1 lockX 0 lockY 0 lockF 0 time -1 // versionB
  851. $AMMU_Seller_Animation_Time = 0.0
  852. IF $2418 == False
  853. THEN
  854. gosub @AMUNAT_PANEL_COST
  855. END
  856. IF $AMMU_Selected_Weapon <> WEAPON_ARMOUR
  857. THEN
  858. $9578 = $AMMU_Selected_Weapon_Weapon_Group
  859. $9578 += 1
  860. 04B8: get_weapon_data_from_actor $PLAYER_ACTOR slot $9578 weapon $9572 ammo $9573 model $9574
  861. IF $9572 <> $AMMU_Selected_Weapon
  862. THEN
  863. IF $9573 > 0
  864. THEN
  865. 00BC: show_text_highpriority GXT 'AMMUA' time 5000 flag 1
  866. END
  867. END
  868. END
  869. $AMMU_Stage = 7
  870. $9584 = 0
  871. END
  872. END
  873. END
  874.  
  875. IF $AMMU_Stage == 7
  876. THEN
  877. IF $AMMU_Seller.Dead()
  878. THEN
  879. gosub @AMUNAT_CLEAR
  880. 07B0: get_active_shop_name_to s$Current_Shop_GXT_Name
  881. IF s$Current_Shop_GXT_Name <> s$AMMU_Interior_Name
  882. THEN
  883. gosub @AMUNAT_END_THREAD
  884. END
  885. CONTINUE
  886. END
  887. IF 1 > $9584
  888. THEN
  889. IF $2418 == False
  890. THEN
  891. gosub @AMUNAT_PANEL_COST
  892. END
  893. END
  894. IF $9584 == 0
  895. THEN
  896. IF 00E1: player 0 pressed_key 16
  897. THEN
  898. $9584 = 5
  899. END
  900. IF 00E1: player 0 pressed_key 15
  901. THEN
  902. $9584 = 1
  903. END
  904. END
  905. IF $9584 == 1
  906. THEN
  907. IF 80E1: NOT player 0 pressed_key 15
  908. THEN
  909. IF $2418 == True
  910. THEN
  911. 03E6: remove_text_box
  912. 08DA: remove_panel $2417
  913. $2418 = False
  914. END
  915. 0812: AS_actor $AMMU_Seller perform_animation v$AMMU_Seller_Animation IFP "WEAPONS" framedelta 1000.0 loopA 0 lockX 0 lockY 0 lockF 1 time -1 // versionB
  916. $AMMU_Seller_Animation_Time = 0.0
  917. IF $AMMU_Seller.Animation == v$AMMU_Seller_Animation
  918. THEN
  919. 0613: $AMMU_Seller_Animation_Time = actor $AMMU_Seller animation v$AMMU_Seller_Animation time
  920. END
  921. $9584 = 2
  922. END
  923. END
  924. IF $9584 == 2
  925. THEN
  926. IF $AMMU_Seller.Animation == v$AMMU_Seller_Animation
  927. THEN
  928. 0613: $AMMU_Seller_Animation_Time = actor $AMMU_Seller animation v$AMMU_Seller_Animation time
  929. END
  930. IF $AMMU_Seller_Animation_Time == 1.0
  931. THEN
  932. 070A: AS_actor $AMMU_Seller attach_to_object $9543 offset 0.0 0.0 0.0 on_bone 6 16 perform_animation "NULL" IFP_file "NULL" time 0
  933. $9543.KeepInMemory = False
  934. 0812: AS_actor $AMMU_Seller perform_animation v$9566 IFP "WEAPONS" framedelta 1000.0 loopA 0 lockX 0 lockY 0 lockF 1 time -1 // versionB
  935. $AMMU_Seller_Animation_Time = 0.0
  936. IF $AMMU_Seller.Animation == v$9566
  937. THEN
  938. 0613: $AMMU_Seller_Animation_Time = actor $AMMU_Seller animation v$9566 time
  939. END
  940. $9584 = 3
  941. END
  942. END
  943. IF $9584 == 3
  944. THEN
  945. IF $AMMU_Seller.Animation == v$9566
  946. THEN
  947. 0613: $AMMU_Seller_Animation_Time = actor $AMMU_Seller animation v$9566 time
  948. END
  949. IF $AMMU_Seller_Animation_Time == 1.0
  950. THEN
  951. 070B: set_actor $AMMU_Seller onbone_attached_object_operation 0
  952. $9543.PutAt($9585, $9586, $9587)
  953. $9543.KeepInMemory = True
  954. gosub @AMUNAT_OBJECT_DESTROY
  955. 0812: AS_actor $AMMU_Seller perform_animation "SHP_G_LIFT_OUT" IFP "WEAPONS" framedelta 1000.0 loopA 0 lockX 0 lockY 0 lockF 1 time -1 // versionB
  956. $AMMU_Seller_Animation_Time = 0.0
  957. IF $AMMU_Seller.Animation == "SHP_G_LIFT_OUT"
  958. THEN
  959. 0613: $AMMU_Seller_Animation_Time = actor $AMMU_Seller animation "SHP_G_LIFT_OUT" time
  960. END
  961. $9584 = 4
  962. END
  963. END
  964. IF $9584 == 4
  965. THEN
  966. IF $AMMU_Seller.Animation == "SHP_G_LIFT_OUT"
  967. THEN
  968. 0613: $AMMU_Seller_Animation_Time = actor $AMMU_Seller animation "SHP_G_LIFT_OUT" time
  969. END
  970. IF $AMMU_Seller_Animation_Time == 1.0
  971. THEN
  972. 0812: AS_actor $AMMU_Seller perform_animation "SHP_TRAY_POSE" IFP "WEAPONS" framedelta 1000.0 loopA 1 lockX 0 lockY 0 lockF 0 time -1 // versionB
  973. $AMMU_Seller_Animation_Time = 0.0
  974. $9584 = 0
  975. $AMMU_Stage = 6
  976. END
  977. END
  978. IF $9584 == 5
  979. THEN
  980. IF 80E1: NOT player 0 pressed_key 16
  981. THEN
  982. 03D5: remove_text 'AMMUA'
  983. 03D5: remove_text 'SHOPNO'
  984. 03D5: remove_text 'AMMUC'
  985. 03D5: remove_text 'AMMUD'
  986. $2544 = False
  987. $9596 = False
  988. $Shops_Player_Cash = $PLAYER_CHAR.Money
  989. IF $Shops_Player_Cash >= $AMMU_Weapon_Cost
  990. THEN
  991. IF $AMMU_Selected_Weapon <> WEAPON_ARMOUR
  992. THEN
  993. 041A: $9573 = actor $PLAYER_ACTOR weapon $AMMU_Selected_Weapon ammo
  994. IF 9999 > $9573
  995. THEN
  996. 0790: charge_money_for_shopping_item_with_textureCRC $AMMU_Selected_Weapon
  997. 09D5: play_sound_of_actor $AMMU_Seller soundslot 323 unknown_flags 0 0 1 as $10081 // extended 0947
  998. 097A: play_audio_at $tempvar_X_coord $tempvar_Y_coord $tempvar_Z_coord event 1052
  999. $9584 = 6
  1000. 33@ = 0
  1001. ELSE
  1002. IF $9596 == False
  1003. THEN
  1004. 097A: play_audio_at $tempvar_X_coord $tempvar_Y_coord $tempvar_Z_coord event 1053
  1005. 00BC: show_text_highpriority GXT 'AMMUC' time 5000 flag 1
  1006. 09D5: play_sound_of_actor $AMMU_Seller soundslot 322 unknown_flags 0 0 1 as $10081 // extended 0947
  1007. $9584 = 0
  1008. $9596 = True
  1009. END
  1010. END
  1011. ELSE
  1012. 04DD: $9594 = actor $PLAYER_ACTOR armour
  1013. 0945: get_player $PLAYER_CHAR max_armour_to $9595
  1014. IF $9595 > $9594
  1015. THEN
  1016. 09D5: play_sound_of_actor $AMMU_Seller soundslot 323 unknown_flags 0 0 1 as $10081 // extended 0947
  1017. 0790: charge_money_for_shopping_item_with_textureCRC $AMMU_Selected_Weapon
  1018. 097A: play_audio_at $tempvar_X_coord $tempvar_Y_coord $tempvar_Z_coord event 1052
  1019. $9584 = 6
  1020. 33@ = 0
  1021. ELSE
  1022. IF $9596 == False
  1023. THEN
  1024. 097A: play_audio_at $tempvar_X_coord $tempvar_Y_coord $tempvar_Z_coord event 1053
  1025. 09D5: play_sound_of_actor $AMMU_Seller soundslot 322 unknown_flags 0 0 1 as $10081 // extended 0947
  1026. 00BC: show_text_highpriority GXT 'AMMUD' time 5000 flag 1
  1027. $9584 = 0
  1028. $9596 = True
  1029. END
  1030. END
  1031. END
  1032. ELSE
  1033. IF $2544 == False
  1034. THEN
  1035. 097A: play_audio_at $tempvar_X_coord $tempvar_Y_coord $tempvar_Z_coord event 1053
  1036. 09D5: play_sound_of_actor $AMMU_Seller soundslot 324 unknown_flags 0 0 1 as $10081 // extended 0947
  1037. 00BC: show_text_highpriority GXT 'SHOPNO' time 5000 flag 1
  1038. $9584 = 0
  1039. $2544 = True
  1040. END
  1041. END
  1042. END
  1043. END
  1044. IF $9584 == 6
  1045. THEN
  1046. IF $2418 == True
  1047. THEN
  1048. 08DA: remove_panel $2417
  1049. 03E6: remove_text_box
  1050. $2418 = False
  1051. END
  1052. IF $2422 == False
  1053. THEN
  1054. 08D4: $2421 = create_panel_with_title 'AMMUN' position 29.0 20.0 width 93.0 columns 2 interactive False background True alignment ALIGN_LEFT
  1055. 08D6: set_panel $2421 column 0 alignment ALIGN_LEFT
  1056. 08DB: set_panel $2421 column 0 header 'WEAPON' data 'BOUGHT' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY'
  1057. 08D6: set_panel $2421 column 1 alignment ALIGN_CENTRE
  1058. 08DB: set_panel $2421 column 1 header 'COST' data 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY'
  1059. 08EE: set_panel $2421 column 1 row 0 text_1number GXT 'DOLLAR' number $AMMU_Weapon_Cost
  1060. 09DB: set_panel $2421 column 0 width 140
  1061. 09DB: set_panel $2421 column 1 width 46
  1062. $2422 = True
  1063. END
  1064. 33@ = 0
  1065. $9584 = 7
  1066. END
  1067. IF $9584 == 7
  1068. THEN
  1069. IF 33@ >= 1000
  1070. THEN
  1071. IF $2422 == True
  1072. THEN
  1073. 08DA: remove_panel $2421
  1074. $2422 = False
  1075. END
  1076. $9584 = 0
  1077. IF 1 > $9584
  1078. THEN
  1079. IF $2418 == False
  1080. THEN
  1081. gosub @AMUNAT_PANEL_COST
  1082. END
  1083. END
  1084. END
  1085. END
  1086. END
  1087. ELSE
  1088. gosub @AMUNAT_END_THREAD
  1089. END
  1090. ELSE
  1091. gosub @AMUNAT_END_THREAD
  1092. END
  1093. END
  1094.  
  1095.  
  1096.  
  1097. :AMUNAT_PANEL_COST
  1098. IF $2418 == False
  1099. THEN
  1100. 0512: show_permanent_text_box 'AMMU_H3'
  1101. IF $Current_Language == LANGUAGE_AMERICAN
  1102. THEN
  1103. 08D4: $2417 = create_panel_with_title 'AMMUN' position 29.0 95.0 width 93.0 columns 2 interactive False background True alignment ALIGN_LEFT
  1104. ELSE
  1105. IF $Current_Language == LANGUAGE_FRENCH
  1106. THEN
  1107. 08D4: $2417 = create_panel_with_title 'AMMUN' position 29.0 95.0 width 93.0 columns 2 interactive False background True alignment ALIGN_LEFT
  1108. ELSE
  1109. IF $Current_Language == LANGUAGE_GERMAN
  1110. THEN
  1111. 08D4: $2417 = create_panel_with_title 'AMMUN' position 29.0 95.0 width 93.0 columns 2 interactive False background True alignment ALIGN_LEFT
  1112. ELSE
  1113. IF $Current_Language == LANGUAGE_ITALIAN
  1114. THEN
  1115. 08D4: $2417 = create_panel_with_title 'AMMUN' position 29.0 95.0 width 93.0 columns 2 interactive False background True alignment ALIGN_LEFT
  1116. ELSE
  1117. IF $Current_Language == LANGUAGE_SPANISH
  1118. THEN
  1119. 08D4: $2417 = create_panel_with_title 'AMMUN' position 29.0 95.0 width 93.0 columns 2 interactive False background True alignment ALIGN_LEFT
  1120. END
  1121. END
  1122. END
  1123. END
  1124. END
  1125. 08D6: set_panel $2417 column 0 alignment ALIGN_LEFT
  1126. 08DB: set_panel $2417 column 0 header 'WEAPON' data s$AMMU_Weapon_Name 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY'
  1127. 08D6: set_panel $2417 column 1 alignment ALIGN_CENTRE
  1128. 08DB: set_panel $2417 column 1 header 'COST' data 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY'
  1129. 08EE: set_panel $2417 column 1 row 0 text_1number GXT 'DOLLAR' number $AMMU_Weapon_Cost
  1130. 09DB: set_panel $2417 column 0 width 140
  1131. 09DB: set_panel $2417 column 1 width 46
  1132. $2418 = True
  1133. END
  1134. RETURN
  1135.  
  1136.  
  1137.  
  1138. :AMUNAT_CLEAR
  1139. IF $2420 == True
  1140. THEN
  1141. 03E6: remove_text_box
  1142. 08DA: remove_panel $2419
  1143. $2420 = False
  1144. END
  1145. IF $2424 == True
  1146. THEN
  1147. 03E6: remove_text_box
  1148. 08DA: remove_panel $2423
  1149. $2424 = False
  1150. END
  1151. IF $2418 == True
  1152. THEN
  1153. 03E6: remove_text_box
  1154. 08DA: remove_panel $2417
  1155. $2418 = False
  1156. END
  1157. IF $2422 == True
  1158. THEN
  1159. 08DA: remove_panel $2421
  1160. $2422 = False
  1161. END
  1162. IF $AMMU_Stage >= 1
  1163. THEN
  1164. 03E6: remove_text_box
  1165. END
  1166. 03D5: remove_text 'AMMUA'
  1167. 03D5: remove_text 'SHOPNO'
  1168. 03D5: remove_text 'AMMUC'
  1169. 03D5: remove_text 'AMMUD'
  1170. $2420 = False
  1171. $2424 = False
  1172. $9544 = False
  1173. $9584 = 0
  1174. $2418 = False
  1175. $2422 = False
  1176. $2545 = False
  1177. $2544 = False
  1178. $9596 = False
  1179. $AMMU_Stage = 2
  1180. RETURN
  1181.  
  1182.  
  1183.  
  1184. :AMUNAT_END_THREAD
  1185. IF $2420 == True
  1186. THEN
  1187. 03E6: remove_text_box
  1188. 08DA: remove_panel $2419
  1189. $2420 = False
  1190. END
  1191. IF $2424 == True
  1192. THEN
  1193. 03E6: remove_text_box
  1194. 08DA: remove_panel $2423
  1195. $2424 = False
  1196. END
  1197. IF $2418 == True
  1198. THEN
  1199. 03E6: remove_text_box
  1200. 08DA: remove_panel $2417
  1201. $2418 = False
  1202. END
  1203. IF $2422 == True
  1204. THEN
  1205. 08DA: remove_panel $2421
  1206. $2422 = False
  1207. END
  1208. IF $AMMU_Stage >= 1
  1209. THEN
  1210. 03E6: remove_text_box
  1211. END
  1212. 03D5: remove_text 'AMMUA'
  1213. 03D5: remove_text 'SHOPNO'
  1214. 03D5: remove_text 'AMMUC'
  1215. 03D5: remove_text 'AMMUD'
  1216. $2420 = False
  1217. $2424 = False
  1218. $flag_AMMU_Seller_Attack_Player = False
  1219. $9544 = False
  1220. $9584 = 0
  1221. $2418 = False
  1222. $2422 = False
  1223. $2545 = False
  1224. $2544 = False
  1225. $9596 = False
  1226. $AMMU_Stage = 0
  1227. #COLT45.Destroy()
  1228. #SILENCED.Destroy()
  1229. #DESERT_EAGLE.Destroy()
  1230. #CHROMEGUN.Destroy()
  1231. #SAWNOFF.Destroy()
  1232. #SHOTGSPA.Destroy()
  1233. #GRENADE.Destroy()
  1234. #MICRO_UZI.Destroy()
  1235. #MP5LNG.Destroy()
  1236. #TEC9.Destroy()
  1237. #AK47.Destroy()
  1238. #M4.Destroy()
  1239. #CUNTGUN.Destroy()
  1240. #SNIPER.Destroy()
  1241. #ARMOUR.Destroy()
  1242. #SATCHEL.Destroy()
  1243. #BOMB.Destroy()
  1244. 03F0: enable_text_draw False
  1245. $Seller_Model.Destroy()
  1246. $AMMU_Seller.DestroyInstantly()
  1247. 08F8: display_stat_update_box True
  1248. 0581: enable_radar True
  1249. 09BD: allow_other_threads_to_display_text_boxes False
  1250. IF $5274 == True
  1251. THEN
  1252. 03E5: show_text_box 'ANR_56'
  1253. $5274 = False
  1254. END
  1255. END_THREAD
  1256.  
  1257.  
  1258.  
  1259. :AMUNAT_OBJECT_DESTROY
  1260. $9543.Destroy()
  1261. RETURN
  1262.  
  1263.  
  1264.  
  1265. :AMUNAT_ANIMATION_GET
  1266. IF OR
  1267. $AMMU_Selected_Weapon_Model == #CHROMEGUN
  1268. $AMMU_Selected_Weapon_Model == #SHOTGSPA
  1269. $AMMU_Selected_Weapon_Model == #AK47
  1270. $AMMU_Selected_Weapon_Model == #M4
  1271. $AMMU_Selected_Weapon_Model == #CUNTGUN
  1272. $AMMU_Selected_Weapon_Model == #SNIPER
  1273. $AMMU_Selected_Weapon_Model == #SAWNOFF
  1274. THEN
  1275. v$9554 = "SHP_2H_LIFT"
  1276. v$9558 = "SHP_2H_LIFT_END"
  1277. $9585 = $AMMU_X_Seller
  1278. $9585 += 0.231
  1279. $9586 = $AMMU_Y_Seller
  1280. $9586 += 0.636
  1281. $9587 = $AMMU_Z_Seller
  1282. $9587 += 1.053
  1283. END
  1284. IF OR
  1285. $AMMU_Selected_Weapon_Model == #COLT45
  1286. $AMMU_Selected_Weapon_Model == #SILENCED
  1287. $AMMU_Selected_Weapon_Model == #DESERT_EAGLE
  1288. $AMMU_Selected_Weapon_Model == #GRENADE
  1289. $AMMU_Selected_Weapon_Model == #MICRO_UZI
  1290. $AMMU_Selected_Weapon_Model == #MP5LNG
  1291. $AMMU_Selected_Weapon_Model == #SATCHEL
  1292. $AMMU_Selected_Weapon_Model == #TEC9
  1293. THEN
  1294. v$9554 = "SHP_1H_LIFT"
  1295. v$9558 = "SHP_1H_LIFT_END"
  1296. $9585 = $AMMU_X_Seller
  1297. $9585 += 0.108
  1298. $9586 = $AMMU_Y_Seller
  1299. $9586 += 0.654
  1300. $9587 = $AMMU_Z_Seller
  1301. $9587 += 1.053
  1302. END
  1303. IF $AMMU_Selected_Weapon_Model == #ARMOUR
  1304. THEN
  1305. v$9554 = "SHP_AR_LIFT"
  1306. v$9558 = "SHP_AR_LIFT_END"
  1307. $9585 = $AMMU_X_Seller
  1308. $9585 += 0.175
  1309. $9586 = $AMMU_Y_Seller
  1310. $9586 += 0.676
  1311. $9587 = $AMMU_Z_Seller
  1312. $9587 += 1.5
  1313. END
  1314. RETURN
  1315.  
  1316.  
  1317.  
  1318. :AMUNAT_ANIMATION_PUT
  1319. IF OR
  1320. $AMMU_Selected_Weapon_Model == #CHROMEGUN
  1321. $AMMU_Selected_Weapon_Model == #SHOTGSPA
  1322. $AMMU_Selected_Weapon_Model == #AK47
  1323. $AMMU_Selected_Weapon_Model == #M4
  1324. $AMMU_Selected_Weapon_Model == #CUNTGUN
  1325. $AMMU_Selected_Weapon_Model == #SNIPER
  1326. $AMMU_Selected_Weapon_Model == #SAWNOFF
  1327. THEN
  1328. v$AMMU_Seller_Animation = "SHP_2H_RET_S"
  1329. v$9566 = "SHP_2H_RET"
  1330. END
  1331. IF OR
  1332. $AMMU_Selected_Weapon_Model == #COLT45
  1333. $AMMU_Selected_Weapon_Model == #SILENCED
  1334. $AMMU_Selected_Weapon_Model == #DESERT_EAGLE
  1335. $AMMU_Selected_Weapon_Model == #GRENADE
  1336. $AMMU_Selected_Weapon_Model == #MICRO_UZI
  1337. $AMMU_Selected_Weapon_Model == #MP5LNG
  1338. $AMMU_Selected_Weapon_Model == #SATCHEL
  1339. $AMMU_Selected_Weapon_Model == #TEC9
  1340. THEN
  1341. v$AMMU_Seller_Animation = "SHP_1H_RET_S"
  1342. v$9566 = "SHP_1H_RET"
  1343. END
  1344. IF $AMMU_Selected_Weapon_Model == #ARMOUR
  1345. THEN
  1346. v$AMMU_Seller_Animation = "SHP_AR_RET_S"
  1347. v$9566 = "SHP_AR_RET"
  1348. END
  1349. RETURN
  1350.  
  1351.  
  1352.  
  1353. :AMUNAT_SWITCH_CATEGORY
  1354. $9597 = 0
  1355. $9616 = 0
  1356. $2515 = 0
  1357. $9598 = 0
  1358. $9599 = 0
  1359. $9600 = 0
  1360. $9601 = 0
  1361. $9602 = 0
  1362. $9603 = 0
  1363. $9604 = 0
  1364. $9605 = 0
  1365. $9606 = 0
  1366. $9607 = False
  1367. $9608 = False
  1368. $9609 = False
  1369. $9610 = False
  1370. $9611 = False
  1371. $9612 = False
  1372. $9613 = False
  1373. $9614 = False
  1374. $9615 = False
  1375.  
  1376. :AMUNAT_SWITCH
  1377. IF $AMMU_Available_Weapons > $9597
  1378. jf @AMUNAT_END_SWITCH
  1379. 0760: store_shopping_data_index $9597 textureCRC_to $AMMU_Selected_Weapon
  1380. 0871: init_jump_table $AMMU_Selected_Weapon total_jumps 16 default_jump 0 @AMUNAT_DEFAULT jumps WEAPON_GRENADE @AMUNAT_GUN7 WEAPON_PISTOL @AMUNAT_GUN1 WEAPON_PISTOL_SILENCED @AMUNAT_GUN1 WEAPON_DESERT_EAGLE @AMUNAT_GUN1 WEAPON_SHOTGUN @AMUNAT_GUN2 WEAPON_SAWNOFF @AMUNAT_GUN2 WEAPON_SPAS12 @AMUNAT_GUN2
  1381. 0872: jump_table_jumps WEAPON_MICRO_UZI @AMUNAT_GUN3 WEAPON_MP5 @AMUNAT_GUN4 WEAPON_AK47 @AMUNAT_GUN5 WEAPON_M4 @AMUNAT_GUN5 WEAPON_TEC9 @AMUNAT_GUN3 WEAPON_COUNTRYRIFLE @AMUNAT_GUN6 WEAPON_SNIPERRIFLE @AMUNAT_GUN6 WEAPON_SATCHEL_CHARGE @AMUNAT_GUN7 WEAPON_ARMOUR @AMUNAT_GUN8
  1382.  
  1383. :AMUNAT_GUN1
  1384. /*----------
  1385. Name: Pistols
  1386. 1) Pistol
  1387. 2) Silenced pistol
  1388. 3) Desert eagle
  1389. ----------*/
  1390. $9617[$9598] = $AMMU_Selected_Weapon
  1391. $9598++
  1392. IF $9607 == False
  1393. THEN
  1394. $2450[$9616] = 'GUN1'
  1395. $9616++
  1396. $9607 = True
  1397. END
  1398. jump @AMUNAT_DEFAULT
  1399.  
  1400. :AMUNAT_GUN2
  1401. /*----------
  1402. Name: Shotguns
  1403. 1) Shotgun
  1404. 2) Combat Shotgun
  1405. 3) Sawnoff
  1406. ----------*/
  1407. $9620[$9599] = $AMMU_Selected_Weapon
  1408. $9599++
  1409. IF $9608 == False
  1410. THEN
  1411. $2450[$9616] = 'GUN2'
  1412. $9616++
  1413. $9608 = True
  1414. END
  1415. jump @AMUNAT_DEFAULT
  1416.  
  1417. :AMUNAT_GUN3
  1418. /*----------
  1419. Name: Micro SMGs
  1420. 1) Micro SMG
  1421. 2) Tec9
  1422. ----------*/
  1423. $9623[$9600] = $AMMU_Selected_Weapon
  1424. $9600++
  1425. IF $9609 == False
  1426. THEN
  1427. $2450[$9616] = 'GUN3'
  1428. $9616++
  1429. $9609 = True
  1430. END
  1431. jump @AMUNAT_DEFAULT
  1432.  
  1433. :AMUNAT_GUN4
  1434. /*----------
  1435. Name: SMG
  1436. 1) SMG
  1437. ----------*/
  1438. $9625[$9601] = $AMMU_Selected_Weapon
  1439. $9601++
  1440. IF $9610 == False
  1441. THEN
  1442. $2450[$9616] = 'GUN4'
  1443. $9616++
  1444. $9610 = True
  1445. END
  1446. jump @AMUNAT_DEFAULT
  1447.  
  1448. :AMUNAT_GUN5
  1449. /*----------
  1450. Name: Assault
  1451. 1) AK-47
  1452. 2) M4
  1453. ----------*/
  1454. $9626[$9602] = $AMMU_Selected_Weapon
  1455. $9602++
  1456. IF $9611 == False
  1457. THEN
  1458. $2450[$9616] = 'GUN5'
  1459. $9616++
  1460. $9611 = True
  1461. END
  1462. jump @AMUNAT_DEFAULT
  1463.  
  1464. :AMUNAT_GUN6
  1465. /*----------
  1466. Name: Rifles
  1467. 1) Country rifle
  1468. 2) Sniper rifle
  1469. ----------*/
  1470. $9628[$9604] = $AMMU_Selected_Weapon
  1471. $9604++
  1472. IF $9612 == False
  1473. THEN
  1474. $2450[$9616] = 'GUN6'
  1475. $9616++
  1476. $9612 = True
  1477. END
  1478. jump @AMUNAT_DEFAULT
  1479.  
  1480. :AMUNAT_GUN7
  1481. /*----------
  1482. Name: Thrown
  1483. 1) Grenade
  1484. 2) Satchel charge
  1485. ----------*/
  1486. $9630[$9603] = $AMMU_Selected_Weapon
  1487. $9603++
  1488. IF $9613 == False
  1489. THEN
  1490. $2450[$9616] = 'GUN7'
  1491. $9616++
  1492. $9613 = True
  1493. END
  1494. jump @AMUNAT_DEFAULT
  1495.  
  1496. :AMUNAT_GUN8
  1497. /*----------
  1498. Name: Armour
  1499. 1) Armour
  1500. ----------*/
  1501. $9632[$9605] = $AMMU_Selected_Weapon
  1502. $9605++
  1503. IF $9614 == False
  1504. THEN
  1505. $2450[$9616] = 'GUN8'
  1506. $9616++
  1507. $9614 = True
  1508. END
  1509.  
  1510. :AMUNAT_DEFAULT
  1511. $9597++
  1512. jump @AMUNAT_SWITCH
  1513.  
  1514. :AMUNAT_END_SWITCH
  1515. $2515 = $9616
  1516. WHILE $2515 < 12
  1517. $2438[$2515] = -1
  1518. $2426[$2515] = NULL
  1519. $2450[$2515] = 'DUMMY'
  1520. $2515++
  1521. END
  1522. RETURN
  1523.  
  1524.  
  1525.  
  1526. :AMUNAT_PANEL_CATEGORY
  1527. IF $2420 == False
  1528. THEN
  1529. 0512: show_permanent_text_box 'AMMU_H'
  1530. IF $Current_Language == LANGUAGE_AMERICAN
  1531. THEN
  1532. 08D4: $2419 = create_panel_with_title 'AMMUN' position 29.0 145.0 width 186.0 columns 1 interactive True background True alignment ALIGN_LEFT
  1533. ELSE
  1534. IF $Current_Language == LANGUAGE_FRENCH
  1535. THEN
  1536. 08D4: $2419 = create_panel_with_title 'AMMUN' position 29.0 145.0 width 186.0 columns 1 interactive True background True alignment ALIGN_LEFT
  1537. ELSE
  1538. IF $Current_Language == LANGUAGE_GERMAN
  1539. THEN
  1540. 08D4: $2419 = create_panel_with_title 'AMMUN' position 29.0 165.0 width 186.0 columns 1 interactive True background True alignment ALIGN_LEFT
  1541. ELSE
  1542. IF $Current_Language == LANGUAGE_ITALIAN
  1543. THEN
  1544. 08D4: $2419 = create_panel_with_title 'AMMUN' position 29.0 145.0 width 186.0 columns 1 interactive True background True alignment ALIGN_LEFT
  1545. ELSE
  1546. IF $Current_Language == LANGUAGE_SPANISH
  1547. THEN
  1548. 08D4: $2419 = create_panel_with_title 'AMMUN' position 29.0 145.0 width 186.0 columns 1 interactive True background True alignment ALIGN_LEFT
  1549. END
  1550. END
  1551. END
  1552. END
  1553. END
  1554. 08D6: set_panel $2419 column 0 alignment ALIGN_LEFT
  1555. 08DB: set_panel $2419 column 0 header 'DUMMY' data s$2450[0] s$2450[1] s$2450[2] s$2450[3] s$2450[4] s$2450[5] s$2450[6] s$2450[7] s$2450[8] s$2450[9] s$2450[10] s$2450[11]
  1556. $2420 = True
  1557. END
  1558. RETURN
  1559.  
  1560.  
  1561.  
  1562. :AMUNAT_PANEL_WEAPONS
  1563. $9636 = 0
  1564. IF s$9549 == 'GUN1'
  1565. THEN
  1566. WHILE $9598 > $9636
  1567. 078C: get_shopping_item_with_textureCRC $9617[$9636] nametag_to s$AMMU_Weapon_Name
  1568. $2450[$9636] = s$AMMU_Weapon_Name
  1569. $9633[$9636] = $9617[$9636]
  1570. $9636++
  1571. END
  1572. END
  1573. IF s$9549 == 'GUN2'
  1574. THEN
  1575. WHILE $9599 > $9636
  1576. 078C: get_shopping_item_with_textureCRC $9620[$9636] nametag_to s$AMMU_Weapon_Name
  1577. $2450[$9636] = s$AMMU_Weapon_Name
  1578. $9633[$9636] = $9620[$9636]
  1579. $9636++
  1580. END
  1581. END
  1582. IF s$9549 == 'GUN3'
  1583. THEN
  1584. WHILE $9600 > $9636
  1585. 078C: get_shopping_item_with_textureCRC $9623[$9636] nametag_to s$AMMU_Weapon_Name
  1586. $2450[$9636] = s$AMMU_Weapon_Name
  1587. $9633[$9636] = $9623[$9636]
  1588. $9636++
  1589. END
  1590. END
  1591. IF s$9549 == 'GUN4'
  1592. THEN
  1593. WHILE $9601 > $9636
  1594. 078C: get_shopping_item_with_textureCRC $9625[$9636] nametag_to s$AMMU_Weapon_Name
  1595. $2450[$9636] = s$AMMU_Weapon_Name
  1596. $9633[$9636] = $9625[$9636]
  1597. $9636++
  1598. END
  1599. END
  1600. IF s$9549 == 'GUN5'
  1601. THEN
  1602. WHILE $9602 > $9636
  1603. 078C: get_shopping_item_with_textureCRC $9626[$9636] nametag_to s$AMMU_Weapon_Name
  1604. $2450[$9636] = s$AMMU_Weapon_Name
  1605. $9633[$9636] = $9626[$9636]
  1606. $9636++
  1607. END
  1608. END
  1609. IF s$9549 == 'GUN6'
  1610. THEN
  1611. WHILE $9604 > $9636
  1612. 078C: get_shopping_item_with_textureCRC $9628[$9636] nametag_to s$AMMU_Weapon_Name
  1613. $2450[$9636] = s$AMMU_Weapon_Name
  1614. $9633[$9636] = $9628[$9636]
  1615. $9636++
  1616. END
  1617. END
  1618. IF s$9549 == 'GUN7'
  1619. THEN
  1620. WHILE $9603 > $9636
  1621. 078C: get_shopping_item_with_textureCRC $9630[$9636] nametag_to s$AMMU_Weapon_Name
  1622. $2450[$9636] = s$AMMU_Weapon_Name
  1623. $9633[$9636] = $9630[$9636]
  1624. $9636++
  1625. END
  1626. END
  1627. IF s$9549 == 'GUN8'
  1628. THEN
  1629. WHILE $9605 > $9636
  1630. 078C: get_shopping_item_with_textureCRC $9632[$9636] nametag_to s$AMMU_Weapon_Name
  1631. $2450[$9636] = s$AMMU_Weapon_Name
  1632. $9633[$9636] = $9632[$9636]
  1633. $9636++
  1634. END
  1635. END
  1636. $2515 = $9636
  1637. WHILE $2515 < 12
  1638. $2438[$2515] = -1
  1639. $2426[$2515] = NULL
  1640. $2450[$2515] = 'DUMMY'
  1641. $2515++
  1642. END
  1643. IF $2424 == False
  1644. THEN
  1645. 0512: show_permanent_text_box 'AMMU_H2'
  1646. IF $Current_Language == LANGUAGE_AMERICAN
  1647. THEN
  1648. 08D4: $2423 = create_panel_with_title 'AMMUN' position 29.0 145.0 width 186.0 columns 1 interactive True background True alignment ALIGN_LEFT
  1649. ELSE
  1650. IF $Current_Language == LANGUAGE_FRENCH
  1651. THEN
  1652. 08D4: $2423 = create_panel_with_title 'AMMUN' position 29.0 145.0 width 186.0 columns 1 interactive True background True alignment ALIGN_LEFT
  1653. ELSE
  1654. IF $Current_Language == LANGUAGE_GERMAN
  1655. THEN
  1656. 08D4: $2423 = create_panel_with_title 'AMMUN' position 29.0 165.0 width 186.0 columns 1 interactive True background True alignment ALIGN_LEFT
  1657. ELSE
  1658. IF $Current_Language == LANGUAGE_ITALIAN
  1659. THEN
  1660. 08D4: $2423 = create_panel_with_title 'AMMUN' position 29.0 145.0 width 186.0 columns 1 interactive True background True alignment ALIGN_LEFT
  1661. ELSE
  1662. IF $Current_Language == LANGUAGE_SPANISH
  1663. THEN
  1664. 08D4: $2423 = create_panel_with_title 'AMMUN' position 29.0 145.0 width 186.0 columns 1 interactive True background True alignment ALIGN_LEFT
  1665. END
  1666. END
  1667. END
  1668. END
  1669. END
  1670. 08D6: set_panel $2423 column 0 alignment ALIGN_LEFT
  1671. 08DB: set_panel $2423 column 0 header 'DUMMY' data s$2450[0] s$2450[1] s$2450[2] s$2450[3] s$2450[4] s$2450[5] s$2450[6] s$2450[7] s$2450[8] s$2450[9] s$2450[10] s$2450[11]
  1672. $2424 = True
  1673. END
  1674. RETURN
Add Comment
Please, Sign In to add comment