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

Conversation

Aloncheeto
Copy link
Contributor

Add comments for better understanding.

PED/SetPedDensityMultiplierThisFrame.md Outdated Show resolved Hide resolved
PED/SetPedDensityMultiplierThisFrame.md Outdated Show resolved Hide resolved
@spacevx
Copy link
Contributor

spacevx commented Oct 25, 2023

At this point, you can add examples from Lua, JS, or C#

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

JavaScript

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

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

and for C# i'm not sure so i'm not going to write it

Complement the documentation with the examples provided by ahcenezdh. Thanks for the examples!
Copy link
Contributor

@4mmonium 4mmonium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving this PR, thank you all for your contribution 🙂

@4mmonium 4mmonium merged commit 4b5b140 into citizenfx:master Dec 13, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants