Sets whether or not pedestrians are enabled for a mission.
Context
This command should be called between calls to SelectMission and CloseMission.
Syntax
SetPedsEnabled( peds_enabled );
Game.SetPedsEnabled( peds_enabled )
- peds_enabled: Whether or not peds are enabled.
- Defaults to 1 (true) unless StreetRacePropsLoad is called in the mission.
Examples
SelectMission("m1");
...
StreetRacePropsLoad("l4_m1p.p3d;");
StreetRacePropsUnload("l4_m1p.p3d:");
// Enable Peds even though Street Race Props are in use.
SetPedsEnabled(1);
AddStage();
...
CloseStage();
CloseMission();
Game.SelectMission("m1")
...
Game.StreetRacePropsLoad("l4_m1p.p3d;")
Game.StreetRacePropsUnload("l4_m1p.p3d:")
-- Enable Peds even though Street Race Props are in use.
Game.SetPedsEnabled(1)
Game.AddStage()
...
Game.CloseStage()
Game.CloseMission()
Notes
This command can be helpful for enabling peds in a mission where the "Street Race Props" would not interfere with the ped paths (the original game's L1M7 could've used something like this).
Version History
1.23.8
Fixed a bug where calling SetPedsEnabled
alongside StreetRacePropsLoad
would cause pedestrians to become disabled after the mission ends until another mission puts it back.
1.21
Removed the "!m_bStart" assert (previously on line 3292) related to using this command.
1.20
Added this command.