Jump to content

Gang Weapons Question


Recommended Posts

well, ive downloaded the "SA GANG WEAPONS EDITOR" by Emperror, cause i was trying to avoid the gangs carry fire weapons. So, i set only melee weapons, like bats, brass knuckles and stuff like that. but that doesn't seem to work, cause they still carry 9mm and Uzi. So, i wanted to know if there is any other tool that does the same job or any code to fix this thing up. Thanks 4 reading, if you know something please answer icon14.gif

Link to comment
https://gtaforums.com/topic/463329-gang-weapons-question/
Share on other sites

 

{$CLEO}0000:while true   wait 0   if   0256:   player $PLAYER_CHAR defined    then       for 0@ = 0 to 7           0237: set_gang 0@ weapons_to 0 0 0       end       break   endend0000:0000:0A93: end_custom_thread

 

 

This code disables the weapons of all gangs but by recruiting a member he will automaticly get a 9mm

 

Link to comment
https://gtaforums.com/topic/463329-gang-weapons-question/#findComment-1060208689
Share on other sites

{$CLEO}0000:while true   wait 0   if   0256:   player $PLAYER_CHAR defined    then       for 0@ = 0 to 7           0237: set_gang 0@ weapons_to 0 0 0       end       break   endend0000:0000:0A93: end_custom_thread

 

 

This code disables the weapons of all gangs but by recruiting a member he will automaticly get a 9mm

thanks dude!!! icon14.gificon14.gificon14.gif and the 9mm that the families get, is possible to delete to???

 

Link to comment
https://gtaforums.com/topic/463329-gang-weapons-question/#findComment-1060208813
Share on other sites

didn't worked confused.gif any way, i am looking for something like this http://www.youtube.com/watch?v=wrhSBphHmdQ but in GTA SA. thats why i dont want any fire weapon, only melee

You should study my older brother's mission code from Tenpenny Stories, Mission: King of the Hill. This is not a CLEO script but a SCM script. The audio won't match if you compile it.

 

 

