Jump to content

Rectangle Colshapes didnt creating


Rodeiun

Recommended Posts

async function colshapesCreate(id, x, y, width, height, dimension)
{
    mp.console.logInfo(`${parseFloat(x)}, ${parseFloat(y)}`)
    let cols = mp.colshapes.newRectangle(parseFloat(x), parseFloat(y), parseInt(width), 10000);
    let turfBlip = mp.game.ui.addBlipForRadius(parseFloat(x), parseFloat(y), 1, parseInt(width)*0.7);
    natives.SET_BLIP_SPRITE(turfBlip, 5);
    natives.SET_BLIP_ALPHA(turfBlip, 60);
    natives.SET_BLIP_COLOUR(turfBlip, 2);
    natives.SET_BLIP_ROTATION(turfBlip, height);
    mp.console.logInfo(`${cols}, ${turfBlip}`)
    return cols;
}

The blip is created correctly and in accordance with the width, but the rectangle is assigned to undefined and does not occur (the enter exit call does not work).

 

for (let i = 0; cols.handle === 0 && i < 20; ++i) {
        await mp.game.waitAsync(100);
    }

I try this but didnt work.

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