Games > The Simpsons Hit & Run > Console File Commands > MFK Commands > Levels > Ped Groups > AddPed

AddPed

This command adds a ped to a ped group.

Context

This command should be called in a level's initialisation script (leveli.mfk).

Additionally, it must be called between calls to CreatePedGroup and ClosePedGroup.

Syntax

AddPed( character, amount );

Game.AddPed( character, amount )

  • character: The name of the character to add to the ped group.
  • amount: The maximum amount of this character that will be able to spawn.
    • Max of 7.

Examples

// Example from missions/level01/leveli.mfk
CreatePedGroup(0);
	AddPed("male6", 2);
	AddPed("girl4", 1);
	AddPed("fem4", 2);
	AddPed("boy3", 2);
ClosePedGroup();

-- Example from missions/level01/leveli.mfk
Game.CreatePedGroup(0)
	Game.AddPed("male6", 2)
	Game.AddPed("girl4", 1)
	Game.AddPed("fem4", 2)
	Game.AddPed("boy3", 2)
Game.ClosePedGroup()

Notes

The total amount values of every call to this command within a ped group should not exceed 7.

Donut Team © 2024 · v4.0