Characters in GTA 2 Mission Scripts

To create characters for your missions, you need to use the following code. PLAYER_PED must be used initially to create the actual player, whilst CHAR_DATA is used to create AI charcters:

PLAYER_PED name = (X,Y,Z) remap rotation

So, an example could be:

PLAYER_PED p1 = (127.5,127.5,2.0) 22 0

The following is used for AI charcters:

CHAR_DATA name = (X,Y,Z) remap rotation OCCUPATION

Again, an example could be:

CHAR_DATA bigbossdude = (12.5,57.5,4.0) 12 270 CRIMINAL_TYPE1

The characters above will stand still. They run away if a gun is fired. The next section will first detail remaps and then how to add AI to them.

Remaps

Below is a list of every remap in GTA 2 from special police officers to ordinary civilians:

Values for remap
0Blue Police
1Green Police
2Red Police
3Yellow Police
4Army
5Red hair Redneck
6Blonde hair Redneck
7Scientist
8Zaibatsu
9Krishna
10Russian
11Loony
12Elvis
13Yakuza
14Fireman
15Green Shorts Ped
16Medic
17Mugger Remap
18Blue Dummy Remap
19Light Blue Dummy Remap
20T-Shirt & Shorts Dummy Remap
21Short Sleeved Shirt & Trousers Dummy Remap
22Prison Uniform
23Hulk (Normal)
24Hulk (Green)
25Default Player Ped
26Naked Dummy
27Blue shirt and jeans
28White shirt and jeans
29Lilac shirt and jeans
30Light red shirt and jeans
31Light red shirt and khaki shorts
32Blue shirt and blue shorts
33Yellow shirt and khaki shorts
34Light purple shirt and jeans
35Dark red shirt and turquoise trousers
36Dark green shirt and dark green trousers
37Brown shirt and jeans
38Brown shirt and brown trousers
39Dark purple shirt and brown trousers
40Dark purple shirt and light brown trousers
41Burgundy shirt and light brown trousers
42Short sleeve burgundy shirt and light brown trousers
43Short sleeve light burgundy shirt and light brown trousers
44Aqua shirt and jeans
45Yellow shirt and jeans
46Short sleeve dark green shirt and lilac trousers
47Light grey shirt and dark grey jeans
48Short sleeve grey/blue shirt and drak grey jeans
49Short sleeve light purple shirt and light grey trousers
50Purple shirt with light purple sleeves and light grey trousers
51Grey/green shirt and grey trousers
52Pink shirt and jeans

Changing Remaps

If you’ve played on the second city with one of the Redneck missions where you enter the prison, you actually change outfit. This is a simple command:

CHANGE_CHAR_REMAP (name, remap)

Example code:

CHANGE_CHAR_REMAP (p1, 13)

To make your character or player look like a civilian, just use the following code instead:

SET_CHAR_GRAPHIC_TYPE (name, GRAPHIC_TYPE, remap)

Be careful with this command, as it sets the remap colour as well as the graphic type! Character name is self explanitory.

Values for GRAPHIC_TYPE
DUMMY_GRAPHICStandard peds. See the remap list above.
EMERG_GRAPHICMedics, cops and SWAT!
GANG_GRAPHICSlightly bigger than standard peds. Carries a backpack.

So an example could be:

SET_CHAR_GRAPHIC_TYPE (dummy01, DUMMY_GRAPHIC, 34)

This also applies to things like medics and police so they look like the ones in game, and not larger version of them! The gang one shouldn’t really be used at all, as I’m pretty sure all characters have this as default.

SWAT Officer Remap

This was one of my best finds in GTA 2, and not even Rockstar or anyone else had used this in any major mission:

SET_CHAR_GRAPHIC_TYPE (p1, EMERG_GRAPHIC, -1)

Cars also use -1 for their default remap. If you try -1 with each GRAPHIC_TYPE, you’ll get these results:

Effect of GRAPHIC_TYPE when remap is -1
DUMMY_GRAPHICRoadblock tank driver (dark red shirt and green sleeves)
EMERG_GRAPHICSWAT character
GANG_GRAPHICZaibatsu

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