Skip to content

jovanivanovic/altv-os-global-blip-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open Source - Global Blip Manager for alt:V

Created by Dzeknjak (Jovan Ivanovic)

❤️ Please support my open source work by donating. I'm here to provide general context for complicated procedures for you new developers. ❤️

https://www.buymeacoffee.com/dzeknjak

⭐ This repository if you found it useful!


Description

This is a basic global blip manager resource. It allows you to create/destroy blips from the server-side for all players.

Installing Dependencies / Installation

I cannot stress this enough. Ensure you have NodeJS 13+ or you will have problems.

  • NodeJS 13+
  • An Existing or New Gamemode
  • General Scripting Knowledge

Afterwards, simply add the name of this resource to your server.cfg resource section.

altv-os-global-blip-manager

Then simply clone this repository into your main server resources folder.

cd resources
git clone https://github.com/jovanivanovic/altv-os-global-blip-manager

Ensure your package.json includes this property:

"type": "module"

Usage

There's couple of events to get you started with this resource:

// Notice: these events are serverside only.

Creating a blip

alt.emit('blips:Create', identifier, label, position, sprite, color, scale, shortRange);
Argument Description
identifier Unique identifier for the blip, can be anything as long as it is unique.
label Text to show for the blip.
position { x, y, z } Location of the blip.
sprite Sprite of the blip.
color Color of the blip.
scale Scale of the blip.
shortRange [optional] Is the blip visible on the radar only when you are close to it (true) or always (false). Default is true.

For sprites and colors take a look here: alt:V Wiki - Blips


Deleting a blip

alt.emit('blips:Delete', identifier);
Argument Description
identifier Previously set unique identifier of the blip you wish to delete.

Syncing the blips with a player

// Notice: you should probably call this event on player connect.

alt.emit('blips:Sync', player);
Argument Description
player Player handle you wish to sync the blips with.

Other alt:V Open Source Resources

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published