Click or drag to resize

PlayerObject Class

Represents a player-object.
Inheritance Hierarchy
SystemObject
  SampSharp.GameMode.ToolsDisposable
    SampSharp.GameMode.PoolsIdentifiedOwnedPoolPlayerObject, BasePlayer
      SampSharp.GameMode.WorldPlayerObject

Namespace:  SampSharp.GameMode.World
Assembly:  SampSharp.GameMode (in SampSharp.GameMode.dll) Version: 0.0.0-localbuild+05637d43e9f34d872e453289d4e240c843e43b09
Syntax
C#
public class PlayerObject : IdentifiedOwnedPool<PlayerObject, BasePlayer>, 
	IGameObject, IWorldObject

The PlayerObject type exposes the following members.

Constructors
  NameDescription
Public methodPlayerObject
Initializes a new instance of the PlayerObject class.
Public methodPlayerObject(BasePlayer, Int32, Vector3, Vector3)
Initializes a new instance of the PlayerObject class.
Public methodPlayerObject(BasePlayer, Int32, Vector3, Vector3, Single)
Initializes a new instance of the PlayerObject class.
Top
Properties
  NameDescription
Public propertyDrawDistance
Gets the draw distance of this IGameObject.
Public propertyId
Gets the identifier of this instance.
(Inherited from IdentifiedOwnedPoolTInstance, TOwner.)
Public propertyIsDisposed
Gets whether this resource has been disposed.
(Inherited from Disposable.)
Public propertyIsMoving
Gets whether this IGameObject is moving.
Public propertyIsValid
Gets whether this IGameObject is valid.
Public propertyModelId
Gets the model of this IGameObject.
Public propertyOwner
Gets the owner of this instance.
(Inherited from IdentifiedOwnedPoolTInstance, TOwner.)
Public propertyPosition
Gets the position of this IWorldObject.
Public propertyRotation
Gets the rotation of this IGameObject.
Top
Methods
  NameDescription
Protected methodAssertNotDisposed
Checks whether this instance has been disposed. If it has, it throws an exception.
(Inherited from Disposable.)
Public methodAttachCameraToObject
Attaches the player's camera to this PlayerObject.
Public methodAttachTo(BasePlayer, Vector3, Vector3)
Attaches this PlayerObject to the specified player.
Public methodAttachTo(BaseVehicle, Vector3, Vector3)
Attaches this PlayerObject to the specified vehicle.
Public methodDisableCameraCollisions
Disable collisions between players' cameras and this PlayerObject.
Public methodDispose
Performs tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from Disposable.)
Protected methodDispose(Boolean)
Performs tasks associated with freeing, releasing, or resetting unmanaged resources.
(Overrides IdentifiedOwnedPoolTInstance, TOwnerDispose(Boolean).)
Public methodEdit
Lets the Owner of this PlayerObject edit this object.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Finalizes an instance of the Disposable class.
(Inherited from Disposable.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodInitialize
An overloadable point for initialization logic which requires the Id and the Owner to be set.
(Inherited from IdentifiedOwnedPoolTInstance, TOwner.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodMove(Vector3, Single)
Moves this IGameObject to the given position with the given speed.
Public methodMove(Vector3, Single, Vector3)
Moves this IGameObject to the given position and rotation with the given speed.
Public methodOnEdited
Raises the Edited event.
Public methodOnMoved
Raises the Moved event.
Public methodOnSelected
Raises the Selected event.
Public methodStatic memberSelect
Lets the specified player select an object.
Public methodSetMaterial
Sets the material of this IGameObject.
Public methodSetMaterialText
Sets the material text of this IGameObject.
Public methodStop
Stop this IGameObject from moving any further.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Events
  NameDescription
Public eventDisposed
Occurs when this isntance has been disposed.
(Inherited from Disposable.)
Public eventEdited
Occurs when the OnEdited(EditPlayerObjectEventArgs) callback is being called. This callback is called when a player ends object edition mode.
Public eventMoved
Occurs when the OnMoved(EventArgs) callback is being called. This callback is called when an object is moved after Move(Vector3, Single) (when it stops moving).
Public eventSelected
Occurs when the OnSelected(SelectPlayerObjectEventArgs) callback is being called. This callback is called when a player selects an object after Select(BasePlayer) has been used.
Top
Fields
  NameDescription
Public fieldStatic memberInvalidId
Identifier indicating the handle is invalid.
Public fieldStatic memberMax
Maximum number of objects which can exist.
Top
See Also