MFK Command: SetPedsEnabled

Synopsis

Sets whether or not pedestrians are enabled for a mission.

Syntax

SetPedsEnabled( <peds_enabled> );
  • peds_enabled: Whether or not peds are enabled. Defaults to 1 (true) unless StreetRacePropsLoadis 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();

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).

History

1.21

Removed "!m_bStart" asserts (previously on lines 3292 and 3336) related to using this command.

KoL3rNeYO66zaMsL-ASF_RemovedAssert_3292.png

qlrSzkQkuf6Hjd8k-ASF_RemovedAssert_3396.png

1.20

  • Added this command.

Revision #6
Created Tue, Dec 4, 2018 5:50 AM by Loren Goodwin
Updated Thu, Mar 7, 2019 11:14 PM by Loren Goodwin