Search Results for

    Show / Hide Table of Contents

    Class Player

    Inheritance
    Object
    Player
    Implements
    INativeValue
    Inherited Members
    Object.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: GTA
    Assembly: ScriptHookVDotNet3.dll
    Syntax
    public sealed class Player : INativeValue

    Properties

    | Improve this Doc View Source

    CanControlCharacter

    Gets or sets a value indicating whether this Player can control its Ped.

    Declaration
    public bool CanControlCharacter { get; set; }
    Property Value
    Type Description
    Boolean

    true if this Player can control its Ped; otherwise, false.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    Character

    Gets the Ped this Player is controlling.

    Declaration
    public Ped Character { get; }
    Property Value
    Type Description
    Ped
    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    Handle

    Declaration
    public int Handle { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    LastVehicle

    Gets the last Vehicle this Player used.

    Declaration
    public Vehicle LastVehicle { get; }
    Property Value
    Type Description
    Vehicle
    Remarks

    returns null if the last vehicle doesn't exist.

    | Improve this Doc View Source

    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

    | Improve this Doc View Source

    MaxArmor

    Gets or sets the maximum amount of armor this Player can carry.

    Declaration
    public int MaxArmor { get; set; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    Money

    Gets or sets how much money this Player has. Only works if current player is Michael, Franklin or Trevor

    Declaration
    public int Money { get; set; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    Name

    Gets the Social Club name of this Player.

    Declaration
    public string Name { get; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    NativeValue

    Declaration
    public ulong NativeValue { get; set; }
    Property Value
    Type Description
    UInt64
    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    PrimaryParachuteTint

    Gets or sets the primary parachute tint for this Player.

    Declaration
    public ParachuteTint PrimaryParachuteTint { get; set; }
    Property Value
    Type Description
    ParachuteTint
    | Improve this Doc View Source

    RemainingSprintStamina

    Gets how much sprint stamina this Player currently has.

    Declaration
    public float RemainingSprintStamina { get; }
    Property Value
    Type Description
    Single
    | Improve this Doc View Source

    RemainingSprintTime

    Gets how long this Player can remain sprinting for.

    Declaration
    public float RemainingSprintTime { get; }
    Property Value
    Type Description
    Single
    | Improve this Doc View Source

    RemainingUnderwaterTime

    Gets how long this Player can stay underwater before they start losing health.

    Declaration
    public float RemainingUnderwaterTime { get; }
    Property Value
    Type Description
    Single
    | Improve this Doc View Source

    ReserveParachuteTint

    Gets or sets the reserve parachute tint for this Player.

    Declaration
    public ParachuteTint ReserveParachuteTint { get; set; }
    Property Value
    Type Description
    ParachuteTint
    | Improve this Doc View Source

    TargetedEntity

    Gets the Entity this Player is free aiming.

    Declaration
    public Entity TargetedEntity { get; }
    Property Value
    Type Description
    Entity

    The Entity if this Player is free aiming any Entity; otherwise, null

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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 Source

    ChangeModel(Model)

    Attempts to change the Model of this Player.

    Declaration
    public bool ChangeModel(Model model)
    Parameters
    Type Name Description
    Model model

    The Model to change this Player to.

    Returns
    Type Description
    Boolean

    true if the change was successful; otherwise, false.

    | Improve this Doc View Source

    ChargeSpecialAbility(Int32)

    Charges the special ability for this Player.

    Declaration
    public void ChargeSpecialAbility(int absoluteAmount)
    Parameters
    Type Name Description
    Int32 absoluteAmount

    The absolute amount.

    | Improve this Doc View Source

    ChargeSpecialAbility(Single)

    Charges the special ability for this Player.

    Declaration
    public void ChargeSpecialAbility(float normalizedRatio)
    Parameters
    Type Name Description
    Single normalizedRatio

    The amount between 0.0f and 1.0f

    | Improve this Doc View Source

    DepleteSpecialAbility()

    Depletes the special ability for this Player.

    Declaration
    public void DepleteSpecialAbility()
    | Improve this Doc View Source

    DisableFiringThisFrame()

    Prevents this Player firing this frame.

    Declaration
    public void DisableFiringThisFrame()
    | Improve this Doc View Source

    Equals(Object)

    Determines if an Object refers to the same player as this Player.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj

    The Object to check.

    Returns
    Type Description
    Boolean

    true if the obj is the same player as this Player; otherwise, false.

    Overrides
    Object.Equals(Object)
    | Improve this Doc View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32
    Overrides
    Object.GetHashCode()
    | Improve this Doc View Source

    IsTargeting(Entity)

    Determines whether this Player is targeting the specified 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.

    | Improve this Doc View Source

    RefillSpecialAbility()

    Refills the special ability for this Player.

    Declaration
    public void RefillSpecialAbility()
    | Improve this Doc View Source

    SetExplosiveAmmoThisFrame()

    Makes this Player shoot explosive bullets this frame.

    Declaration
    public void SetExplosiveAmmoThisFrame()
    | Improve this Doc View Source

    SetExplosiveMeleeThisFrame()

    Makes this Player have an explosive melee attack this frame.

    Declaration
    public void SetExplosiveMeleeThisFrame()
    | Improve this Doc View Source

    SetFireAmmoThisFrame()

    Makes this Player shoot fire bullets this frame.

    Declaration
    public void SetFireAmmoThisFrame()
    | Improve this Doc View Source

    SetMayNotEnterAnyVehicleThisFrame()

    Blocks this Player from entering any Vehicle this frame.

    Declaration
    public void SetMayNotEnterAnyVehicleThisFrame()
    | Improve this Doc View Source

    SetMayOnlyEnterThisVehicleThisFrame(Vehicle)

    Only lets this Player enter a specific Vehicle this frame.

    Declaration
    public void SetMayOnlyEnterThisVehicleThisFrame(Vehicle vehicle)
    Parameters
    Type Name Description
    Vehicle vehicle

    The Vehicle this Player is allowed to enter.

    | Improve this Doc View Source

    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: 0.0f, default: 1.0f, max: 1.499f.

    | Improve this Doc View Source

    SetSuperJumpThisFrame()

    Lets this Player jump really high this frame.

    Declaration
    public void SetSuperJumpThisFrame()
    | Improve this Doc View Source

    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: 0.0f, default: 1.0f, max: 1.499f.

    Operators

    | Improve this Doc View Source

    Equality(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 left is the same player as right; otherwise, false.

    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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 left is not the same player as right; otherwise, false.

    Implements

    INativeValue
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX