dan4ik1147 Posted September 15, 2023 Posted September 15, 2023 Hello everyone, tell me, I wrote a script that allows you to pick up snowballs on the street, the question is how to disable the ability to pick them up in interiors, I mean 24/7, etc.
Kopra Posted September 15, 2023 Posted September 15, 2023 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 1
dan4ik1147 Posted September 16, 2023 Author Posted September 16, 2023 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now