Rodeiun Posted November 19, 2023 Posted November 19, 2023 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.
Rodeiun Posted November 19, 2023 Author Posted November 19, 2023 When I tried newCircle, colshape was created and undefined was not returned. What should I do?
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