SetBlipColor: Difference between revisions
(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...") |
m (Xabi moved page NAPI.Blip.SetBlipColor to SetBlipColor) |
||
| (4 intermediate revisions by one other user not shown) | |||
| Line 5: | Line 5: | ||
=== Required Arguments === | === Required Arguments === | ||
*'''blip:''' The blip to | *'''blip:''' The blip to set the color. Parameter input should be in '''Blip''' type | ||
*''' | *'''color:''' The color to set. Parameter input should be in '''int''' type (https://wiki.rage.mp/index.php?title=Blip::color) | ||
==Example== | ==Example== | ||
Sets | Sets any existing white blip to blue blip. | ||
{{CSharpContainer| | {{CSharpContainer| | ||
{{Example}} | {{Example}} | ||
<syntaxhighlight lang="C#"> | <syntaxhighlight lang="C#"> | ||
var | var list = NAPI.Pools.GetAllBlips(); | ||
foreach (var blip in list) | |||
if | if (NAPI.Blip.GetBlipColor(blip) == 0) | ||
NAPI.Blip. | NAPI.Blip.SetBlipColor(blip, 38); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | }} | ||
[[Category:Serverside API]] | [[Category:Serverside API]] | ||
Latest revision as of 12:42, 27 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 color to set. Parameter input should be in int type (https://wiki.rage.mp/index.php?title=Blip::color)
Example
Sets any existing white blip to blue blip.
C# Syntax
Example
var list = NAPI.Pools.GetAllBlips();
foreach (var blip in list)
if (NAPI.Blip.GetBlipColor(blip) == 0)
NAPI.Blip.SetBlipColor(blip, 38);