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.
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
Add the Mission Code
In your script file, the command has these parameters:
SET_GANG_INFO (gang_name, remap, BASIC_WEAPON,ANGRY_WEAPON,HATE_WEAPON, arrow_colour, X,Y,Z, respect, MODEL,car_remap)
Here’s an example:
SET_GANG_INFO (copgang, 00, PISTOL,SHOTGUN,MACHINE_GUN, 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!
|Must match the gang zone names in your |
|Colour of the gang members.|
|For killing other gangs’ members if they don’t like you (one or two bars).|
|When you have butchered quite a few of them|
|The gang really hates the player! This is when the bar is flashing on the negative side.|
|Colour of their arrow (further down page).|
|Direct the player to one of their phones for info or something.|
|How much the bar changes when the player kills a gang member. Usually set to |
|The name of a vehicle they use as a gang car.|
|The colour of the gang car.|
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, PISTOL,SHOTGUN,MACHINE_GUN, 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.
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)
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
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
zaibgang, and the second line is
Sounds confusing, try it and see what happens!
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, 1000,100,100,100,700,000, 450)
MAP_ZONE in the official scripting guide.
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, SHOTGUN,SHOTGUN,SHOTGUN, 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.
SET_GANG_INFO (yakuzagang, 13, PISTOL,PISTOL,PISTOL, 2, 031.00,157.00,002.00, 1, MIURA,15) SET_GANG_INFO (zaibatsugang, 08, PISTOL,PISTOL,PISTOL, 3, 188.50,037.50,002.00, 1, VTYPE,02) SET_GANG_INFO (looniegang, 11, PISTOL,PISTOL,PISTOL, 1, 038.50,038.50,002.00, 1, ISETTA,16)
SET_GANG_INFO (redngang, 05, PISTOL, MACHINE_GUN,MOLOTOV, 4, 047.50,049.50,255.00, 1, PICKUP,03) SET_GANG_INFO (sciegang, 07, PISTOL, MACHINE_GUN,FLAME_THROWER, 5, 211.50,219.50,255.00, 1, STRATOSB,10) SET_GANG_INFO (zaibgang, 08, PISTOL, DUAL_PISTOL,MACHINE_GUN, 3, 199.00,025.50,255.00, 1, VTYPE,02) SET_GANG_INFO (almagang, 22, NO_WEAPON,NO_WEAPON,NO_WEAPON, 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)
SET_GANG_INFO (krisgang, 09, PISTOL,MOLOTOV,FLAME_THROWER, 6, 234.5,193.5,2.0, 1, KRSNABUS,-1) SET_GANG_INFO (zaibgang, 08, PISTOL,SILENCED_MACHINE_GUN,ROCKET_LAUNCHER, 3, 064.0,189.5,2.0, 1, VTYPE,02) SET_GANG_INFO (russgang, 10, PISTOL,SHOTGUN,MACHINE_GUN, 7, 202.5,034.5,2.0, 1, BUICK,28) SET_GANG_INFO (islagang, 06, PISTOL,SHOTGUN,MACHINE_GUN, 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.)