Streaming::streamvolCreateSphere

From RAGE Multiplayer Wiki
Revision as of 09:55, 23 April 2024 by Shr0x (talk | contribs) (Created page with "__NOTOC__ {{ClientsideJsFunction}} {{JSContainer| Creates a new spherical streaming volume for the specified asset types === Required Arguments === *'''x:''' {{RageType|Float}} *'''y:''' {{RageType|Float}} *'''z:''' {{RageType|Float}} *'''flag:''' {{RageType|Number}} *'''lodflag''' {{RageType|Number}} === Return Value === *'''handle''' {{RageType|Handle}} //returns -1 if invalid ==Syntax== <pre> mp.game.streaming.streamvolCreateSphere(x, y, z, flag, lodFlag); </pre> =...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Client-Side
Function

 JavaScript



JavaScript Syntax

Creates a new spherical streaming volume for the specified asset types

Required Arguments

  • x: Float
  • y: Float
  • z: Float
  • flag: Number
  • lodflag Number

Return Value

  • handle Handle //returns -1 if invalid

Syntax

mp.game.streaming.streamvolCreateSphere(x, y, z, flag, lodFlag);

Example

Client-Side
const {x, y, z} = mp.players.local.position;
const streamvol = mp.game.streaming.streamvolCreateSphere(x, y, z, 1, 1);
if (mp.game.streaming.streamvolIsValid(streamvol)) {
    mp.gui.chat.push("stream vol is valid!");
}


See also