IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules GTA Modification Forums

Please post mod releases in the Mod Showroom

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


  Reply to this topicStart new topicStart Poll

 Include more than 10 characters in group

 
subramanian  
Posted: Saturday, Jan 21 2012, 14:08
Quote Post


krishnaryan
Group Icon
Group: Members
Joined: May 24, 2010

ia.gif

XXXXX



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?
PM
  Top
 

 
The_Sorrow  
Posted: Saturday, Jan 21 2012, 15:01
Quote Post


Heaven, I'm in heaven(8)
Group Icon
Group: Members
Joined: May 31, 2010

en.gif

XXXXX



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
Users WebsitePMMSN
  Top
 

 
subramanian  
Posted: Tuesday, Jan 31 2012, 01:25
Quote Post


krishnaryan
Group Icon
Group: Members
Joined: May 24, 2010

ia.gif

XXXXX



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
PM
  Top
 

 
ZAZ  
Posted: Tuesday, Jan 31 2012, 17:06
Quote Post


Kernlochbohrer
Group Icon
Group: Members
Joined: Jan 10, 2005

eu.gif

Member Award




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



This post has been edited by ZAZ on Tuesday, Jan 31 2012, 17:44
Users WebsitePM
  Top
 

 
subramanian  
Posted: Wednesday, Feb 1 2012, 05:14
Quote Post


krishnaryan
Group Icon
Group: Members
Joined: May 24, 2010

ia.gif

XXXXX



QUOTE (ZAZ @ Tuesday, Jan 31 2012, 22:36)
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
PM
  Top
 

 
subramanian  
Posted: Saturday, Feb 11 2012, 11:36
Quote Post


krishnaryan
Group Icon
Group: Members
Joined: May 24, 2010

ia.gif

XXXXX



QUOTE (ZAZ @ Tuesday, Jan 31 2012, 22:36)
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.

18@ is an actor I'm creating. The line I'm using for that is:
18@ = create_actor_pedtype 7 model #BALLAS1 in_car 27@ 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: 30@ = player $PLAYER_ACTOR group
0630: put_actor $PLAYER_ACTOR in_group 30@ as_leader
062F: 31@ = create_group_type 0
0630: put_actor 18@ in_group 31@ as_leader
0631: put_actor 18@ in_group 30@
07CB: set_actor 18@ supporting_fire 0

This post has been edited by subramanian on Saturday, Feb 11 2012, 11:48
PM
  Top
 

 
subramanian  
Posted: Saturday, Feb 11 2012, 11:45
Quote Post


krishnaryan
Group Icon
Group: Members
Joined: May 24, 2010

ia.gif

XXXXX



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.

This post has been edited by subramanian on Saturday, Feb 11 2012, 11:50
PM
  Top
 

 
ZAZ  
Posted: Saturday, Feb 11 2012, 13:45
Quote Post


Kernlochbohrer
Group Icon
Group: Members
Joined: Jan 10, 2005

eu.gif

Member Award




QUOTE (subramanian @ Saturday, Feb 11 2012, 11:36)
QUOTE (ZAZ @ Tuesday, Jan 31 2012, 22:36)
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.

18@ is an actor I'm creating. The line I'm using for that is:
18@ = create_actor_pedtype 7 model #BALLAS1 in_car 27@ 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: 30@ = player $PLAYER_ACTOR group
0630: put_actor $PLAYER_ACTOR in_group 30@ as_leader
062F: 31@ = create_group_type 0
0630: put_actor 18@ in_group 31@ as_leader
0631: put_actor 18@ in_group 30@
07CB: set_actor 18@ supporting_fire 0


post your script and
look for pedtypes in sannybuilder HELP
Users WebsitePM
  Top
 

 
subramanian  
Posted: Sunday, Feb 12 2012, 13:28
Quote Post


krishnaryan
Group Icon
Group: Members
Joined: May 24, 2010

ia.gif

XXXXX



The following is my code

CODE


