From 77a4788a99a56b3583cf2fd8bc598f225ab38a1a Mon Sep 17 00:00:00 2001 From: Stuyk Date: Sun, 16 Jun 2024 15:28:21 -0600 Subject: [PATCH] 32 (#63) * feat: disable cam, actions, etc. closes #58 * feat: attach blips to entities like players or vehicles * docs: update changelog --- docs/api/server/controllers/blip.md | 14 ++++++++++++++ docs/changelog.md | 13 +++++++++++++ 2 files changed, 27 insertions(+) diff --git a/docs/api/server/controllers/blip.md b/docs/api/server/controllers/blip.md index d7c17bcdd..b9e5aef34 100644 --- a/docs/api/server/controllers/blip.md +++ b/docs/api/server/controllers/blip.md @@ -34,6 +34,20 @@ blip.update({ pos: new alt.Vector3(0, 0, 0), text: 'New Text!' }); blip.destroy(); ``` +Additionally, you can attach a blip to any entity like a player, or a vehicle like this. + +```ts +const blip = Rebar.controllers.useBlipGlobal({ + color: 6, + pos: player.pos, + shortRange: true, + sprite: 128, + text: `${player.name}`, +}); + +blip.attach(player); +``` + ## Local Markers A local blip can only been seen by a single player. diff --git a/docs/changelog.md b/docs/changelog.md index 56d60859b..c78a1e8f2 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,5 +1,18 @@ # Changelog +## Version 32 + +### Code Changes + +- Added function to attach blips to entities, because alt:V's one is broken +- Additionally, when a blip or the entity becomes invalid the blip is automatically destroyed. + +### Docs Changes + +- Updated blip documentation to cover attachments + +--- + ## Version 31 ### Code Changes