Buckets Posted November 5, 2017 Posted November 5, 2017 When I tried using the server side blips it would still show up for everyone when they typed the command. I also tried making it so it gets removed once they arrive to the destination but it only worked if they typed the command at the destination. What is the best way to make a blip for one player that will be removed once they arrive to it? Your help would be appreciated. This is what I had, but I'm pretty sure it still shows the blip for everyone. mp.events.addCommand("routeBlip", (player) => { let position = new mp.Vector3(37.563, 6379.244, 31.040); let blip = mp.blips.new(1, position); blip.routeFor(player, 1, 1); let pos = player.position let blipPos = mp.colshapes.newSphere(37.563, 6379.244, 31.040, 3); removeBlip(blip, blipPos, pos); }); function removeBlip(blip, blipPos, pos) { if (blipPos.isPointWithin(pos)) { blip.destroy(); } }
Captien Posted November 6, 2017 Posted November 6, 2017 You should create a function outside the command firstly and do what you want in it, then call it inside your command so the function stays active till the player hits the colshape, your code only checks if the player has hit the colshape or not when the command is executed.
Buckets Posted November 6, 2017 Author Posted November 6, 2017 (edited) I found this: https://wiki.rage.mp/index.php?title=PlayerEnterColshape Ended up getting it to work with that, close the thread please Edited November 6, 2017 by Buckets
Carter Posted November 26, 2017 Posted November 26, 2017 В 06.11.2017 в 16:51, Buckets сказал: I found this: https://wiki.rage.mp/index.php?title=PlayerEnterColshape Ended up getting it to work with that, close the thread please But I don't understand too. What is the best way to make a blip for one player?
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