:HOMIES_11
0001: 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 and
0248:   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_170
0001: wait 0 ms
04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 50.0 0.0 5.0
02C1: store_to 1@ 2@ 3@ car_path_coords_closest_to 1@ 2@ 3@
04C4: store_coords_to 14@ 15@ 16@ from_actor $PLAYER_ACTOR with_offset 0.0 5.0 0.0
00A5: 4@ = create_car #HUNTLEY at 1@ 2@ 3@
02AC: set_car 4@ immunities BP 1 FP 1 EP 1 CP 1 MP 1
03CC: enable_car 4@ stuck_check_distance_to 2.0 time_to 2000
0129: 10@ = create_actor_pedtype 23 model #TRIADA in_car 4@ driverseat
00A7: car 4@ drive_to 14@ 15@ 16@
000B: 1@ += 3.0
000B: 2@ += 3.0                      
00A5: 5@ = create_car #SAVANNA at 1@ 2@ 3@
02AC: set_car 5@ immunities BP 1 FP 1 EP 1 CP 1 MP 1
03CC: enable_car 5@ stuck_check_distance_to 2.0 time_to 2000
0129: 20@ = create_actor_pedtype 23 model #FAM1 in_car 5@ driverseat
00A7: car 5@ drive_to 14@ 15@ 16@
0001: wait 1000 ms
000B: 1@ += 2.0
000B: 2@ += 2.0
00A5: 27@ = create_car #HUNTLEY at 1@ 2@ 3@
02AC: set_car 27@ immunities BP 1 FP 1 EP 1 CP 1 MP 1
0129: 28@ = create_actor_pedtype 23 model #BALLAS1 in_car 27@ driverseat
00A7: car 28@ drive_to 14@ 15@ 16@
01C8: 11@ = create_actor_pedtype 13 model #TRIADA in_car 4@ passenger_seat 0
02AB: set_actor 11@ immunities BP 1 FP 1 EP 1 CP 1 MP 1
01C8: 12@ = create_actor_pedtype 13 model #TRIADA in_car 4@ passenger_seat 1
02AB: set_actor 12@ immunities BP 1 FP 1 EP 1 CP 1 MP 1
01C8: 13@ = create_actor_pedtype 13 model #TRIADA in_car 4@ passenger_seat 2
02AB: set_actor 13@ immunities BP 1 FP 1 EP 1 CP 1 MP 1
01C8: 21@ = create_actor_pedtype 8 model #FAM1 in_car 5@ passenger_seat 0
02AB: set_actor 21@ immunities BP 1 FP 1 EP 1 CP 1 MP 1
01C8: 22@ = create_actor_pedtype 8 model #FAM1 in_car 5@ passenger_seat 1
02AB: set_actor 22@ immunities BP 1 FP 1 EP 1 CP 1 MP 1
01C8: 23@ = create_actor_pedtype 8 model #FAM1 in_car 5@ passenger_seat 2
02AB: set_actor 23@ immunities BP 1 FP 1 EP 1 CP 1 MP 1
01C8: 17@ = create_actor_pedtype 7 model #BALLAS1 in_car 27@ passenger_seat 0
01C8: 18@ = create_actor_pedtype 7 model #BALLAS1 in_car 27@ passenger_seat 1
01C8: 19@ = create_actor_pedtype 7 model #BALLAS1 in_car 27@ passenger_seat 2
02AB: set_actor 17@ immunities BP 1 FP 1 EP 1 CP 1 MP 1
02AB: set_actor 18@ immunities BP 1 FP 1 EP 1 CP 1 MP 1
02AB: set_actor 19@ immunities BP 1 FP 1 EP 1 CP 1 MP 1
0001: wait 1000 ms
000B: 14@ += 5.1
000B: 15@ += 5.1
00A7: car 5@ drive_to 14@ 15@ 16@
000B: 14@ += 5.1
000B: 15@ += 5.1
00A7: car 27@ drive_to 14@ 15@ 16@
07AF: 30@ = player $PLAYER_ACTOR group
0630: put_actor $PLAYER_ACTOR in_group 30@ as_leader
062F: 31@ = create_group_type 0
0630: put_actor 18@ in_group 31@ as_leader
0631: put_actor 18@ in_group 30@
07CB: set_actor 18@ supporting_fire 0

:HOMIES_933
0001: wait 0 ms
00D6: if
01B0:   car 4@ sphere 0 in_sphere 14@ 15@ 16@ radius 30.0 30.0 30.0 stopped
004D: jump_if_false @HOMIES_933
05CD: AS_actor 11@ exit_car 4@
05CD: AS_actor 12@ exit_car 4@
05CD: AS_actor 13@ exit_car 4@
01B2: give_actor 11@ weapon 24 ammo 9999 // Load the weapon model before using this
01B2: give_actor 12@ weapon 35 ammo 9999 // Load the weapon model before using this
01B2: give_actor 13@ weapon 38 ammo 9999 // Load the weapon model before using this
0631: put_actor 11@ in_group 30@
0631: put_actor 12@ in_group 30@
0631: put_actor 13@ in_group 30@

:HOMIES_1057
0001: wait 1000 ms
00D6: if
01B0:   car 5@ sphere 0 in_sphere 14@ 15@ 16@ radius 30.0 30.0 30.0 stopped
004D: jump_if_false @HOMIES_1057
05CD: AS_actor 21@ exit_car 5@
05CD: AS_actor 22@ exit_car 5@
05CD: AS_actor 23@ exit_car 5@
01B2: give_actor 21@ weapon 24 ammo 9999 // Load the weapon model before using this
01B2: give_actor 22@ weapon 35 ammo 9999 // Load the weapon model before using this
01B2: give_actor 23@ weapon 38 ammo 9999 // Load the weapon model before using this
0631: put_actor 21@ in_group 30@
0631: put_actor 22@ in_group 30@
0631: put_actor 23@ in_group 31@

