namespace SAMP.API { public class SpawnInfo { #region Class Variables private Player _qPlayer; private int _nTeam; private Skin _qSkin; private Vector3 _qPos; private float _fAngle; private int _nWeapon1, _nWeapon1Ammo; private int _nWeapon2, _nWeapon2Ammo; private int _nWeapon3, _nWeapon3Ammo; #endregion #region Constructor /// /// Initializes a new instance of SAMP.API.SpawnInfo. /// /// The player whose spawn info is being affected. internal SpawnInfo(Player sender) { _qPlayer = sender; } #endregion #region Accessors & Mutators /// /// Gets or sets the spawn facing angle of the player. /// public float Angle { get { return _fAngle; } set { _fAngle = value; } } /// /// Gets or sets the spawn position of the player. /// public Vector3 Position { get { return _qPos; } set { _qPos = value; } } /// /// Gets or sets the Skin of the player. /// public Skin Skin { get { return _qSkin; } set { _qSkin = value; } } /// /// Gets or sets the team ID of the player. /// public int Team { get { return _nTeam; } set { _nTeam = value; } } /// /// Gets or sets the primary spawn-weapon for the player. /// public int Weapon1 { get { return _nWeapon1; } set { _nWeapon1 = value; } } /// /// Gets or sets the amount of ammunition for the primary spawn-weapon. /// public int Weapon1Ammo { get { return _nWeapon1Ammo; } set { _nWeapon1Ammo = value; } } /// /// Gets or sets the secondary spawn-weapon for the player. /// public int Weapon2 { get { return _nWeapon2; } set { _nWeapon2 = value; } } /// /// Gets or sets the amount of ammunition for the secondary spawn-weapon. /// public int Weapon2Ammo { get { return _nWeapon2Ammo; } set { _nWeapon2Ammo = value; } } /// /// Gets or sets the third spawn-weapon for the player. /// public int Weapon3 { get { return _nWeapon3; } set { _nWeapon3 = value; } } /// /// Gets or sets the amount of ammunition for the third spawn-weapon. /// public int Weapon3Ammo { get { return _nWeapon3Ammo; } set { _nWeapon3Ammo = value; } } #endregion #region Public Methods /// /// Sends all buffered SpawnInfo to be updated. /// public void Flush() { Core.Natives.SetSpawnInfo(_qPlayer.ID, Team, (int)Skin, Position.X, Position.Y, Position.Z, Angle, Weapon1, Weapon1Ammo, Weapon2, Weapon2Ammo, Weapon3, Weapon3Ammo); } #endregion }; };