Перейти к содержанию

CreateBlip

Материал из RAGE MP Wiki Archive
(перенаправлено с «NAPI.Blip.CreateBlip»)

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.


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

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

<syntaxhighlight lang="csharp">Blip myBlip = NAPI.Blip.CreateBlip(new Vector3());</syntaxhighlight> <syntaxhighlight lang="csharp">Blip myBlip = NAPI.Blip.CreateBlip(new Vector3(), 10.0f);</syntaxhighlight> <syntaxhighlight lang="csharp"> Client player = NAPI.Pools.GetAllPlayers()[0]; Blip myBlip = NAPI.Blip.CreateBlip(player.Vehicle);</syntaxhighlight>