Table of Contents

Class Class

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

Represents a component which provides the data and functionality of a player spawn class.

public class Class : IdProvider
Inheritance
Class
Inherited Members

Constructors

Class(IClassesComponent, IClass)

Initializes a new instance of the Class class.

protected Class(IClassesComponent classes, IClass playerClass)

Parameters

classes IClassesComponent
playerClass IClass

Properties

Angle

Gets or sets the spawn angle (in degrees) for this player class.

public virtual float Angle { get; }

Property Value

float

IsOmpEntityDestroyed

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

protected bool IsOmpEntityDestroyed { get; }

Property Value

bool

Location

Gets or sets the spawn position for this player class.

public virtual Vector3 Location { get; }

Property Value

Vector3

Skin

Gets or sets the skin model ID for this player class.

public virtual int Skin { get; }

Property Value

int

Team

Gets or sets the team ID for this player class.

public virtual int Team { get; }

Property Value

int

Weapons

Gets or sets the weapon slots assigned to this player class.

public virtual PlayerWeaponSlots Weapons { get; }

Property Value

PlayerWeaponSlots

Methods

GetSpawnData()

Retrieves the current spawn data for the player.

public virtual PlayerSpawnData GetSpawnData()

Returns

PlayerSpawnData

A PlayerSpawnData instance containing the player's spawn information.

OnDestroyComponent()

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

protected override void OnDestroyComponent()

SetSpawnData(PlayerSpawnData)

Sets the spawn data for the player using the specified spawn configuration.

public virtual void SetSpawnData(PlayerSpawnData data)

Parameters

data PlayerSpawnData

The spawn configuration data to apply.

ToString()

public override string ToString()

Returns

string

Operators

implicit operator IClass(Class?)

Performs an implicit conversion from Class to IClass.

public static implicit operator IClass(Class? playerClass)

Parameters

playerClass Class

Returns

IClass