Streaming::requestRuntimeAssetFromUrl
Not available on SYNC MP yet
This member is part of the RAGE:MP API but SYNC MP does not implement it yet (Client-side JavaScript). Calling it does nothing or throws.
JavaScript
Required Params
- resourceName: string — The name of the resource.
- url: string — The URL from which to request the asset.
Return value
- 'Promise<boolean>' — Resolves to
trueif the asset was successfully loaded, otherwisefalse.
Syntax
mp.game.streaming.requestRuntimeAssetFromUrl(string resourceName, string url)
Example
mp.game.streaming.requestRuntimeAssetFromUrl("myAsset", "https://example.com/asset.ytd")
.then(success => {
if (success) {
mp.gui.chat.push("Asset successfully loaded.");
} else {
mp.gui.chat.push("Failed to load asset.");
}
});