This command adds a ped to a ped group.
Scope
This command should be called between calls to CreatePedGroup and ClosePedGroup in a level's initialisation script.
Syntax
MFK
Lua
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.
Examples
MFK
Lua
// 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
You can add up to 10 unique models to a ped group. Subsequent calls to this command will be ignored.