SetBlipColor: Difference between revisions

From RAGE Multiplayer Wiki
(Created page with "Sets the color of a blip. ==Syntax== <pre>void NAPI.Blip.SetBlipColor(Blip blip, int color);</pre> === Required Arguments === *'''blip:''' The blip to get the color from. Pa...")
 
Line 5: Line 5:


=== Required Arguments ===
=== Required Arguments ===
*'''blip:''' The blip to get the color from. Parameter input should be in '''Blip''' type
*'''blip:''' The blip to set the color. Parameter input should be in '''Blip''' type
*'''name:''' The name to use on that blip. This parameter input should be in '''string''' type
*'''color:''' The blip color to set. Parameter input should be in '''int''' type


==Example==
==Example==

Revision as of 15:24, 26 November 2019

Sets the color of a blip.

Syntax

void NAPI.Blip.SetBlipColor(Blip blip, int color);

Required Arguments

  • blip: The blip to set the color. Parameter input should be in Blip type
  • color: The blip color to set. Parameter input should be in int type

Example

Sets names based on ID to any existing blip without a name.

C# Syntax

Example

var blips = NAPI.Pools.GetAllBlips();
for (int i = 0; i < blips.Count; i++)
    if (string.IsNullOrEmpty(NAPI.Blip.GetBlipName(b)))
        NAPI.Blip.SetBlipName(b, "Blip No." + i);