Jump to content

Help, how to disable actions in interiors


dan4ik1147

Recommended Posts

You didn't specify API that you use(C# or JS) so I will give you JS example, should be easy to convert to C# too.

Client side:

const {x, y, z} = mp.players.local.position;
const interiorId = mp.game.interior.getInteriorAtCoords(x, y, z);
if (interiorId === 0) {
    // player is not in interior
} else {
    // player is in interior
}

Interior::getInteriorAtCoords - RAGE Multiplayer Wiki

  • Like 1
Link to comment
Share on other sites

On 9/15/2023 at 9:13 PM, Kopra said:

You didn't specify API that you use(C# or JS) so I will give you JS example, should be easy to convert to C# too.

Client side:

const {x, y, z} = mp.players.local.position;
const interiorId = mp.game.interior.getInteriorAtCoords(x, y, z);
if (interiorId === 0) {
    // player is not in interior
} else {
    // player is in interior
}

Interior::getInteriorAtCoords - RAGE Multiplayer Wiki

Thank you very much, but I noticed that if you are near the interior without entering it, then interior > 0

Link to comment
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...