//Project: Tenpenny Stories version 0.2 beta//Coding by: Joshua Black aka JABHackSoul//Questions email to [email protected]//Audio Splicing: Vincent Black aka ToonSkull/Evol Child //Additional Voices: Vincent Black and Brian Black aka Our Dad as Pendelbury//Scripting Assistance: ZAZ & ceedj on GTAforums.com//This script was produced for educational purposes.//IF you redistribute DON'T REMOVE these comments they help others learn.//You can add as much as you like but comment on the changes and improvements you made.// Don't remove old buggy code just comment it out and explain why it was removed.DEFINE MISSIONS 1              // Total Missions AvailableDEFINE MISSION 0 AT @MISSN_05DEFINE EXTERNAL_SCRIPTS 0 DEFINE UNKNOWN_EMPTY_SEGMENT 0DEFINE UNKNOWN_THREADS_MEMORY 500{$VERSION 3.1.0027}var$PLAYER_CHAR: Playerend // var //Main thread starts here03A4: name_thread 'MAIN' //Set the screen BLACK immediately016A: fade 0 time 0           01F0: set_max_wanted_level_to 6 0111: toggle_wasted_busted_check 0 00C0: set_current_time_hours_to 8 minutes_to 0 //Loads Tenpenny as #SPECIAL01 or 290023C: load_special_actor 'TENPEN' as 1 //Create Player at Station04E4: unknown_refresh_game_renderer_at 1541 -1675.4 Camera.SetAtPos(1541.156, -1675.352, 13.55)$PLAYER_CHAR = Player.Create(#NULL, 1541.156, -1675.352, 13.552)Player.SetClothes($PLAYER_CHAR, "VEST", "VEST", Torso)Player.SetClothes($PLAYER_CHAR, "JEANSDENIM", "JEANS", Legs)Player.SetClothes($PLAYER_CHAR, "SNEAKERBINCBLK", "SNEAKER", Shoes)Player.SetClothes($PLAYER_CHAR, "PLAYER_FACE", "HEAD", Head)  Player.Build($PLAYER_CHAR)//Changes the player to ped model 290 Tenpenny09C7: change_player $PLAYER_CHAR model_to 290 01F5: $PLAYER_ACTOR = create_player_actor $PLAYER_CHAR 07AF: $PLAYER_GROUP = player $PLAYER_CHAR group Model.Load(#COPBIKE)Model.Load(#COPCARLA)Model.Load(#DESERT_EAGLE)Model.Load(#COLT45)038B: load_requested_models :MAIN_110if ornot Model.Available(#COPBIKE)not Model.Available(#COPCARLA)not Model.Available(#DESERT_EAGLE)not Model.Available(#COLT45)else_jump @MAIN_120 wait 0 jump @MAIN_110 :MAIN_1200674: set_car_model #COPCARLA numberplate "_CRASH_"$My_Car = Car.Create(#COPCARLA,  1535.743, -1678.094, 13.09914)$My_Bike = Car.Create(#COPBIKE, 1535.743, -1665.094, 13.09914)Car.SetImmunities($My_Car, 0, 1, 0, 0, 0) Car.Angle($My_Car) = 0                       //Headed NorthCar.DoorStatus($My_Car, 0)                   //No locked doors053F: set_car $My_Car tires_vulnerability 0  //No popped tries01B6: set_weather 1 0001: wait 0 ms 01B4: toggle_player $PLAYER_CHAR can_move false //We shut down control for the cameras to work 04BB: select_interior 0 0629: change_integer_stat 181 to 4 016C: restart_if_wasted_at 2027.77 -1420.52 15.99 angle 137.0 town_number 0 016D: restart_if_busted_at 1550.68 -1675.49 14.51 angle 90.0 town_number 0 // Note: your missions have to use the variable defined here0180: set_on_mission_flag_to $ONMISSION  0004: $DEFAULT_WAIT_TIME = 25003E6: remove_text_box $MISSION_1 = 2// START GAME$ONMISSION = 0 01B4: toggle_player $PLAYER_CHAR can_move true               fade 1 1000 :MAIN_LOOP0001: wait $DEFAULT_WAIT_TIME ms00BF: $TIME_HOURS = current_time_hours, $TIME_MINS = current_time_minutesif and$ONMISSION == 000E1:   player 0 pressed_key 11jf @MAIN_LOOPstart_mission 0 0002: jump @MAIN_LOOP //-------------Mission 15---------------//Easy to follow mission "King of the Hill" - Based on The Warriors (also by Rockstar):MISSN_05thread 'MISSN_05' $ONMISSION = 1054C: use_GXT_table 'JABM05' 0395: clear_area 1 at 2471.6958 -1888.9365 15.0156 radius 90.0 1@ = 2452.96582@ = -1898.76660050: gosub @MISSN_05_INT00D6: if0112:   wasted_or_busted004D: jump_if_false @MISSN_05_End0050: gosub @MISSN_05_LOSE:MISSN_05_End0050: gosub @MISSN_05_CLEANUP004E: end_thread// Setup the mission  :MISSN_05_INTwait 0Model.Load(102)  //Notice I used the model numbers instead of namesModel.Load(103)  //I knew I was going to need to refference these soModel.Load(104)  //I used the number so I wouldn't need to bounce betweenModel.Load(331)  //this and help files.Model.Load(333)Model.Load(336)Model.Load(337)Model.Load(338)ifModel.Available(102) //Ballas 1Model.Available(103) //Ballas 2Model.Available(104) //Ballas 3 Model.Available(331) //#BRASSKNUCKLEModel.Available(333) //#GOLFCLUBModel.Available(336) //#BATModel.Available(337) //#SHOVELModel.Available(338) //#POOLCUEjf @MISSN_05_INT//Cut Scene 00C0: set_current_time_hours_to 1 minutes_to 5 02A3: enable_widescreen 1 009A: 70@ = create_actor_pedtype 7 model 104 at 2481.6411 -1889.2788 25.55Actor.Angle(70@) = 90.0 03E5: show_text_box 'KOH01'  // The Ballas haven't paid rent for some time now. They must think you're a punk or something.wait 5000068D: get_camera_position_to $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 $TEMPVAR_FLOAT_3 068E: get_camera_target_point_to $TEMPVAR_FLOAT_4 $TEMPVAR_FLOAT_5 $TEMPVAR_FLOAT_6 092F: lock_camera_target_point 1 0930: lock_camera_position 1 03CB: set_rendering_origin_at $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 $TEMPVAR_FLOAT_3 0160: set_camera_point_at $TEMPVAR_FLOAT_4 $TEMPVAR_FLOAT_5 $TEMPVAR_FLOAT_6  mode 2 0920: point_camera $TEMPVAR_FLOAT_4 $TEMPVAR_FLOAT_5 $TEMPVAR_FLOAT_6  transverse_to 2481.6411 -1889.2788 25.55  time 5000 mode 1 0936: set_camera $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 $TEMPVAR_FLOAT_3  position_to 2471.6411 -1889.2788 18.55  time 5000 drop_mode 1 00BC: show_text_highpriority GXT 'KOH02' time 15000 flag 1 // ~z~Tenpenny! You came here tonight to get paid, tonight the Ballas pay will pay you...03CF: load_wav 45235 as 1gosub @MISSN_05_PLAY00BC: show_text_highpriority GXT 'KOH03' time 10000 flag 1 // ~z~in BLOOD!  //Vincent did this voice for the mod himself.03CF: load_wav 45236 as 1gosub @MISSN_05_PLAY00BE: text_clear_all 03E5: show_text_box 'KOH04' // Keep the hill for 3 minutes and survive at all costs!wait 5000060A: create_decision_maker_type 2 store_to 34@  //This makes the actor ignore guns.Actor.Angle($PLAYER_ACTOR) = 90.001F7: set_player $PLAYER_CHAR ignored_by_cops 1  //No Cops03DE: set_pedestrians_density_multiplier_to 0.0  //No Peds01EB: set_traffic_density_multiplier_to 0.0      //No Cars4@ = 0                                           //Index//Build an Army of 20 men with weapon:MISSN_05_ARMYwait 00209: 28@ = random_int_in_ranges 0 5             //Random number 0 to 5if                                               //Change it to 0 1 2 6 7 8 28@ >= 3then 28@ += 3end   0209: 13@ = random_int_in_ranges 102 105         //Ballas models 102 103 1040208: 12@ = random_float_in_ranges 1.2 3.5       009A: 70@ = create_actor_pedtype 7 model 13@ at 1@ 2@ 13.5469Actor.Angle(70@) = 270.001B2: give_actor 70@ weapon 28@ ammo 999999      //Handout weapons087E: set_actor 70@ weapon_droppable 0           //Weapons dissapear when dead060B: set_actor 70@ decision_maker_to 34@        //Pissed off!! (see above)05E2: AS_actor 70@ kill_actor $PLAYER_ACTOR      //Kill Tenpenny005B: 2@ += 12@4@ += 1if    2@ >= -1883.1393then   2@ = -1898.7666005B: 1@ += 12@endif 4@ >= 20jf @MISSN_05_ARMY//Setup a 3 minute countdown timerFade 1 0$7234 = 180000 7@ = 10 50@ = 051@ = 0014E: set_timer_to $7234 type 1 0890: enable_sound_when_timer $7234 reach 10 seconds02A3: enable_widescreen 0092F: lock_camera_target_point 0 0930: lock_camera_position 0 02EB: restore_camera_with_jumpcut 0373: set_camera_directly_behind_player //Start the WAR:MISSN_05_WARSwait 0if00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 2471.6958 -1888.9365 15.0156 radius 10.0 10.0 10.0 then7@ = 10 jump @MISSN_05_TIMEend01BD: 50@ = current_time_in_ms50@ /= 1000 if003B: 50@ == 51@jf @MISSN_05_86jump @MISSN_05_TIME:MISSN_05_860085: 51@ = 50@01E5: show_text_1number_highpriority GXT 'KOH05' number 7@ time 1000 flag 1  // ~s~You have ~1~ seconds to return to the hill or be counted out!7@ -= 1//Ten second time out.if   7@ >= 0jf @MISSN_05_LOSE:MISSN_05_TIMEif    $7234 <= 0jf @MISSN_05_WARS:MISSN_05_WIN03E5: show_text_box 'KOH06'  // Now the Ballas know you are not a punk and paid the rent.wait 5000016A: fade 1 time 1500 :MISSN_05_FADEwait 0if816B:   not fading jf @MISSN_05_FADE$MISSION_TP += 1$CRASH_TOTAL_PASSED_MISSIONS += 1 030C: progress_made += 1 0394: play_music 1 Player.ClearWantedLevel($PLAYER_CHAR)01E3: show_text_1number_styled GXT 'M_PASS' number 2500 time 5000 style 1  // MISSION PASSED!~n~~w~$~1~Player.Money($PLAYER_CHAR) += 2500$CRASH_MARKER = Marker.CreateIconAndSphere(16, 1541.156, -1675.352, 13.552)return :MISSN_05_LOSE00BE: text_clear_all00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1  $CRASH_MARKER = Marker.CreateIconAndSphere(16, 2471.6958, -1888.9365, 15.0156)return//Play Audio:MISSN_05_PLAYwait 0if  03D0:   wav 1 loaded jf @MISSN_05_PLAY03D1: play_wav 1:MISSN_05_UNLOAD wait 0if 03D2:   wav 1 ended jf @MISSN_05_UNLOAD 040D: unload_wav 1return:MISSN_05_CLEANUP// This section is where you clean up the contents of your mission so you can end it$ONMISSION = 0  014F: stop_timer $7234wait 5000 00BE: text_clear_all 03DE: set_pedestrians_density_multiplier_to 1.0 01EB: set_traffic_density_multiplier_to 1.0 00D8: mission_cleanup 0051: return

 

 

