Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

Include more than 10 characters in group


subramanian
 Share

Recommended Posts

I've finished creating 10 characters. but CJ cannot include more than 7 in CJ's group. Please help me.. Is there a way to make more than this number in CJ's group?

Link to comment
Share on other sites

Im assuming you mean when CJ aims at a character he can recruit them into his gang?

 

Why not just code the other 3, just create the actors, when there aimed at make them follow CJ

Link to comment
Share on other sites

  • 2 weeks later...

Im assuming you mean when CJ aims at a character he can recruit them into his gang?

 

Why not just code the other 3, just create the actors, when there aimed at make them follow CJ

 

No I create homies and they come in cars. and yeah. I tried that, creating 9 characters total. But the other actors who come are simply dummies. Even though U put them in CJs group. I can ask my gang to shoot these extra characters!!!! LOL. which means that these extras aren't part of the group.. sad.gif

Link to comment
Share on other sites

max 7 members are working for a group

but you can create player_group with two leaders and each leader have 6 members of 2 subgroups

then 14 gangmembers will fight with the player, alltogether 3 groups

try Paratroopers mod

 

 

Edited by ZAZ
Link to comment
Share on other sites

max 7 members are working for a group

but you can create player_group with two leaders and each leader have 6 members of 2 subgroups

then 14 gangmembers will fight with the player, alltogether 3 groups

try Paratroopers mod

thanks for your suggestion zaz. I'll definitely have a look at this paratrooper mod. smile.gif

Link to comment
Share on other sites

  • 2 weeks later...

 

max 7 members are working for a group

but you can create player_group with two leaders and each leader have 6 members of 2 subgroups

then 14 gangmembers will fight with the player, alltogether 3 groups

try Paratroopers mod

 

Mr. ZAZ, I'm using these codes to create a group. I've narrowed it down to this lines. Please help me here.

 

[email protected] is an actor I'm creating. The line I'm using for that is:

[email protected] = create_actor_pedtype 7 model #BALLAS1 in_car [email protected] passenger_seat 1

 

I face an issue sometimes here. May I know what this pedtype stands for? Pls..

 

The game crashes after this point. Please check this part.

 

 

07AF: [email protected] = player $PLAYER_ACTOR group

0630: put_actor $PLAYER_ACTOR in_group [email protected] as_leader

062F: [email protected] = create_group_type 0

0630: put_actor [email protected] in_group [email protected] as_leader

0631: put_actor [email protected] in_group [email protected]

07CB: set_actor [email protected] supporting_fire 0

Edited by subramanian
Link to comment
Share on other sites

And can you please explain what the pedtype stands for? In one post i read it as temper of the actor, but I just want to verify. Please help me with this..

 

 

Sorry for reposting. I don't know how to delete already written quotes.

Edited by subramanian
Link to comment
Share on other sites

 

max 7 members are working for a group

but you can create player_group with two leaders and each leader have 6 members of 2 subgroups

then 14 gangmembers will fight with the player, alltogether 3 groups

try Paratroopers mod

 

Mr. ZAZ, I'm using these codes to create a group. I've narrowed it down to this lines. Please help me here.

 

[email protected] is an actor I'm creating. The line I'm using for that is:

[email protected] = create_actor_pedtype 7 model #BALLAS1 in_car [email protected] passenger_seat 1

 

I face an issue sometimes here. May I know what this pedtype stands for? Pls..

 

The game crashes after this point. Please check this part.

 

 

07AF: [email protected] = player $PLAYER_ACTOR group

0630: put_actor $PLAYER_ACTOR in_group [email protected] as_leader

062F: [email protected] = create_group_type 0

0630: put_actor [email protected] in_group [email protected] as_leader

0631: put_actor [email protected] in_group [email protected]

07CB: set_actor [email protected] supporting_fire 0

 

post your script and

look for pedtypes in sannybuilder HELP

Link to comment
Share on other sites

The following is my code

 

 

:HOMIES_110001: wait 0 ms 00D6: if 0256:   player $PLAYER_ACTOR defined 004D: jump_if_false @HOMIES_11 0001: wait 0 ms 00D6: if 0AB0:   key_pressed 90 004D: jump_if_false @HOMIES_11 0247: load_model #HUNTLEY 0247: load_model #SAVANNA 0247: load_model #TRIADA 0247: load_model #FAM1 0247: load_model #DESERT_EAGLE 0247: load_model #ROCKETLA 0247: load_model #BALLAS1 0247: load_model #MINIGUN 0247: load_model #MOONBEAM 00D6: if and0248:   model #HUNTLEY available 0248:   model #SAVANNA available 0248:   model #TRIADA available 0248:   model #DESERT_EAGLE available 0248:   model #ROCKETLA available 0248:   model #BALLAS1 available 0248:   model #MINIGUN available 0248:   model #FAM1 available 0248:   model #MOONBEAM available 004D: jump_if_false @HOMIES_11:HOMIES_1700001: wait 0 ms 04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 50.0 0.0 5.0 02C1: store_to [email protected] [email protected] [email protected] car_path_coords_closest_to [email protected] [email protected] [email protected] 04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 5.0 0.0 00A5: [email protected] = create_car #HUNTLEY at [email protected] [email protected] [email protected] 02AC: set_car [email protected] immunities BP 1 FP 1 EP 1 CP 1 MP 1 03CC: enable_car [email protected] stuck_check_distance_to 2.0 time_to 20000129: [email protected] = create_actor_pedtype 23 model #TRIADA in_car [email protected] driverseat 00A7: car [email protected] drive_to [email protected] [email protected] [email protected] 000B: [email protected] += 3.0 000B: [email protected] += 3.0                      00A5: [email protected] = create_car #SAVANNA at [email protected] [email protected] [email protected] 02AC: set_car [email protected] immunities BP 1 FP 1 EP 1 CP 1 MP 1 03CC: enable_car [email protected] stuck_check_distance_to 2.0 time_to 2000 0129: [email protected] = create_actor_pedtype 23 model #FAM1 in_car [email protected] driverseat 00A7: car [email protected] drive_to [email protected] [email protected] [email protected] 0001: wait 1000 ms 000B: [email protected] += 2.0 000B: [email protected] += 2.0 00A5: [email protected] = create_car #HUNTLEY at [email protected] [email protected] [email protected] 02AC: set_car [email protected] immunities BP 1 FP 1 EP 1 CP 1 MP 1 0129: [email protected] = create_actor_pedtype 23 model #BALLAS1 in_car [email protected] driverseat 00A7: car [email protected] drive_to [email protected] [email protected] [email protected] 01C8: [email protected] = create_actor_pedtype 13 model #TRIADA in_car [email protected] passenger_seat 0 02AB: set_actor [email protected] immunities BP 1 FP 1 EP 1 CP 1 MP 1 01C8: [email protected] = create_actor_pedtype 13 model #TRIADA in_car [email protected] passenger_seat 1 02AB: set_actor [email protected] immunities BP 1 FP 1 EP 1 CP 1 MP 1 01C8: [email protected] = create_actor_pedtype 13 model #TRIADA in_car [email protected] passenger_seat 2 02AB: set_actor [email protected] immunities BP 1 FP 1 EP 1 CP 1 MP 1 01C8: [email protected] = create_actor_pedtype 8 model #FAM1 in_car [email protected] passenger_seat 0 02AB: set_actor [email protected] immunities BP 1 FP 1 EP 1 CP 1 MP 1 01C8: [email protected] = create_actor_pedtype 8 model #FAM1 in_car [email protected] passenger_seat 1 02AB: set_actor [email protected] immunities BP 1 FP 1 EP 1 CP 1 MP 1 01C8: [email protected] = create_actor_pedtype 8 model #FAM1 in_car [email protected] passenger_seat 2 02AB: set_actor [email protected] immunities BP 1 FP 1 EP 1 CP 1 MP 1 01C8: [email protected] = create_actor_pedtype 7 model #BALLAS1 in_car [email protected] passenger_seat 0 01C8: [email protected] = create_actor_pedtype 7 model #BALLAS1 in_car [email protected] passenger_seat 1 01C8: [email protected] = create_actor_pedtype 7 model #BALLAS1 in_car [email protected] passenger_seat 2 02AB: set_actor [email protected] immunities BP 1 FP 1 EP 1 CP 1 MP 1 02AB: set_actor [email protected] immunities BP 1 FP 1 EP 1 CP 1 MP 1 02AB: set_actor [email protected] immunities BP 1 FP 1 EP 1 CP 1 MP 1 0001: wait 1000 ms 000B: [email protected] += 5.1 000B: [email protected] += 5.1 00A7: car [email protected] drive_to [email protected] [email protected] [email protected] 000B: [email protected] += 5.1 000B: [email protected] += 5.1 00A7: car [email protected] drive_to [email protected] [email protected] [email protected] 07AF: [email protected] = player $PLAYER_ACTOR group 0630: put_actor $PLAYER_ACTOR in_group [email protected] as_leader 062F: [email protected] = create_group_type 0 0630: put_actor [email protected] in_group [email protected] as_leader 0631: put_actor [email protected] in_group [email protected] 07CB: set_actor [email protected] supporting_fire 0 :HOMIES_9330001: wait 0 ms 00D6: if 01B0:   car [email protected] sphere 0 in_sphere [email protected] [email protected] [email protected] radius 30.0 30.0 30.0 stopped 004D: jump_if_false @HOMIES_933 05CD: AS_actor [email protected] exit_car [email protected] 05CD: AS_actor [email protected] exit_car [email protected] 05CD: AS_actor [email protected] exit_car [email protected] 01B2: give_actor [email protected] weapon 24 ammo 9999 // Load the weapon model before using this 01B2: give_actor [email protected] weapon 35 ammo 9999 // Load the weapon model before using this 01B2: give_actor [email protected] weapon 38 ammo 9999 // Load the weapon model before using this 0631: put_actor [email protected] in_group [email protected] 0631: put_actor [email protected] in_group [email protected] 0631: put_actor [email protected] in_group [email protected] :HOMIES_10570001: wait 1000 ms 00D6: if 01B0:   car [email protected] sphere 0 in_sphere [email protected] [email protected] [email protected] radius 30.0 30.0 30.0 stopped 004D: jump_if_false @HOMIES_1057 05CD: AS_actor [email protected] exit_car [email protected] 05CD: AS_actor [email protected] exit_car [email protected] 05CD: AS_actor [email protected] exit_car [email protected] 01B2: give_actor [email protected] weapon 24 ammo 9999 // Load the weapon model before using this 01B2: give_actor [email protected] weapon 35 ammo 9999 // Load the weapon model before using this 01B2: give_actor [email protected] weapon 38 ammo 9999 // Load the weapon model before using this 0631: put_actor [email protected] in_group [email protected] 0631: put_actor [email protected] in_group [email protected] 0631: put_actor [email protected] in_group [email protected] :HOMIES_11820001: wait 1000 ms 00D6: if 01B0:   car [email protected] sphere 0 in_sphere [email protected] [email protected] [email protected] radius 30.0 30.0 30.0 stopped 004D: jump_if_false @HOMIES_1182 05CD: AS_actor [email protected] exit_car [email protected] 05CD: AS_actor [email protected] exit_car [email protected] 05CD: AS_actor [email protected] exit_car [email protected] 01B2: give_actor [email protected] weapon 24 ammo 9999 // Load the weapon model before using this 01B2: give_actor [email protected] weapon 35 ammo 9999 // Load the weapon model before using this 01B2: give_actor [email protected] weapon 38 ammo 9999 // Load the weapon model before using this 0631: put_actor [email protected] in_group [email protected] 00A7: car [email protected] drive_to 2488.562 -1666.865 12.8757 0001: wait 3000 ms 00A7: car [email protected] drive_to 0.0 0.0 0.0 0001: wait 1500 ms 00A7: car [email protected] drive_to 0.0 0.0 0.0 0249: release_model #HUNTLEY 0249: release_model #SAVANNA 0249: release_model #TRIADA 0249: release_model #ROCKETLA 0249: release_model #MINIGUN 0249: release_model #DESERT_EAGLE 0249: release_model #MOONBEAM 0249: release_model #BALLAS1 0249: release_model #FAM1 :HOMIES_14300001: wait 0 ms 00D6: if and06EE:   actor [email protected] in_group [email protected] 06EE:   actor [email protected] in_group [email protected] 06EE:   actor [email protected] in_group [email protected] 06EE:   actor [email protected] in_group [email protected] 06EE:   actor [email protected] in_group [email protected] 06EE:   actor [email protected] in_group [email protected] 06EE:   actor [email protected] in_group [email protected] 06EE:   actor [email protected] in_group [email protected] 004D: jump_if_false @HOMIES_1532 0002: jump @HOMIES_1430 :HOMIES_15320001: wait 0 ms 00D6: if and06EE:   actor [email protected] in_group [email protected] 06EE:   actor [email protected] in_group [email protected] 004D: jump_if_false @HOMIES_1532 0001: wait 20000 ms 00A6: destroy_car [email protected] 00A6: destroy_car [email protected] 00A6: destroy_car [email protected] 0002: jump @HOMIES_11 

 

Edited by subramanian
Link to comment
Share on other sites

 

004D: jump_if_false @HOMIES_110001: wait 0 ms00D6: if0AB0:   key_pressed 90004D: jump_if_false @HOMIES_11 

 

 

Remove that wait to increase script performance.

 

------------------------------------------------------

 

Changing this:

 

00D6: if and0248:   model #HUNTLEY available0248:   model #SAVANNA available0248:   model #TRIADA available0248:   model #DESERT_EAGLE available0248:   model #ROCKETLA available0248:   model #BALLAS1 available0248:   model #MINIGUN available0248:   model #FAM1 available0248:   model #MOONBEAM available004D: jump_if_false @HOMIES_11

 

 

To this:

 

:HOMIES_ModelChecks100D6: if and0248:   model #HUNTLEY available0248:   model #SAVANNA available0248:   model #TRIADA available0248:   model #DESERT_EAGLE available004D: jump_if_false @HOMIES_ModelChecksif and0248:   model #ROCKETLA available0248:   model #BALLAS1 available0248:   model #MINIGUN available0248:   model #FAM1 available0248:   model #MOONBEAM availableelse_jump @HOMIES_ModelChecks

 

 

Again, will improve performance and possibly stability (number of conditions is known to get buggy above 7).

 

------------------------------------------------------

 

