GetBlipName: Difference between revisions

From RAGE Multiplayer Wiki
(Created page with "Gets the name of a blip. ==Syntax== <pre>string NAPI.Blip.GetBlipName(Blip blip);</pre> === Required Arguments === *'''blip:''' The blip to get the name from. Parameter inpu...")
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
Gets the name of a blip.
Gets the name of a blip.


==Syntax==
<pre>string NAPI.Blip.GetBlipName(Blip blip);</pre>


=== Required Arguments ===
{{CSharpContainer|
*'''blip:''' The blip to get the name from. Parameter input should be in '''Blip''' type
{{#tag:syntaxhighlight| string {{Template:CSharp_Serverside_namespace}}Blip.GetBlipName(Blip blip);|lang=csharp}}
 
{{Parameters}}
*'''blip:''' The blip to get the color from. Parameter input should be in '''Blip''' type
 


==Example==
{{CSharpContainer|
{{Example}}
{{Example}}
<syntaxhighlight lang="C#">
{{#tag:syntaxhighlight|var list = {{Template:CSharp_Serverside_namespace}}Pools.GetAllBlips();
var list = NAPI.Pools.GetAllBlips();


foreach (Blip blip in list)
foreach (Blip blip in list)
{
{
     if (string.IsNullOrEmpty(NAPI.Blip.GetBlipName(blip)))
     if (string.IsNullOrEmpty({{Template:CSharp_Serverside_namespace}}Blip.GetBlipName(blip)))
     {
     {
         NAPI.Blip.SetBlipName(blip, "My blip");
         {{Template:CSharp_Serverside_namespace}}Blip.SetBlipName(blip, "My blip");
     }
     }
}
}
</syntaxhighlight>
}}
}}
}}


[[Category:Serverside API]]
[[Category:Serverside API]]

Latest revision as of 08:02, 29 November 2019

Gets the name of a blip.


C# Syntax

 string NAPI.Blip.GetBlipName(Blip blip);

Parameters

  • blip: The blip to get the color from. Parameter input should be in Blip type


Example

var list = NAPI.Pools.GetAllBlips();

foreach (Blip blip in list)
{
    if (string.IsNullOrEmpty(NAPI.Blip.GetBlipName(blip)))
    {
        NAPI.Blip.SetBlipName(blip, "My blip");
    }
}