Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Contract
      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. GTA San Andreas

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

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

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    4. Bugs*

    1. Grand Theft Auto Series

      1. 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. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    6. 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

      1. GTANet 20th Anniversary
    2. Support

    3. Suggestions

Code Crash


ogsf4life
 Share

Recommended Posts

hey guys..

this script is to call homies for my group without limit 7..

i call the 7 man normal,and after call with the script

But when my group have 12 homies,and i will call the 13,the game crash

 

code :

 

 

 

 

:NONAME_2
wait 0
if
Player.Defined($PLAYER_CHAR)
$ONMISSION == 0
else_jump @NONAME_2
if and
00E1: player 0 pressed_key 13
Player.Controllable($PLAYER_CHAR)
else_jump @NONAME_2
08E5: get_actor_in_sphere [email protected] [email protected] [email protected] radius 1.0 handle_as [email protected]
if
not [email protected] == -1
else_jump @NONAME_2
if or
Actor.Model([email protected]) == #FAM1
Actor.Model([email protected]) == #FAM2
Actor.Model([email protected]) == #FAM3
else_jump @NONAME_2
if
00F3: actor $PLAYER_ACTOR near_actor [email protected] radius 1.0 1.0 1.0 on_foot
else_jump @NONAME_2_326
wait 700
04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 0.975 0.0
jump @NONAME_2_207
:NONAME_2_207
wait 500
062F: [email protected] = create_group_type 0
0631: put_actor [email protected] in_group [email protected]
08F4: set_max_group_members 99999
0630: put_actor $PLAYER_ACTOR in_group [email protected] as_leader
07DD: set_actor [email protected] temper_to 100 // see pedstats.dat
Actor.WeaponAccuracy([email protected]) = 100
081A: set_actor [email protected] weapon_skill_to 2
jump @NONAME_2_270
:NONAME_2_270
wait 1000
0631: put_actor [email protected] in_group [email protected]
0630: put_actor $PLAYER_ACTOR in_group [email protected] as_leader
08F4: set_max_group_members 99999
07DD: set_actor [email protected] temper_to 100 // see pedstats.dat
081A: set_actor [email protected] weapon_skill_to 2
Actor.WeaponAccuracy([email protected]) = 100
jump @NONAME_2_326
if or
wasted_or_busted
Actor.Dead([email protected])
jf @NONAME_2_326
06C9: remove_actor [email protected] from_group
Actor.RemoveReferences([email protected])
Actor.DestroyInstantly([email protected])
:NONAME_2_326
Player.CanMove($PLAYER_CHAR) = True
jump @NONAME_2
Link to comment
Share on other sites

SigiloHQ

 

 

 

yes bro,is the full code..

how fix this ? " This label: @NONAME_2_326 isn't in your code. "

Link to comment
Share on other sites

SigiloHQ

 

i removed the LABEL than you said.. @NONAME_2_326

more just continue crashing...

i got it call 1 more..

now call 14 homies,but when will call 15, the game crash...

 

CODE :

 

:NONAME_2
wait 0
if
Player.Defined($PLAYER_CHAR)
$ONMISSION == 0
else_jump @NONAME_2
if and
00E1: player 0 pressed_key 13
Player.Controllable($PLAYER_CHAR)
else_jump @NONAME_2
073F: get_actor_in_sphere [email protected] [email protected] [email protected] radius 1.0 with_pedtype_civilian 1 gang 1 criminal/prostitute 1 handle_as [email protected]
if
not [email protected] == -1
else_jump @NONAME_2
if or
Actor.Model([email protected]) == #FAM1
Actor.Model([email protected]) == #FAM2
Actor.Model([email protected]) == #FAM3
else_jump @NONAME_2
if
00F3: actor $PLAYER_ACTOR near_actor [email protected] radius 1.0 1.0 1.0 on_foot
else_jump @NONAME_2
04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 0.975 0.0
jump @NONAME_2_207
:NONAME_2_207
wait 500
062F: [email protected] = create_group_type 0
0631: put_actor [email protected] in_group [email protected]
08F4: set_max_group_members 9999999
0630: put_actor $PLAYER_ACTOR in_group [email protected] as_leader
07DD: set_actor [email protected] temper_to 100 // see pedstats.dat
Actor.WeaponAccuracy([email protected]) = 100
081A: set_actor [email protected] weapon_skill_to 2
jump @NONAME_2_270
:NONAME_2_270
wait 1000
0631: put_actor [email protected] in_group [email protected]
0630: put_actor $PLAYER_ACTOR in_group [email protected] as_leader
08F4: set_max_group_members 9999999
07DD: set_actor [email protected] temper_to 100 // see pedstats.dat
081A: set_actor [email protected] weapon_skill_to 2
Actor.WeaponAccuracy([email protected]) = 100
Player.CanMove($PLAYER_CHAR) = True
jump @NONAME_2
Link to comment
Share on other sites

