Jump to content
RAGE Multiplayer Community

object in array, and delete it after


Recommended Posts

I have an array with an object, but i want to delete it from another command.

But its not working, due invalid function (destroy)

let mit = {
      x: player.position.x,
      y: player.position.y,
      z: player.position.z,
      ent: mp.objects.new(3469410940new mp.Vector3(player.position),
      {
            rotation: new mp.Vector3(0,0,90),
            alpha: 255,
            dimension: player.dimension
      })
    }
    let igen = JSON.stringify(mit);
    hulla.push(JSON.parse(igen));
 
 
hulla.forEach((entityindex=> {
        if(player.IsInRange(entity.xentity.yentity.z10)) {
          result = true;
          player.pushChat(`törölve: (${index}${entity.ent}`);
          hulla.splice(index1);
          entity.ent.destroy();
        }
Link to post
Share on other sites

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