My brother Joshua said the game tends to crash if you create too many fighters.

 

 

Link to comment
https://gtaforums.com/topic/463329-gang-weapons-question/#findComment-1060209388
Share on other sites

This is actually a strange script since it could try to influence chars which might not even exist and it also has some structure related issues tounge.gif

 

but the schematic is clear and I'll try to produce a working version later lol.gif

 

{$CLEO}0000:while true   wait 20   if   0256:   player $PLAYER_CHAR defined    then       if       03EE:   player $PLAYER_CHAR controllable        then           if and           not $PLAYER_GROUP == 0           07FD:   group $PLAYER_GROUP alive           then               for 0@ = 0 to 7                   092B: 1@ = group $PLAYER_GROUP member 0@                   if and                   not 1@ == 0                   0491:   actor 1@ has_weapon 22                   then                       0555: remove_weapon 22 from_actor 1@                       #BAT.Load()                       repeat                           wait 0                       until #BAT.Available()                       01B2: give_actor 1@ weapon 5 ammo 1 // Load the weapon model before using this                       #BAT.Available()                   end               end               break           end       end   endend0000:0000:0A93: end_custom_thread

 

 

this is actually another try but it is incomplete tounge.gif

 

 

{$CLEO}0000:while true   wait 20   if   0256:   player $PLAYER_CHAR defined    then       if       03EE:   player $PLAYER_CHAR controllable        then           07AF: $PLAYER_GROUP = player $PLAYER_CHAR group            if and           not $PLAYER_GROUP == 0           07FD:   group $PLAYER_GROUP alive           then               {               get gang respect               switch and case for its valu to get max number of members > 0@               }               for 1@ = 0 to 0@ // max hmoies                    if                   not 1 == 0 //   056D:   actor 1@ defined                    then                       if and                       0491:   actor 1@ has_weapon 22                       8491:   not actor 1@ has_weapon 5                        then                           0555: remove_weapon 22 from_actor 1@                           #BAT.Load()                           repeat                               wait 0                           until #BAT.Available()                           01B2: give_actor 1@ weapon 5 ammo 1 // Load the weapon model before using this                           #BAT.Destroy()                       end                   end               end           end       end   endend0000:0000:0A93: end_custom_thread

 

