Table of Contents

Class BaseGangZone

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

Provides the shared data and functionality of a gang zone, regardless of whether it is global (GangZone) or scoped to a single player (PlayerGangZone).

public abstract class BaseGangZone : IdProvider
Inheritance
BaseGangZone
Derived
Inherited Members

Constructors

BaseGangZone(IOmpEntityProvider, IGangZonesComponent, IGangZone)

Initializes a new instance of the BaseGangZone class.

protected BaseGangZone(IOmpEntityProvider entityProvider, IGangZonesComponent gangZones, IGangZone gangZone)

Parameters

entityProvider IOmpEntityProvider
gangZones IGangZonesComponent
gangZone IGangZone

Properties

Color

Gets or sets the Color of this gang zone.

public virtual Color Color { 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

Max

Gets the maximum position of this gang zone as a Vector2.

public virtual Vector2 Max { get; }

Property Value

Vector2

MaxX

Gets the maximum x coordinate of this gang zone.

public virtual float MaxX { get; }

Property Value

float

MaxY

Gets the maximum y coordinate of this gang zone.

public virtual float MaxY { get; }

Property Value

float

Min

Gets the minimum position of this gang zone as a Vector2.

public virtual Vector2 Min { get; }

Property Value

Vector2

MinX

Gets the minimum x coordinate of this gang zone.

public virtual float MinX { get; }

Property Value

float

MinY

Gets the minimum y coordinate of this gang zone.

public virtual float MinY { get; }

Property Value

float

Methods

GetShownFor()

Enumerates the players for whom this gang zone is currently shown.

public virtual IEnumerable<Player> GetShownFor()

Returns

IEnumerable<Player>

A lazy sequence of Player components.

OnDestroyComponent()

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

protected override void OnDestroyComponent()

SetPosition(Vector2, Vector2)

Updates the boundary of this gang zone.

public virtual void SetPosition(Vector2 min, Vector2 max)

Parameters

min Vector2

The minimum corner.

max Vector2

The maximum corner.

ToString()

public override string ToString()

Returns

string

Operators

implicit operator IGangZone(BaseGangZone?)

Performs an implicit conversion from BaseGangZone to IGangZone.

public static implicit operator IGangZone(BaseGangZone? gangZone)

Parameters

gangZone BaseGangZone

Returns

IGangZone