CreateBlip: Difference between revisions

From RAGE Multiplayer Wiki
m (Xabi moved page NAPI.Blip.CreateBlip to CreateBlip)
No edit summary
 
Line 1: Line 1:
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.
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==
<pre>Blip NAPI.Blip.CreateBlip(uint/int sprite, Vector3 position, float range, byte color [, string name = "", byte alpha = 255, float drawDistance = 0, bool shortRange = false, short rotation = 0, uint dimension = NAPI.GlobalDimension ]);</pre>
<pre>Blip NAPI.Blip.CreateBlip(Vector3 position, float range [, uint dimension = NAPI.GlobalDimension ]);</pre>
<pre>Blip NAPI.Blip.CreateBlip(Vector3 position [, uint dimension = NAPI.GlobalDimension ]);</pre>
<pre>Blip NAPI.Blip.CreateBlip(NetHandle entity);</pre>


=== Required Arguments ===
{{CSharpContainer|
{{#tag:syntaxhighlight|Blip {{Template:CSharp_Serverside_namespace}}Blip.CreateBlip(uint/int sprite, Vector3 position, float range, byte color [, string name = "", byte alpha = 255, float drawDistance = 0, bool shortRange = false, short rotation = 0, uint dimension = {{Template:CSharp_Serverside_namespace}}GlobalDimension ]);|lang=csharp}}
{{#tag:syntaxhighlight|Blip {{Template:CSharp_Serverside_namespace}}Blip.CreateBlip(Vector3 position, float range [, uint dimension = {{Template:CSharp_Serverside_namespace}}GlobalDimension ]);|lang=csharp}}
{{#tag:syntaxhighlight|Blip {{Template:CSharp_Serverside_namespace}}Blip.CreateBlip(Vector3 position [, uint dimension = {{Template:CSharp_Serverside_namespace}}GlobalDimension ]);|lang=csharp}}
{{#tag:syntaxhighlight|Blip {{Template:CSharp_Serverside_namespace}}Blip.CreateBlip(NetHandle entity);|lang=csharp}}
 
{{Parameters}}
*'''sprite:''' parameter input should be in '''int''' or '''uint''' type
*'''sprite:''' parameter input should be in '''int''' or '''uint''' type
*'''position:''' parameter input should be in '''Vector3 ''' type
*'''position:''' parameter input should be in '''Vector3 ''' type
Line 19: Line 20:
*'''entity:''' parameter input should be in '''NetHandle''' type
*'''entity:''' parameter input should be in '''NetHandle''' type


==Example==
 
{{CSharpContainer|
{{Example}}
{{Example}}
<syntaxhighlight lang="C#">
{{#tag:syntaxhighlight|Blip myBlip = {{Template:CSharp_Serverside_namespace}}Blip.CreateBlip(new Vector3());|lang=csharp}}
Blip myBlip = NAPI.Blip.CreateBlip(pos);
{{#tag:syntaxhighlight|Blip myBlip = {{Template:CSharp_Serverside_namespace}}Blip.CreateBlip(new Vector3(), 10.0f);|lang=csharp}}
</syntaxhighlight>
{{#tag:syntaxhighlight|
<syntaxhighlight lang="C#">
Client player = {{Template:CSharp_Serverside_namespace}}Pools.GetAllPlayers()[0];
Blip myBlip = NAPI.Blip.CreateBlip(pos, 10f);
Blip myBlip = {{Template:CSharp_Serverside_namespace}}Blip.CreateBlip(player.Vehicle);|lang=csharp
</syntaxhighlight>
}}
<syntaxhighlight lang="C#">
Blip myBlip = NAPI.Blip.CreateBlip(myVehicle);
</syntaxhighlight>
}}
}}


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

Latest revision as of 07:57, 29 November 2019

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.


C# Syntax

Blip NAPI.Blip.CreateBlip(uint/int sprite, Vector3 position, float range, 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 position, float range [, uint dimension = NAPI.GlobalDimension ]);
Blip NAPI.Blip.CreateBlip(Vector3 position [, uint dimension = NAPI.GlobalDimension ]);
Blip NAPI.Blip.CreateBlip(NetHandle entity);

Parameters

  • sprite: parameter input should be in int or uint type
  • position: parameter input should be in Vector3 type
  • range: parameter input should be in float type
  • color: parameter input should be in byte type
  • name: parameter input should be in string type
  • alpha: parameter input should be in byte type
  • drawDistance: parameter input should be in float type
  • rotation: parameter input should be in short type
  • dimension: parameter input should be in uint type
  • entity: parameter input should be in NetHandle type


Example

Blip myBlip = NAPI.Blip.CreateBlip(new Vector3());
Blip myBlip = NAPI.Blip.CreateBlip(new Vector3(), 10.0f);
Client player = NAPI.Pools.GetAllPlayers()[0];
Blip myBlip = NAPI.Blip.CreateBlip(player.Vehicle);