Gangs in GTA 2 Mission Scripts

The cities in GTA 2 have three gangs who try to battle for the city, and they hate each other. Below is how to set up a gang in your city.

See also: How to display a gang head next to your messages.

Add the Zone

To start with, go into your map (via the editor) and add a gang zone. It is not allowed to touch any of the edges otherwise it’ll say it’s an invalid zone. So, make it one cell from the edge. Call it whatever name you like. In this example, I’ll call them zaibgang and copgang.

Add the Mission Code

In your script file, the command has these parameters:

SET_GANG_INFO (gang_name, gang_remap,
               arrow_colour, X,Y,Z,
               respect, MODEL,car_remap)

Here’s an example:

SET_GANG_INFO (copgang, 00,
               4, 12.5,6.5,2.0,
               1, COPCAR,-1)

Do this for all your gangs. It’s a very long command and takes some explaining!

gang_name Must match the gang zone names in your .gmp map file.
gang_remap Colour of the gang members.
BASIC_WEAPON For killing other gangs’ members if they don’t like you (one or two bars).
ANGRY_WEAPON When you have butchered quite a few of them
HATE_WEAPON The gang really hates the player! This is when the bar is flashing on the negative side.
arrow_colour Colour of their arrow (further down page).
X,Y,Z Direct the player to one of their phones for info or something.
respect How much the bar changes when the player kills a gang member. Usually set to 1.
MODEL The name of a vehicle they use as a gang car.
car_remap The colour of the gang car.
Effect of Values for arrow_colour
0 (Pink Arrow) (Glitchy)
1 Green Loonie
2 Purple Yakuza
3 Grey Zaibatsu,
4 Blue Redneck
5 Yellow Scientist
6 Orange Krishna
7 Red Russian
8 (None) (None)

(Values 0 and 8 discovered via the WikiGTA Code List.)

Gangs Without Arrows

Gang arrows get confused with player arrows in a normal multiplayer game. To remove the gang arrows but keep the player arrows, you have to disable all the special features of the gang phones and respect system.

Here’s an example based on our earlier gang but now they have no arrow:

SET_GANG_INFO (copgang, 00,
               0, 0.0,0.0,0.0,
               0, COPCAR,-1)

If your level is a team game, gang arrows might be OK. But it’s usually best to use the big pink mission arrow to show objectives in multiplayer games.

AI Interactions

Now, when you load up your map, you have the two gangs. But they don’t do anything do they? This is where you need to set the kill reaction. Add this just below your gang info:

SET_GANG_KILL_REACTION (firstgang, secondgang, value)

The firstgang and secondgang are for two of your created gangs. So, in my example, my code would look like this:

SET_GANG_KILL_REACTION (zaibgang, copgang, 1)
SET_GANG_KILL_REACTION (copgang, zaibgang, 1)

What this means is that copgang hates zaibgang and when the player shoots a zaibgang, respect from the copgang goes up by one. The second gang in the line hates the first gang in the line. So the first line means copgang hates zaibgang, and the second line is zaibgang hate copgang.

Sounds confusing, try it and see what happens!

Gang Cars

If you want gang cars driving around, you have to do a MAP_ZONE command (before the LEVELSTART command). Below is an example for an extremely busy city:

MAP_ZONE City01 = (1000,350,200,000,

See also: MAP_ZONE in the official scripting guide.

Redneck Gang

The Redneck gang is a special gang in GTA 2 due to the fact they have red-haired and blonde-haired people walking around and part of the same gang. To make it work, just use the following code:

SET_GANG_INFO (madgang, 5,
               0, 000.0,000.0,000.0,
               0, PICKUP,-1)

John Tooray discovered only one line is needed. No other gang has this feature.

Original Gang Zones

These are taken from reserach by Sektor for each of the 3 original districts.

Downtown (wil.*)

SET_GANG_INFO (yakuzagang,   13,
               2, 031.00,157.00,002.00,
               1, MIURA,15)
SET_GANG_INFO (zaibatsugang, 08,
               3, 188.50,037.50,002.00,
               1, VTYPE,02)
SET_GANG_INFO (looniegang,   11,
               1, 038.50,038.50,002.00,
               1, ISETTA,16)

Residential (ste.*)

SET_GANG_INFO (redngang, 05,
               4, 047.50,049.50,255.00,
               1, PICKUP,03)
SET_GANG_INFO (sciegang, 07,
               5, 211.50,219.50,255.00,
               1, STRATOSB,10)
SET_GANG_INFO (zaibgang, 08,
               3, 199.00,025.50,255.00,
               1, VTYPE,02)
SET_GANG_INFO (almagang, 22,
               3, 224.50,020.50,255.00,
               0, VTYPE,02)
SET_GANG_INFO (poligang, 00,
               PISTOL,   PISTOL,PISTOL,
               3, 224.50,020.50,255.00,
               0, VTYPE,02)

Industrial (bil.*)

SET_GANG_INFO (krisgang, 09,
               6, 234.5,193.5,2.0,
               1, KRSNABUS,-1)
SET_GANG_INFO (zaibgang, 08,
               3, 064.0,189.5,2.0,
               1, VTYPE,02)
SET_GANG_INFO (russgang, 10,
               7, 202.5,034.5,2.0,
               1, BUICK,28)
SET_GANG_INFO (islagang, 06,
               0, 000.0,000.0,0.0,
               0, GRAHAM,30)

(Originally written by Chris “Pyro” Hockley and formatted by Ben “Cerbera” Millard with full permission.)