Player::isStreamed: Difference between revisions

From RAGE Multiplayer Wiki
(Created page with "__NOTOC__ {{SharedJsFunction}} This function is used for check, player is located in stream distance for another player or not. {{JSContainer| == Syntax == <pre> player.isS...")
 
No edit summary
 
Line 31: Line 31:
== See Also ==
== See Also ==
*'''Server-side'''
*'''Server-side'''
{{Vehicle_function}}
{{Player_block}}
 
[[Category:Player API]]
[[Category:Server-side Function]]

Latest revision as of 06:55, 26 May 2020

Shared
Function

 JavaScript


This function is used for check, player is located in stream distance for another player or not.


JavaScript Syntax

Syntax

player.isStreamed(Player player);

Parameters

  • player: Player

Return value

  • Boolean

Examples

Server-Side
let player = mp.players.at(1488);
mp.players.forEach((_player) => {
    if (player.isStreamed(_player)) {
        console.log(`Player by name ${_player.name} in stream distance!`);
    }
});


See Also