EntityStreamIn: Difference between revisions

From RAGE Multiplayer Wiki
(added example)
 
No edit summary
Line 1: Line 1:
==Example==  
==Example==  
That's example will just call server side event, from client, if player screen size not a 1280x1024.


<div class="header" style="background-color: #AE4040; color: #FFFFFF; border: 2px solid #AE4040;">
<div class="header" style="background-color: #AE4040; color: #FFFFFF; border: 2px solid #AE4040;">

Revision as of 19:17, 17 December 2017

Example

Client-Side
// Other player streams in
mp.events.add('entityStreamIn', (entity) => {

    // Init 
    let player = mp.players.local;

    if (entity.type == "player") {

        // Init
        let other_player = entity;

        // Actions

    }
});