Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add description to SET_PED_DENSITY_MULTIPLIER_THIS_FRAME #927

Merged
merged 3 commits into from
Dec 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion PED/SetPedDensityMultiplierThisFrame.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,30 @@ ns: PED
void SET_PED_DENSITY_MULTIPLIER_THIS_FRAME(float multiplier);
```

**Usage:** Call this native every frame

## Parameters
* **multiplier**:
* **multiplier**: Adjust from 0.0 (minimum, indicating no pedestrians in the street) to 1.0 (maximum, representing a normal amount of pedestrians on the street).

## Examples
```lua
-- 0.0 means no peds, while 1.0 indicates the regular density of peds.
local pedsDensityFactor = 0.0

Citizen.CreateThread(function()
while true do
SetPedDensityMultiplierThisFrame(pedsDensityFactor)
Citizen.Wait(0)
end
end)
```

```js
// 0.0 means no peds, while 1.0 indicates the regular density of peds.
const pedsDensityFactor = 0.0;

setTick(() => {
SetPedDensityMultiplierThisFrame(pedsDensityFactor);
});
```

Loading