Edited by The_Siggi
Link to comment
https://gtaforums.com/topic/463329-gang-weapons-question/#findComment-1060209819
Share on other sites

Here is a code I worked up based on my brother's code posted above. Step out to a parking lot or field and press Y. It will spawn 20 fighters and some are keyed to fight each other a few will attack you. Melee weapons only. If you attack or threaten another he will attack you as well.

 

 

{$VERSION 3.1.0027}{$CLEO .cs}//This mod creates gang members about 30 feet in front of the player.//Then adds only melee weapons.//Coded by Vincent Black//November 21st, 2010//-------------MAIN---------------thread 'MOSHPIT' :MOSH_10wait 0 if and00E1:   player 0 pressed_key 11      //Player pressed YES$ACTIVE_INTERIOR == 0                //Player is outsidejf @MOSH_10wait 250                             //Wait for keyboard buffer to clear//Load Melee WeaponsModel.Load(331) Model.Load(333) Model.Load(336) Model.Load(337) Model.Load(338)038B: load_requested_models :MOSH_120wait 0if andModel.Available(331) Model.Available(333) Model.Available(336) Model.Available(337) Model.Available(338) jf @MOSH_120//Load gangs Model.Load(108) Model.Load(109) Model.Load(110) Model.Load(111)Model.Load(112) Model.Load(113) Model.Load(114) Model.Load(115) Model.Load(116)038B: load_requested_models :MOSH_99wait 0if andModel.Available(108) Model.Available(109) Model.Available(110)   Model.Available(111)Model.Available(112) Model.Available(113) Model.Available(114) Model.Available(115) Model.Available(116) jf @MOSH_9901F7: set_player $PLAYER_CHAR ignored_by_cops 1  //No Cops03DE: set_pedestrians_density_multiplier_to 0.0  //No Peds01EB: set_traffic_density_multiplier_to 0.0      //No Cars4@ = 004C4: store_coords_to 14@ 15@ 16@ from_actor $PLAYER_ACTOR with_offset 0.0 10.0 0.0 0395: clear_area 1 at 14@ 15@ 16@ radius 90.0060A: create_decision_maker_type 2 store_to 3@  //This makes the actor ignore guns.:MOSH_100wait 00209: 1@ = random_int_in_ranges 0 5             //Random number 0 to 5if                                              //Change it to 0 1 2 6 7 8 1@ >= 3then 1@ += 3end   0209: 2@ = random_int_in_ranges 108 117         //Select a Gang Model (108 - 116)0208: 12@ = random_float_in_ranges 1.2 3.5       009A: 7@ = create_actor_pedtype 4 model 2@ at 14@ 15@ [email protected](7@) = 0.001B2: give_actor 7@ weapon 1@ ammo 999999      087E: set_actor 7@ weapon_droppable 0           060B: set_actor 7@ decision_maker_to 3@          005B: 15@ += 12@4@ += 1if or   4@ == 5   4@ == 10   4@ == 15 then   15@ -= 10.0005B: 14@ += 12@end0209: 1@ = random_int_in_ranges 0 5             //Random number 0 to 5if                                              //Change it to 0 1 2 6 7 8 1@ >= 3then 1@ += 3end   0209: 2@ = random_int_in_ranges 108 117         //Select a Gang Model (108 - 116)0208: 12@ = random_float_in_ranges 1.2 3.5       009A: 8@ = create_actor_pedtype 4 model 2@ at 14@ 15@ [email protected](8@) = 180.001B2: give_actor 8@ weapon 1@ ammo 999999      087E: set_actor 8@ weapon_droppable 0           060B: set_actor 8@ decision_maker_to 3@   0209: 9@ = random_int_in_ranges 0 5     if 9@ == 0then05E2: AS_actor 8@ kill_actor $PLAYER_ACTOR 05E2: AS_actor 7@ kill_actor $PLAYER_ACTOR else05E2: AS_actor 8@ kill_actor 7@ 05E2: AS_actor 7@ kill_actor 8@ end   005B: 15@ += 12@4@ += 1if or   4@ == 5   4@ == 10   4@ == 15 then   15@ -= 10.0005B: 14@ += 12@endif 4@ >= 20jf @MOSH_100jump @MOSH_10

 

