Jump to content

How do you sync world doors..


pervik2k

Recommended Posts

Look what you can replace this `forEachByType`, I can't do it now.

 


// client-side
mp.dummies.forEachByType(1001, (entity) => {
  mp.game.object.doorControl(
    entity.getVariable("doorHash"),
    entity.getVariable("x"),
    entity.getVariable("y"),
    entity.getVariable("z"),
    entity.getVariable("locked"),
    entity.getVariable("p5"),
    entity.getVariable("p6"),
    entity.getVariable("p7")
  );
});

// server-side
// interface (id: number, dimension: number, values: {})
mp.dummies.new(1001, 0, {
  // fill in your details
  doorHash: '',
  x = 0.0,
  y = 0.0,
  z = 0.0,
  locked: false,
  p5 = 0.0,
  p6 = 0.0,
  p7 = 0.0,
});

 

  • Like 1
Link to comment
Share on other sites

  • 5 weeks 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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...