Your script doesn't call any homie, also we think the script was not written by you
we think you should first go here and learn coding

Link to comment
Share on other sites

of course than call homies..

You call first the 7 homies normal,pressing G..

and when the group have 7,you call pressing right mouse button + V

Take the groves member from the inside of the car e call pressing right mouse button + V

run he again and you will see than work.

But remember,only start work after than group have 7 members called for G.
Link to comment
Share on other sites

Ok, i got it. Your script creates an additional group that can also have max. 7 members

the script adds player_actor as leader, so 6 additional members are the limit, plus the hardcoded 7 homie gang, are total 13 members, the 14th let the game crash.

 

Also, your method to build a group isn't valid, because you're using always the same variable for every member, but it needs to manage all actors by own variable

and then remove their reference in a cleanup section !!!

otherwise script will cause heavy bug

please make following test to see the bug:

recruit some members with your current script, 3, 4 or 5 are enough

then kill all gang members

then you will see that the dead actors, recruited by your script, nevermore disappear from game world

 

It needs to do array coding to make a gang in a valid way!

check out the script below to understand what i mean

recruit 6 peds by keypress Backspace, till the message "OK" give info that the group is complete

then kill all group members

then wait and you will see that the dead peds will disappear

 

 

{$CLEO .cs}thread 'NEWGANG':NEWGANG_2wait  0if0256:   player $PLAYER_CHAR definedjf @NEWGANG_2if  and0AB0:   key_pressed 8// ----------------	Backspace key044B:   actor $PLAYER_ACTOR on_footjf @NEWGANG_2if6 > [email protected]  // integer valuesjf @NEWGANG_804C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 1.5 0.008E5: get_actor_in_sphere [email protected] [email protected] [email protected] radius 1.5 handle_as [email protected]([email protected],16i)if8039:   not  [email protected]([email protected],16i) == -1jf @[email protected] == 0jf @NEWGANG_3062F: [email protected] = create_group_type 00630: put_actor $PLAYER_ACTOR in_group [email protected] as_leader:NEWGANG_30631: put_actor [email protected]([email protected],16i) in_group [email protected] 00BA: text_styled 'fem_on'  1000 ms  [email protected] += 1jump @NEWGANG_2:NEWGANG_800BA: text_styled 'fem_ok'  3000 ms  1:NEWGANG_9wait  0if0256:   player $PLAYER_CHAR definedjf @NEWGANG_cleanupif and0118:  actor [email protected] dead0118:  actor [email protected] dead0118:  actor [email protected] dead0118:  actor [email protected] dead0118:  actor [email protected] dead0118:  actor [email protected] deadjf @NEWGANG_9:NEWGANG_cleanup00BA: text_styled 'fem_off'  1000 ms  401C2: remove_references_to_actor [email protected]: remove_references_to_actor [email protected]: remove_references_to_actor [email protected]: remove_references_to_actor [email protected]: remove_references_to_actor [email protected]: remove_references_to_actor [email protected]@ = 0jump @NEWGANG_2

this remove the actor instance:

 

Actor.RemoveReferences([email protected])
this also:

 

Actor.DestroyInstantly([email protected])
and this also:

 

Actor.DestroyWithFade([email protected])
but use only one of these code to remove reference

then the instance can't be used anymore in the script

 

then the var is free to use for another instance

Link to comment
Share on other sites

thank you zaz,you are a the legend..

