ResetDynamicPedShadows

From Multi Theft Auto: Wiki
Revision as of 10:03, 17 April 2026 by Arran Fortuna (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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