SD.LoadAnim=function(animDict)iftype(animDict) ~="string" thenerror("Animation dictionary identifier must be a string.")endifnotHasAnimDictLoaded(animDict) thenRequestAnimDict(animDict)-- Use sd.awaitLoad to wait for the animation dictionary to load with a timeout. SD.AwaitLoad(function()ifHasAnimDictLoaded(animDict) thenreturntrue-- Return true indicating the dictionary is loaded.endend, ("Failed to load animation dictionary '%s'"):format(animDict), 5000) -- 5000 ms timeout.endendreturn SD.LoadAnim
Usage Example:
-- Load an animation dictionary named 'anim@heists@ornate_bank@grab_cash'.SD.LoadAnim('anim@heists@ornate_bank@grab_cash')
This function SD.LoadAnim ensures that the specified animation dictionary is loaded into the game. It takes one parameter:
animDict (string): The name of the animation dictionary to be loaded.
This function is asynchronous, meaning it does not block execution of subsequent code.