ResetDynamicPedShadows: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ {{Client function}} This function restores the dynamic ped shadow setting back to the player's original video configuration. If setDynamicPedShadowsEnabled was used to override the setting, calling this function will remove that override and reapply the value defined in the player's settings. This is useful for ensuring that temporary changes made by a resource do not persist after it stops. ==Syntax== <syntaxhighlight lang="lua"> bool resetDynamicPedSha...")
 
No edit summary
 
Line 40: Line 40:


==See Also==
==See Also==
* [[setDynamicPedShadowsEnabled]]
{{World functions|client}}
* [[isDynamicPedShadowsEnabled]]
* [[Client functions]]

Latest revision as of 10:03, 17 April 2026

This function restores the dynamic ped shadow setting back to the player's original video configuration.

If setDynamicPedShadowsEnabled was used to override the setting, calling this function will remove that override and reapply the value defined in the player's settings.

This is useful for ensuring that temporary changes made by a resource do not persist after it stops.

Syntax

bool resetDynamicPedShadows ( )

Required Arguments

  • None

Returns

Returns true if the reset was successful, false otherwise.

Examples

-- Reset dynamic ped shadows to player's settings
resetDynamicPedShadows()

Example: Safe usage in a resource

addEventHandler("onClientResourceStart", resourceRoot,
    function()
        setDynamicPedShadowsEnabled(false)
    end
)

addEventHandler("onClientResourceStop", resourceRoot,
    function()
        resetDynamicPedShadows()
    end
)

See Also