Player::callToStreamed

From RAGE Multiplayer Wiki
Revision as of 10:06, 25 January 2021 by Unknown (talk | contribs) (Created page with "__TOC__ {{ServersideJsFunction}} This function calls all streamed in players' clientside from the specified player passing data. {{JSContainer| ==Syntax== <pre> player.call...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Server-Side
Function

 JavaScript



This function calls all streamed in players' clientside from the specified player passing data.

JavaScript Syntax

Syntax

player.callToStreamed(includeSelf, 'eventName', [...args]);

Required Arguments

  • *includeSelf: String (Calls the specified player's clientside also along with the streamed players to him)
  • *eventProcName: String
  • args: Any

Example

Server-Side
  mp.players.at(0).callStreamed(false, 'catchedSuckers', [mp.players.at(0).name]);


Client-Side
mp.events.add('catchedSuckers', (name) => {
  mp.gui.chat.push("You sucker got catched by" + name);
});


See Also