Jump to content
RAGE Multiplayer Community

entityStreamIn and entityStreamOut temporary fix for objects


MarkCavalli
 Share

Recommended Posts

paste this code inside client_packages folder

 

class Singleton {
  constructor() {
    setInterval(() => {
      this.checkEvent();
    }, 250);
  }

  checkEvent() {
    mp.objects.forEach((object) => {
      if (object.handle) {
        this.checkForStreamIn(object);
      }
      else {
        this.checkForStreamOut(object);
      }
    });
  }

  checkForStreamIn(object) {
    if (object.isInStreamRange) return;
    object.isInStreamRange = true;
    mp.events.call('entityStreamIn', object);
  }

  checkForStreamOut(object) {
    if (!object.isInStreamRange) return;
    object.isInStreamRange = false;
    mp.events.call('entityStreamOut', object);
  }
}
new Singleton();

 

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...