SetDynamicPedShadowsEnabled: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Client function}} This function allows scripts to override the current dynamic ped shadow setting on the client. When used, it temporarily overrides the player’s video setting for dynamic ped shadows. To restore the original value based on the player's settings, use resetDynamicPedShadows. ==Syntax== <syntaxhighlight lang="lua"> bool setDynamicPedShadowsEnabled ( bool enabled ) </syntaxhighlight> ===Required Arguments=== *'''enabled:''' a boolean val...") |
No edit summary |
||
| Line 46: | Line 46: | ||
* [[isDynamicPedShadowsEnabled]] | * [[isDynamicPedShadowsEnabled]] | ||
* [[resetDynamicPedShadows]] | * [[resetDynamicPedShadows]] | ||
{{World functions|client}} | |||
Revision as of 10:02, 17 April 2026
This function allows scripts to override the current dynamic ped shadow setting on the client.
When used, it temporarily overrides the player’s video setting for dynamic ped shadows. To restore the original value based on the player's settings, use resetDynamicPedShadows.
Syntax
bool setDynamicPedShadowsEnabled ( bool enabled )
Required Arguments
- enabled: a boolean value specifying whether dynamic ped shadows should be enabled (true) or disabled (false).
Returns
Returns true if the setting was successfully applied, false otherwise.
Examples
-- Disable dynamic ped shadows setDynamicPedShadowsEnabled(false)
Example: Toggle shadows
local current = isDynamicPedShadowsEnabled() setDynamicPedShadowsEnabled(not current)
Example: Disable shadows on resource start and restore on stop
addEventHandler("onClientResourceStart", resourceRoot,
function()
setDynamicPedShadowsEnabled(false)
end
)
addEventHandler("onClientResourceStop", resourceRoot,
function()
resetDynamicPedShadows()
end
)
See Also
- createSWATRope
- getBirdsEnabled
- getCoronaReflectionsEnabled
- getGarageBoundingBox
- getGaragePosition
- getGarageSize
- getGroundPosition
- getInteriorFurnitureEnabled
- getNearClipDistance
- getPedsLODDistance
- getRoofPosition
- getScreenFromWorldPosition
- getVehiclesLODDistance
- getWorldFromScreenPosition
- isAmbientSoundEnabled
- isLineOfSightClear
- isWorldSoundEnabled
- processLineOfSight
- resetAmbientSounds
- resetBlurLevel
- resetColorFilter
- resetCoronaReflectionsEnabled
- resetNearClipDistance
- resetPedsLODDistance
- resetVehiclesLODDistance
- resetWorldSounds
- setAmbientSoundEnabled
- setBirdsEnabled
- setColorFilter
- setCoronaReflectionsEnabled
- setInteriorFurnitureEnabled
- setNearClipDistance
- setPedsLODDistance
- setVehiclesLODDistance
- setWorldSoundEnabled
- testLineAgainstWater
- areTrafficLightsLocked
- getAircraftMaxHeight
- getAircraftMaxVelocity
- getCloudsEnabled
- getFarClipDistance
- getFogDistance
- getGameSpeed
- getGravity
- getHeatHaze
- getInteriorSoundsEnabled
- getJetpackMaxHeight
- getMinuteDuration
- getMoonSize
- getOcclusionsEnabled
- getRainLevel
- getSunColor
- getSunSize
- getTime
- getTrafficLightState
- getWeather
- getWindVelocity
- getSkyGradient
- getZoneName
- isGarageOpen
- removeWorldModel
- resetFarClipDistance
- resetFogDistance
- resetHeatHaze
- resetMoonSize
- resetRainLevel
- resetSkyGradient
- resetSunColor
- resetSunSize
- resetWindVelocity
- restoreAllWorldModels
- restoreWorldModel
- setAircraftMaxHeight
- setAircraftMaxVelocity
- setCloudsEnabled
- setFarClipDistance
- setFogDistance
- setGameSpeed
- setGarageOpen
- setGravity
- setHeatHaze
- setInteriorSoundsEnabled
- setMinuteDuration
- setMoonSize
- setOcclusionsEnabled
- setRainLevel
- setSkyGradient
- setSunColor
- setSunSize
- setTime
- setTrafficLightState
- setTrafficLightsLocked
- setWeather
- setWeatherBlended
- setWindVelocity
- setJetpackMaxHeight