I want to be like you when I grow up :lol:
But I still have doubts ..
Dont is possible increase this limit 7 to additional group or of group PLAYER GROUP ?
this opcode dont make nothing ? 08F4: set_max_group_members 0 ?
13 members just is little.
if i create 7 groups additional,my group would have 49 members?
or for a big group,eu would than create actor by actor,for each actor, a different variable ?
exist some script than there a group much big,the your GANGSPAWN big paratroopers,advanced homie spawner..
advance homie spawner i spawned 40 members and dont crash..
How to get a large group (+20 or no limit) by calling 1 for 1?
thx ZAZ.
Link to comment
Share on other sites

Dont is possible increase this limit 7 to additional group or of group PLAYER GROUP ?

Maybe with FLA , ask fastman92, but i recommand: "don't try to chase a phantom"

 

this opcode dont make nothing ? 08F4: set_max_group_members 0 ?

no, it can't increase it to more, only limit to less

 

13 members just is little.

if i create 7 groups additional,my group would have 49 members?

learn first to make a script that can manage a 7 member group in a valid way

1.what should happen, if player dies or get arrested

2. what should happen if player drive far away or visit interior?

3.what should happen if a member die ....

...while you're recruiting new members?

 

Answer:

1.+ 2.: reference of all members need to be removed

3. it needs a script that can add members to the array index which was restored from a dead actor

and therefor i show you now the valid script and note, the small script from previous post wasn't valid at all, it was just to show, how to get group members

With the script below you can permanently add members till the group is full, if one member die, you can add again one member,

if 2 or 3 die you can add again 2 or 3

members will be released if they're dead or far away

The group will be terminated, if player player dies or get arrested

{$CLEO .cs}thread 'NEWGANG'[email protected] =  [email protected] =  [email protected] =  [email protected] =  [email protected] =  [email protected] =  -1:NEWGANG_2// main loopwait  0if0256:   player $PLAYER_CHAR definedjf @NEWGANG_cleanup_303F0: enable_text_draw 1045A: text_draw_1number  50.0  200.0 'NUMBER' [email protected]: text_draw_1number  50.0  210.0 'NUMBER' [email protected]: text_draw_1number  50.0  220.0 'NUMBER' [email protected]([email protected],16i)if  and0AB0:   key_pressed 8// ----------------	Backspace key044B:   actor $PLAYER_ACTOR on_footjf @NEWGANG_14if6 > [email protected]  // integer valuesjf @NEWGANG_8// jump to restore indexif0039:  [email protected]([email protected],16i) == -1jf @NEWGANG_1404C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 1.5 0.008E5: get_actor_in_sphere [email protected] [email protected] [email protected] radius 1.5 handle_as [email protected]([email protected],16i)if8039:   not  [email protected]([email protected],16i) == -1jf @NEWGANG_2if8118: not actor [email protected]([email protected],16i) deadjf @[email protected] == 0jf @NEWGANG_3062F: [email protected] = create_group_type 00630: put_actor $PLAYER_ACTOR in_group [email protected] [email protected] = 1:NEWGANG_30631: put_actor [email protected]([email protected],16i) in_group [email protected] 00BA: text_styled 'fem_on'  1000 ms  [email protected] += 1jump @NEWGANG_2:NEWGANG_8//restore [email protected] = 0jump @NEWGANG_2//---------- check loop to identify dead members and submit his index to main loop:[email protected] = 0:NEWGANG_15wait 0if6 > [email protected]  // integer valuesjf @NEWGANG_203F0: enable_text_draw 1045A: text_draw_1number  50.0  200.0 'NUMBER' [email protected]: text_draw_1number  50.0  210.0 'NUMBER' [email protected]: text_draw_1number  50.0  220.0 'NUMBER' [email protected]([email protected],16i)if8039:   not  [email protected]([email protected],16i) == -1jf @NEWGANG_18if8118: not actor [email protected]([email protected],16i) deadjf @NEWGANG_17if80F2: not  actor [email protected]([email protected],16i) near_actor $PLAYER_ACTOR radius 70.0 70.0 0 jf @NEWGANG_19:NEWGANG_1701C2: remove_references_to_actor [email protected]([email protected],16i)[email protected]([email protected],16i) =  -1:NEWGANG_180085: [email protected] = [email protected] // submit index of dead released member to main loopjump @NEWGANG_2:[email protected] += 1jump @NEWGANG_15//--------- cleanup when player is dead or got arrested:[email protected] = 0:NEWGANG_cleanup_5wait 0if6 > [email protected]  // integer valuesjf @NEWGANG_cleanup_703F0: enable_text_draw 1045A: text_draw_1number  50.0  200.0 'NUMBER' [email protected]:   not  [email protected]([email protected],16i) == -1jf @NEWGANG_cleanup_601C2: remove_references_to_actor [email protected]([email protected],16i)[email protected]([email protected],16i) =  -1:[email protected] += 1jump @NEWGANG_cleanup_5:[email protected] = [email protected] = 00632: release_group [email protected] @NEWGANG_2

