DavidReyes2250 Posted February 25, 2021 Share Posted February 25, 2021 Hi ... again, I already made several posts about coding the main script, but I try to understand the operation of some codes to get an idea of how to create or modify a script, but hey. I'm here to find out how I can add a weapon to purchase from the Ammu-Nation. I had already seen some posts that say how to do it, but the problem is that they only show how to do it but they used the previous versions of Sanny Builder, (because I have the latest version). In my case, I would like to know for example how to add a weapon in the "Assault" section and how I could do it with any section. I had seen that ZAZ already did this by adding the heavy weapons, in my case I want to know how to modify the original on my own. Link to comment Share on other sites More sharing options...
ZAZ Posted February 25, 2021 Share Posted February 25, 2021 The Ammu script reads the content of shopping.dat, then it sort the content by weapon group for the different menues > so you can't add another weapon to the assult menue The assult menue shows M4 as well as AK47 If not, then it's because of the story line check 00D6: if 0018: $CASINO_TOTAL_PASSED_MISSIONS > 2 004D: jump_if_false @AMUNAT_1638 075F: store_shopping_data_entries_number_to $AMMU_AVAILABLE_WEAPONS Spoiler :AMUNAT_1638 00D6: if 0018: $TORENO_TOTAL_PASSED_MISSIONS > 7 004D: jump_if_false @AMUNAT_1706 0004: $AMMU_AVAILABLE_WEAPONS = 15 00D6: if 0038: $2573 == 0 004D: jump_if_false @AMUNAT_1699 03E5: show_text_box 'NEWWEAP' // Es ist eine neue Waffe erhšltlich. 0004: $2573 = 1 :AMUNAT_1699 0002: jump @AMUNAT_2311 :AMUNAT_1706 00D6: if 0018: $SYNDICATE_TOTAL_PASSED_MISSIONS > 9 004D: jump_if_false @AMUNAT_1774 0004: $AMMU_AVAILABLE_WEAPONS = 14 00D6: if 0038: $2572 == 0 004D: jump_if_false @AMUNAT_1767 03E5: show_text_box 'NEWWEAP' // Es ist eine neue Waffe erhšltlich. 0004: $2572 = 1 :AMUNAT_1767 0002: jump @AMUNAT_2311 :AMUNAT_1774 00D6: if 0018: $WUZIMU_TOTAL_PASSED_MISSIONS > 0 004D: jump_if_false @AMUNAT_1842 0004: $AMMU_AVAILABLE_WEAPONS = 13 00D6: if 0038: $2571 == 0 004D: jump_if_false @AMUNAT_1835 03E5: show_text_box 'NEWWEAP' // Es ist eine neue Waffe erhšltlich. 0004: $2571 = 1 :AMUNAT_1835 0002: jump @AMUNAT_2311 :AMUNAT_1842 00D6: if 0018: $SYNDICATE_TOTAL_PASSED_MISSIONS > 7 004D: jump_if_false @AMUNAT_1910 0004: $AMMU_AVAILABLE_WEAPONS = 12 00D6: if 0038: $2570 == 0 004D: jump_if_false @AMUNAT_1903 03E5: show_text_box 'NEWWEAP' // Es ist eine neue Waffe erhšltlich. 0004: $2570 = 1 :AMUNAT_1903 0002: jump @AMUNAT_2311 :AMUNAT_1910 00D6: if 0018: $TRUTH_TOTAL_PASSED_MISSIONS > 0 004D: jump_if_false @AMUNAT_1978 0004: $AMMU_AVAILABLE_WEAPONS = 11 00D6: if 0038: $2569 == 0 004D: jump_if_false @AMUNAT_1971 03E5: show_text_box 'NEWWEAP' // Es ist eine neue Waffe erhšltlich. 0004: $2569 = 1 :AMUNAT_1971 0002: jump @AMUNAT_2311 :AMUNAT_1978 00D6: if 0038: $ALL_CATALINA_MISSIONS_PASSED == 1 004D: jump_if_false @AMUNAT_2046 0004: $AMMU_AVAILABLE_WEAPONS = 10 00D6: if 0038: $2568 == 0 004D: jump_if_false @AMUNAT_2039 03E5: show_text_box 'NEWWEAP' // Es ist eine neue Waffe erhšltlich. 0004: $2568 = 1 :AMUNAT_2039 0002: jump @AMUNAT_2311 :AMUNAT_2046 00D6: if 0018: $OG_LOC_TOTAL_PASSED_MISSIONS > 4 004D: jump_if_false @AMUNAT_2114 0004: $AMMU_AVAILABLE_WEAPONS = 9 00D6: if 0038: $2567 == 0 004D: jump_if_false @AMUNAT_2107 03E5: show_text_box 'NEWWEAP' // Es ist eine neue Waffe erhšltlich. 0004: $2567 = 1 :AMUNAT_2107 0002: jump @AMUNAT_2311 :AMUNAT_2114 00D6: if 0018: $SMOKE_TOTAL_PASSED_MISSIONS > 3 004D: jump_if_false @AMUNAT_2182 0004: $AMMU_AVAILABLE_WEAPONS = 8 00D6: if 0038: $2566 == 0 004D: jump_if_false @AMUNAT_2175 03E5: show_text_box 'NEWWEAP' // Es ist eine neue Waffe erhšltlich. 0004: $2566 = 1 :AMUNAT_2175 0002: jump @AMUNAT_2311 :AMUNAT_2182 00D6: if 0018: $RYDER_TOTAL_PASSED_MISSIONS > 2 004D: jump_if_false @AMUNAT_2250 0004: $AMMU_AVAILABLE_WEAPONS = 7 00D6: if 0038: $2565 == 0 004D: jump_if_false @AMUNAT_2243 03E5: show_text_box 'NEWWEAP' // Es ist eine neue Waffe erhšltlich. 0004: $2565 = 1 :AMUNAT_2243 0002: jump @AMUNAT_2311 :AMUNAT_2250 00D6: if 001A: 2 > $LS_FINAL_TOTAL_PASSED_MISSIONS 004D: jump_if_false @AMUNAT_2311 0004: $AMMU_AVAILABLE_WEAPONS = 6 To find out how to add another weapon to the assault weapon group menue is hard work What exactly is your plan? CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
DavidReyes2250 Posted February 25, 2021 Author Share Posted February 25, 2021 The weapons that I want in shopping.dat are already registered and there are 2, and I want to add a weapon in the "assault" section and one in the "rifles" section Link to comment Share on other sites More sharing options...
ZAZ Posted February 26, 2021 Share Posted February 26, 2021 8 hours ago, DavidReyes2250 said: The weapons that I want in shopping.dat are already registered and there are 2, and I want to add a weapon in the "assault" section and one in the "rifles" section Sorry, but this doesn't sound like exactly informations CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
DavidReyes2250 Posted February 26, 2021 Author Share Posted February 26, 2021 15 hours ago, ZAZ said: Sorry, but this doesn't sound like exactly informations What I wanted to say is that the weapons that I want to add to the Ammu-Nation, are already registered in "shopping.dat", but in my case I would like to know how to add a weapon in the "Asault" section and one in the "Rifles section. " Link to comment Share on other sites More sharing options...
ZAZ Posted February 27, 2021 Share Posted February 27, 2021 All weapons and the armour, which are listed in originally shopping.dat are available in unlocked Ammunation To make any of these items available twice isn't possible, because... The weapon collections of the sub menues are arranged by this jumptable :AMUNAT_10127 00D6: if 001C: $AMMU_AVAILABLE_WEAPONS > $9597 // (int) 004D: jump_if_false @AMUNAT_10904 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_10890 jumps 16 @AMUNAT_10738 22 @AMUNAT_10282 23 @AMUNAT_10282 24 @AMUNAT_10282 25 @AMUNAT_10358 26 @AMUNAT_10358 27 @AMUNAT_10358 0872: jump_table_jumps 28 @AMUNAT_10434 29 @AMUNAT_10510 30 @AMUNAT_10586 31 @AMUNAT_10586 32 @AMUNAT_10434 33 @AMUNAT_10662 34 @AMUNAT_10662 39 @AMUNAT_10738 48 @AMUNAT_10814 This code gets the weapon number from shopping.dat entry 0760: store_shopping_data_index $9597 textureCRC_to $AMMU_SELECTED_WEAPON Then the weapon number is used as jumptable selector 0871: init_jump_table $AMMU_SELECTED_WEAPON total_jumps 16 default_jump 0 @AMUNAT_10890 jumps 16 @AMUNAT_10738 22 @AMUNAT_10282 23 @AMUNAT_10282 24 @AMUNAT_10282 25 @AMUNAT_10358 26 @AMUNAT_10358 27 @AMUNAT_10358 0872: jump_table_jumps 28 @AMUNAT_10434 29 @AMUNAT_10510 30 @AMUNAT_10586 31 @AMUNAT_10586 32 @AMUNAT_10434 33 @AMUNAT_10662 34 @AMUNAT_10662 39 @AMUNAT_10738 48 @AMUNAT_10814 To insert a jumptable selector twice, won't work ___________________________________________________________________________ Now I show how to add the Chainsaw to the Assault collection Add chainsaw to shopping.dat (Note: adding weapons to shopping.dat requires the entry of weapon.dat > A: string weaponType) section Weapons # weapontype, nametag, ammo, stats to change, price pistol PISTOL 30 respect 0 sexy 0 200 pistol_silenced PISTSL 30 respect 0 sexy 0 600 desert_eagle DEAGLE 15 respect 0 sexy 0 1200 grenade GRENADE 5 respect 0 sexy 0 300 shotgun SHOTGN1 15 respect 0 sexy 0 600 spas12 SHOTGN2 10 respect 0 sexy 0 1000 sawnoff SHOTGN3 12 respect 0 sexy 0 800 micro_uzi UZI 60 respect 0 sexy 0 500 tec9 TEC9 60 respect 0 sexy 0 300 mp5 MP5 90 respect 0 sexy 0 2000 ak47 AK 120 respect 0 sexy 0 3500 m4 M4 150 respect 0 sexy 0 4500 countryrifle RIFLE 20 respect 0 sexy 0 1000 sniperrifle SNIPE 10 respect 0 sexy 0 5000 rlauncher ROCKET 5 respect 0 sexy 0 10000 rlauncher_hs ROCKHS 5 respect 0 sexy 0 12000 fthrower FLAMET 80 respect 0 sexy 0 6000 satchel_charge DETONA 1 respect 0 sexy 0 2000 minigun MINIGU 500 respect 0 sexy 0 10000 armour ARMOUR 1 respect 0 sexy 0 200 chainsaw CHAINSA 1 respect 0 sexy 0 300 end section ammun1 type weapons item pistol item tec9 item micro_uzi item shotgun item grenade item armour item mp5 item sawnoff item pistol_silenced item satchel_charge item countryrifle item sniperrifle item ak47 item m4 item desert_eagle item spas12 item chainsaw end if necessary also to section ammun2,3,4,5 Then modify the jumptable: 0871: init_jump_table $AMMU_SELECTED_WEAPON total_jumps 17 default_jump 0 @AMUNAT_10890 jumps 9 @AMUNAT_10586 16 @AMUNAT_10738 22 @AMUNAT_10282 23 @AMUNAT_10282 24 @AMUNAT_10282 25 @AMUNAT_10358 26 @AMUNAT_10358 0872: jump_table_jumps 27 @AMUNAT_10358 28 @AMUNAT_10434 29 @AMUNAT_10510 30 @AMUNAT_10586 31 @AMUNAT_10586 32 @AMUNAT_10434 33 @AMUNAT_10662 34 @AMUNAT_10662 39 @AMUNAT_10738 0872: jump_table_jumps 48 @AMUNAT_10814 -1 @AMUNAT_10890 -1 @AMUNAT_10890 -1 @AMUNAT_10890 -1 @AMUNAT_10890 -1 @AMUNAT_10890 -1 @AMUNAT_10890 -1 @AMUNAT_10890 -1 @AMUNAT_10890 In addition does the Ammu_Seller need to know what animation he has to do add the neccesarry check 04A3: $AMMU_SELECTED_WEAPON_MODEL == 341// model id here :AMUNAT_8960 00D6: if or 04A3: $AMMU_SELECTED_WEAPON_MODEL == 349 // == constant 04A3: $AMMU_SELECTED_WEAPON_MODEL == 351 // == constant 04A3: $AMMU_SELECTED_WEAPON_MODEL == 355 // == constant 04A3: $AMMU_SELECTED_WEAPON_MODEL == 356 // == constant 04A3: $AMMU_SELECTED_WEAPON_MODEL == 358 // == constant 04A3: $AMMU_SELECTED_WEAPON_MODEL == 357 // == constant 04A3: $AMMU_SELECTED_WEAPON_MODEL == 341 // $ == any 004D: jump_if_false @AMUNAT_9113 06D1: v$9554 = "SHP_2H_LIFT" // v$ = string 06D1: v$9558 = "SHP_2H_LIFT_END" // v$ = string 0086: $9585 = $AMMU_X_SELLER // (float) 0009: $9585 += 0.231 0086: $9586 = $AMMU_Y_SELLER // (float) 0009: $9586 += 0.636 0086: $9587 = $AMMU_Z_SELLER // (float) 0009: $9587 += 1.053 :AMUNAT_9113 00D6: if 04A3: $AMMU_SELECTED_WEAPON_MODEL == 350 // == constant 004D: jump_if_false @AMUNAT_9226 06D1: v$9554 = "SHP_2H_LIFT" // v$ = string 06D1: v$9558 = "SHP_2H_LIFT_END" // v$ = string 0086: $9585 = $AMMU_X_SELLER // (float) 0009: $9585 += 0.231 0086: $9586 = $AMMU_Y_SELLER // (float) 0009: $9586 += 0.636 0086: $9587 = $AMMU_Z_SELLER // (float) 0009: $9587 += 1.053 :AMUNAT_9226 00D6: if or 04A3: $AMMU_SELECTED_WEAPON_MODEL == 346 // == constant 04A3: $AMMU_SELECTED_WEAPON_MODEL == 347 // == constant 04A3: $AMMU_SELECTED_WEAPON_MODEL == 348 // == constant 04A3: $AMMU_SELECTED_WEAPON_MODEL == 342 // == constant 04A3: $AMMU_SELECTED_WEAPON_MODEL == 352 // == constant 04A3: $AMMU_SELECTED_WEAPON_MODEL == 353 // == constant 004D: jump_if_false @AMUNAT_9379 06D1: v$9554 = "SHP_1H_LIFT" // v$ = string 06D1: v$9558 = "SHP_1H_LIFT_END" // v$ = string 0086: $9585 = $AMMU_X_SELLER // (float) 0009: $9585 += 0.108 0086: $9586 = $AMMU_Y_SELLER // (float) 0009: $9586 += 0.654 0086: $9587 = $AMMU_Z_SELLER // (float) 0009: $9587 += 1.053 :AMUNAT_9379 00D6: if or 04A3: $AMMU_SELECTED_WEAPON_MODEL == 363 // == constant 04A3: $AMMU_SELECTED_WEAPON_MODEL == 372 // == constant 004D: jump_if_false @AMUNAT_9500 06D1: v$9554 = "SHP_1H_LIFT" // v$ = string 06D1: v$9558 = "SHP_1H_LIFT_END" // v$ = string 0086: $9585 = $AMMU_X_SELLER // (float) 0009: $9585 += 0.108 0086: $9586 = $AMMU_Y_SELLER // (float) 0009: $9586 += 0.654 0086: $9587 = $AMMU_Z_SELLER // (float) 0009: $9587 += 1.053 :AMUNAT_9500 00D6: if 04A3: $AMMU_SELECTED_WEAPON_MODEL == 373 // == constant 004D: jump_if_false @AMUNAT_9613 06D1: v$9554 = "SHP_AR_LIFT" // v$ = string 06D1: v$9558 = "SHP_AR_LIFT_END" // v$ = string 0086: $9585 = $AMMU_X_SELLER // (float) 0009: $9585 += 0.175 0086: $9586 = $AMMU_Y_SELLER // (float) 0009: $9586 += 0.676 0086: $9587 = $AMMU_Z_SELLER // (float) 0009: $9587 += 1.5 :AMUNAT_9613 0051: return and here :AMUNAT_9615 00D6: if or 04A3: $AMMU_SELECTED_WEAPON_MODEL == 349 // == constant 04A3: $AMMU_SELECTED_WEAPON_MODEL == 351 // == constant 04A3: $AMMU_SELECTED_WEAPON_MODEL == 355 // == constant 04A3: $AMMU_SELECTED_WEAPON_MODEL == 356 // == constant 04A3: $AMMU_SELECTED_WEAPON_MODEL == 358 // == constant 04A3: $AMMU_SELECTED_WEAPON_MODEL == 357 // == constant 04A3: $AMMU_SELECTED_WEAPON_MODEL == 341 // $ == any 004D: jump_if_false @AMUNAT_9710 06D1: v$AMMU_SELLER_ANIMATION = "SHP_2H_RET_S" // v$ = string 06D1: v$9566 = "SHP_2H_RET" // v$ = string :AMUNAT_9710 00D6: if 04A3: $AMMU_SELECTED_WEAPON_MODEL == 350 // == constant 004D: jump_if_false @AMUNAT_9765 06D1: v$AMMU_SELLER_ANIMATION = "SHP_2H_RET_S" // v$ = string 06D1: v$9566 = "SHP_2H_RET" // v$ = string :AMUNAT_9765 00D6: if or 04A3: $AMMU_SELECTED_WEAPON_MODEL == 346 // == constant 04A3: $AMMU_SELECTED_WEAPON_MODEL == 347 // == constant 04A3: $AMMU_SELECTED_WEAPON_MODEL == 348 // == constant 04A3: $AMMU_SELECTED_WEAPON_MODEL == 342 // == constant 04A3: $AMMU_SELECTED_WEAPON_MODEL == 352 // == constant 04A3: $AMMU_SELECTED_WEAPON_MODEL == 353 // == constant 004D: jump_if_false @AMUNAT_9860 06D1: v$AMMU_SELLER_ANIMATION = "SHP_1H_RET_S" // v$ = string 06D1: v$9566 = "SHP_1H_RET" // v$ = string :AMUNAT_9860 00D6: if or 04A3: $AMMU_SELECTED_WEAPON_MODEL == 363 // == constant 04A3: $AMMU_SELECTED_WEAPON_MODEL == 372 // == constant 004D: jump_if_false @AMUNAT_9923 06D1: v$AMMU_SELLER_ANIMATION = "SHP_1H_RET_S" // v$ = string 06D1: v$9566 = "SHP_1H_RET" // v$ = string :AMUNAT_9923 00D6: if 04A3: $AMMU_SELECTED_WEAPON_MODEL == 373 // == constant 004D: jump_if_false @AMUNAT_9978 06D1: v$AMMU_SELLER_ANIMATION = "SHP_AR_RET_S" // v$ = string 06D1: v$9566 = "SHP_AR_RET" // v$ = string :AMUNAT_9978 0051: return CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
DavidReyes2250 Posted February 28, 2021 Author Share Posted February 28, 2021 (edited) The method worked for me, but other problems arose, in my case, the "Armor" section has disappeared and in the "Thrown" section is the sniper that I put in, and the grenades and explosive charges have disappeared and the assault weapon that I wanted to put in the "Assault" section does not appear I guess the problem is in the jumptable, here is my jumptable: 0871: init_jump_table $AMMU_SELECTED_WEAPON total_jumps 18 default_jump 0 @AMUNAT_10890 jumps 16 @AMUNAT_10738 22 @AMUNAT_10282 23 @AMUNAT_10282 24 @AMUNAT_10282 25 @AMUNAT_10358 26 @AMUNAT_10358 27 @AMUNAT_10358 0872: jump_table_jumps 28 @AMUNAT_10434 29 @AMUNAT_10510 30 @AMUNAT_10586 31 @AMUNAT_10586 74 @AMUNAT_10586 32 @AMUNAT_10434 33 @AMUNAT_10662 34 @AMUNAT_10662 76 @AMUNAT_10662 0872: jump_table_jumps 39 @AMUNAT_10738 48 @AMUNAT_10814 -1 @AMUNAT_10890 -1 @AMUNAT_10890 -1 @AMUNAT_10890 -1 @AMUNAT_10890 -1 @AMUNAT_10890 -1 @AMUNAT_10890 -1 @AMUNAT_10890 Edited February 28, 2021 by DavidReyes2250 Link to comment Share on other sites More sharing options...
ZAZ Posted February 28, 2021 Share Posted February 28, 2021 (edited) weapon number 74 and 76, how should i help there As first, take the cleo script below and check if the game returns all necessary informations of your shopping.dat entries {$CLEO .cs} :GET_SHOPPING_DAT_data thread 'SHOPDAT' wait 1000 075E: set_shopping_item_pool_items_section_to "ammun1" // 075F: store_shopping_data_entries_number_to 5@ 1@ = -1 3@ = 0 4@ = 0 while true wait 0 03F0: enable_text_draw 1 045A: text_draw_1number 50.0 120.0 'NUMBER' 5@ // amount of shopping_data_entries 045A: text_draw_1number 50.0 140.0 'NUMBER' 1@ // current shopping_data_entry 033E: set_draw_text_position 50.0 160.0 GXT 15@s // item name 045A: text_draw_1number 50.0 180.0 'NUMBER' 3@ // weapon number 045A: text_draw_1number 50.0 200.0 'NUMBER' 6@ // model id 045A: text_draw_1number 50.0 220.0 'NUMBER' 4@ // weapon group if 0AB0: key_pressed 8//-----------------------press backspace then 1@ += 1 if 002D: 1@ >= 5@ then 1@ = 0 end 0760: store_shopping_data_index 1@ textureCRC_to 3@ 0781: get_weapon_with_ID 3@ model_to 6@ 0782: get_weapon_with_ID 3@ weapon_group_to 4@ 078C: get_shopping_item_with_textureCRC 3@ nametag_to 15@s // 8-byte string 00BC: show_text_highpriority GXT 15@s time 1000 flag 1 wait 1000 end end Then build the jumptable in that way, that the weapon numbers are arranged in ascending order 0871: init_jump_table $AMMU_SELECTED_WEAPON total_jumps 18 default_jump 0 @AMUNAT_10890 jumps 16 @AMUNAT_10738 22 @AMUNAT_10282 23 @AMUNAT_10282 24 @AMUNAT_10282 25 @AMUNAT_10358 26 @AMUNAT_10358 27 @AMUNAT_10358 0872: jump_table_jumps 28 @AMUNAT_10434 29 @AMUNAT_10510 30 @AMUNAT_10586 31 @AMUNAT_10586 32 @AMUNAT_10434 33 @AMUNAT_10662 34 @AMUNAT_10662 39 @AMUNAT_10738 48 @AMUNAT_10814 0872: jump_table_jumps 74 @AMUNAT_10586 76 @AMUNAT_10662 -1 @AMUNAT_10890 -1 @AMUNAT_10890 -1 @AMUNAT_10890 -1 @AMUNAT_10890 -1 @AMUNAT_10890 -1 @AMUNAT_10890 -1 @AMUNAT_10890 Edited February 28, 2021 by ZAZ CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
DavidReyes2250 Posted February 28, 2021 Author Share Posted February 28, 2021 (edited) Ah, is that guns 74 and 76 are new weapons that I added to the game without replacing, the 74 is an assault weapon and the 76 is a new sniper The weapons appear to me correctly but there is only one small problem ... again, now from what I see, the new sniper (76) apparently replaced the grenade for some reason and the assault weapon (74) is in the section " rifles "and this replaces the rifle :// Edited February 28, 2021 by DavidReyes2250 Link to comment Share on other sites More sharing options...
MRSK Posted March 3, 2021 Share Posted March 3, 2021 On 2/28/2021 at 11:20 AM, ZAZ said: weapon number 74 and 76, how should i help there As first, take the cleo script below and check if the game returns all necessary informations of your shopping.dat entries {$CLEO .cs} :GET_SHOPPING_DAT_data thread 'SHOPDAT' wait 1000 075E: set_shopping_item_pool_items_section_to "ammun1" // 075F: store_shopping_data_entries_number_to 5@ 1@ = -1 3@ = 0 4@ = 0 while true wait 0 03F0: enable_text_draw 1 045A: text_draw_1number 50.0 120.0 'NUMBER' 5@ // amount of shopping_data_entries 045A: text_draw_1number 50.0 140.0 'NUMBER' 1@ // current shopping_data_entry 033E: set_draw_text_position 50.0 160.0 GXT 15@s // item name 045A: text_draw_1number 50.0 180.0 'NUMBER' 3@ // weapon number 045A: text_draw_1number 50.0 200.0 'NUMBER' 6@ // model id 045A: text_draw_1number 50.0 220.0 'NUMBER' 4@ // weapon group if 0AB0: key_pressed 8//-----------------------press backspace then 1@ += 1 if 002D: 1@ >= 5@ then 1@ = 0 end 0760: store_shopping_data_index 1@ textureCRC_to 3@ 0781: get_weapon_with_ID 3@ model_to 6@ 0782: get_weapon_with_ID 3@ weapon_group_to 4@ 078C: get_shopping_item_with_textureCRC 3@ nametag_to 15@s // 8-byte string 00BC: show_text_highpriority GXT 15@s time 1000 flag 1 wait 1000 end end Then build the jumptable in that way, that the weapon numbers are arranged in ascending order 0871: init_jump_table $AMMU_SELECTED_WEAPON total_jumps 18 default_jump 0 @AMUNAT_10890 jumps 16 @AMUNAT_10738 22 @AMUNAT_10282 23 @AMUNAT_10282 24 @AMUNAT_10282 25 @AMUNAT_10358 26 @AMUNAT_10358 27 @AMUNAT_10358 0872: jump_table_jumps 28 @AMUNAT_10434 29 @AMUNAT_10510 30 @AMUNAT_10586 31 @AMUNAT_10586 32 @AMUNAT_10434 33 @AMUNAT_10662 34 @AMUNAT_10662 39 @AMUNAT_10738 48 @AMUNAT_10814 0872: jump_table_jumps 74 @AMUNAT_10586 76 @AMUNAT_10662 -1 @AMUNAT_10890 -1 @AMUNAT_10890 -1 @AMUNAT_10890 -1 @AMUNAT_10890 -1 @AMUNAT_10890 -1 @AMUNAT_10890 -1 @AMUNAT_10890 dude Could You PLease Make Knife Throw Script FOr GTA VC RyanDri3957V 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now