Quantcast

Jump to content

» «
Photo

[TUT] Gangs 9 & 10

66 replies to this topic
bmb
  • bmb

    "Lots of ideas trying to learn the skills"

  • Members
  • Joined: 02 Feb 2010

#31

Posted 17 February 2011 - 03:57 PM

QUOTE (twannie1997 @ Feb 16 2011, 15:06)
How can i make the bikers have Tec-9's or something?

You can also find the weapons numbers when your using Sanny Builder. Press F12 for the help menu navigate to SCM Documentation\GTA SA\Weapon numbers for a complete list.

Gramps
  • Gramps

    ★★★★★

  • Feroci
  • Joined: 23 May 2008
  • New-Zealand

#32

Posted 19 February 2011 - 11:33 AM

QUOTE (bmb @ Feb 15 2011, 07:21)
CODE
:GW_11
wait 0
if
Player.Defined($PLAYER_CHAR)
else_jump @GW_11


What does this code do exactly ? just for curiosity .. smile.gif

Gramps
  • Gramps

    ★★★★★

  • Feroci
  • Joined: 23 May 2008
  • New-Zealand

#33

Posted 19 February 2011 - 11:38 AM

QUOTE (bmb @ Feb 15 2011, 07:21)
Also looking at the popcycle.dat (in the data folder) under the desert & countryside areas. The gang columns are at 0, increase this number to around 65 for for each time of day (midnight, 2am, 4 am etc). Increase these values in Weekday & Weekend and you should see more of them on the more remote roads.

I think I am using Zyonig's popcycle.dat file that is posted on GTAGarage .. Also a ped/vehicle multiplier CLEO found on a russian site .. I'll ad-head to your advice .. and see what I can come up with ..

QUOTE (bmb @ Feb 15 2011, 07:21)
CODE
:GW_11
wait 0
if
Player.Defined($PLAYER_CHAR)
else_jump @GW_11


What does this code do exactly ? just for curiosity .. smile.gif

bmb
  • bmb

    "Lots of ideas trying to learn the skills"

  • Members
  • Joined: 02 Feb 2010

#34

Posted 19 February 2011 - 02:34 PM Edited by bmb, 19 February 2011 - 02:44 PM.

BnB pointed this out earlier. If the player defined chack return false the game will crash because there is no wait.
smile.gif

BnB
  • BnB

    The Yardies

  • Members
  • Joined: 28 Jun 2010
  • Saint-Vincent-and-the-Grenadines

#35

Posted 19 February 2011 - 04:50 PM Edited by BnB, 19 February 2011 - 05:24 PM.

QUOTE (methodunderg @ Feb 19 2011, 13:38)
QUOTE (bmb @ Feb 15 2011, 07:21)
CODE
:GW_11
wait 0
if
Player.Defined($PLAYER_CHAR)
else_jump @GW_11


What does this code do exactly ? just for curiosity .. smile.gif

0256
QUOTE (gtamodding.com)
This checks if the player is defined. The player is not defined when the player dies or gets busted. It is used throughout the script to check if the player exists before executing codes that requires the player to exist. Use 0117 to check if the player is specifically wasted.

It can be ommited sometimes.

Gramps
  • Gramps

    ★★★★★

  • Feroci
  • Joined: 23 May 2008
  • New-Zealand

#36

Posted 25 February 2011 - 04:57 AM Edited by methodunderg, 25 February 2011 - 11:36 AM.

QUOTE (BnB @ Feb 19 2011, 16:50)
QUOTE (methodunderg @ Feb 19 2011, 13:38)
QUOTE (bmb @ Feb 15 2011, 07:21)
CODE
:GW_11
wait 0
if
Player.Defined($PLAYER_CHAR)
else_jump @GW_11


What does this code do exactly ? just for curiosity .. smile.gif

0256
QUOTE (gtamodding.com)
This checks if the player is defined. The player is not defined when the player dies or gets busted. It is used throughout the script to check if the player exists before executing codes that requires the player to exist. Use 0117 to check if the player is specifically wasted.

It can be ommited sometimes.

Ok thanks, will update my script.

Is it possible to have a ped in 2 groups @ the same time in pedgrp.dat ? So I can have BIKDRUG in Dealers and in GANG9 ?

CODE


// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007

{$VERSION 3.1.0027}
{$CLEO .CS}

//-------------MAIN---------------
0000: NOP
04ED: load_animation "GANGS"
Model.Load(#FREEWAY)
Model.Load(#BIKERA)
Model.Load(#BIKERB)
038B: load_requested_models
jump @Noname_35

:Noname_35
wait 0
if and
04EE:   animation "GANGS" loaded
  Model.Available(#FREEWAY)
  Model.Available(#BIKERA)
  Model.Available(#BIKERB)
else_jump @Noname_35
jump @Noname_81

:Noname_81
wait 100
$MARK = Marker.CreateIconAndSphere(0, 1175.081, 1380.601, 10.8203)
jump @Noname_114

:Noname_114
wait 0
if and
  Player.Defined($PLAYER_CHAR)
0102:   actor $PLAYER_ACTOR in_sphere 1175.081 1380.601 10.8203 radius 2.0 2.0 2.0 sphere 1 stopped_on_foot
else_jump @Noname_114
Marker.Disable($MARK)
else_jump @Noname_114
jump @Noname_190

:Noname_190
$BIKE1 = Car.Create(#FREEWAY, 1196.824, 1403.132, 6.9956)
Car.Angle($BIKE1) = 184.7214
Car.SetMaxSpeed($BIKE1, 40.0)
00AE: set_car $BIKE1 traffic_behaviour_to 2
$BIKE2 = Car.Create(#FREEWAY, 1198.768, 1408.834, 6.8558)
Car.Angle($BIKE2) = 184.7214
Car.SetMaxSpeed($BIKE2, 40.0)
00AE: set_car $BIKE2 traffic_behaviour_to 2
$BIKE3 = Car.Create(#FREEWAY, 1198.538, 1416.083, 6.8627)
Car.Angle($BIKE3) = 184.7214
Car.SetMaxSpeed($BIKE3, 40.0)
00AE: set_car $BIKE3 traffic_behaviour_to 2
$BIKE4 = Car.Create(#FREEWAY, 1198.461, 1422.555, 6.865)
Car.Angle($BIKE4) = 184.7214
Car.SetMaxSpeed($BIKE4, 40.0)
00AE: set_car $BIKE4 traffic_behaviour_to 2
$BIKE5 = Car.Create(#FREEWAY, 1201.032, 1427.92, 6.7878)
Car.Angle($BIKE5) = 184.7214
Car.SetMaxSpeed($BIKE5, 40.0)
00AE: set_car $BIKE5 traffic_behaviour_to 2
$BIKE6 = Car.Create(#FREEWAY, 1194.361, 1427.142, 7.487)
Car.Angle($BIKE6) = 184.7214
Car.SetMaxSpeed($BIKE6, 40.0)
00AE: set_car $BIKE6 traffic_behaviour_to 2
$BIKE7 = Car.Create(#FREEWAY, 1194.927, 1420.098, 7.3759)
Car.Angle($BIKE7) = 184.7214
Car.SetMaxSpeed($BIKE7, 40.0)
00AE: set_car $BIKE7 traffic_behaviour_to 2
$BIKE8 = Car.Create(#FREEWAY, 1195.232, 1413.676, 7.3161)
Car.Angle($BIKE8) = 184.7214
Car.SetMaxSpeed($BIKE8, 40.0)
00AE: set_car $BIKE8 traffic_behaviour_to 2
$BIKE9 = Car.Create(#FREEWAY, 1195.506, 1406.18, 7.2622)
Car.Angle($BIKE9) = 184.7214
Car.SetMaxSpeed($BIKE9, 40.0)
00AE: set_car $BIKE9 traffic_behaviour_to 2
$BIKE10 = Car.Create(#FREEWAY, 1198.272, 1400.168, 6.8707)
Car.Angle($BIKE10) = 184.7214
Car.SetMaxSpeed($BIKE10, 40.0)
00AE: set_car $BIKE10 traffic_behaviour_to 2
$ACTOR1 = Actor.Create(Mission1, #BIKERA, 1189.976, 1394.32, 8.3479)
Actor.Angle($ACTOR1) = 0.2523
0605: actor $ACTOR1 perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 0 0 0 0 time 4000 // versionA
$ACTOR2 = Actor.Create(Mission1, #BIKERB, 1185.827, 1409.274, 9.1625)
Actor.Angle($ACTOR2) = 192.3774
$ACTOR3 = Actor.Create(Mission1, #BIKERA, 1188.146, 1412.244, 8.7071)
Actor.Angle($ACTOR3) = 185.9962
0605: actor $ACTOR3 perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 0 0 0 0 time 4000 // versionA
$ACTOR4 = Actor.Create(Mission1, #BIKERB, 1180.303, 1401.662, 10.2389)
Actor.Angle($ACTOR4) = 200.1836
$ACTOR5 = Actor.Create(Mission1, #BIKERA, 1187.356, 1415.419, 8.8543)
Actor.Angle($ACTOR5) = 314.0161
0605: actor $ACTOR5 perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 0 0 0 0 time 4000 // versionA
$ACTOR6 = Actor.Create(Mission1, #BIKERB, 1187.028, 1418.459, 8.9186)
Actor.Angle($ACTOR6) = 214.6165
0605: actor $ACTOR6 perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 0 0 0 0 time 4000 // versionA
$ACTOR7 = Actor.Create(Mission1, #BIKERA, 1190.422, 1416.601, 8.2523)
Actor.Angle($ACTOR7) = 83.0653
$ACTOR8 = Actor.Create(Mission1, #BIKERB, 1189.408, 1412.727, 8.4593)
Actor.Angle($ACTOR8) = 21.2166
0605: actor $ACTOR8 perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 0 0 0 0 time 4000 // versionA
$ACTOR9 = Actor.Create(Mission1, #BIKERA, 1187.43, 1422.23, 8.8399)
Actor.Angle($ACTOR9) = 88.7103
$ACTOR10 = Actor.Create(Mission1, #BIKERB, 1185.221, 1422.049, 9.2735)
Actor.Angle($ACTOR10) = 266.8933
0605: actor $ACTOR10 perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 0 0 0 0 time 4000 // versionA
wait 100
Model.Destroy(#FREEWAY)
Model.Destroy(#BIKERA)
Model.Destroy(#BIKERB)
wait 3950
036A: put_actor $ACTOR1 in_car $BIKE1
036A: put_actor $ACTOR2 in_car $BIKE2
036A: put_actor $ACTOR3 in_car $BIKE3
036A: put_actor $ACTOR4 in_car $BIKE4
036A: put_actor $ACTOR5 in_car $BIKE5
036A: put_actor $ACTOR6 in_car $BIKE6
036A: put_actor $ACTOR7 in_car $BIKE7
036A: put_actor $ACTOR8 in_car $BIKE8
036A: put_actor $ACTOR9 in_car $BIKE9
036A: put_actor $ACTOR10 in_car $BIKE10
wait 3000
Car.SetDriverBehaviour($BIKE1, FollowRoad)
Car.SetDriverBehaviour($BIKE2, FollowRoad)
Car.SetDriverBehaviour($BIKE3, FollowRoad)
Car.SetDriverBehaviour($BIKE4, FollowRoad)
Car.SetDriverBehaviour($BIKE5, FollowRoad)
Car.SetDriverBehaviour($BIKE6, FollowRoad)
Car.SetDriverBehaviour($BIKE7, FollowRoad)
Car.SetDriverBehaviour($BIKE8, FollowRoad)
Car.SetDriverBehaviour($BIKE9, FollowRoad)
Car.SetDriverBehaviour($BIKE10, FollowRoad)
jump @Noname_1490

:Noname_1490
wait 0
if and
0AB0:   key_pressed 66
0AB0:   key_pressed 109
else_jump @Noname_1490
wait 50
Car.RemoveReferences($BIKE1)
Car.RemoveReferences($BIKE2)
Car.RemoveReferences($BIKE3)
Car.RemoveReferences($BIKE4)
Car.RemoveReferences($BIKE5)
Car.RemoveReferences($BIKE6)
Car.RemoveReferences($BIKE7)
Car.RemoveReferences($BIKE8)
Car.RemoveReferences($BIKE9)
Car.RemoveReferences($BIKE10)
Car.Destroy($BIKE1)
Car.Destroy($BIKE2)
Car.Destroy($BIKE3)
Car.Destroy($BIKE4)
Car.Destroy($BIKE5)
Car.Destroy($BIKE6)
Car.Destroy($BIKE7)
Car.Destroy($BIKE8)
Car.Destroy($BIKE9)
Car.Destroy($BIKE10)
Actor.RemoveReferences($ACTOR1)
Actor.RemoveReferences($ACTOR2)
Actor.RemoveReferences($ACTOR3)
Actor.RemoveReferences($ACTOR4)
Actor.RemoveReferences($ACTOR5)
Actor.RemoveReferences($ACTOR6)
Actor.RemoveReferences($ACTOR7)
Actor.RemoveReferences($ACTOR8)
Actor.RemoveReferences($ACTOR9)
Actor.RemoveReferences($ACTOR10)
Actor.DestroyWithFade($ACTOR1)
Actor.DestroyWithFade($ACTOR2)
Actor.DestroyWithFade($ACTOR3)
Actor.DestroyWithFade($ACTOR4)
Actor.DestroyWithFade($ACTOR5)
Actor.DestroyWithFade($ACTOR6)
Actor.DestroyWithFade($ACTOR7)
Actor.DestroyWithFade($ACTOR8)
Actor.DestroyWithFade($ACTOR9)
Actor.DestroyWithFade($ACTOR10)
jump @Noname_1724

:Noname_1724
wait 10
if and
0AB0:   key_pressed 66
0AB0:   key_pressed 107
else_jump @Noname_1724
jump @Noname_1754

:Noname_1754
wait 10
Model.Load(#FREEWAY)
Model.Load(#BIKERA)
Model.Load(#BIKERB)
038B: load_requested_models
jump @Noname_1782

:Noname_1782
wait 0
if and
04EE:   animation "GANGS" loaded
  Model.Available(#FREEWAY)
  Model.Available(#BIKERA)
  Model.Available(#BIKERB)
else_jump @Noname_1782
jump @Noname_190


Found that on my travels; maybe some of that could be used to spawn 'packs' of Bikers smile.gif I wouldn't know where to start smile.gif But I'm sure you would

bmb
  • bmb

    "Lots of ideas trying to learn the skills"

  • Members
  • Joined: 02 Feb 2010

#37

Posted 25 February 2011 - 05:02 PM

QUOTE (methodunderg)
Is it possible to have a ped in 2 groups @ the same time in pedgrp.dat ? So I can have BIKDRUG in Dealers and in GANG9 ?

Yes you can have them in both groups. but you also have to change the "STAT" in the peds.ide file.

Example:
CODE
original
254, BIKDRUG,  BIKDRUG , CIVMALE, STAT_CRIMINAL, man, 0,1, null,6,2,PED_TYPE_GEN,VOICE_GEN_BIKDRUG ,VOICE_GEN_BIKDRUG
gang
254, BIKDRUG,  BIKDRUG , GANG9, STAT_GANG9, man, 0,1, null,6,2,PED_TYPE_GEN,VOICE_GEN_BIKDRUG ,VOICE_GEN_BIKDRUG
both
254, BIKDRUG,  BIKDRUG , GANG9, STAT_CRIMINAL, man, 0,1, null,6,2,PED_TYPE_GEN,VOICE_GEN_BIKDRUG ,VOICE_GEN_BIKDRUG


As long as "GANG9" is there that ped will always be associated with that group. You can change "STAT" to anything you want. Your going to encounter two problems when dealing with gangs.

1. The game will usually spawn 3 or more of that particular ped on the sidewalk. When they are associated with gangs they will group together and act like a gang. The "STAT_CRIMINAL" will be ignored.

2. If you do happen to get 1 BIKDRUG to spawn he will act like a dealer, but dealers spawn in gang areas and he will most likely be attacked by that gang.

You can manipulate the peds,ide any way you want to.

Examples:
CODE
original
12, BFYRI, BFYRI, CIVFEMALE, STAT_COWARD, sexywoman, 120C,1, null,7,9,PED_TYPE_GEN,VOICE_GEN_BFYRI ,VOICE_GEN_BFYRI
modified
12, BFYRI, BFYRI, CIVFEMALE, STAT_PROSTITUTE, sexywoman, 120C,1, null,7,9,PED_TYPE_GEN,VOICE_GEN_BFYRI ,VOICE_GEN_BFYRI

This will make BFYRI kind of like a hidden prostitute. She will spawn normally and walk around her normal group areas because she still is a "CIVFEMALE". When your car stops next to her she will run up to it and the text on the screen will ask if you want a good time, with a yes response she will get in the car and you know what happens next. She is not added to the prostitutes in the pedgrp.dat.

CODE
original
282, lvpd1, lvpd1, COP, STAT_COP, swat, 1FFF, 0, null, 9,9, PED_TYPE_EMG,VOICE_EMG_LVPD1 ,VOICE_EMG_LVPD5
modified
282, lvpd1, lvpd1, COP, STAT_COP, sexywoman, 1FFF, 0, null, 9,9, PED_TYPE_GEN,VOICE_GEN_BMYBE ,VOICE_GEN_BMYBE

Try it. mercie_blink.gif lol.gif

QUOTE (methodunderg)
Found that on my travels; maybe some of that could be used to spawn 'packs' of Bikers smile.gif I wouldn't know where to start smile.gif But I'm sure you would

I'm far from being an expert on cleo but first off there are way too may globals ($) in the script.

QUOTE (ZAZ)
$ is used to mark a GLOBAL VARIABLE

The stuff in the game needs a identity for registration to can handle with it
The identities can be variable, for exemble by calculating something

The global variable is builded with the $ sign and a a letter or a word or a number or both
But using global variables in Cleo scripts can cause heavy bugs or crashs
only $PLAYER_CHAR, $PLAYER_ACTOR, $ONMISSION are valid

ZAZ has an awesome tutorial here, he is also incredibly helpful when you ask him questions.

Other than that look at other scripts that have been released relating to vehicle spawning. Use there scripts as examples for a starting point to make your script. If you get stuck post it in GTA Modding / III Era Modding and people who are experts at cleo will be more than happy to help. smile.gif

Gramps
  • Gramps

    ★★★★★

  • Feroci
  • Joined: 23 May 2008
  • New-Zealand

#38

Posted 28 February 2011 - 04:16 AM

Ok; thanks for the tips smile.gif Appreciate it smile.gif Was wanting to add BIKDRUG to dealers and to GANG9 (BIKERS), as well as add a dealer to each of the gangs smile.gif

Rapier
  • Rapier

    Retired scripter

  • Members
  • Joined: 14 Aug 2005

#39

Posted 06 March 2011 - 02:41 PM

@bmb: Very interesting! cookie.gif I have an idea: what would happen if we put more gangs in the same territory? To make a gang war...

twannie1997
  • twannie1997

    PS3 Stronk

  • Members
  • Joined: 02 Jul 2010
  • Netherlands

#40

Posted 06 March 2011 - 07:42 PM

I got a side-effect, where aztecas hang around in docks, drive sentinels, wield ak47 and silenced pistols.
I think i will make gang 10 something like thugs.

sleepowl
  • sleepowl

    Player Hater

  • Members
  • Joined: 17 Dec 2010

#41

Posted 10 March 2011 - 08:59 AM

so good tut, man!! tounge.gif tounge.gif

can i provoke a gangwar with them(russian&biker) like ballass & lsv ?

onemore Q,
does radar show their territory(russian&biker) collor?

bmb
  • bmb

    "Lots of ideas trying to learn the skills"

  • Members
  • Joined: 02 Feb 2010

#42

Posted 23 March 2011 - 02:21 PM Edited by bmb, 23 March 2011 - 03:03 PM.

QUOTE (Rapier @ Mar 6 2011, 10:41)
@bmb: Very interesting!  cookie.gif I have an idea: what would happen if we put more gangs in the same territory? To make a gang war...

If you put more than 1 gang in an area they will attack each other. That zone will have a never ending battle. You can increase or decrease this by adjusting each gangs density in that zone. The higher the density the more intense it will be.


Sorry about the late replies everyone, I did not get an email notification for the last few posts. confused.gif I will check daily from now on to answer your questions faster.

bmb
  • bmb

    "Lots of ideas trying to learn the skills"

  • Members
  • Joined: 02 Feb 2010

#43

Posted 23 March 2011 - 02:45 PM

QUOTE (twannie1997 @ Mar 6 2011, 15:42)
I got a side-effect, where aztecas hang around in docks, drive sentinels, wield ak47 and silenced pistols.
I think i will make gang 10 something like thugs.

Sounds good. You can make the gangs anything you want. You could have a gang of woman driving fast cars and there territory in Rodeo, or construction workers driving heavy equipment at a building site. The possibilities are endless.

bmb
  • bmb

    "Lots of ideas trying to learn the skills"

  • Members
  • Joined: 02 Feb 2010

#44

Posted 23 March 2011 - 03:01 PM

QUOTE (sleepowl @ Mar 10 2011, 04:59)
so good tut, man!! tounge.gif   tounge.gif

can i provoke a gangwar with them(russian&biker) like ballass & lsv ?

onemore Q,
does radar show their territory(russian&biker) collor?

Gang wars only work with Ballas and Los Santos Vagos. Only there territories are can be taken over by Grove St. Families.

Only Ballas, LSV, & OGF gangs have colors that show on the map and radar with gang wars enabled.

Gramps
  • Gramps

    ★★★★★

  • Feroci
  • Joined: 23 May 2008
  • New-Zealand

#45

Posted 15 April 2011 - 09:45 AM Edited by methodunderg, 15 April 2011 - 09:54 AM.

I want to add in GANG10 with some new peds.

What are the most worthless/unused peds in the game ? I saw on the previous page you had the bums ID 134-137; any others?

bmb
  • bmb

    "Lots of ideas trying to learn the skills"

  • Members
  • Joined: 02 Feb 2010

#46

Posted 15 April 2011 - 02:29 PM

QUOTE (methodunderg @ Apr 15 2011, 05:45)
I want to add in GANG10 with some new peds.

What are the most worthless/unused peds in the game ? I saw on the previous page you had the bums ID 134-137; any others?

All the Bums
77, SWMOTR1
78, WMOTR1
79, BMOTR1
134, SBMOTR2
135, SWMOTR2
136, SBMYTR3
137, SWMOTR3
212, VWMOTR1
213, VWMOTR2
230, SWMOTR5
239, SWMOTR4

These peds are for the storyline only or they were left out by Rockstar in the pedgrp.dat.
62, WMOPJ (Colonel Fuhrberger, Home Invasion)
68, WMOPREA (preacher)
70, WMOSCI (Area 51 scientist)
97, WMYLG (lifeguard)
144, BMYCG (Big Smokes Crack Fortress)
145, WFYCRK (Big Smokes Crack Fortress)
146, HMYCM (Big Smokes Crack Fortress)
165, WMOMIB (Gov. Agent, Stowaway)
166, BMYMIB (Gov. Agent, Stowaway)
210, OMOBOAT (never figured out his purpose)
249, BMYPIMP (pimp)
252, WMYVA2 (valet in underwear, 555 We Tip)
253, BMOSEC (old black security guard)
260, BMYCON (black construction worker)

Of course if you change the storyline peds there replacements will show up in the missions.

OrionSR
  • OrionSR

    Chain Game Development Team

  • Feroci
  • Joined: 23 May 2007
  • None
  • Helpfulness Award [GTA & Modding]

#47

Posted 29 April 2011 - 12:21 AM Edited by OrionSR, 05 May 2011 - 02:34 PM.

How to War with Any Gang

Zone Map by pdescobar

This information was discovered as part of the Master Mind's Territory Glitch investigation. The glitch involves getting Aztecas to attack during a Turf Attack without mods or cheats, but some of what we learned should be useful for Gang War mods.

After an Attack Notice is displayed or a Gang War is triggered by killing 3 successive Ballas or Vagos, the attacking or warring gang can be changed with memory writes. The code segment below will set unused gang 8 as the gang to attack, or unused gangs 8 and 9 as targets in a war. Note that only the 1st model listed for a gang will appear during a war with the non-Los Santos gangs (gangs 3-6,8,9).

CODE
0A8C: write_memory 0x96ab84 size 4 value 8 virtual_protect 0 // Set Attack/War Gang ID
0A8C: write_memory 0x96ab50 size 4 value 9 virtual_protect 0 // Set War Gang ID 2


The Gang War Strength assigned by gang density can also be changed after the war is triggered.
CODE
0A8C: write_memory 0x96ab58 size 4 value 3 virtual_protect 0 // Gang War Strength (0 to 3, 3 is unused)

Gang strength of 0, rival density of 1 to 14, armed with bats, 9mm pistols, Micro-SMG, and SMG
Gang strength of 1, rival density of 15 to 29, armed with 9mm pistols, Micro-SMGs, SMGs, and AK-47
Gang strength of 2, rival density of 30 and above, armed with Micro-SMGs, SMGs, and AK-47s
Gang strength of 3, not seen without modification, armed with SMGs, AK-47s, and Desert Eagles
Gang strength of 4 crashes loading 3rd wave
Gang strength of 5 crashes loading 2nd wave
Gang strength of 6 crashes loading 1st wave


A Turf Attack can be triggered on demand by clearing the Next Attack Timer.
CODE
0A8C: write_memory 0x96ab48 size 4 value 0.0 virtual_protect 0 // Clear Next Attack Timer


A "3rd Kill" against Ballas or Vagos can be detected by comparing the 3rd Kill XYZ coordinates. The 3rd Kill will only trigger a gang war if Vagos or Ballas control the turf. A gang war mod might want to change the warring gangs and strength instead of displaying an FXT string.
CODE
:Top
0A8D: 0@ = read_memory 0x96abbc size 4 virtual_protect 0 // 3rd Kill X coordinate

:Middle
wait 1000
0A8D: 1@ = read_memory 0x96abbc size 4 virtual_protect 0 // 3rd Kill X coordinate

00D6: if
8045:  not 0@ == 1@
004D: jump_if_false @Middle

00BA: show_text_styled GXT 'CG3KILL' time 1000 style 2  // FXT string
wait 1000

0002: jump @Top


Adjusting Gang Cars and Peds using memory writes (adapted from a post by -ATP-). I prefer not to edit my data files, even if it is the easier method. It looks like there is room in the group for 23 cars and 21 peds, but I haven't tested the limits.
CODE
// Gang Cars
0@ = 46 // car group size [23 words]
0@ *= 8 // gang ID (0...9)
0@ += 0xC0F074 // beginning of gang car groups

0A8C: write_memory 0@ size 2 value 434 virtual_protect 0 // Gang Car      #HOTKNIFE 434
0@ += 2
0A8C: write_memory 0@ size 2 value 568 virtual_protect 0 // Gang Car      #BANDITO 568

// Gang Peds
1@ = 42 // ped group size [21 words]
1@ *= 8 // gang ID (0...9)
1@ += 0xC0FA3C // beginning of gang peds group

0A8C: write_memory 1@ size 2 value 178 virtual_protect 0 // Gang Ped  wfysex
1@ += 2
0A8C: write_memory 1@ size 2 value 246 virtual_protect 0 // Gang Ped  vhfyst3
1@ += 2
0A8C: write_memory 1@ size 2 value 257 virtual_protect 0 // Gang Ped  swfystr


Other addresses that might be useful for gang war mods.
CODE

0x96ab44 // Attack Timeout (milliseconds before notice or attack ends)
0x96ab64 // current gang war stage
                           0: no war
                           1: war provoked
                           2: first wave
                           3: first wave passed
                           4: second wave
                           5: second wave passed
                           6: third wave


coin-god
  • coin-god

    High Roller

  • $outh $ide Hoodz
  • Joined: 18 Mar 2007
  • None

#48

Posted 29 April 2011 - 02:27 AM

Nice info OrionSR.

HipHopHeadSeb
  • HipHopHeadSeb

    Hustler

  • Members
  • Joined: 28 Mar 2011

#49

Posted 03 May 2011 - 11:37 PM

so, lets say i go out and buy gta san andreas.. a legit copy from a shop.. for the PC... i can add gangs? design the gang member models? choose their colours of turf And clothes? choose their weapons and cars?! WHAT THE f*ck!
what else can i mod and is it really as easy as this thread makes it seem?!

I NEED THE PC VERSION OF SAN ANDREAS!

could i make it so like, grove street wont shoot this new gang i create? like there allies?

bmb
  • bmb

    "Lots of ideas trying to learn the skills"

  • Members
  • Joined: 02 Feb 2010

#50

Posted 04 May 2011 - 04:29 AM

QUOTE (OrionSR @ Apr 28 2011, 20:21)
How to War with Any Gang

First of all thanks for the contribution and the link to the map is great, I was making a map myself and got through the lower third of the map so you saved me a lot of work.

Secondly you will have to excuse my ignorance. I have only been dabbling in coding for close to a year now and still have a lot to learn. I get most of what your talking about, but I have a few questions.

CODE
// Gang Cars
0@ = 46 // record size
0@ *= 8 // gang ID
0@ += 0xC0F074 // gang car offset

0A8C: write_memory 0@ size 2 value 434 virtual_protect 0 // Gang Car      #HOTKNIFE 434
0@ += 2
0A8C: write_memory 0@ size 2 value 568 virtual_protect 0 // Gang Car      #BANDITO 568

// Gang Peds
1@ = 42 // record size
1@ *= 8 // gang ID
1@ += 0xC0FA3C // gang peds offset

0A8C: write_memory 1@ size 2 value 178 virtual_protect 0 // Gang Ped  wfysex
1@ += 2
0A8C: write_memory 1@ size 2 value 246 virtual_protect 0 // Gang Ped  vhfyst3
1@ += 2
0A8C: write_memory 1@ size 2 value 257 virtual_protect 0 // Gang Ped  swfystr


The size in your codes are either 2 or 4 does this mean memory size or something to do with the gangs?

and 0@ = 46 // record size?

also is there some kind of a list for what the different memory values are for?

bmb
  • bmb

    "Lots of ideas trying to learn the skills"

  • Members
  • Joined: 02 Feb 2010

#51

Posted 04 May 2011 - 05:03 AM

QUOTE (HipHopHeadSeb @ May 3 2011, 19:37)
so, lets say i go out and buy gta san andreas.. a legit copy from a shop.. for the PC... i can add gangs? design the gang member models? choose their colours of turf And clothes? choose their weapons and cars?! WHAT THE f*ck!
what else can i mod and is it really as easy as this thread makes it seem?!

I NEED THE PC VERSION OF SAN ANDREAS!

could i make it so like, grove street wont shoot this new gang i create? like there allies?

i can add gangs? yes 2

design the gang member models? not without 3D modeling software.

choose their colours of turf And clothes? If by turf you mean on the map then no. You can do a texture edit to change colors on existing models with Txd Workshop and photoshop or some other paint program.

choose their weapons and cars? yes

could i make it so like, grove street wont shoot this new gang i create? like there allies? You could see if editing the ped.dat file would work but I have never tested it.

HipHopHeadSeb
  • HipHopHeadSeb

    Hustler

  • Members
  • Joined: 28 Mar 2011

#52

Posted 04 May 2011 - 01:12 PM

my enthusiasm has been weakend slightly sad.gif

cheers for the answers though

OrionSR
  • OrionSR

    Chain Game Development Team

  • Feroci
  • Joined: 23 May 2007
  • None
  • Helpfulness Award [GTA & Modding]

#53

Posted 04 May 2011 - 10:28 PM Edited by OrionSR, 05 May 2011 - 02:48 AM.

Hm.... It looks like I need to rework some of my descriptions. "Record" was definitely used incorrectly.

The size of a memory write is usually 1, 2, or 4, and depends on if you are trying to change a byte, word (2 bytes), or dword/float (4 bytes).

There is room in memory for 23 records in each car group. Each car record is 2 bytes long, so the... group length (there's a better word for this) is 46 bytes long.

The best references for memory addresses that I have found are at:
GTAModding: http://www.gtamoddin...=...resses_(SA)
GTAForums: http://www.gtaforums...howtopic=194199

Added:
CODE
// Gang Cars
0@ = 46 // car group size [23 words]
0@ *= 8 // gang ID (0...9)
0@ += 0xC0F074 // beginning of gang car groups
0A8C: write_memory 0@ size 2 value  #HOTKNIFE virtual_protect 0
0@ += 2
0A8C: write_memory 0@ size 2 value #BANDITO virtual_protect 0

0247: request_model #HOTKNIFE
0247: request_model #BANDITO

I haven't been having the best of luck with this method of switching out the gang cars. It could be because I've chosen vehicles that are unlikely to be in memory, but it doesn't seem like the cars are spawning as regularly as they did when the cargroup file was edited. Requesting the model didn't help all that much. Note that the #CARNAME method of entering values for a memory write works just as well as the car ID numbers.

bmb
  • bmb

    "Lots of ideas trying to learn the skills"

  • Members
  • Joined: 02 Feb 2010

#54

Posted 07 May 2011 - 01:26 AM Edited by bmb, 07 May 2011 - 01:50 AM.

Thanks OrionSR I got it now. The links you provided just gave me a ton of new ideas. smile.gif

QUOTE
I haven't been having the best of luck with this method of switching out the gang cars. It could be because I've chosen vehicles that are unlikely to be in memory, but it doesn't seem like the cars are spawning as regularly as they did when the cargroup file was edited. Requesting the model didn't help all that much.

I know you don't like to edit the data files, but in the VEHICLES.IDE the BANDITO and the HOTKNIFE both only have a frequency of 4. Adjusting this to 8 - 10 may solve your problem.

Grove Street Boy
  • Grove Street Boy

    Maggot for life!

  • Members
  • Joined: 06 Aug 2005

#55

Posted 21 June 2011 - 03:18 AM

sorry for the bump, but is it possible to create an allied gang? As in a gang friendly to GSF, which will assist you in shooting rival gangs/cops, but you are not able to recruit them. I think this should also be done to the triads since Woo Zi is supposed to be a friend of CJ, right? biggrin.gif

Gramps
  • Gramps

    ★★★★★

  • Feroci
  • Joined: 23 May 2008
  • New-Zealand

#56

Posted 23 July 2011 - 09:40 AM

QUOTE (Grove Street Boy @ Tuesday, Jun 21 2011, 03:18)
sorry for the bump, but is it possible to create an allied gang? As in a gang friendly to GSF, which will assist you in shooting rival gangs/cops, but you are not able to recruit them. I think this should also be done to the triads since Woo Zi is supposed to be a friend of CJ, right? biggrin.gif

Can't you change that in ped.dat?

MC Vic
  • MC Vic

    aka LikeBAX

  • Members
  • Joined: 31 Dec 2009

#57

Posted 05 September 2011 - 04:29 PM Edited by MC Vic, 05 September 2011 - 04:31 PM.

It's easy to add. Check Surya386's Seville mod.

And how to do it:
add gang models to gta3.img (if you need it)
1-if you added new peds, write the need notes in peds.ide - two in ADD NEW PEDS HERE, and if you want more totally new members, you must delete the unneed models inf (for example - bmosec, wmylg, etc.)
1-if you use standart peds, just edit the string with its name, for example WMOSCI - copy for example FAM1 string but write WMOSCI replacing FAM1, GANG9 STAT_GANG9 VOICE_GEN_... (the ped model voice that you want)
2 - write new member(s) in pedgrp.dat in GANG9 string
3 - write gang9 cars in cargrp.dat
4 - make a CLEO script, you must know the name of territory that you want to make under control of gang9
for example, Playa Del Seville
write set_zone 'PLS' gang [GANG9 number] density to...
set gang [GANG9 number] weapons to . . .

You better decompile Surya's script for more information.

That's all. It's the same with gang10. If you have crashes, you hadn't edited peds.ide properly (smth with VOICE_GEN or before).

I can write a better tutorial for request.
  • Chorizombie likes this

mtna
  • mtna

    Player Hater

  • Members
  • Joined: 20 Feb 2012

#58

Posted 20 February 2012 - 10:54 AM

i did as instructed and then tried to start the game but it wouldn't load. so i use my backup files to undo everything that was done but that game still is not loading, has anyone else had this problem or is this just a problem with my game

PK_LT
  • PK_LT

    Prankster

  • BUSTED!
  • Joined: 11 May 2012

#59

Posted 28 October 2012 - 09:55 PM Edited by PK_LT, 01 November 2012 - 10:04 PM.

Thank you very much, it's really useful smile.gif .

larosco
  • larosco

    Yay Area

  • Members
  • Joined: 27 Jan 2005

#60

Posted 03 February 2013 - 08:33 PM

works for me im going to change the skins though for fun




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users