Multiplayer in GTA 2 Coding
GTA 2 uses one PLAYER_PED for each player. It ignores any extra PLAYER_PED commands. If you have 4 players, PLAYER_PED p5 and PLAYER_PED p6 won’t be created.
You then create a .mmp file for each number of players, linking to the same .scr.
One Script to Rule Them All…
Create a text file and change it from untitled.txt to yourlevel.mis. Copy this from my slayer.mis script in MultiSlayer:
// Player Cars:
PARKED_CAR_DATA p1car = (105.5,092.5) 28 090 STINGRAY // Red
PARKED_CAR_DATA p2car = (074.5,093.5) 24 180 STINGRAY // Orange
PARKED_CAR_DATA p3car = (083.5,120.5) 35 000 STINGRAY // Yellow
PARKED_CAR_DATA p4car = (122.5,162.5) 20 090 STINGRAY // Green
PARKED_CAR_DATA p5car = (188.4,151.4) 14 200 STINGRAY // Dark Blue
PARKED_CAR_DATA p6car = (189.5,111.5) 02 090 STINGRAY // Black
// Players:
PLAYER_PED p1 = (103.5,090.5,255.0) 10 090 // Red
PLAYER_PED p2 = (074.5,090.5,255.0) 09 000 // Orange
PLAYER_PED p3 = (081.5,121.5,255.0) 07 090 // Yellow
PLAYER_PED p4 = (122.5,164.5,255.0) 11 180 // Green
PLAYER_PED p5 = (186.5,153.5,255.0) 13 315 // Dark Blue
PLAYER_PED p6 = (188.5,112.5,255.0) 08 090 // Black
LEVELSTART
// Environment:
SET_AMBIENT_LEVEL (0.33, 0) // set to 1.0 for levels without lights
DECLARE_POLICELEVEL (3) // 3 = strong police, 4 = SWAT, 5 = FBI
LEVELEND
Change the locations to fit in your level. This can be used for any number of players. All 6 cars will appear in all games.
GTA 2 will only create a PLAYER_PED for human players, the rest of them will be ignored.
You can easily add weapon generators to the script.
You have to compile your .mis into a .src using a program. I use Delfi’s Mis Pad.
Multiplayer Map Packages (*.mmp)
Here’s how I set up multiplayer from my MultiSlayer level.
1 Player
You can also play by yourself from the multiplayer interface. From my slayer1p.mmp:
[MapFiles]
GMPFile = slayer.gmp
STYFile = slayer.sty
SCRFile = slayer.scr
Description = MultiSlayer 1 Player
PlayerCount = 1
Your multiplayer level might have single player missions which do not expect multiple players. These must go in a separate .scr. I would call mine slayer1p.scr and link to it like this:
[MapFiles]
GMPFile = slayer.gmp
STYFile = slayer.sty
SCRFile = slayer1p.scr
Description = MultiSlayer 1 Player
PlayerCount = 1
2 Players
From my slayer2p.mmp file:
[MapFiles]
GMPFile = slayer.gmp
STYFile = slayer.sty
SCRFile = slayer.scr
Description = MultiSlayer 2 Player
PlayerCount = 2
6 Players
From my slayer6p.mmp file:
[MapFiles]
GMPFile = slayer.gmp
STYFile = slayer.sty
SCRFile = slayer.scr
Description = MultiSlayer 6 Player
PlayerCount = 6