Table of Contents

Class PlayerTextDraw

Namespace
SampSharp.Entities.SAMP
Assembly
SampSharp.OpenMp.Entities.dll

Represents a component which provides the data and functionality of a per-player text draw.

public class PlayerTextDraw : IdProvider
Inheritance
PlayerTextDraw
Inherited Members

Constructors

PlayerTextDraw(IPlayerTextDrawData, IPlayerTextDraw)

Initializes a new instance of the PlayerTextDraw class.

protected PlayerTextDraw(IPlayerTextDrawData playerTextDraws, IPlayerTextDraw playerTextDraw)

Parameters

playerTextDraws IPlayerTextDrawData
playerTextDraw IPlayerTextDraw

Properties

Alignment

Gets or sets the alignment of this text draw.

public virtual TextDrawAlignment Alignment { get; set; }

Property Value

TextDrawAlignment

BackColor

Gets or sets the background Color of this text draw.

public virtual Color BackColor { get; set; }

Property Value

Color

BoxColor

Gets or sets the Color of the box in this text draw.

public virtual Color BoxColor { get; set; }

Property Value

Color

Font

Gets or sets the font of this text draw.

public virtual TextDrawFont Font { get; set; }

Property Value

TextDrawFont

ForeColor

Gets or sets the foreground Color of this text draw.

public virtual Color ForeColor { get; set; }

Property Value

Color

IsOmpEntityDestroyed

Gets a value indicating whether the open.mp entity counterpart has been destroyed.

protected bool IsOmpEntityDestroyed { get; }

Property Value

bool

LetterSize

Gets or sets the size of the letters in this text draw.

public virtual Vector2 LetterSize { get; set; }

Property Value

Vector2

Outline

Gets or sets the outline size of this text draw.

public virtual int Outline { get; set; }

Property Value

int

Position

Gets or sets the position of this text draw.

public virtual Vector2 Position { get; set; }

Property Value

Vector2

PreviewModel

Gets or sets the preview model ID displayed in this text draw.

public virtual int PreviewModel { get; set; }

Property Value

int

PreviewRotation

Gets or sets the preview model rotation of this text draw.

public virtual Vector3 PreviewRotation { get; set; }

Property Value

Vector3

PreviewZoom

Gets the preview model zoom of this text draw.

public virtual float PreviewZoom { get; }

Property Value

float

Proportional

Gets or sets a value indicating whether the text of this text draw uses proportional spacing.

public virtual bool Proportional { get; set; }

Property Value

bool

Selectable

Gets or sets a value indicating whether this text draw is selectable by the player.

public virtual bool Selectable { get; set; }

Property Value

bool

Shadow

Gets or sets the shadow size of this text draw.

public virtual int Shadow { get; set; }

Property Value

int

Text

Gets or sets the text displayed in this text draw.

public virtual string Text { get; set; }

Property Value

string

TextSize

Gets or sets the size of this text draw box and clickable area.

public virtual Vector2 TextSize { get; set; }

Property Value

Vector2

UseBox

Gets or sets a value indicating whether a box is displayed for this text draw.

public virtual bool UseBox { get; set; }

Property Value

bool

Methods

Hide()

Hides this text draw for the player.

public virtual void Hide()

OnDestroyComponent()

This method is invoked before this component is destroyed and removed from its entity.

protected override void OnDestroyComponent()

Restream()

Forces this text draw to be re-sent to the player.

public virtual void Restream()

SetPreviewRotation(Vector3, float)

Sets the preview model rotation and zoom of this text draw.

public virtual void SetPreviewRotation(Vector3 rotation, float zoom = 1)

Parameters

rotation Vector3

The rotation of the preview model.

zoom float

The zoom level of the preview model.

SetPreviewVehicleColor(int, int)

Sets the preview vehicle colors of this text draw.

public virtual void SetPreviewVehicleColor(int color1, int color2)

Parameters

color1 int

The primary color of the preview vehicle.

color2 int

The secondary color of the preview vehicle.

Show()

Shows this text draw for the player.

public virtual void Show()

ToString()

public override string ToString()

Returns

string

Operators

implicit operator IPlayerTextDraw(PlayerTextDraw?)

Performs an implicit conversion from PlayerTextDraw to IPlayerTextDraw.

public static implicit operator IPlayerTextDraw(PlayerTextDraw? playerTextDraw)

Parameters

playerTextDraw PlayerTextDraw

Returns

IPlayerTextDraw