I made the GANGSPAWN big in following way:

2 members are in player group and these 2 members are leaders of additional 2 groupes

 

You wanna make 7 groupes with 49 members at all?

not enough variables in cs script

also it needs answers for following questions:

4. what should happen if player drive vehicle?

5. what should happen if members fight against each other

6. what should happen if member does nothing?

 

the game isn't programmed to let such a lot actors fight in a good way

 

 

or for a big group,eu would than create actor by actor,for each actor, a different variable ?

yes, each actor needs different variable

 

 

 

advance homie spawner i spawned 40 members and dont crash..

the group of advance homie spawner have only 7 members and the rest of the homies don't follow the player

the script spawn 3 homies by keypress and their reference will be removed immediately

they will be added to player_group but it doesn't work for every spawn

it's luck that it doesn't crash, like glitch

Edited by ZAZ
Link to comment
Share on other sites

I think I know how to do this, but I do not know how to write the code ...


Can not make the game create an additional group randomly each time an additional group is full?

So there will be no limits.


i want make 7 groups with 6 members,and 1 leader to each group, and after put the leader of each group in group of PLAYER GROUP..

7 leader in my group with your homies,ill have 49 homies..

But ill first learn your cleo tutorial,for write a code best...

i know about java language..

but i be begining with code in gta now,im just noob..

is much diferent...


but,thank so much ZAZ,helped me a lot.

Link to comment
Share on other sites

There's another way:

 

 

0850: AS_actor [email protected]([email protected],16i) follow_actor $PLAYER_ACTOR077A: set_actor [email protected]([email protected],16i) acquaintance 4 to_actors_pedtype 6 077A: set_actor [email protected]([email protected],16i) acquaintance 4 to_actors_pedtype 7

 

Link to comment
Share on other sites

nice opcodes ZAZ..

i removed 0631: put_actor [email protected] in_group [email protected] and 062F: [email protected] = create_group_type 0

and put this opcodes than you said

and i call 20 members and the game dont crash,is getting better....hahaha

dont be crashing more..

but now appear other thing..

they shoot in police and also in the ballas,but sometimes only some shoot..

they also dont obey when cj give comand to attack pedestrian..

I think now only missing this, force them to defend the cj when the cj is attacked without need to use the opcodes of type put_actor_in group, why this group have limit 7 and make the game crash if call more of 13 homies...

 

first call the 7 man normal,pressing G,and after get the homies of inside of car pressing right mouse button + v,,,

i dont put to remove referencer when actor dead..

but after i put

 

 

run to you see what happening ZAZ :

 

:NONAME_2
wait 0
if
Player.Defined($PLAYER_CHAR)
$ONMISSION == 0
jf @NONAME_2
if and
00E1: player 0 pressed_key 13
Player.Controllable($PLAYER_CHAR)
jf @NONAME_2
073F: get_actor_in_sphere [email protected] [email protected] [email protected] radius 1.0 with_pedtype_civilian 1 gang 1 criminal/prostitute 1 handle_as [email protected]
if
not [email protected] == -1
jf @NONAME_2
if or
Actor.Model([email protected]) == #FAM1
Actor.Model([email protected]) == #FAM2
Actor.Model([email protected]) == #FAM3
jf @NONAME_2
if
00F3: actor $PLAYER_ACTOR near_actor [email protected] radius 1.0 1.0 1.0 on_foot
jf @NONAME_2
04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 0.975 0.0
jump @NONAME_2_208
:NONAME_2_208
wait 500
0850: AS_actor [email protected] follow_actor $PLAYER_ACTOR
089F: get_actor [email protected] pedtype_to [email protected]
01B9: set_actor [email protected] armed_weapon_to 1
077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 20 // see ped.dat
077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 6 // see ped.dat
077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 14 // see ped.dat
077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 7 // see ped.dat
077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 9 // see ped.dat
077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 22 // see ped.dat
077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 17 // see ped.dat
07CB: set_actor [email protected] supporting_fire 0
0630: put_actor $PLAYER_ACTOR in_group $PLAYER_GROUP as_leader
07DD: set_actor [email protected] temper_to 100 // see pedstats.dat
Actor.WeaponAccuracy([email protected]) = 100
081A: set_actor [email protected] weapon_skill_to 2
jump @NONAME_2_302
:NONAME_2_302
wait 1000
0850: AS_actor [email protected] follow_actor $PLAYER_ACTOR
089F: get_actor [email protected] pedtype_to [email protected]
01B9: set_actor [email protected] armed_weapon_to 1
077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 20 // see ped.dat
077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 6 // see ped.dat
077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 14 // see ped.dat
077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 7 // see ped.dat
077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 9 // see ped.dat
077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 22 // see ped.dat
077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 17 // see ped.dat
07CB: set_actor [email protected] supporting_fire 0
0630: put_actor $PLAYER_ACTOR in_group $PLAYER_GROUP as_leader
07DD: set_actor [email protected] temper_to 100 // see pedstats.dat
081A: set_actor [email protected] weapon_skill_to 2
Actor.WeaponAccuracy([email protected]) = 100
Player.CanMove($PLAYER_CHAR) = True
jump @NONAME_2

 

 

 

Edited by ogsf4life
Link to comment
Share on other sites

Hey zaz..i be making a code..

i make the 7 actors..

now it's missing make the additional groups and put they as leader

when i finish i show you the code

 

Edited by ogsf4life
Link to comment
Share on other sites

My code ZAZ..

look if now is valid group.

i create 7 actors and 1 group additional,and put CJ as leader this group..

The members be in street of house of CJ

 

It's right now ?

 

 

:ACTOR1
wait 0
if
Player.Defined($PLAYER_CHAR)
else_jump @ACTOR1
Model.Load(#FAM1)
Model.Load(#FAM2)
Model.Load(#FAM3)
Model.Load(#AK47)
Model.Load(#SAWNOFF)
Model.Load(#TEC9)
Model.Load(#ROCKETLA)
if and
Model.Available(#FAM1)
Model.Available(#FAM2)
Model.Available(#FAM3)
Model.Available(#AK47)
Model.Available(#SAWNOFF)
Model.Available(#TEC9)
Model.Available(#ROCKETLA)
jf @ACTOR1
[email protected] = Actor.Create(Gang2, #FAM1, 2478.449, -1685.776, 13.5078)
[email protected] = Actor.Create(Gang2, #FAM2, 2483.009, -1687.02, 13.5078)
[email protected] = Actor.Create(Gang2, #FAM3, 2487.677, -1686.729, 13.5122)
[email protected] = Actor.Create(Gang2, #FAM1, 2474.084, -1682.982, 13.425)
[email protected] = Actor.Create(Gang2, #FAM2, 2470.871, -1681.008, 13.4283)
[email protected] = Actor.Create(Gang2, #FAM3, 2468.521, -1677.377, 13.5078)
[email protected] = Actor.Create(Gang2, #FAM3, 2466.84, -1674.159, 13.4981)
jf @ACTOR1
062F: [email protected] = create_group_type 0
0630: put_actor $PLAYER_ACTOR in_group [email protected] as_leader
:ACTOR2
wait 0
if and
Player.Controllable($PLAYER_CHAR)
00E1: player 0 pressed_key 13 // RIGHT MOUSE BUTTOM + V
jf @ACTOR2
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]
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]
0631: put_actor [email protected] in_group [email protected]
01B2: give_actor [email protected] weapon 30 ammo 9999999 // Load the weapon model before using this
01B2: give_actor [email protected] weapon 30 ammo 9999999 // Load the weapon model before using this
01B2: give_actor [email protected] weapon 26 ammo 9999999 // Load the weapon model before using this
01B2: give_actor [email protected] weapon 26 ammo 9999999 // Load the weapon model before using this
01B2: give_actor [email protected] weapon 35 ammo 9999999 // Load the weapon model before using this
01B2: give_actor [email protected] weapon 35 ammo 9999999 // Load the weapon model before using this
01B2: give_actor [email protected] weapon 35 ammo 9999999 // Load the weapon model before using this
Actor.WeaponAccuracy([email protected]) = 200
Actor.WeaponAccuracy([email protected]) = 200
Actor.WeaponAccuracy([email protected]) = 200
Actor.WeaponAccuracy([email protected]) = 200
Actor.WeaponAccuracy([email protected]) = 200
Actor.WeaponAccuracy([email protected]) = 200
Actor.WeaponAccuracy([email protected]) = 200
07DD: set_actor [email protected] temper_to 100 // see pedstats.dat
07DD: set_actor [email protected] temper_to 100 // see pedstats.dat
07DD: set_actor [email protected] temper_to 100 // see pedstats.dat
07DD: set_actor [email protected] temper_to 100 // see pedstats.dat
07DD: set_actor [email protected] temper_to 100 // see pedstats.dat
07DD: set_actor [email protected] temper_to 100 // see pedstats.dat
07DD: set_actor [email protected] temper_to 100 // see pedstats.dat
081A: set_actor [email protected] weapon_skill_to 2
081A: set_actor [email protected] weapon_skill_to 2
081A: set_actor [email protected] weapon_skill_to 2
081A: set_actor [email protected] weapon_skill_to 2
081A: set_actor [email protected] weapon_skill_to 2
081A: set_actor [email protected] weapon_skill_to 2
081A: set_actor [email protected] weapon_skill_to 2
:ACTOR3
wait 0
if and
Actor.Dead([email protected])
Actor.Dead([email protected])
Actor.Dead([email protected])
Actor.Dead([email protected])
Actor.Dead([email protected])
Actor.Dead([email protected])
Actor.Dead([email protected])
jf @ACTOR3
Actor.RemoveReferences([email protected])
Actor.RemoveReferences([email protected])
Actor.RemoveReferences([email protected])
Actor.RemoveReferences([email protected])
Actor.RemoveReferences([email protected])
Actor.RemoveReferences([email protected])
Actor.RemoveReferences([email protected])
jump @ACTOR1
Edited by ogsf4life
Link to comment
Share on other sites

You've made good progress...
...i found some reasons to improve:
First make a condition to let it start, then load and spawn models
remove the keypress check you made, the actors will spawn in Groovestreet at this time,
so you will have problems, when you leave the location but actors must spawn far away

Second: put only 6 members into group, because you have to count the player as 7th

Third: improve the loop after spawn codes to controle the actors
-add a player_defined check
-add a keypress check to make cleanup and refresh

then i added codes, 04C4:, 05D3: to fix that problem, when you leave the location but actors must spawn far away
test the script, you can walk to ballas revier and kill, or refresh your own gang,
then the actors will appear nearby player
but not too far, at the limit of the 350.0 radius will it crash

{$CLEO .cs}thread '12HOMIE':ACTOR1wait 0 if    Player.Defined($PLAYER_CHAR)else_jump @ACTOR1if00FF:   actor $PLAYER_ACTOR  0 (in-sphere)near_point_on_foot 2491.8572 -1681.8943 13.3372 radius  350.0  350.0  200.0jf @ACTOR1 Model.Load(#FAM1)Model.Load(#FAM2)Model.Load(#FAM3)Model.Load(#AK47)Model.Load(#SAWNOFF)Model.Load(#TEC9)Model.Load(#chromegun)Model.Load(#ROCKETLA)if and   Model.Available(#FAM1)   Model.Available(#FAM2)   Model.Available(#FAM3)   Model.Available(#AK47)   Model.Available(#SAWNOFF)   Model.Available(#TEC9)   Model.Available(#chromegun)jf @ACTOR1 [email protected] = Actor.Create(Gang2, #FAM1, 2478.449, -1685.776, 13.5078)[email protected] = Actor.Create(Gang2, #FAM2, 2483.009, -1687.02, 13.5078)[email protected] = Actor.Create(Gang2, #FAM3, 2487.677, -1686.729, 13.5122)[email protected] = Actor.Create(Gang2, #FAM1, 2474.084, -1682.982, 13.425)[email protected] = Actor.Create(Gang2, #FAM2, 2470.871, -1681.008, 13.4283)[email protected] = Actor.Create(Gang2, #FAM3, 2468.521, -1677.377, 13.5078)//[email protected] = Actor.Create(Gang2, #FAM3, 2466.84, -1674.159, 13.4981)04C4: create_coordinate [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR offset 0.0  0.5  0.0 05D3: AS_actor [email protected] goto_point [email protected] [email protected] [email protected] mode 4 1000 // versionA 05D3: AS_actor [email protected] goto_point [email protected] [email protected] [email protected] mode 4 1500 // versionA05D3: AS_actor [email protected] goto_point [email protected] [email protected] [email protected] mode 4 1800 // versionA 05D3: AS_actor [email protected] goto_point [email protected] [email protected] [email protected] mode 4 1100 // versionA05D3: AS_actor [email protected] goto_point [email protected] [email protected] [email protected] mode 4 1500 // versionA 05D3: AS_actor [email protected] goto_point [email protected] [email protected] [email protected] mode 4 1000 // versionAwait 2000062F: [email protected] = create_group_type 0 0630: put_actor $PLAYER_ACTOR  in_group [email protected] as_leader  //:ACTOR2//wait 0 //if and//   Player.Controllable($PLAYER_CHAR)//00E1:   player 0 pressed_key 13  // RIGHT MOUSE BUTTOM + V//jf @ACTOR2 0631: put_actor [email protected] in_group [email protected]: 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] 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] 01B2: give_actor [email protected] weapon 30 ammo 9999999 // Load the weapon model before using this 01B2: give_actor [email protected] weapon 30 ammo 9999999 // Load the weapon model before using this 01B2: give_actor [email protected] weapon 26 ammo 9999999 // Load the weapon model before using this 01B2: give_actor [email protected] weapon 26 ammo 9999999 // Load the weapon model before using this 01B2: give_actor [email protected] weapon 25 ammo 9999999 // Load the weapon model before using this 01B2: give_actor [email protected] weapon 25 ammo 9999999 // Load the weapon model before using this //01B2: give_actor [email protected] weapon 25 ammo 9999999 // Load the weapon model before using this Actor.WeaponAccuracy([email protected]) = 200Actor.WeaponAccuracy([email protected]) = 200Actor.WeaponAccuracy([email protected]) = 200Actor.WeaponAccuracy([email protected]) = 200Actor.WeaponAccuracy([email protected]) = 200Actor.WeaponAccuracy([email protected]) = 200//Actor.WeaponAccuracy([email protected]) = 20007DD: set_actor [email protected] temper_to 100 // see pedstats.dat 07DD: set_actor [email protected] temper_to 100 // see pedstats.dat 07DD: set_actor [email protected] temper_to 100 // see pedstats.dat 07DD: set_actor [email protected] temper_to 100 // see pedstats.dat 07DD: set_actor [email protected] temper_to 100 // see pedstats.dat 07DD: set_actor [email protected] temper_to 100 // see pedstats.dat //07DD: set_actor [email protected] temper_to 100 // see pedstats.dat 081A: set_actor [email protected] weapon_skill_to 2 081A: set_actor [email protected] weapon_skill_to 2 081A: set_actor [email protected] weapon_skill_to 2 081A: set_actor [email protected] weapon_skill_to 2 081A: set_actor [email protected] weapon_skill_to 2 081A: set_actor [email protected] weapon_skill_to 2 //081A: set_actor [email protected] weapon_skill_to 2  :ACTOR3wait 0if    Player.Defined($PLAYER_CHAR)else_jump @ACTOR_cleanup if80E1: not  player 0 pressed_key 10//  conversation - no jf @ACTOR_cleanupif0AB0:   key_pressed 72// 	h keyjf @ACTOR407B3: set_group [email protected] give_command 1:ACTOR4if and   Actor.Dead([email protected])   Actor.Dead([email protected])   Actor.Dead([email protected])   Actor.Dead([email protected])   Actor.Dead([email protected])   Actor.Dead([email protected])//   Actor.Dead([email protected])jf @ACTOR3:ACTOR_cleanupActor.RemoveReferences([email protected])Actor.RemoveReferences([email protected])Actor.RemoveReferences([email protected])Actor.RemoveReferences([email protected])Actor.RemoveReferences([email protected])Actor.RemoveReferences([email protected])//Actor.RemoveReferences([email protected])jump @ACTOR1
Link to comment
Share on other sites

thx ZAZ,ill learn more..

look the code here :

i got it make 18 homies follow CJ, + 7 of group normal,i have 25 homies following me and shooting in gangs rivals..

but i put to remover references when they dead,but is not working..

 

CODE without remove references :

 

RUN this :

 

:R
wait 0
if
Player.Defined($PLAYER_CHAR)
$ONMISSION == 0
else_jump @R
if and
00E1: player 0 pressed_key 13 // right mouse button + V (call first the 7 homies pressing G,normal mode, after get the homies than be inside car pressing key 13,when you have 25 homies following you,when call the 26,will crash,i dont why)
Player.Controllable($PLAYER_CHAR)
else_jump @R
073F: get_actor_in_sphere [email protected] [email protected] [email protected] radius 1.0 with_pedtype_civilian 1 gang 1 criminal/prostitute 1 handle_as [email protected]
if
not [email protected] == -1
else_jump @R
if or
Actor.Model([email protected]) == #FAM1
Actor.Model([email protected]) == #FAM2
Actor.Model([email protected]) == #FAM3
else_jump @R
if
00F3: actor $PLAYER_ACTOR near_actor [email protected] radius 1.0 1.0 1.0 on_foot
else_jump @R
04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 0.975 0.0
0850: AS_actor [email protected] follow_actor $PLAYER_ACTOR
077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 7
077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 9
077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 10
077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 11
077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 12
077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 13
077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 14
07DD: set_actor [email protected] temper_to 100 // see pedstats.dat
081A: set_actor [email protected] weapon_skill_to 2
Actor.WeaponAccuracy([email protected]) = 100
Player.CanMove($PLAYER_CHAR) = True
jump @R
___________________________________________________________________________________
CODE with remove references,but dont working,the reference dont remove
:R
wait 0
if
Player.Defined($PLAYER_CHAR)
$ONMISSION == 0
else_jump @R
if and
00E1: player 0 pressed_key 13
Player.Controllable($PLAYER_CHAR)
else_jump @R
073F: get_actor_in_sphere [email protected] [email protected] [email protected] radius 1.0 with_pedtype_civilian 1 gang 1 criminal/prostitute 1 handle_as [email protected]
if
not [email protected] == -1
else_jump @R
if or
Actor.Model([email protected]) == #FAM1
Actor.Model([email protected]) == #FAM2
Actor.Model([email protected]) == #FAM3
else_jump @R
if
00F3: actor $PLAYER_ACTOR near_actor [email protected] radius 1.0 1.0 1.0 on_foot
else_jump @R
04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 0.975 0.0
0850: AS_actor [email protected] follow_actor $PLAYER_ACTOR
077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 7
077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 9
077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 10
077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 11
077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 12
077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 13
077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 14
07DD: set_actor [email protected] temper_to 100 // see pedstats.dat
081A: set_actor [email protected] weapon_skill_to 2
Actor.WeaponAccuracy([email protected]) = 100
Player.CanMove($PLAYER_CHAR) = True
:DEAD
wait 0
if
0118: actor [email protected] dead
jf @DEAD
01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian
jump @R
I Dont know why when have 25 homies following me (18 called for keypress 13 , 7 normal normal mode(pressing G) the game crash..
i dont know if is the variable [email protected] of actor be overload or if is why be without remove references when of ator..
Edited by ogsf4life
Link to comment
Share on other sites

yes, the reference remove..../ Like turning an actor into a random pedestrian without delete him
your script controles only one actor
you have to work with arrays, go back here

Link to comment
Share on other sites

but and when i have more of 9 actors,how ill remove the references, if the o operator "if and" the maximum of condition is 9 ?

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.