CreateBlip

From GTA Network Wiki
Jump to: navigation, search

CreateBlip
Server-Side Function

utilities-terminal.png Server-Side csharp.png C#

Creates a blip either tied to an entity or static with range as an option and dimension. You can also use a sprite for the blip.

Syntax

This function has 4 overloads.

Blip NAPI.Blip.CreateBlip(uint/int sprite, Vector3 position, float scale, byte color [, string name = "", byte alpha = 255, float drawDistance = 0, bool shortRange = false, short rotation = 0, uint dimension = NAPI.GlobalDimension ]);
Blip NAPI.Blip.CreateBlip(Vector3 pos, float range [, uint dimension = NAPI.GlobalDimension ]);
Blip NAPI.Blip.CreateBlip(Vector3 pos [, uint dimension = NAPI.GlobalDimension ]);
Blip NAPI.Blip.CreateBlip(NetHandle entity);

- Overload 1:

  • Missing

- Overload 2:

  • Creates a blip which can be seen within a specific range.
  • pos: Position of the blip. This parameter input should be in Vector3 type.
  • range: Range that the blip could be seen from. This parameter input should be in float type.
  • dimension: Optional: Dimension of the blip. Only players in the specified dimension will be able to see the blip. This parameter input should be in uint type.

- Overload 3:

  • pos: Position of the blip. This parameter input should be in Vector3 type.
  • dimension: Optional: Dimension of the blip. Only players in the specified dimension will be able to see the blip. This parameter input should be in uint type.

- Overload 4:

  • Creates a blip attached to a specified existing entity. The blip dimension will be the same as the entity's dimension.
  • entity: Entity to attach the blip to. This parameter input should be in NetHandle type.

NOTE: This function returns the Blip object as Blip type. }}

Usage example(s)

Blip myBlip = NAPI.Blip.CreateBlip(pos);
Blip myBlip = NAPI.Blip.CreateBlip(pos, 10f);
Blip myBlip = NAPI.Blip.CreateBlip(myVehicle);

Changelog

Version Description
1.0 Release.

References