Class Player
Implements
Inherited Members
Namespace: GTA
Assembly: ScriptHookVDotNet3.dll
Syntax
public sealed class Player : INativeValue
Properties
| Improve this Doc View SourceCanControlCharacter
Declaration
public bool CanControlCharacter { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
CanControlRagdoll
Sets a value indicating whether this Player can control ragdoll.
Declaration
public bool CanControlRagdoll { set; }
Property Value
| Type | Description |
|---|---|
| Boolean | true if this Player can control ragdoll; otherwise, false. |
CanLeaveParachuteSmokeTrail
Sets a value indicating whether this Player can leave a parachute smoke trail.
Declaration
public bool CanLeaveParachuteSmokeTrail { set; }
Property Value
| Type | Description |
|---|---|
| Boolean | true if this Player can leave a parachute smoke trail; otherwise, false. |
CanStartMission
Gets a value indicating whether this Player can start a mission.
Declaration
public bool CanStartMission { get; }
Property Value
| Type | Description |
|---|---|
| Boolean | true if this Player can start a mission; otherwise, false. |
CanUseCover
Sets a value indicating whether this Player can use cover.
Declaration
public bool CanUseCover { set; }
Property Value
| Type | Description |
|---|---|
| Boolean | true if this Player can use cover; otherwise, false. |
Character
Declaration
public Ped Character { get; }
Property Value
| Type | Description |
|---|---|
| Ped |
DispatchsCops
Sets a value indicating whether cops will be dispatched for this Player
Declaration
public bool DispatchsCops { set; }
Property Value
| Type | Description |
|---|---|
| Boolean | true if cops will be dispatched; otherwise, false. |
ForcedAim
Sets a value indicating whether the player is forced to aim.
Declaration
public bool ForcedAim { set; }
Property Value
| Type | Description |
|---|---|
| Boolean | true to make the player always be aiming; otherwise, false. |
Handle
Declaration
public int Handle { get; }
Property Value
| Type | Description |
|---|---|
| Int32 |
IgnoredByEveryone
Sets a value indicating whether this Player is ignored by everyone.
Declaration
public bool IgnoredByEveryone { set; }
Property Value
| Type | Description |
|---|---|
| Boolean | true if this Player is ignored by everyone; otherwise, false. |
IgnoredByPolice
Sets a value indicating whether this Player is ignored by the police.
Declaration
public bool IgnoredByPolice { set; }
Property Value
| Type | Description |
|---|---|
| Boolean | true if this Player is ignored by the police; otherwise, false. |
IsAiming
Gets a value indicating whether this Player is aiming.
Declaration
public bool IsAiming { get; }
Property Value
| Type | Description |
|---|---|
| Boolean | true if this Player is aiming; otherwise, false. |
IsAlive
Gets a value indicating whether this Player is alive.
Declaration
public bool IsAlive { get; }
Property Value
| Type | Description |
|---|---|
| Boolean | true if this Player is alive; otherwise, false. |
IsClimbing
Gets a value indicating whether this Player is climbing.
Declaration
public bool IsClimbing { get; }
Property Value
| Type | Description |
|---|---|
| Boolean | true if this Player is climbing; otherwise, false. |
IsDead
Gets a value indicating whether this Player is dead.
Declaration
public bool IsDead { get; }
Property Value
| Type | Description |
|---|---|
| Boolean | true if this Player is dead; otherwise, false. |
IsInvincible
Gets or sets a value indicating whether this Player is invincible.
Declaration
public bool IsInvincible { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean | true if this Player is invincible; otherwise, false. |
IsPlaying
Gets a value indicating whether this Player is playing.
Declaration
public bool IsPlaying { get; }
Property Value
| Type | Description |
|---|---|
| Boolean | true if this Player is playing; otherwise, false. |
IsPressingHorn
Gets a value indicating whether this Player is pressing a horn.
Declaration
public bool IsPressingHorn { get; }
Property Value
| Type | Description |
|---|---|
| Boolean | true if this Player is pressing a horn; otherwise, false. |
IsRidingTrain
Gets a value indicating whether this Player is riding a train.
Declaration
public bool IsRidingTrain { get; }
Property Value
| Type | Description |
|---|---|
| Boolean | true if this Player is riding a train; otherwise, false. |
IsSpecialAbilityActive
Gets a value indicating whether this Player is using their special ability.
Declaration
public bool IsSpecialAbilityActive { get; }
Property Value
| Type | Description |
|---|---|
| Boolean | true if this Player is using their special ability; otherwise, false. |
IsSpecialAbilityEnabled
Gets or sets a value indicating whether this Player can use their special ability.
Declaration
public bool IsSpecialAbilityEnabled { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean | true if this Player can use their special ability; otherwise, false. |
IsTargetingAnything
Gets a value indicating whether this Player is targeting anything.
Declaration
public bool IsTargetingAnything { get; }
Property Value
| Type | Description |
|---|---|
| Boolean | true if this Player is targeting anything; otherwise, false. |
LastVehicle
Declaration
public Vehicle LastVehicle { get; }
Property Value
| Type | Description |
|---|---|
| Vehicle |
Remarks
returns null if the last vehicle doesn't exist.
LockedOnEntity
Gets the Entity this Player is locking on when they are aiming with a firearm using a controller or they are locking on unarmed or with a melee weapon.
Declaration
public Entity LockedOnEntity { get; }
Property Value
| Type | Description |
|---|---|
| Entity | The Entity if this Player is automatically locking on any Entity; otherwise, null |
MaxArmor
Gets or sets the maximum amount of armor this Player can carry.
Declaration
public int MaxArmor { get; set; }
Property Value
| Type | Description |
|---|---|
| Int32 |
Money
Gets or sets how much money this Player has.
Declaration
public int Money { get; set; }
Property Value
| Type | Description |
|---|---|
| Int32 |
Name
Gets the Social Club name of this Player.
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| String |
NativeValue
Declaration
public ulong NativeValue { get; set; }
Property Value
| Type | Description |
|---|---|
| UInt64 |
ParachuteSmokeTrailColor
Gets or sets the color of the parachute smoke trail for this Player.
Declaration
public Color ParachuteSmokeTrailColor { get; set; }
Property Value
| Type | Description |
|---|---|
| Color | The color of the parachute smoke trail for this Player. |
PrimaryParachuteTint
Gets or sets the primary parachute tint for this Player.
Declaration
public ParachuteTint PrimaryParachuteTint { get; set; }
Property Value
| Type | Description |
|---|---|
| ParachuteTint |
RemainingSprintStamina
Gets how much sprint stamina this Player currently has.
Declaration
public float RemainingSprintStamina { get; }
Property Value
| Type | Description |
|---|---|
| Single |
RemainingSprintTime
Gets how long this Player can remain sprinting for.
Declaration
public float RemainingSprintTime { get; }
Property Value
| Type | Description |
|---|---|
| Single |
RemainingUnderwaterTime
Gets how long this Player can stay underwater before they start losing health.
Declaration
public float RemainingUnderwaterTime { get; }
Property Value
| Type | Description |
|---|---|
| Single |
ReserveParachuteTint
Gets or sets the reserve parachute tint for this Player.
Declaration
public ParachuteTint ReserveParachuteTint { get; set; }
Property Value
| Type | Description |
|---|---|
| ParachuteTint |
TargetedEntity
Declaration
public Entity TargetedEntity { get; }
Property Value
| Type | Description |
|---|---|
| Entity | The Entity if this Player is free aiming any Entity; otherwise, null |
WantedCenterPosition
Gets or sets the wanted center position for this Player.
Declaration
public Vector3 WantedCenterPosition { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector3 | The place in world coordinates where the police think this Player is. |
WantedLevel
Gets or sets the wanted level for this Player.
Declaration
public int WantedLevel { get; set; }
Property Value
| Type | Description |
|---|---|
| Int32 |
Methods
| Improve this Doc View SourceChangeModel(Model)
Declaration
public bool ChangeModel(Model model)
Parameters
| Type | Name | Description |
|---|---|---|
| Model | model |
Returns
| Type | Description |
|---|---|
| Boolean | true if the change was successful; otherwise, false. |
ChargeSpecialAbility(Int32)
Charges the special ability for this Player.
Declaration
public void ChargeSpecialAbility(int absoluteAmount)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | absoluteAmount | The absolute amount. |
ChargeSpecialAbility(Single)
Charges the special ability for this Player.
Declaration
public void ChargeSpecialAbility(float normalizedRatio)
Parameters
| Type | Name | Description |
|---|---|---|
| Single | normalizedRatio | The amount between |
DepleteSpecialAbility()
Depletes the special ability for this Player.
Declaration
public void DepleteSpecialAbility()
DisableFiringThisFrame()
Prevents this Player firing this frame.
Declaration
public void DisableFiringThisFrame()
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | obj | The Object to check. |
Returns
| Type | Description |
|---|---|
| Boolean | true if the |
Overrides
| Improve this Doc View SourceGetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| Int32 |
Overrides
| Improve this Doc View SourceIsTargeting(Entity)
Declaration
public bool IsTargeting(Entity entity)
Parameters
| Type | Name | Description |
|---|---|---|
| Entity | entity | The Entity to check. |
Returns
| Type | Description |
|---|---|
| Boolean | true if this Player is targeting the specified Entity; otherwise, false. |
RefillSpecialAbility()
Refills the special ability for this Player.
Declaration
public void RefillSpecialAbility()
SetExplosiveAmmoThisFrame()
Makes this Player shoot explosive bullets this frame.
Declaration
public void SetExplosiveAmmoThisFrame()
SetExplosiveMeleeThisFrame()
Makes this Player have an explosive melee attack this frame.
Declaration
public void SetExplosiveMeleeThisFrame()
SetFireAmmoThisFrame()
Makes this Player shoot fire bullets this frame.
Declaration
public void SetFireAmmoThisFrame()
SetMayNotEnterAnyVehicleThisFrame()
Declaration
public void SetMayNotEnterAnyVehicleThisFrame()
SetMayOnlyEnterThisVehicleThisFrame(Vehicle)
Declaration
public void SetMayOnlyEnterThisVehicleThisFrame(Vehicle vehicle)
Parameters
| Type | Name | Description |
|---|---|---|
| Vehicle | vehicle |
SetRunSpeedMultThisFrame(Single)
Sets the run speed multiplier for this Player this frame.
Declaration
public void SetRunSpeedMultThisFrame(float mult)
Parameters
| Type | Name | Description |
|---|---|---|
| Single | mult | The factor - min: |
SetSuperJumpThisFrame()
Lets this Player jump really high this frame.
Declaration
public void SetSuperJumpThisFrame()
SetSwimSpeedMultThisFrame(Single)
Sets the swim speed multiplier for this Player this frame.
Declaration
public void SetSwimSpeedMultThisFrame(float mult)
Parameters
| Type | Name | Description |
|---|---|---|
| Single | mult | The factor - min: |
Operators
| Improve this Doc View SourceEquality(Player, Player)
Determines if two Players refer to the same player.
Declaration
public static bool operator ==(Player left, Player right)
Parameters
| Type | Name | Description |
|---|---|---|
| Player | left | The left Player. |
| Player | right | The right Player. |
Returns
| Type | Description |
|---|---|
| Boolean | true if |
Implicit(Player to InputArgument)
Converts a Player to a native input argument.
Declaration
public static implicit operator InputArgument(Player value)
Parameters
| Type | Name | Description |
|---|---|---|
| Player | value |
Returns
| Type | Description |
|---|---|
| InputArgument |
Inequality(Player, Player)
Determines if two Players don't refer to the same player.
Declaration
public static bool operator !=(Player left, Player right)
Parameters
| Type | Name | Description |
|---|---|---|
| Player | left | The left Player. |
| Player | right | The right Player. |
Returns
| Type | Description |
|---|---|
| Boolean | true if |