Jump to content

Recommended Posts

Posted
Using this.. 
Quote

mp.game.object.doorControl(doorHash, x, y, z, locked, p5, p6, p7);

I want to sync this to all players on server and not just client side.

Can anyone give me an example..

Posted

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
  • 5 weeks later...
Posted
В 22.07.2021 в 01:12, pervik2k сказал:
Using this.. 

I want to sync this to all players on server and not just client side.

Can anyone give me an example..

May I know if you did it?

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...