Class Class
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
classesIClassesComponentplayerClassIClass
Properties
Angle
Gets or sets the spawn angle (in degrees) for this player class.
public virtual float Angle { get; }
Property Value
IsOmpEntityDestroyed
Gets a value indicating whether the open.mp entity counterpart has been destroyed.
protected bool IsOmpEntityDestroyed { get; }
Property Value
Location
Gets or sets the spawn position for this player class.
public virtual Vector3 Location { get; }
Property Value
Skin
Gets or sets the skin model ID for this player class.
public virtual int Skin { get; }
Property Value
Team
Gets or sets the team ID for this player class.
public virtual int Team { get; }
Property Value
Weapons
Gets or sets the weapon slots assigned to this player class.
public virtual PlayerWeaponSlots Weapons { get; }
Property Value
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
dataPlayerSpawnDataThe spawn configuration data to apply.
ToString()
public override string ToString()
Returns
Operators
implicit operator IClass(Class?)
public static implicit operator IClass(Class? playerClass)
Parameters
playerClassClass