Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //-------------External script 60 (AMMU)---------------
- // Author: Black & White
- :AMUNAT
- CONST
- // To execute at the beginning main.scm
- WEAPON_SKILL_POOR = 0
- WEAPON_SKILL_STD = 1
- WEAPON_SKILL_PRO = 2
- WEAPON_SKILL_COP = 3
- // eWeaponType
- WEAPON_NONE = -1
- WEAPON_UNARMED = 0
- WEAPON_BRASSKNUCKLE = 1
- WEAPON_GOLFCLUB = 2
- WEAPON_NIGHTSTICK = 3
- WEAPON_KNIFE = 4
- WEAPON_BASEBALLBAT = 5
- WEAPON_SHOVEL = 6
- WEAPON_POOLCUE = 7
- WEAPON_KATANA = 8
- WEAPON_CHAINSAW = 9
- WEAPON_DILDO1 = 10
- WEAPON_DILDO2 = 11
- WEAPON_VIBE1 = 12
- WEAPON_VIBE2 = 13
- WEAPON_FLOWERS = 14
- WEAPON_CANE = 15
- WEAPON_GRENADE = 16
- WEAPON_TEARGAS = 17
- WEAPON_MOLOTOV = 18
- WEAPON_ROCKET = 19
- WEAPON_ROCKET_HS = 20
- WEAPON_FREEFALL_BOMB = 21
- WEAPON_PISTOL = 22
- WEAPON_PISTOL_SILENCED = 23
- WEAPON_DESERT_EAGLE = 24
- WEAPON_SHOTGUN = 25
- WEAPON_SAWNOFF = 26
- WEAPON_SPAS12 = 27
- WEAPON_MICRO_UZI = 28
- WEAPON_MP5 = 29
- WEAPON_AK47 = 30
- WEAPON_M4 = 31
- WEAPON_SPARROW_GUN = 31
- WEAPON_SEASPARROW_GUN = 31
- WEAPON_TEC9 = 32
- WEAPON_COUNTRYRIFLE = 33
- WEAPON_SNIPERRIFLE = 34
- WEAPON_RLAUNCHER = 35
- WEAPON_RLAUNCHER_HS = 36
- WEAPON_FTHROWER = 37
- WEAPON_FIRE = 37
- WEAPON_MINIGUN = 38
- WEAPON_HUNTER_GUN = 38
- WEAPON_SATCHEL_CHARGE = 39
- WEAPON_DETONATOR = 40
- WEAPON_SPRAYCAN = 41
- WEAPON_EXTINGUISHER = 42
- WEAPON_CAMERA = 43
- WEAPON_NIGHTVISION = 44
- WEAPON_INFRARED = 45
- WEAPON_PARACHUTE = 46
- WEAPON_LAST_TYPE = 47
- WEAPON_ARMOUR = 48
- WEAPON_VEHICLE = 49
- WEAPON_HELI_BLADES = 50
- WEAPON_EXPLOSION = 51
- WEAPON_COP_HELI_GUN = 52
- WEAPON_DROWN = 53
- WEAPON_FALL = 54
- WEAPON_SAVED_NONE = 55
- WEAPON_MELEE = 56
- WEAPON_ANY = 57
- WEAPON_FLARE = 58
- WEAPON_M1911 = 87
- PANEL_ROW_UNLOCK = 0
- PANEL_ROW_LOCK = 1
- PANEL_ROW_BOUGHT = 2
- ALIGN_CENTRE = 0
- ALIGN_LEFT = 1
- ALIGN_RIGHT = 2
- LANGUAGE_AMERICAN = 0
- LANGUAGE_FRENCH = 1
- LANGUAGE_GERMAN = 2
- LANGUAGE_ITALIAN = 3
- LANGUAGE_SPANISH = 4
- NULL = 0
- END
- VAR
- // To execute at the beginning main.scm
- $PLAYER_CHAR : Player
- $PLAYER_ACTOR : Actor
- $Shops_Player_Cash : Int
- $X_Buy_Marker : Float
- $Y_Buy_Marker : Float
- $Z_Buy_Marker : Float
- $2426 : array 12 of Integer
- $2438 : array 12 of Integer
- $2450 : array 12 of String
- $2755 : Float
- $2756 : Float
- $2757 : Float
- END
- VAR
- $AMMU_Seller : Actor
- $Seller_Model : Model
- $9543 : Object
- $9585 : Float = 0.0
- $9586 : Float = 0.0
- $9587 : Float = 0.0
- $AMMU_X_Offset : Float = 0.0
- $AMMU_Y_Offset : Float = 0.0
- $AMMU_Z_Offset : Float = 0.0
- $X_Camera : Float = 0.0
- $Y_Camera : Float = 0.0
- $Z_Camera : Float = 0.0
- $AMMU_X_Aim_Camera : Float = 0.0
- $AMMU_Y_Aim_Camera : Float = 0.0
- $AMMU_Z_Aim_Camera : Float = 0.0
- $AMMU_Seller_Animation_Time : Float = 0.0
- $AMMU_Seller_Angle : Float = 0.0
- $AMMU_X_Seller : Float = 0.0
- $AMMU_Y_Seller : Float = 0.0
- $AMMU_Z_Seller : Float = 0.0
- $flag_AMMU_Seller_Attack_Player : Int = False
- $AMMU_Available_Weapons : Int
- $AMMU_Selected_Weapon_Weapon_Group : Int
- $AMMU_Stage : Int = 0
- $AMMU_Selected_Weapon : Int
- $AMMU_Weapon_Cost : Int
- $9575 : Float = 0.0
- $9576 : Float = 0.0
- $9577 : Float = 0.0
- $9572 : Int = 0
- $9573 : Int = 0
- $9574 : Int = 0
- $9578 : Int
- $2418 : Int = False
- $2422 : Int = False
- $2545 : Int = False
- $2544 : Int = False
- $9595 : Int = 0
- $9594 : Int = 0
- $9596 : Int = False
- $9616 : Int = 0
- $9597 : Int = 0
- $2515 : Int = 0
- $9598 : Int = 0
- $9599 : Int = 0
- $9600 : Int = 0
- $9601 : Int = 0
- $9602 : Int = 0
- $9603 : Int = 0
- $9604 : Int = 0
- $9605 : Int = 0
- $9606 : Int = 0
- $9607 : Int = False
- $9608 : Int = False
- $9609 : Int = False
- $9610 : Int = False
- $9611 : Int = False
- $9612 : Int = False
- $9613 : Int = False
- $9614 : Int = False
- $9615 : Int = False
- $9617 : array 3 of Integer // Pistols array
- $9620 : array 3 of Integer // Shotguns array
- $9623 : array 2 of Integer // Micro SMGs array
- $9625 : array 1 of Integer // SMGs array
- $9626 : array 2 of Integer // Assaults array
- $9628 : array 2 of Integer // Rifles array
- $9630 : array 4 of Integer // Throwns array
- $9632 : array 1 of Integer // Armours array
- $9633 : array 4 of Integer // Selected category array
- $9636 : Int = 0
- $9637 : Int = 0
- $9638 : Int = 0
- END
- $Seller_Model = #WMYAMMO
- $Seller_Model.Load()
- #COLT45.Load()
- #TEC9.Load()
- #MICRO_UZI.Load()
- #CHROMEGUN.Load()
- #GRENADE.Load()
- #ARMOUR.Load()
- #MP5LNG.Load()
- #SAWNOFF.Load()
- #SILENCED.Load()
- #SATCHEL.Load()
- #BOMB.Load()
- #CUNTGUN.Load()
- #SNIPER.Load()
- #AK47.Load()
- #M4.Load()
- #DESERT_EAGLE.Load()
- #SHOTGSPA.Load()
- #TEARGAS.Load()
- #MOLOTOV.Load()
- #M1911.Load()
- 038B: load_requested_models
- set_wb_check_to 0
- thread 'AMUNAT'
- WHILE TRUE
- wait 0
- IF $PLAYER_CHAR.Defined()
- THEN
- IF 8844: NOT string s$Current_Shop_GXT_Name empty
- THEN
- IF $AMMU_Stage > 0
- THEN
- IF 0A0F: new_language_set
- THEN
- 03E6: remove_text_box
- 08DA: remove_panel $2419
- 08DA: remove_panel $2423
- 08DA: remove_panel $2421
- 08DA: remove_panel $2417
- $2420 = False
- $2424 = False
- $2418 = False
- $2422 = False
- 09FB: $Current_Language = current_language
- END
- END
- IF $AMMU_Stage == 0
- THEN
- IF s$Current_Shop_GXT_Name == 'AMMUN1'
- THEN
- $AMMU_X_Offset = 0.0
- $AMMU_Y_Offset = 0.0
- $AMMU_Z_Offset = 0.0
- $AMMU_Player_Angle = 180.0
- $AMMU_Seller_Angle = 0.0
- $Show_Shop_Sphere = True
- s$AMMU_Interior_Name = s$Current_Shop_GXT_Name
- $9584 = 0
- $AMMU_Stage = 1
- END
- IF s$Current_Shop_GXT_Name == 'AMMUN2'
- THEN
- $AMMU_X_Offset = -0.765
- $AMMU_Y_Offset = -42.311
- $AMMU_Z_Offset = -0.013
- $AMMU_Player_Angle = 180.0
- $AMMU_Seller_Angle = 0.0
- $Show_Shop_Sphere = True
- s$AMMU_Interior_Name = s$Current_Shop_GXT_Name
- $9584 = 0
- $AMMU_Stage = 1
- END
- IF s$Current_Shop_GXT_Name == 'AMMUN3'
- THEN
- $AMMU_X_Offset = -6.264
- $AMMU_Y_Offset = -71.34
- $AMMU_Z_Offset = -0.002
- $AMMU_Player_Angle = 180.0
- $AMMU_Seller_Angle = 0.0
- $Show_Shop_Sphere = True
- s$AMMU_Interior_Name = s$Current_Shop_GXT_Name
- $9584 = 0
- $AMMU_Stage = 1
- END
- IF s$Current_Shop_GXT_Name == 'AMMUN4'
- THEN
- $AMMU_X_Offset = 11.642
- $AMMU_Y_Offset = -102.936
- $AMMU_Z_Offset = -1.929
- $AMMU_Player_Angle = 180.0
- $AMMU_Seller_Angle = 0.0
- $Show_Shop_Sphere = True
- s$AMMU_Interior_Name = s$Current_Shop_GXT_Name
- $AMMU_Stage = 1
- END
- IF s$Current_Shop_GXT_Name == 'AMMUN5'
- THEN
- $AMMU_X_Offset = 16.285
- $AMMU_Y_Offset = -127.781
- $AMMU_Z_Offset = -1.929
- $AMMU_Player_Angle = 180.0
- $AMMU_Seller_Angle = 0.0
- $Show_Shop_Sphere = True
- s$AMMU_Interior_Name = s$Current_Shop_GXT_Name
- $AMMU_Stage = 1
- END
- END
- IF $AMMU_Stage == 1
- THEN
- 03F0: enable_text_draw True
- 08F8: display_stat_update_box False
- $X_Buy_Marker = 296.506
- $X_Buy_Marker += $AMMU_X_Offset
- $Y_Buy_Marker = -38.168
- $Y_Buy_Marker += $AMMU_Y_Offset
- $Z_Buy_Marker = 1000.547
- $Z_Buy_Marker += $AMMU_Z_Offset
- $AMMU_X_Seller = 296.506
- $AMMU_X_Seller += $AMMU_X_Offset
- $AMMU_Y_Seller = -40.35
- $AMMU_Y_Seller += $AMMU_Y_Offset
- $AMMU_Z_Seller = 1000.54
- $AMMU_Z_Seller += $AMMU_Z_Offset
- $X_Camera = 296.585
- $X_Camera += $AMMU_X_Offset
- $Y_Camera = -38.345
- $Y_Camera += $AMMU_Y_Offset
- $Z_Camera = 1002.236
- $Z_Camera += $AMMU_Z_Offset
- $AMMU_X_Aim_Camera = 296.501
- $AMMU_X_Aim_Camera += $AMMU_X_Offset
- $AMMU_Y_Aim_Camera = -39.298
- $AMMU_Y_Aim_Camera += $AMMU_Y_Offset
- $AMMU_Z_Aim_Camera = 1001.943
- $AMMU_Z_Aim_Camera += $AMMU_Z_Offset
- $AMMU_Seller.Create(CivMale, $Seller_Model, $AMMU_X_Seller, $AMMU_Y_Seller, $AMMU_Z_Seller)
- $AMMU_Seller.Angle = $AMMU_Seller_Angle
- Actor.Health($AMMU_Seller) = 300
- 02A9: set_actor $AMMU_Seller immune_to_nonplayer 1
- 087E: set_actor $AMMU_Seller weapon_droppable 0
- 0946: set_actor $AMMU_Seller actions_uninterupted_by_weapon_fire 1
- 060B: set_actor $AMMU_Seller decision_maker_to 65542
- IF $Casino_Total_Passed_Missions > 2
- THEN
- 075F: store_shopping_data_entries_number_to $AMMU_Available_Weapons
- IF $2574 == False
- THEN
- 03E5: show_text_box 'NEWWEAP'
- $2574 = True
- END
- ELSE
- IF $Toreno_Total_Passed_Missions > 7
- THEN
- $AMMU_Available_Weapons = 15
- IF $2573 == False
- THEN
- 03E5: show_text_box 'NEWWEAP'
- $2573 = True
- END
- ELSE
- IF $Syndicate_Total_Passed_Missions > 9
- THEN
- $AMMU_Available_Weapons = 14
- IF $2572 == False
- THEN
- 03E5: show_text_box 'NEWWEAP'
- $2572 = True
- END
- ELSE
- IF $Wuzimu_Total_Passed_Missions > 0
- THEN
- $AMMU_Available_Weapons = 13
- IF $2571 == False
- THEN
- 03E5: show_text_box 'NEWWEAP'
- $2571 = True
- END
- ELSE
- IF $Syndicate_Total_Passed_Missions > 7
- THEN
- $AMMU_Available_Weapons = 12
- IF $2570 == False
- THEN
- 03E5: show_text_box 'NEWWEAP'
- $2570 = True
- END
- ELSE
- IF $Truth_Total_Passed_Missions > 0
- THEN
- $AMMU_Available_Weapons = 11
- IF $2569 == False
- THEN
- 03E5: show_text_box 'NEWWEAP'
- $2569 = True
- END
- ELSE
- IF $All_Catalina_missions_passed == 1
- THEN
- $AMMU_Available_Weapons = 10
- IF $2568 == False
- THEN
- 03E5: show_text_box 'NEWWEAP'
- $2568 = True
- END
- ELSE
- IF $OG_Loc_Total_Passed_Missions > 4
- THEN
- $AMMU_Available_Weapons = 9
- IF $2567 == False
- THEN
- 03E5: show_text_box 'NEWWEAP'
- $2567 = True
- END
- ELSE
- IF $Smoke_Total_Passed_Missions > 3
- THEN
- $AMMU_Available_Weapons = 8
- IF $2566 == False
- THEN
- 03E5: show_text_box 'NEWWEAP'
- $2566 = True
- END
- ELSE
- IF $Ryder_Total_Passed_Missions > 2
- THEN
- $AMMU_Available_Weapons = 7
- IF $2565 == False
- THEN
- 03E5: show_text_box 'NEWWEAP'
- $2565 = True
- END
- ELSE
- IF 2 > $LS_FINAL_Total_Passed_Missions
- THEN
- $AMMU_Available_Weapons = 6
- IF $2564 == False
- THEN
- 03E5: show_text_box 'NEWWEAP'
- $2564 = True
- END
- END
- END
- END
- END
- END
- END
- END
- END
- END
- END
- END
- $AMMU_Stage = 2
- END
- IF $AMMU_Stage == 2
- THEN
- 07B0: get_active_shop_name_to s$Current_Shop_GXT_Name
- IF s$Current_Shop_GXT_Name <> s$AMMU_Interior_Name
- THEN
- gosub @AMUNAT_END_THREAD
- END
- IF NOT $AMMU_Seller.Dead()
- THEN
- IF $flag_AMMU_Seller_Attack_Player == False
- THEN
- IF $9584 == 0
- THEN
- 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
- $AMMU_Seller_Animation_Time = 0.0
- $9584 = 1
- END
- IF $ONMISSION_Shooting == False
- THEN
- IF OR
- 02E0: actor $PLAYER_ACTOR firing_weapon
- 0457: player $PLAYER_CHAR aiming_at_actor $AMMU_Seller
- 031D: actor $AMMU_Seller hit_by_weapon WEAPON_ANY
- THEN
- 09D5: play_sound_of_actor $AMMU_Seller soundslot 327 unknown_flags 0 0 1 as $10081 // extended 0947
- 05BA: AS_actor $AMMU_Seller move_mouth 5 ms
- 081A: set_actor $AMMU_Seller weapon_skill_to WEAPON_SKILL_PRO
- $AMMU_Seller.GiveWeaponAndAmmo(WEAPON_SHOTGUN, 30000)
- $AMMU_Seller.WeaponAccuracy = 80
- 0638: AS_actor $AMMU_Seller stay_put True
- 05E2: AS_actor $AMMU_Seller kill_actor $PLAYER_ACTOR
- $Show_Shop_Sphere = False
- $flag_AMMU_Seller_Attack_Player = True
- ELSE
- $Show_Shop_Sphere = True
- 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
- THEN
- IF $PLAYER_CHAR.Controllable()
- THEN
- $9584 = 0
- $AMMU_Stage = 3
- END
- END
- END
- ELSE
- IF OR
- 0457: player $PLAYER_CHAR aiming_at_actor $AMMU_Seller
- 031D: actor $AMMU_Seller hit_by_weapon WEAPON_ANY
- THEN
- 09D5: play_sound_of_actor $AMMU_Seller soundslot 327 unknown_flags 0 0 1 as $10081 // extended 0947
- 05BA: AS_actor $AMMU_Seller move_mouth 5 ms
- 081A: set_actor $AMMU_Seller weapon_skill_to WEAPON_SKILL_PRO
- $AMMU_Seller.GiveWeaponAndAmmo(WEAPON_SHOTGUN, 30000)
- $AMMU_Seller.WeaponAccuracy = 80
- 0638: AS_actor $AMMU_Seller stay_put True
- 05E2: AS_actor $AMMU_Seller kill_actor $PLAYER_ACTOR
- $Show_Shop_Sphere = False
- $flag_AMMU_Seller_Attack_Player = True
- ELSE
- $Show_Shop_Sphere = True
- 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
- THEN
- $9584 = 0
- $AMMU_Stage = 3
- END
- END
- END
- ELSE
- gosub @AMUNAT_CLEAR
- 07B0: get_active_shop_name_to s$Current_Shop_GXT_Name
- IF s$Current_Shop_GXT_Name <> s$AMMU_Interior_Name
- THEN
- gosub @AMUNAT_END_THREAD
- END
- CONTINUE
- END
- ELSE
- gosub @AMUNAT_CLEAR
- 07B0: get_active_shop_name_to s$Current_Shop_GXT_Name
- IF s$Current_Shop_GXT_Name <> s$AMMU_Interior_Name
- THEN
- gosub @AMUNAT_END_THREAD
- END
- CONTINUE
- END
- END
- IF $AMMU_Stage == 3
- THEN
- $PLAYER_CHAR.CanMove = False
- 09BD: allow_other_threads_to_display_text_boxes True
- 01B9: set_actor $PLAYER_ACTOR armed_weapon_to 0
- 0792: disembark_instantly_actor $PLAYER_ACTOR
- 0395: clear_area 1 at $tempvar_X_coord $tempvar_Y_coord $tempvar_Z_coord radius 1.0
- 03D5: remove_text 'SHOPNO'
- 32@ = 0
- $AMMU_Stage = 4
- END
- IF $AMMU_Stage == 4
- THEN
- IF $AMMU_Seller.Dead()
- THEN
- gosub @AMUNAT_CLEAR
- 07B0: get_active_shop_name_to s$Current_Shop_GXT_Name
- IF s$Current_Shop_GXT_Name <> s$AMMU_Interior_Name
- THEN
- gosub @AMUNAT_END_THREAD
- END
- CONTINUE
- END
- IF $9584 == 0
- THEN
- IF 32@ >= 300
- THEN
- 08C7: put_actor $PLAYER_ACTOR at $X_Buy_Marker $Y_Buy_Marker $Z_Buy_Marker dont_warp_gang
- $PLAYER_ACTOR.Angle = $AMMU_Player_Angle
- $AMMU_Seller.StorePos($2755, $2756, $2757)
- IF OR
- $2755 <> $AMMU_X_Seller
- $2756 <> $AMMU_Y_Seller
- $2757 <> $AMMU_Z_Seller
- THEN
- $AMMU_Seller.PutAt($AMMU_X_Seller, $AMMU_Y_Seller, $AMMU_Z_Seller)
- $AMMU_Seller.Angle = $AMMU_Seller_Angle
- END
- Camera.SetPosition($X_Camera, $Y_Camera, $Z_Camera, 0.0, 0.0, 0.0)
- Camera.PointAt($AMMU_X_Aim_Camera, $AMMU_Y_Aim_Camera, $AMMU_Z_Aim_Camera, 2)
- 09D5: play_sound_of_actor $AMMU_Seller soundslot 333 unknown_flags 0 0 1 as $10081 // extended 0947
- IF $2576 == 1
- THEN
- $2575 = 1
- END
- IF $PLAYER_CHAR.Defined()
- THEN
- $PLAYER_ACTOR.StorePos($tempvar_X_coord, $tempvar_Y_coord, $tempvar_Z_coord)
- ELSE
- gosub @AMUNAT_END_THREAD
- CONTINUE
- END
- 0581: enable_radar False
- $AMMU_Stage = 5
- $9584 = 0
- END
- END
- END
- IF $AMMU_Stage == 5
- THEN
- IF $AMMU_Seller.Dead()
- THEN
- gosub @AMUNAT_CLEAR
- 07B0: get_active_shop_name_to s$Current_Shop_GXT_Name
- IF s$Current_Shop_GXT_Name <> s$AMMU_Interior_Name
- THEN
- gosub @AMUNAT_END_THREAD
- END
- CONTINUE
- END
- IF 1 > $9584
- THEN
- IF $2420 == False
- THEN
- gosub @AMUNAT_SWITCH_CATEGORY
- gosub @AMUNAT_PANEL_CATEGORY
- END
- END
- IF $9584 == 0
- THEN
- IF 00E1: player 0 pressed_key 16
- THEN
- $9584 = 3
- END
- IF 00E1: player 0 pressed_key 15
- THEN
- $9584 = 1
- END
- END
- IF $9584 == 1
- THEN
- IF 80E1: NOT player 0 pressed_key 15
- THEN
- IF $2420 == True
- THEN
- 03E6: remove_text_box
- 08DA: remove_panel $2419
- $2420 = False
- END
- IF $2424 == True
- THEN
- 03E6: remove_text_box
- 08DA: remove_panel $2423
- $2424 = False
- END
- IF $2418 == True
- THEN
- 03E6: remove_text_box
- 08DA: remove_panel $2417
- $2418 = False
- END
- IF $2422 == True
- THEN
- 08DA: remove_panel $2421
- $2422 = False
- END
- 03D5: remove_text 'AMMUA'
- 03D5: remove_text 'SHOPNO'
- 03D5: remove_text 'AMMUC'
- 03D5: remove_text 'AMMUD'
- 09D5: play_sound_of_actor $AMMU_Seller soundslot 331 unknown_flags 0 0 1 as $10081 // extended 0947
- Camera.Restore_WithJumpCut()
- $PLAYER_CHAR.CanMove = True
- 09BD: allow_other_threads_to_display_text_boxes False
- 0581: enable_radar True
- $9584 = 2
- END
- END
- IF $9584 == 2
- THEN
- IF $flag_AMMU_Seller_Attack_Player == False
- THEN
- IF OR
- 02E0: actor $PLAYER_ACTOR firing_weapon
- 0457: player $PLAYER_CHAR aiming_at_actor $AMMU_Seller
- 031D: actor $AMMU_Seller hit_by_weapon WEAPON_ANY
- THEN
- 09D5: play_sound_of_actor $AMMU_Seller soundslot 327 unknown_flags 0 0 1 as $10081 // extended 0947
- 05BA: AS_actor $AMMU_Seller move_mouth 5 ms
- 081A: set_actor $AMMU_Seller weapon_skill_to WEAPON_SKILL_PRO
- $AMMU_Seller.GiveWeaponAndAmmo(WEAPON_SHOTGUN, 30000)
- $AMMU_Seller.WeaponAccuracy = 80
- 0638: AS_actor $AMMU_Seller stay_put True
- 05E2: AS_actor $AMMU_Seller kill_actor $PLAYER_ACTOR
- $flag_AMMU_Seller_Attack_Player = True
- END
- END
- 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
- THEN
- $2420 = False
- $2424 = False
- $9544 = False
- $2418 = False
- $2422 = False
- $AMMU_Stage = 2
- $9584 = 0
- END
- END
- IF $9584 == 3
- THEN
- IF 80E1: NOT player 0 pressed_key 16
- THEN
- 08D8: $9637 = panel $2419 selected_row
- s$9549 = $2450[$9637]
- IF 0 > $9637
- THEN
- $9637 = 0
- END
- IF $2420 == True
- THEN
- 03E6: remove_text_box
- 08DA: remove_panel $2419
- $2420 = False
- END
- IF $2424 == False
- THEN
- gosub @AMUNAT_PANEL_WEAPONS
- END
- $9584 = 0
- $AMMU_Stage = 6
- END
- END
- END
- IF $AMMU_Stage == 6
- THEN
- IF $AMMU_Seller.Dead()
- THEN
- gosub @AMUNAT_CLEAR
- 07B0: get_active_shop_name_to s$Current_Shop_GXT_Name
- IF s$Current_Shop_GXT_Name <> s$AMMU_Interior_Name
- THEN
- gosub @AMUNAT_END_THREAD
- END
- CONTINUE
- END
- IF 1 > $9584
- THEN
- IF $2424 == False
- THEN
- gosub @AMUNAT_PANEL_WEAPONS
- END
- END
- IF $9584 == 0
- THEN
- IF 00E1: player 0 pressed_key 16
- THEN
- $9584 = 2
- END
- IF 00E1: player 0 pressed_key 15
- THEN
- $9584 = 1
- END
- END
- IF $9584 == 1
- THEN
- IF 80E1: NOT player 0 pressed_key 15
- THEN
- IF $2424 == True
- THEN
- 03E6: remove_text_box
- 08DA: remove_panel $2423
- $2424 = False
- END
- IF $2420 == False
- THEN
- gosub @AMUNAT_SWITCH_CATEGORY
- gosub @AMUNAT_PANEL_CATEGORY
- END
- $9584 = 0
- $AMMU_Stage = 5
- END
- END
- IF $9584 == 2
- THEN
- IF 80E1: NOT player 0 pressed_key 16
- THEN
- 08D8: $9638 = panel $2423 selected_row
- IF 0 > $9638
- THEN
- $9638 = 0
- END
- $AMMU_Selected_Weapon = $9633[$9638]
- IF $AMMU_SELECTED_WEAPON == 17 // $ == any
- THEN
- s$AMMU_WEAPON_NAME = '343' // Rocket Launcher
- $AMMU_WEAPON_COST = 200
- $AMMU_SELECTED_WEAPON_WEAPON_GROUP = 9
- $AMMU_SELECTED_WEAPON_MODEL = 343
- END
- IF $AMMU_SELECTED_WEAPON == 18 // $ == any
- THEN
- s$AMMU_WEAPON_NAME = '344' // Rocket Launcher
- $AMMU_WEAPON_COST = 150
- $AMMU_SELECTED_WEAPON_WEAPON_GROUP = 9
- $AMMU_SELECTED_WEAPON_MODEL = 344
- END
- 078C: get_shopping_item_with_textureCRC $AMMU_Selected_Weapon nametag_to s$AMMU_Weapon_Name
- 0761: get_shopping_item_with_textureCRC $AMMU_Selected_Weapon price_to $AMMU_Weapon_Cost
- IF $AMMU_Selected_Weapon <> WEAPON_ARMOUR
- THEN
- 0782: get_weapon_with_ID $AMMU_Selected_Weapon weapon_group_to $AMMU_Selected_Weapon_Weapon_Group
- 0781: get_weapon_with_ID $AMMU_Selected_Weapon model_to $AMMU_Selected_Weapon_Model
- ELSE
- $AMMU_Selected_Weapon_Model = #ARMOUR
- END
- IF $2424 == True
- THEN
- 03E6: remove_text_box
- 08DA: remove_panel $2423
- $2424 = False
- END
- 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
- $AMMU_Seller_Animation_Time = 0.0
- IF $AMMU_Seller.Animation == "SHP_G_LIFT_IN"
- THEN
- 0613: $AMMU_Seller_Animation_Time = actor $AMMU_Seller animation "SHP_G_LIFT_IN" time
- END
- $9584 = 3
- END
- END
- IF $9584 == 3
- THEN
- IF $AMMU_Seller.Animation == "SHP_G_LIFT_IN"
- THEN
- 0613: $AMMU_Seller_Animation_Time = actor $AMMU_Seller animation "SHP_G_LIFT_IN" time
- END
- IF $AMMU_Seller_Animation_Time == 1.0
- THEN
- $9584 = 4
- END
- END
- IF $9584 == 4
- THEN
- $9543.Create($AMMU_Selected_Weapon_Model, $AMMU_X_Seller, $AMMU_Y_Seller, $AMMU_Z_Seller)
- gosub @AMUNAT_ANIMATION_GET
- gosub @AMUNAT_ANIMATION_PUT
- 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
- $9543.KeepInMemory = False
- 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
- $AMMU_Seller_Animation_Time = 0.0
- IF $AMMU_Seller.Animation == v$9554
- THEN
- 0613: $AMMU_Seller_Animation_Time = actor $AMMU_Seller animation v$9554 time
- END
- $9584 = 5
- END
- IF $9584 == 5
- THEN
- IF $AMMU_Seller.Animation == v$9554
- THEN
- 0613: $AMMU_Seller_Animation_Time = actor $AMMU_Seller animation v$9554 time
- END
- IF $AMMU_Seller_Animation_Time == 1.0
- THEN
- 070B: set_actor $AMMU_Seller onbone_attached_object_operation 0
- 097A: play_audio_at $tempvar_X_coord $tempvar_Y_coord $tempvar_Z_coord event 1131
- $9543.PutAt($9585, $9586, $9587)
- $9543.KeepInMemory = True
- 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
- $AMMU_Seller_Animation_Time = 0.0
- IF $AMMU_Seller.Animation == v$9558
- THEN
- 0613: $AMMU_Seller_Animation_Time = actor $AMMU_Seller animation v$9558 time
- END
- $9584 = 6
- END
- END
- IF $9584 == 6
- THEN
- IF $AMMU_Seller.Animation == v$9558
- THEN
- 0613: $AMMU_Seller_Animation_Time = actor $AMMU_Seller animation v$9558 time
- END
- IF $AMMU_Seller_Animation_Time == 1.0
- THEN
- 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
- $AMMU_Seller_Animation_Time = 0.0
- IF $2418 == False
- THEN
- gosub @AMUNAT_PANEL_COST
- END
- IF $AMMU_Selected_Weapon <> WEAPON_ARMOUR
- THEN
- $9578 = $AMMU_Selected_Weapon_Weapon_Group
- $9578 += 1
- 04B8: get_weapon_data_from_actor $PLAYER_ACTOR slot $9578 weapon $9572 ammo $9573 model $9574
- IF $9572 <> $AMMU_Selected_Weapon
- THEN
- IF $9573 > 0
- THEN
- 00BC: show_text_highpriority GXT 'AMMUA' time 5000 flag 1
- END
- END
- END
- $AMMU_Stage = 7
- $9584 = 0
- END
- END
- END
- IF $AMMU_Stage == 7
- THEN
- IF $AMMU_Seller.Dead()
- THEN
- gosub @AMUNAT_CLEAR
- 07B0: get_active_shop_name_to s$Current_Shop_GXT_Name
- IF s$Current_Shop_GXT_Name <> s$AMMU_Interior_Name
- THEN
- gosub @AMUNAT_END_THREAD
- END
- CONTINUE
- END
- IF 1 > $9584
- THEN
- IF $2418 == False
- THEN
- gosub @AMUNAT_PANEL_COST
- END
- END
- IF $9584 == 0
- THEN
- IF 00E1: player 0 pressed_key 16
- THEN
- $9584 = 5
- END
- IF 00E1: player 0 pressed_key 15
- THEN
- $9584 = 1
- END
- END
- IF $9584 == 1
- THEN
- IF 80E1: NOT player 0 pressed_key 15
- THEN
- IF $2418 == True
- THEN
- 03E6: remove_text_box
- 08DA: remove_panel $2417
- $2418 = False
- END
- 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
- $AMMU_Seller_Animation_Time = 0.0
- IF $AMMU_Seller.Animation == v$AMMU_Seller_Animation
- THEN
- 0613: $AMMU_Seller_Animation_Time = actor $AMMU_Seller animation v$AMMU_Seller_Animation time
- END
- $9584 = 2
- END
- END
- IF $9584 == 2
- THEN
- IF $AMMU_Seller.Animation == v$AMMU_Seller_Animation
- THEN
- 0613: $AMMU_Seller_Animation_Time = actor $AMMU_Seller animation v$AMMU_Seller_Animation time
- END
- IF $AMMU_Seller_Animation_Time == 1.0
- THEN
- 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
- $9543.KeepInMemory = False
- 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
- $AMMU_Seller_Animation_Time = 0.0
- IF $AMMU_Seller.Animation == v$9566
- THEN
- 0613: $AMMU_Seller_Animation_Time = actor $AMMU_Seller animation v$9566 time
- END
- $9584 = 3
- END
- END
- IF $9584 == 3
- THEN
- IF $AMMU_Seller.Animation == v$9566
- THEN
- 0613: $AMMU_Seller_Animation_Time = actor $AMMU_Seller animation v$9566 time
- END
- IF $AMMU_Seller_Animation_Time == 1.0
- THEN
- 070B: set_actor $AMMU_Seller onbone_attached_object_operation 0
- $9543.PutAt($9585, $9586, $9587)
- $9543.KeepInMemory = True
- gosub @AMUNAT_OBJECT_DESTROY
- 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
- $AMMU_Seller_Animation_Time = 0.0
- IF $AMMU_Seller.Animation == "SHP_G_LIFT_OUT"
- THEN
- 0613: $AMMU_Seller_Animation_Time = actor $AMMU_Seller animation "SHP_G_LIFT_OUT" time
- END
- $9584 = 4
- END
- END
- IF $9584 == 4
- THEN
- IF $AMMU_Seller.Animation == "SHP_G_LIFT_OUT"
- THEN
- 0613: $AMMU_Seller_Animation_Time = actor $AMMU_Seller animation "SHP_G_LIFT_OUT" time
- END
- IF $AMMU_Seller_Animation_Time == 1.0
- THEN
- 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
- $AMMU_Seller_Animation_Time = 0.0
- $9584 = 0
- $AMMU_Stage = 6
- END
- END
- IF $9584 == 5
- THEN
- IF 80E1: NOT player 0 pressed_key 16
- THEN
- 03D5: remove_text 'AMMUA'
- 03D5: remove_text 'SHOPNO'
- 03D5: remove_text 'AMMUC'
- 03D5: remove_text 'AMMUD'
- $2544 = False
- $9596 = False
- $Shops_Player_Cash = $PLAYER_CHAR.Money
- IF $Shops_Player_Cash >= $AMMU_Weapon_Cost
- THEN
- IF $AMMU_Selected_Weapon <> WEAPON_ARMOUR
- THEN
- 041A: $9573 = actor $PLAYER_ACTOR weapon $AMMU_Selected_Weapon ammo
- IF 9999 > $9573
- THEN
- 0790: charge_money_for_shopping_item_with_textureCRC $AMMU_Selected_Weapon
- 09D5: play_sound_of_actor $AMMU_Seller soundslot 323 unknown_flags 0 0 1 as $10081 // extended 0947
- 097A: play_audio_at $tempvar_X_coord $tempvar_Y_coord $tempvar_Z_coord event 1052
- $9584 = 6
- 33@ = 0
- ELSE
- IF $9596 == False
- THEN
- 097A: play_audio_at $tempvar_X_coord $tempvar_Y_coord $tempvar_Z_coord event 1053
- 00BC: show_text_highpriority GXT 'AMMUC' time 5000 flag 1
- 09D5: play_sound_of_actor $AMMU_Seller soundslot 322 unknown_flags 0 0 1 as $10081 // extended 0947
- $9584 = 0
- $9596 = True
- END
- END
- ELSE
- 04DD: $9594 = actor $PLAYER_ACTOR armour
- 0945: get_player $PLAYER_CHAR max_armour_to $9595
- IF $9595 > $9594
- THEN
- 09D5: play_sound_of_actor $AMMU_Seller soundslot 323 unknown_flags 0 0 1 as $10081 // extended 0947
- 0790: charge_money_for_shopping_item_with_textureCRC $AMMU_Selected_Weapon
- 097A: play_audio_at $tempvar_X_coord $tempvar_Y_coord $tempvar_Z_coord event 1052
- $9584 = 6
- 33@ = 0
- ELSE
- IF $9596 == False
- THEN
- 097A: play_audio_at $tempvar_X_coord $tempvar_Y_coord $tempvar_Z_coord event 1053
- 09D5: play_sound_of_actor $AMMU_Seller soundslot 322 unknown_flags 0 0 1 as $10081 // extended 0947
- 00BC: show_text_highpriority GXT 'AMMUD' time 5000 flag 1
- $9584 = 0
- $9596 = True
- END
- END
- END
- ELSE
- IF $2544 == False
- THEN
- 097A: play_audio_at $tempvar_X_coord $tempvar_Y_coord $tempvar_Z_coord event 1053
- 09D5: play_sound_of_actor $AMMU_Seller soundslot 324 unknown_flags 0 0 1 as $10081 // extended 0947
- 00BC: show_text_highpriority GXT 'SHOPNO' time 5000 flag 1
- $9584 = 0
- $2544 = True
- END
- END
- END
- END
- IF $9584 == 6
- THEN
- IF $2418 == True
- THEN
- 08DA: remove_panel $2417
- 03E6: remove_text_box
- $2418 = False
- END
- IF $2422 == False
- THEN
- 08D4: $2421 = create_panel_with_title 'AMMUN' position 29.0 20.0 width 93.0 columns 2 interactive False background True alignment ALIGN_LEFT
- 08D6: set_panel $2421 column 0 alignment ALIGN_LEFT
- 08DB: set_panel $2421 column 0 header 'WEAPON' data 'BOUGHT' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY'
- 08D6: set_panel $2421 column 1 alignment ALIGN_CENTRE
- 08DB: set_panel $2421 column 1 header 'COST' data 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY'
- 08EE: set_panel $2421 column 1 row 0 text_1number GXT 'DOLLAR' number $AMMU_Weapon_Cost
- 09DB: set_panel $2421 column 0 width 140
- 09DB: set_panel $2421 column 1 width 46
- $2422 = True
- END
- 33@ = 0
- $9584 = 7
- END
- IF $9584 == 7
- THEN
- IF 33@ >= 1000
- THEN
- IF $2422 == True
- THEN
- 08DA: remove_panel $2421
- $2422 = False
- END
- $9584 = 0
- IF 1 > $9584
- THEN
- IF $2418 == False
- THEN
- gosub @AMUNAT_PANEL_COST
- END
- END
- END
- END
- END
- ELSE
- gosub @AMUNAT_END_THREAD
- END
- ELSE
- gosub @AMUNAT_END_THREAD
- END
- END
- :AMUNAT_PANEL_COST
- IF $2418 == False
- THEN
- 0512: show_permanent_text_box 'AMMU_H3'
- IF $Current_Language == LANGUAGE_AMERICAN
- THEN
- 08D4: $2417 = create_panel_with_title 'AMMUN' position 29.0 95.0 width 93.0 columns 2 interactive False background True alignment ALIGN_LEFT
- ELSE
- IF $Current_Language == LANGUAGE_FRENCH
- THEN
- 08D4: $2417 = create_panel_with_title 'AMMUN' position 29.0 95.0 width 93.0 columns 2 interactive False background True alignment ALIGN_LEFT
- ELSE
- IF $Current_Language == LANGUAGE_GERMAN
- THEN
- 08D4: $2417 = create_panel_with_title 'AMMUN' position 29.0 95.0 width 93.0 columns 2 interactive False background True alignment ALIGN_LEFT
- ELSE
- IF $Current_Language == LANGUAGE_ITALIAN
- THEN
- 08D4: $2417 = create_panel_with_title 'AMMUN' position 29.0 95.0 width 93.0 columns 2 interactive False background True alignment ALIGN_LEFT
- ELSE
- IF $Current_Language == LANGUAGE_SPANISH
- THEN
- 08D4: $2417 = create_panel_with_title 'AMMUN' position 29.0 95.0 width 93.0 columns 2 interactive False background True alignment ALIGN_LEFT
- END
- END
- END
- END
- END
- 08D6: set_panel $2417 column 0 alignment ALIGN_LEFT
- 08DB: set_panel $2417 column 0 header 'WEAPON' data s$AMMU_Weapon_Name 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY'
- 08D6: set_panel $2417 column 1 alignment ALIGN_CENTRE
- 08DB: set_panel $2417 column 1 header 'COST' data 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY'
- 08EE: set_panel $2417 column 1 row 0 text_1number GXT 'DOLLAR' number $AMMU_Weapon_Cost
- 09DB: set_panel $2417 column 0 width 140
- 09DB: set_panel $2417 column 1 width 46
- $2418 = True
- END
- RETURN
- :AMUNAT_CLEAR
- IF $2420 == True
- THEN
- 03E6: remove_text_box
- 08DA: remove_panel $2419
- $2420 = False
- END
- IF $2424 == True
- THEN
- 03E6: remove_text_box
- 08DA: remove_panel $2423
- $2424 = False
- END
- IF $2418 == True
- THEN
- 03E6: remove_text_box
- 08DA: remove_panel $2417
- $2418 = False
- END
- IF $2422 == True
- THEN
- 08DA: remove_panel $2421
- $2422 = False
- END
- IF $AMMU_Stage >= 1
- THEN
- 03E6: remove_text_box
- END
- 03D5: remove_text 'AMMUA'
- 03D5: remove_text 'SHOPNO'
- 03D5: remove_text 'AMMUC'
- 03D5: remove_text 'AMMUD'
- $2420 = False
- $2424 = False
- $9544 = False
- $9584 = 0
- $2418 = False
- $2422 = False
- $2545 = False
- $2544 = False
- $9596 = False
- $AMMU_Stage = 2
- RETURN
- :AMUNAT_END_THREAD
- IF $2420 == True
- THEN
- 03E6: remove_text_box
- 08DA: remove_panel $2419
- $2420 = False
- END
- IF $2424 == True
- THEN
- 03E6: remove_text_box
- 08DA: remove_panel $2423
- $2424 = False
- END
- IF $2418 == True
- THEN
- 03E6: remove_text_box
- 08DA: remove_panel $2417
- $2418 = False
- END
- IF $2422 == True
- THEN
- 08DA: remove_panel $2421
- $2422 = False
- END
- IF $AMMU_Stage >= 1
- THEN
- 03E6: remove_text_box
- END
- 03D5: remove_text 'AMMUA'
- 03D5: remove_text 'SHOPNO'
- 03D5: remove_text 'AMMUC'
- 03D5: remove_text 'AMMUD'
- $2420 = False
- $2424 = False
- $flag_AMMU_Seller_Attack_Player = False
- $9544 = False
- $9584 = 0
- $2418 = False
- $2422 = False
- $2545 = False
- $2544 = False
- $9596 = False
- $AMMU_Stage = 0
- #COLT45.Destroy()
- #SILENCED.Destroy()
- #DESERT_EAGLE.Destroy()
- #CHROMEGUN.Destroy()
- #SAWNOFF.Destroy()
- #SHOTGSPA.Destroy()
- #GRENADE.Destroy()
- #MICRO_UZI.Destroy()
- #MP5LNG.Destroy()
- #TEC9.Destroy()
- #AK47.Destroy()
- #M4.Destroy()
- #CUNTGUN.Destroy()
- #SNIPER.Destroy()
- #ARMOUR.Destroy()
- #SATCHEL.Destroy()
- #BOMB.Destroy()
- #TEARGAS.Destroy()
- #MOLOTOV.Destroy()
- #M1911.Destroy()
- 03F0: enable_text_draw False
- $Seller_Model.Destroy()
- $AMMU_Seller.DestroyInstantly()
- 08F8: display_stat_update_box True
- 0581: enable_radar True
- 09BD: allow_other_threads_to_display_text_boxes False
- IF $5274 == True
- THEN
- 03E5: show_text_box 'ANR_56'
- $5274 = False
- END
- END_THREAD
- :AMUNAT_OBJECT_DESTROY
- $9543.Destroy()
- RETURN
- :AMUNAT_ANIMATION_GET
- IF OR
- $AMMU_Selected_Weapon_Model == #CHROMEGUN
- $AMMU_Selected_Weapon_Model == #SHOTGSPA
- $AMMU_Selected_Weapon_Model == #AK47
- $AMMU_Selected_Weapon_Model == #M4
- $AMMU_Selected_Weapon_Model == #CUNTGUN
- $AMMU_Selected_Weapon_Model == #SNIPER
- $AMMU_Selected_Weapon_Model == #SAWNOFF
- THEN
- v$9554 = "SHP_2H_LIFT"
- v$9558 = "SHP_2H_LIFT_END"
- $9585 = $AMMU_X_Seller
- $9585 += 0.231
- $9586 = $AMMU_Y_Seller
- $9586 += 0.636
- $9587 = $AMMU_Z_Seller
- $9587 += 1.053
- END
- IF OR
- $AMMU_Selected_Weapon_Model == #COLT45
- $AMMU_Selected_Weapon_Model == #SILENCED
- $AMMU_Selected_Weapon_Model == #DESERT_EAGLE
- $AMMU_Selected_Weapon_Model == #GRENADE
- $AMMU_Selected_Weapon_Model == #MICRO_UZI
- $AMMU_Selected_Weapon_Model == #MP5LNG
- $AMMU_Selected_Weapon_Model == #SATCHEL
- $AMMU_Selected_Weapon_Model == #TEC9
- THEN
- v$9554 = "SHP_1H_LIFT"
- v$9558 = "SHP_1H_LIFT_END"
- $9585 = $AMMU_X_Seller
- $9585 += 0.108
- $9586 = $AMMU_Y_Seller
- $9586 += 0.654
- $9587 = $AMMU_Z_Seller
- $9587 += 1.053
- END
- IF OR
- $AMMU_Selected_Weapon_Model == #TEARGAS
- $AMMU_Selected_Weapon_Model == #MOLOTOV
- THEN
- v$9554 = "SHP_1H_LIFT"
- v$9558 = "SHP_1H_LIFT_END"
- $9585 = $AMMU_X_Seller
- $9585 += 0.108
- $9586 = $AMMU_Y_Seller
- $9586 += 0.654
- $9587 = $AMMU_Z_Seller
- $9587 += 1.053
- END
- IF $AMMU_Selected_Weapon_Model == #ARMOUR
- THEN
- v$9554 = "SHP_AR_LIFT"
- v$9558 = "SHP_AR_LIFT_END"
- $9585 = $AMMU_X_Seller
- $9585 += 0.175
- $9586 = $AMMU_Y_Seller
- $9586 += 0.676
- $9587 = $AMMU_Z_Seller
- $9587 += 1.5
- END
- RETURN
- :AMUNAT_ANIMATION_PUT
- IF OR
- $AMMU_Selected_Weapon_Model == #CHROMEGUN
- $AMMU_Selected_Weapon_Model == #SHOTGSPA
- $AMMU_Selected_Weapon_Model == #AK47
- $AMMU_Selected_Weapon_Model == #M4
- $AMMU_Selected_Weapon_Model == #CUNTGUN
- $AMMU_Selected_Weapon_Model == #SNIPER
- $AMMU_Selected_Weapon_Model == #SAWNOFF
- THEN
- v$AMMU_Seller_Animation = "SHP_2H_RET_S"
- v$9566 = "SHP_2H_RET"
- END
- IF OR
- $AMMU_Selected_Weapon_Model == #COLT45
- $AMMU_Selected_Weapon_Model == #SILENCED
- $AMMU_Selected_Weapon_Model == #DESERT_EAGLE
- $AMMU_Selected_Weapon_Model == #GRENADE
- $AMMU_Selected_Weapon_Model == #MICRO_UZI
- $AMMU_Selected_Weapon_Model == #MP5LNG
- $AMMU_Selected_Weapon_Model == #SATCHEL
- $AMMU_Selected_Weapon_Model == #TEC9
- THEN
- v$AMMU_Seller_Animation = "SHP_1H_RET_S"
- v$9566 = "SHP_1H_RET"
- END
- IF OR
- $AMMU_Selected_Weapon_Model == #TEARGAS
- $AMMU_Selected_Weapon_Model == #MOLOTOV
- THEN
- v$AMMU_Seller_Animation = "SHP_1H_RET_S"
- v$9566 = "SHP_1H_RET"
- END
- IF $AMMU_Selected_Weapon_Model == #ARMOUR
- THEN
- v$AMMU_Seller_Animation = "SHP_AR_RET_S"
- v$9566 = "SHP_AR_RET"
- END
- RETURN
- :AMUNAT_SWITCH_CATEGORY
- $9597 = 0
- $9616 = 0
- $2515 = 0
- $9598 = 0
- $9599 = 0
- $9600 = 0
- $9601 = 0
- $9602 = 0
- $9603 = 0
- $9604 = 0
- $9605 = 0
- $9606 = 0
- $9607 = False
- $9608 = False
- $9609 = False
- $9610 = False
- $9611 = False
- $9612 = False
- $9613 = False
- $9614 = False
- $9615 = False
- :AMUNAT_SWITCH
- IF $AMMU_Available_Weapons > $9597
- jf @AMUNAT_END_SWITCH
- 0760: store_shopping_data_index $9597 textureCRC_to $AMMU_Selected_Weapon
- 0871: init_jump_table $AMMU_Selected_Weapon total_jumps 16 default_jump 0 @AMUNAT_DEFAULT jumps WEAPON_GRENADE @AMUNAT_GUN7 WEAPON_TEARGAS @AMUNAT_GUN7 WEAPON_MOLOTOV @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
- 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
- :AMUNAT_GUN1
- /*----------
- Name: Pistols
- 1) Pistol
- 2) Silenced pistol
- 3) Desert eagle
- ----------*/
- $9617[$9598] = $AMMU_Selected_Weapon
- $9598++
- IF $9607 == False
- THEN
- $2450[$9616] = 'GUN1'
- $9616++
- $9607 = True
- END
- jump @AMUNAT_DEFAULT
- :AMUNAT_GUN2
- /*----------
- Name: Shotguns
- 1) Shotgun
- 2) Combat Shotgun
- 3) Sawnoff
- ----------*/
- $9620[$9599] = $AMMU_Selected_Weapon
- $9599++
- IF $9608 == False
- THEN
- $2450[$9616] = 'GUN2'
- $9616++
- $9608 = True
- END
- jump @AMUNAT_DEFAULT
- :AMUNAT_GUN3
- /*----------
- Name: Micro SMGs
- 1) Micro SMG
- 2) Tec9
- ----------*/
- $9623[$9600] = $AMMU_Selected_Weapon
- $9600++
- IF $9609 == False
- THEN
- $2450[$9616] = 'GUN3'
- $9616++
- $9609 = True
- END
- jump @AMUNAT_DEFAULT
- :AMUNAT_GUN4
- /*----------
- Name: SMG
- 1) SMG
- ----------*/
- $9625[$9601] = $AMMU_Selected_Weapon
- $9601++
- IF $9610 == False
- THEN
- $2450[$9616] = 'GUN4'
- $9616++
- $9610 = True
- END
- jump @AMUNAT_DEFAULT
- :AMUNAT_GUN5
- /*----------
- Name: Assault
- 1) AK-47
- 2) M4
- ----------*/
- $9626[$9602] = $AMMU_Selected_Weapon
- $9602++
- IF $9611 == False
- THEN
- $2450[$9616] = 'GUN5'
- $9616++
- $9611 = True
- END
- jump @AMUNAT_DEFAULT
- :AMUNAT_GUN6
- /*----------
- Name: Rifles
- 1) Country rifle
- 2) Sniper rifle
- ----------*/
- $9628[$9604] = $AMMU_Selected_Weapon
- $9604++
- IF $9612 == False
- THEN
- $2450[$9616] = 'GUN6'
- $9616++
- $9612 = True
- END
- jump @AMUNAT_DEFAULT
- :AMUNAT_GUN7
- /*----------
- Name: Thrown
- 1) Grenade
- 2) Satchel charge
- ----------*/
- $9630[$9603] = $AMMU_Selected_Weapon
- $9603++
- IF $9613 == False
- THEN
- $9661[0] = 16
- $9661[1] = 17 // $9636 changed to $9661
- $9661[2] = 18
- $9661[3] = 39
- $9606 = 4
- $2450[$9616] = 'GUN7'
- $9616++
- $9613 = True
- END
- jump @AMUNAT_DEFAULT
- :AMUNAT_GUN8
- /*----------
- Name: Armour
- 1) Armour
- ----------*/
- $9632[$9605] = $AMMU_Selected_Weapon
- $9605++
- IF $9614 == False
- THEN
- $2450[$9616] = 'GUN8'
- $9616++
- $9614 = True
- END
- :AMUNAT_DEFAULT
- $9597++
- jump @AMUNAT_SWITCH
- :AMUNAT_END_SWITCH
- $2515 = $9616
- WHILE $2515 < 12
- $2438[$2515] = -1
- $2426[$2515] = NULL
- $2450[$2515] = 'DUMMY'
- $2515++
- END
- RETURN
- :AMUNAT_PANEL_CATEGORY
- IF $2420 == False
- THEN
- 0512: show_permanent_text_box 'AMMU_H'
- IF $Current_Language == LANGUAGE_AMERICAN
- THEN
- 08D4: $2419 = create_panel_with_title 'AMMUN' position 29.0 145.0 width 186.0 columns 1 interactive True background True alignment ALIGN_LEFT
- ELSE
- IF $Current_Language == LANGUAGE_FRENCH
- THEN
- 08D4: $2419 = create_panel_with_title 'AMMUN' position 29.0 145.0 width 186.0 columns 1 interactive True background True alignment ALIGN_LEFT
- ELSE
- IF $Current_Language == LANGUAGE_GERMAN
- THEN
- 08D4: $2419 = create_panel_with_title 'AMMUN' position 29.0 165.0 width 186.0 columns 1 interactive True background True alignment ALIGN_LEFT
- ELSE
- IF $Current_Language == LANGUAGE_ITALIAN
- THEN
- 08D4: $2419 = create_panel_with_title 'AMMUN' position 29.0 145.0 width 186.0 columns 1 interactive True background True alignment ALIGN_LEFT
- ELSE
- IF $Current_Language == LANGUAGE_SPANISH
- THEN
- 08D4: $2419 = create_panel_with_title 'AMMUN' position 29.0 145.0 width 186.0 columns 1 interactive True background True alignment ALIGN_LEFT
- END
- END
- END
- END
- END
- 08D6: set_panel $2419 column 0 alignment ALIGN_LEFT
- 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]
- $2420 = True
- END
- RETURN
- :AMUNAT_PANEL_WEAPONS
- $9636 = 0
- IF s$9549 == 'GUN1'
- THEN
- WHILE $9598 > $9636
- 078C: get_shopping_item_with_textureCRC $9617[$9636] nametag_to s$AMMU_Weapon_Name
- $2450[$9636] = s$AMMU_Weapon_Name
- $9633[$9636] = $9617[$9636]
- $9636++
- END
- END
- IF s$9549 == 'GUN2'
- THEN
- WHILE $9599 > $9636
- 078C: get_shopping_item_with_textureCRC $9620[$9636] nametag_to s$AMMU_Weapon_Name
- $2450[$9636] = s$AMMU_Weapon_Name
- $9633[$9636] = $9620[$9636]
- $9636++
- END
- END
- IF s$9549 == 'GUN3'
- THEN
- WHILE $9600 > $9636
- 078C: get_shopping_item_with_textureCRC $9623[$9636] nametag_to s$AMMU_Weapon_Name
- $2450[$9636] = s$AMMU_Weapon_Name
- $9633[$9636] = $9623[$9636]
- $9636++
- END
- END
- IF s$9549 == 'GUN4'
- THEN
- WHILE $9601 > $9636
- 078C: get_shopping_item_with_textureCRC $9625[$9636] nametag_to s$AMMU_Weapon_Name
- $2450[$9636] = s$AMMU_Weapon_Name
- $9633[$9636] = $9625[$9636]
- $9636++
- END
- END
- IF s$9549 == 'GUN5'
- THEN
- WHILE $9602 > $9636
- 078C: get_shopping_item_with_textureCRC $9626[$9636] nametag_to s$AMMU_Weapon_Name
- $2450[$9636] = s$AMMU_Weapon_Name
- $9633[$9636] = $9626[$9636]
- $9636++
- END
- END
- IF s$9549 == 'GUN6'
- THEN
- WHILE $9604 > $9636
- 078C: get_shopping_item_with_textureCRC $9628[$9636] nametag_to s$AMMU_Weapon_Name
- $2450[$9636] = s$AMMU_Weapon_Name
- $9633[$9636] = $9628[$9636]
- $9636++
- END
- END
- IF s$9549 == 'GUN7'
- THEN
- s$2450[0] = '342' // Rocket Launcher
- s$2450[1] = '343' // Heat Seeking Rocket Launcher
- s$2450[2] = '344' // Flamethrower
- s$2450[3] = '363' // Minigun
- $9633[0] = 16
- $9633[1] = 17
- $9633[2] = 18
- $9633[3] = 39
- $9661 = 4
- WHILE $9603 > $9636
- 078C: get_shopping_item_with_textureCRC $9630[$9636] nametag_to s$AMMU_Weapon_Name
- $2450[$9636] = s$AMMU_Weapon_Name
- $9633[$9636] = $9630[$9636]
- $9636++
- END
- END
- IF s$9549 == 'GUN8'
- THEN
- WHILE $9605 > $9636
- 078C: get_shopping_item_with_textureCRC $9632[$9636] nametag_to s$AMMU_Weapon_Name
- $2450[$9636] = s$AMMU_Weapon_Name
- $9633[$9636] = $9632[$9636]
- $9636++
- END
- END
- $2515 = $9636
- WHILE $2515 < 12
- $2438[$2515] = -1
- $2426[$2515] = NULL
- $2450[$2515] = 'DUMMY'
- $2515++
- END
- IF $2424 == False
- THEN
- 0512: show_permanent_text_box 'AMMU_H2'
- IF $Current_Language == LANGUAGE_AMERICAN
- THEN
- 08D4: $2423 = create_panel_with_title 'AMMUN' position 29.0 145.0 width 186.0 columns 1 interactive True background True alignment ALIGN_LEFT
- ELSE
- IF $Current_Language == LANGUAGE_FRENCH
- THEN
- 08D4: $2423 = create_panel_with_title 'AMMUN' position 29.0 145.0 width 186.0 columns 1 interactive True background True alignment ALIGN_LEFT
- ELSE
- IF $Current_Language == LANGUAGE_GERMAN
- THEN
- 08D4: $2423 = create_panel_with_title 'AMMUN' position 29.0 165.0 width 186.0 columns 1 interactive True background True alignment ALIGN_LEFT
- ELSE
- IF $Current_Language == LANGUAGE_ITALIAN
- THEN
- 08D4: $2423 = create_panel_with_title 'AMMUN' position 29.0 145.0 width 186.0 columns 1 interactive True background True alignment ALIGN_LEFT
- ELSE
- IF $Current_Language == LANGUAGE_SPANISH
- THEN
- 08D4: $2423 = create_panel_with_title 'AMMUN' position 29.0 145.0 width 186.0 columns 1 interactive True background True alignment ALIGN_LEFT
- END
- END
- END
- END
- END
- 08D6: set_panel $2423 column 0 alignment ALIGN_LEFT
- 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]
- $2424 = True
- END
- RETURN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement