subramanian Posted January 21, 2012 Share Posted January 21, 2012 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 More sharing options...
Node Posted January 21, 2012 Share Posted January 21, 2012 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 More sharing options...
subramanian Posted January 31, 2012 Author Share Posted January 31, 2012 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.. Link to comment Share on other sites More sharing options...
ZAZ Posted January 31, 2012 Share Posted January 31, 2012 (edited) 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 January 31, 2012 by ZAZ CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
subramanian Posted February 1, 2012 Author Share Posted February 1, 2012 max 7 members are working for a groupbut 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. Link to comment Share on other sites More sharing options...
subramanian Posted February 11, 2012 Author Share Posted February 11, 2012 (edited) max 7 members are working for a groupbut 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 February 11, 2012 by subramanian Link to comment Share on other sites More sharing options...
subramanian Posted February 11, 2012 Author Share Posted February 11, 2012 (edited) 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 February 11, 2012 by subramanian Link to comment Share on other sites More sharing options...
ZAZ Posted February 11, 2012 Share Posted February 11, 2012 max 7 members are working for a groupbut 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 CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
subramanian Posted February 12, 2012 Author Share Posted February 12, 2012 (edited) 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 February 12, 2012 by subramanian Link to comment Share on other sites More sharing options...
Deji Posted February 12, 2012 Share Posted February 12, 2012 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 More sharing options...
subramanian Posted February 13, 2012 Author Share Posted February 13, 2012 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 Link to comment Share on other sites More sharing options...
Deji Posted February 13, 2012 Share Posted February 13, 2012 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! 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 More sharing options...
subramanian Posted February 14, 2012 Author Share Posted February 14, 2012 Thanks a lot Deji. I'll begin implementing this coding technique. (It's gonna be hard though for me ). 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 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