:HOMIES_1182
0001: wait 1000 ms
00D6: if
01B0:   car 27@ sphere 0 in_sphere 14@ 15@ 16@ radius 30.0 30.0 30.0 stopped
004D: jump_if_false @HOMIES_1182
05CD: AS_actor 17@ exit_car 27@
05CD: AS_actor 18@ exit_car 27@
05CD: AS_actor 19@ exit_car 27@
01B2: give_actor 17@ weapon 24 ammo 9999 // Load the weapon model before using this
01B2: give_actor 18@ weapon 35 ammo 9999 // Load the weapon model before using this
01B2: give_actor 19@ weapon 38 ammo 9999 // Load the weapon model before using this
0631: put_actor 19@ in_group 31@
00A7: car 4@ drive_to 2488.562 -1666.865 12.8757
0001: wait 3000 ms
00A7: car 5@ drive_to 0.0 0.0 0.0
0001: wait 1500 ms
00A7: car 27@ 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_1430
0001: wait 0 ms
00D6: if and
06EE:   actor 10@ in_group 30@
06EE:   actor 11@ in_group 30@
06EE:   actor 12@ in_group 30@
06EE:   actor 13@ in_group 30@
06EE:   actor 20@ in_group 30@
06EE:   actor 21@ in_group 30@
06EE:   actor 22@ in_group 30@
06EE:   actor 23@ in_group 30@
004D: jump_if_false @HOMIES_1532
0002: jump @HOMIES_1430

:HOMIES_1532
0001: wait 0 ms
00D6: if and
06EE:   actor 18@ in_group 31@
06EE:   actor 19@ in_group 31@
004D: jump_if_false @HOMIES_1532
0001: wait 20000 ms
00A6: destroy_car 4@
00A6: destroy_car 5@
00A6: destroy_car 27@
0002: jump @HOMIES_11


This post has been edited by subramanian on Sunday, Feb 12 2012, 13:31
PM
  Top
 

 
Deji  
Posted: Sunday, Feb 12 2012, 18:23
Quote Post


Coding like a Rockstar!
Group Icon
Group: Members
Joined: Dec 24, 2007

ja.gif

XXXXX



CODE
004D: jump_if_false @HOMIES_11
0001: wait 0 ms
00D6: if
0AB0:   key_pressed 90
004D: jump_if_false @HOMIES_11


Remove that wait to increase script performance.

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

Changing this:
CODE
00D6: if and
0248:   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


To this:
CODE
:HOMIES_ModelChecks1
00D6: if and
0248:   model #HUNTLEY available
0248:   model #SAVANNA available
0248:   model #TRIADA available
0248:   model #DESERT_EAGLE available
004D: jump_if_false @HOMIES_ModelChecks
if and
0248:   model #ROCKETLA available
0248:   model #BALLAS1 available
0248:   model #MINIGUN available
0248:   model #FAM1 available
0248:   model #MOONBEAM available
else_jump @HOMIES_ModelChecks


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

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

Note that this:
CODE
03CC: enable_car 4@ 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.
Users WebsitePM
  Top
 

 
subramanian  
Posted: Monday, Feb 13 2012, 04:59
Quote Post


krishnaryan
Group Icon
Group: Members
Joined: May 24, 2010

ia.gif

XXXXX



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
PM
  Top
 

 
Deji  
Posted: Monday, Feb 13 2012, 13:40
Quote Post


Coding like a Rockstar!
Group Icon
Group: Members
Joined: Dec 24, 2007

ja.gif

XXXXX



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

Low-Construct Code:
CODE
0247: load_model #BIKERA
0247: load_model #BIKERB

:ModelLoadLoop
if or
8248:   not model #BIKERA available
8248:   not model #BIKERB available
else_jump @ModelLoadBreak
wait 0
jump @ModelLoadLoop

:ModelLoadBreak


High Construct Code:
CODE
0247: load_model #BIKERA
0247: load_model #BIKERB

while 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 0
end


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).
Users WebsitePM
  Top
 

 
subramanian  
Posted: Tuesday, Feb 14 2012, 05:20
Quote Post


krishnaryan
Group Icon
Group: Members
Joined: May 24, 2010

ia.gif

XXXXX



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 18@ into my group. the game crashes. Any idea why it's failing specifically there?
PM
  Top
 

 

0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)

0 Members:

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG