SetBlipColor

From GT-MP
Jump to: navigation, search
SetBlipColor
Shared Function
Utilities-terminal.png Server-Side System-users.png Client-Side
Csharp.png C# Javascript.png JavaScript

Sets the color of a blip.

Syntax

API.setBlipColor(NetHandle blip, int color);

Required Arguments

  • blip: The blip to set the color. Parameter input should be in NetHandle type.
  • color: The blip color to set. Parameter input should be in int type.
Icon-info.png
  • Using a value lower than 0 will set a white color with different alpha, while using a value upper than 84 will have the same effect only as black color.
  • Setting a new sprite to a blip (with setBlipSprite) will reset the color back to the default - 0 (white).


Usage example(s)

Sets any existing white blip to blue blip.

var list = API.getAllBlips();
foreach (var blip in list)
    if (API.getBlipColor(blip) == 0)
        API.setBlipColor(blip, 38);

References