Link to comment
https://gtaforums.com/topic/463329-gang-weapons-question/#findComment-1060213428
Share on other sites

Here is a code I worked up based on my brother's code posted above. Step out to a parking lot or field and press Y. It will spawn 20 fighters and some are keyed to fight each other a few will attack you. Melee weapons only. If you attack or threaten another he will attack you as well.

 

 

{$VERSION 3.1.0027}{$CLEO .cs}//This mod creates gang members about 30 feet in front of the player.//Then adds only melee weapons.//Coded by Vincent Black//November 21st, 2010//-------------MAIN---------------thread 'MOSHPIT' :MOSH_10wait 0 if and00E1:   player 0 pressed_key 11      //Player pressed YES$ACTIVE_INTERIOR == 0                //Player is outsidejf @MOSH_10wait 250                             //Wait for keyboard buffer to clear//Load Melee WeaponsModel.Load(331) Model.Load(333) Model.Load(336) Model.Load(337) Model.Load(338)038B: load_requested_models :MOSH_120wait 0if andModel.Available(331) Model.Available(333) Model.Available(336) Model.Available(337) Model.Available(338) jf @MOSH_120//Load gangs Model.Load(108) Model.Load(109) Model.Load(110) Model.Load(111)Model.Load(112) Model.Load(113) Model.Load(114) Model.Load(115) Model.Load(116)038B: load_requested_models :MOSH_99wait 0if andModel.Available(108) Model.Available(109) Model.Available(110)   Model.Available(111)Model.Available(112) Model.Available(113) Model.Available(114) Model.Available(115) Model.Available(116) jf @MOSH_9901F7: set_player $PLAYER_CHAR ignored_by_cops 1  //No Cops03DE: set_pedestrians_density_multiplier_to 0.0  //No Peds01EB: set_traffic_density_multiplier_to 0.0      //No Cars4@ = 004C4: store_coords_to 14@ 15@ 16@ from_actor $PLAYER_ACTOR with_offset 0.0 10.0 0.0 0395: clear_area 1 at 14@ 15@ 16@ radius 90.0060A: create_decision_maker_type 2 store_to 3@  //This makes the actor ignore guns.:MOSH_100wait 00209: 1@ = random_int_in_ranges 0 5             //Random number 0 to 5if                                              //Change it to 0 1 2 6 7 8 1@ >= 3then 1@ += 3end   0209: 2@ = random_int_in_ranges 108 117         //Select a Gang Model (108 - 116)0208: 12@ = random_float_in_ranges 1.2 3.5       009A: 7@ = create_actor_pedtype 4 model 2@ at 14@ 15@ [email protected](7@) = 0.001B2: give_actor 7@ weapon 1@ ammo 999999      087E: set_actor 7@ weapon_droppable 0           060B: set_actor 7@ decision_maker_to 3@          005B: 15@ += 12@4@ += 1if or   4@ == 5   4@ == 10   4@ == 15 then   15@ -= 10.0005B: 14@ += 12@end0209: 1@ = random_int_in_ranges 0 5             //Random number 0 to 5if                                              //Change it to 0 1 2 6 7 8 1@ >= 3then 1@ += 3end   0209: 2@ = random_int_in_ranges 108 117         //Select a Gang Model (108 - 116)0208: 12@ = random_float_in_ranges 1.2 3.5       009A: 8@ = create_actor_pedtype 4 model 2@ at 14@ 15@ [email protected](8@) = 180.001B2: give_actor 8@ weapon 1@ ammo 999999      087E: set_actor 8@ weapon_droppable 0           060B: set_actor 8@ decision_maker_to 3@   0209: 9@ = random_int_in_ranges 0 5     if 9@ == 0then05E2: AS_actor 8@ kill_actor $PLAYER_ACTOR 05E2: AS_actor 7@ kill_actor $PLAYER_ACTOR else05E2: AS_actor 8@ kill_actor 7@ 05E2: AS_actor 7@ kill_actor 8@ end   005B: 15@ += 12@4@ += 1if or   4@ == 5   4@ == 10   4@ == 15 then   15@ -= 10.0005B: 14@ += 12@endif 4@ >= 20jf @MOSH_100jump @MOSH_10

 

HAHAHAHA

 

you rul man!!!

ill check this out right now!!!

 

thanks a lot

Link to comment
https://gtaforums.com/topic/463329-gang-weapons-question/#findComment-1060213674
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.