Skip to main content

PopulationPedSetters

Defined in: src/lib/client/events.ts:130

Fired when a population ped is being created. Can be used to customize or cancel ambient ped spawning.

Param

X coordinate of spawn position.

Param

Y coordinate of spawn position.

Param

Z coordinate of spawn position.

Param

The ped model hash.

Param

Object with methods to modify the ped creation.

Example

populationPedCreating.on((x, y, z, model, setters) => {
    // Cancel all ambient ped spawning
    setters.setModel(0);
});

Methods

setModel()

setModel(model: number): void;

Defined in: src/lib/client/events.ts:131

Parameters

ParameterType
modelnumber

Returns

void


setPosition()

setPosition(
   x: number, 
   y: number, 
   z: number): void;

Defined in: src/lib/client/events.ts:132

Parameters

ParameterType
xnumber
ynumber
znumber

Returns

void