Note that this:

 

03CC: enable_car [email protected] stuck_check_distance_to 2.0 time_to 2000

 

 

Reportedly only works in the main.scm, although from a view of the memory I can see no reason why it shouldn't, so use with caution.

 

------------------------------------------------------

 

Now, I didn't see any reason for a crash in particular, but overall your script is has no amount of protection from crashing. It's best to use high constructs and make scripts, especially missions, in a constant loop where you perfom checks to make sure needed cars and characters exist and are ready to use on each run. Your variable usage is also questionable. Setting up constants could help prevent problems there.

Link to comment
Share on other sites

Thanks for your suggestions Deji. May i know what high constructs mean? Are you suggesting i use constructors like in C++ ?? This code i've taken from another mod. I guessed it'll work with a few improvements. and before posting it online. i'd be asking the author for his permission.

 

And yes, surely. I'll remove that 03CC opcode from my mod and spawn the vehicle using a code of my own. Thanks a ton.

 

But pls explain wat this high construct mean? I googled it. but no proper response for that sad.gif

Link to comment
Share on other sites

Nah, high constructed code allows you to look at your code more clearly and logically:

 

Low-Construct Code:

 

0247: load_model #BIKERA0247: load_model #BIKERB:ModelLoadLoopif or8248:   not model #BIKERA available8248:   not model #BIKERB availableelse_jump @ModelLoadBreakwait 0jump @ModelLoadLoop:ModelLoadBreak

 

 

High Construct Code:

 

0247: load_model #BIKERA0247: load_model #BIKERBwhile true   if or       8248:   not model #BIKERA available       8248:   not model #BIKERB available   jf break  // will break the 'while true' loop and continue with the rest of the code   wait 0end

 

 

The codes are identical when compiled. Code between while true and end will keep running in a constant circle, until a break is encountered. continue is another keyword which causes the code to jump back to the start of the loop, similarly to writing jump @LABEL.

 

 

High construct code helps a lot when indention is properly used: https://pastebin.com/u5YdsaR8

This is the same code when compiled and decompiled (low construct): https://pastebin.com/fnm5V9Zy

 

Now, with the first code, I can easily scroll through it and understand what it does. With the second, I have to look much deeper and follow the labels. This gets even harder when a lot of loops are used in code, etc.

 

The script also demonstrates other good coding practises. Notice how it always checks whether the vehicle exists before using it, it doesn't use 01C3 at all (because it's not needed at all), it uses stages to minimise code while keeping things organised and easy to follow, proper descriptions on opcode lines used show a higher understanding of them and only 1 damn wait is used! tounge2.gif

 

Since your last post gave me the impression you have an understanding of C++, I think you'll particularly appreciate how much better it is to code like this. This is code R* would approve of, because it follows their standard of coding.

 

What's more, I've not even tested it and can predict it will work as I expect. I leave very little room for error by checking handles and ensuring the code is properly split up into stages. It only took about 15 minutes to write (would have been much shorter if I didn't overuse comments and didn't have to use opcodes for others to understand).

 

 

So this is also a reason not to recompile scripts, which it looks like you do. Labels with offset names are very ugly (btw, you can use labels in high constructed code when needed - just like you can with C++). Open the original .txt file that you wrote instead of decompiling the .cs or .scm file (or whatever you guys do to end up with decompiled code - I really don't get it to be honest).

Link to comment
Share on other sites

Thanks a lot Deji. I'll begin implementing this coding technique. (It's gonna be hard though for me nervous.gif ).

 

So even with the old code. The game runs till it encounters the line to create a new group. As soon i put the actor [email protected] into my group. the game crashes. Any idea why it's failing specifically there?

Link to comment
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
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

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