SHVDN  v3
An ASI plugin for Grand Theft Auto V, which allows running scripts written in any .NET language in-game. Developed by crosire https://github.com/crosire/scripthookvdotnet/
GTA.Player Class Reference
Inheritance diagram for GTA.Player:
GTA.Native.INativeValue

Public Member Functions

bool ChangeModel (Model model)
 Attempts to change the Model of this Player. More...
 
void ChargeSpecialAbility (int absoluteAmount)
 Charges the special ability for this Player. More...
 
void ChargeSpecialAbility (float normalizedRatio)
 Charges the special ability for this Player. More...
 
void RefillSpecialAbility ()
 Refills the special ability for this Player. More...
 
void DepleteSpecialAbility ()
 Depletes the special ability for this Player. More...
 
bool IsTargeting (Entity entity)
 Determines whether this Player is targeting the specified Entity. More...
 
void DisableFiringThisFrame ()
 Prevents this Player firing this frame. More...
 
void SetRunSpeedMultThisFrame (float mult)
 Sets the run speed multiplier for this Player this frame. More...
 
void SetSwimSpeedMultThisFrame (float mult)
 Sets the swim speed multiplier for this Player this frame. More...
 
void SetFireAmmoThisFrame ()
 Makes this Player shoot fire bullets this frame. More...
 
void SetExplosiveAmmoThisFrame ()
 Makes this Player shoot explosive bullets this frame. More...
 
void SetExplosiveMeleeThisFrame ()
 Makes this Player have an explosive melee attack this frame. More...
 
void SetSuperJumpThisFrame ()
 Lets this Player jump really high this frame. More...
 
void SetMayNotEnterAnyVehicleThisFrame ()
 Blocks this Player from entering any Vehicle this frame. More...
 
void SetMayOnlyEnterThisVehicleThisFrame (Vehicle vehicle)
 Only lets this Player enter a specific Vehicle this frame. More...
 
override bool Equals (object obj)
 Determines if an object refers to the same player as this Player. More...
 
override int GetHashCode ()
 

Static Public Member Functions

static bool operator== (Player left, Player right)
 Determines if two Players refer to the same player. More...
 
static bool operator!= (Player left, Player right)
 Determines if two Players don't refer to the same player. More...
 
static implicit operator InputArgument (Player value)
 Converts a Player to a native input argument. More...
 

Public Attributes

string Name => Function.Call<string>(Hash.GET_PLAYER_NAME, Handle)
 Gets the Social Club name of this Player. More...
 
bool IsDead => Function.Call<bool>(Hash.IS_PLAYER_DEAD, Handle)
 Gets a value indicating whether this Player is dead. More...
 
bool IsAlive => !IsDead
 Gets a value indicating whether this Player is alive. More...
 
bool IsAiming => Function.Call<bool>(Hash.IS_PLAYER_FREE_AIMING, Handle)
 Gets a value indicating whether this Player is aiming. More...
 
bool IsClimbing => Function.Call<bool>(Hash.IS_PLAYER_CLIMBING, Handle)
 Gets a value indicating whether this Player is climbing. More...
 
bool IsRidingTrain => Function.Call<bool>(Hash.IS_PLAYER_RIDING_TRAIN, Handle)
 Gets a value indicating whether this Player is riding a train. More...
 
bool IsPressingHorn => Function.Call<bool>(Hash.IS_PLAYER_PRESSING_HORN, Handle)
 Gets a value indicating whether this Player is pressing a horn. More...
 
bool IsPlaying => Function.Call<bool>(Hash.IS_PLAYER_PLAYING, Handle)
 Gets a value indicating whether this Player is playing. More...
 
float RemainingSprintTime => Function.Call<float>(Hash.GET_PLAYER_SPRINT_TIME_REMAINING, Handle)
 Gets how long this Player can remain sprinting for. More...
 
float RemainingSprintStamina => Function.Call<float>(Hash.GET_PLAYER_SPRINT_STAMINA_REMAINING, Handle)
 Gets how much sprint stamina this Player currently has. More...
 
float RemainingUnderwaterTime => Function.Call<float>(Hash.GET_PLAYER_UNDERWATER_TIME_REMAINING, Handle)
 Gets how long this Player can stay underwater before they start losing health. More...
 
bool IsSpecialAbilityActive => Function.Call<bool>(Hash.IS_SPECIAL_ABILITY_ACTIVE, Handle)
 Gets a value indicating whether this Player is using their special ability. More...
 
Vehicle LastVehicle => Function.Call<Vehicle>(Hash.GET_PLAYERS_LAST_VEHICLE)
 Gets the last Vehicle this Player used. More...
 
bool IsTargetingAnything => Function.Call<bool>(Hash.IS_PLAYER_TARGETTING_ANYTHING, Handle)
 Gets a value indicating whether this Player is targeting anything. More...
 

Properties

int Handle [get]
 
ulong NativeValue [get, set]
 
Ped Character [get]
 Gets the Ped this Player is controlling. More...
 
int Money [get, set]
 Gets or sets how much money this Player has. More...
 
int WantedLevel [get, set]
 Gets or sets the wanted level for this Player. More...
 
Vector3 WantedCenterPosition [get, set]
 Gets or sets the wanted center position for this Player. More...
 
int MaxArmor [get, set]
 Gets or sets the maximum amount of armor this Player can carry. More...
 
ParachuteTint PrimaryParachuteTint [get, set]
 Gets or sets the primary parachute tint for this Player. More...
 
ParachuteTint ReserveParachuteTint [get, set]
 Gets or sets the reserve parachute tint for this Player. More...
 
bool CanLeaveParachuteSmokeTrail [set]
 Sets a value indicating whether this Player can leave a parachute smoke trail. More...
 
Color ParachuteSmokeTrailColor [get, set]
 Gets or sets the color of the parachute smoke trail for this Player. More...
 
bool IsInvincible [get, set]
 Gets or sets a value indicating whether this Player is invincible. More...
 
bool IgnoredByPolice [set]
 Sets a value indicating whether this Player is ignored by the police. More...
 
bool IgnoredByEveryone [set]
 Sets a value indicating whether this Player is ignored by everyone. More...
 
bool DispatchsCops [set]
 Sets a value indicating whether cops will be dispatched for this Player More...
 
bool CanUseCover [set]
 Sets a value indicating whether this Player can use cover. More...
 
bool CanStartMission [get]
 Gets a value indicating whether this Player can start a mission. More...
 
bool CanControlRagdoll [set]
 Sets a value indicating whether this Player can control ragdoll. More...
 
bool CanControlCharacter [get, set]
 Gets or sets a value indicating whether this Player can control its Ped. More...
 
bool IsSpecialAbilityEnabled [get, set]
 Gets or sets a value indicating whether this Player can use their special ability. More...
 
Entity TargetedEntity [get]
 Gets the Entity this Player is targeting. More...
 
bool ForcedAim [set]
 Sets a value indicating whether the player is forced to aim. More...
 
- Properties inherited from GTA.Native.INativeValue
ulong NativeValue [get, set]
 

Member Function Documentation

◆ ChangeModel()

bool GTA.Player.ChangeModel ( Model  model)

Attempts to change the Model of this Player.

Parameters
modelThe Model to change this Player to.
Returns
true if the change was successful; otherwise, false.

◆ ChargeSpecialAbility() [1/2]

void GTA.Player.ChargeSpecialAbility ( float  normalizedRatio)

Charges the special ability for this Player.

Parameters
normalizedRatioThe amount between 0.0f and 1.0f

◆ ChargeSpecialAbility() [2/2]

void GTA.Player.ChargeSpecialAbility ( int  absoluteAmount)

Charges the special ability for this Player.

Parameters
absoluteAmountThe absolute amount.

◆ DepleteSpecialAbility()

void GTA.Player.DepleteSpecialAbility ( )

Depletes the special ability for this Player.

◆ DisableFiringThisFrame()

void GTA.Player.DisableFiringThisFrame ( )

Prevents this Player firing this frame.

◆ Equals()

override bool GTA.Player.Equals ( object  obj)

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

Parameters
objThe object to check.
Returns
true if the obj is the same player as this Player; otherwise, false.

◆ GetHashCode()

override int GTA.Player.GetHashCode ( )

◆ IsTargeting()

bool GTA.Player.IsTargeting ( Entity  entity)

Determines whether this Player is targeting the specified Entity.

Parameters
entityThe Entity to check.
Returns
true if this Player is targeting the specified Entity; otherwise, false.

◆ operator InputArgument()

static implicit GTA.Player.operator InputArgument ( Player  value)
static

Converts a Player to a native input argument.

◆ operator!=()

static bool GTA.Player.operator!= ( Player  left,
Player  right 
)
static

Determines if two Players don't refer to the same player.

Parameters
leftThe left Player.
rightThe right Player.
Returns
true if left is not the same player as right ; otherwise, false.

◆ operator==()

static bool GTA.Player.operator== ( Player  left,
Player  right 
)
static

Determines if two Players refer to the same player.

Parameters
leftThe left Player.
rightThe right Player.
Returns
true if left is the same player as right ; otherwise, false.

◆ RefillSpecialAbility()

void GTA.Player.RefillSpecialAbility ( )

Refills the special ability for this Player.

◆ SetExplosiveAmmoThisFrame()

void GTA.Player.SetExplosiveAmmoThisFrame ( )

Makes this Player shoot explosive bullets this frame.

◆ SetExplosiveMeleeThisFrame()

void GTA.Player.SetExplosiveMeleeThisFrame ( )

Makes this Player have an explosive melee attack this frame.

◆ SetFireAmmoThisFrame()

void GTA.Player.SetFireAmmoThisFrame ( )

Makes this Player shoot fire bullets this frame.

◆ SetMayNotEnterAnyVehicleThisFrame()

void GTA.Player.SetMayNotEnterAnyVehicleThisFrame ( )

Blocks this Player from entering any Vehicle this frame.

◆ SetMayOnlyEnterThisVehicleThisFrame()

void GTA.Player.SetMayOnlyEnterThisVehicleThisFrame ( Vehicle  vehicle)

Only lets this Player enter a specific Vehicle this frame.

Parameters
vehicleThe Vehicle this Player is allowed to enter.

◆ SetRunSpeedMultThisFrame()

void GTA.Player.SetRunSpeedMultThisFrame ( float  mult)

Sets the run speed multiplier for this Player this frame.

Parameters
multThe factor - min: 0.0f, default: 1.0f, max: 1.499f.

◆ SetSuperJumpThisFrame()

void GTA.Player.SetSuperJumpThisFrame ( )

Lets this Player jump really high this frame.

◆ SetSwimSpeedMultThisFrame()

void GTA.Player.SetSwimSpeedMultThisFrame ( float  mult)

Sets the swim speed multiplier for this Player this frame.

Parameters
multThe factor - min: 0.0f, default: 1.0f, max: 1.499f.

Member Data Documentation

◆ IsAiming

bool GTA.Player.IsAiming => Function.Call<bool>(Hash.IS_PLAYER_FREE_AIMING, Handle)

Gets a value indicating whether this Player is aiming.

true if this Player is aiming; otherwise, false.

◆ IsAlive

bool GTA.Player.IsAlive => !IsDead

Gets a value indicating whether this Player is alive.

true if this Player is alive; otherwise, false.

◆ IsClimbing

bool GTA.Player.IsClimbing => Function.Call<bool>(Hash.IS_PLAYER_CLIMBING, Handle)

Gets a value indicating whether this Player is climbing.

true if this Player is climbing; otherwise, false.

◆ IsDead

bool GTA.Player.IsDead => Function.Call<bool>(Hash.IS_PLAYER_DEAD, Handle)

Gets a value indicating whether this Player is dead.

true if this Player is dead; otherwise, false.

◆ IsPlaying

bool GTA.Player.IsPlaying => Function.Call<bool>(Hash.IS_PLAYER_PLAYING, Handle)

Gets a value indicating whether this Player is playing.

true if this Player is playing; otherwise, false.

◆ IsPressingHorn

bool GTA.Player.IsPressingHorn => Function.Call<bool>(Hash.IS_PLAYER_PRESSING_HORN, Handle)

Gets a value indicating whether this Player is pressing a horn.

true if this Player is pressing a horn; otherwise, false.

◆ IsRidingTrain

bool GTA.Player.IsRidingTrain => Function.Call<bool>(Hash.IS_PLAYER_RIDING_TRAIN, Handle)

Gets a value indicating whether this Player is riding a train.

true if this Player is riding a train; otherwise, false.

◆ IsSpecialAbilityActive

bool GTA.Player.IsSpecialAbilityActive => Function.Call<bool>(Hash.IS_SPECIAL_ABILITY_ACTIVE, Handle)

Gets a value indicating whether this Player is using their special ability.

true if this Player is using their special ability; otherwise, false.

◆ IsTargetingAnything

bool GTA.Player.IsTargetingAnything => Function.Call<bool>(Hash.IS_PLAYER_TARGETTING_ANYTHING, Handle)

Gets a value indicating whether this Player is targeting anything.

true if this Player is targeting anything; otherwise, false.

◆ LastVehicle

Vehicle GTA.Player.LastVehicle => Function.Call<Vehicle>(Hash.GET_PLAYERS_LAST_VEHICLE)

Gets the last Vehicle this Player used.

returns null if the last vehicle doesn't exist.

◆ Name

string GTA.Player.Name => Function.Call<string>(Hash.GET_PLAYER_NAME, Handle)

Gets the Social Club name of this Player.

◆ RemainingSprintStamina

float GTA.Player.RemainingSprintStamina => Function.Call<float>(Hash.GET_PLAYER_SPRINT_STAMINA_REMAINING, Handle)

Gets how much sprint stamina this Player currently has.

◆ RemainingSprintTime

float GTA.Player.RemainingSprintTime => Function.Call<float>(Hash.GET_PLAYER_SPRINT_TIME_REMAINING, Handle)

Gets how long this Player can remain sprinting for.

◆ RemainingUnderwaterTime

float GTA.Player.RemainingUnderwaterTime => Function.Call<float>(Hash.GET_PLAYER_UNDERWATER_TIME_REMAINING, Handle)

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

Property Documentation

◆ CanControlCharacter

bool GTA.Player.CanControlCharacter
getset

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

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

◆ CanControlRagdoll

bool GTA.Player.CanControlRagdoll
set

Sets a value indicating whether this Player can control ragdoll.

true if this Player can control ragdoll; otherwise, false.

◆ CanLeaveParachuteSmokeTrail

bool GTA.Player.CanLeaveParachuteSmokeTrail
set

Sets a value indicating whether this Player can leave a parachute smoke trail.

true if this Player can leave a parachute smoke trail; otherwise, false.

◆ CanStartMission

bool GTA.Player.CanStartMission
get

Gets a value indicating whether this Player can start a mission.

true if this Player can start a mission; otherwise, false.

◆ CanUseCover

bool GTA.Player.CanUseCover
set

Sets a value indicating whether this Player can use cover.

true if this Player can use cover; otherwise, false.

◆ Character

Ped GTA.Player.Character
get

Gets the Ped this Player is controlling.

◆ DispatchsCops

bool GTA.Player.DispatchsCops
set

Sets a value indicating whether cops will be dispatched for this Player

true if cops will be dispatched; otherwise, false.

◆ ForcedAim

bool GTA.Player.ForcedAim
set

Sets a value indicating whether the player is forced to aim.

true to make the player always be aiming; otherwise, false.

◆ Handle

int GTA.Player.Handle
get

◆ IgnoredByEveryone

bool GTA.Player.IgnoredByEveryone
set

Sets a value indicating whether this Player is ignored by everyone.

true if this Player is ignored by everyone; otherwise, false.

◆ IgnoredByPolice

bool GTA.Player.IgnoredByPolice
set

Sets a value indicating whether this Player is ignored by the police.

true if this Player is ignored by the police; otherwise, false.

◆ IsInvincible

bool GTA.Player.IsInvincible
getset

Gets or sets a value indicating whether this Player is invincible.

true if this Player is invincible; otherwise, false.

◆ IsSpecialAbilityEnabled

bool GTA.Player.IsSpecialAbilityEnabled
getset

Gets or sets a value indicating whether this Player can use their special ability.

true if this Player can use their special ability; otherwise, false.

◆ MaxArmor

int GTA.Player.MaxArmor
getset

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

◆ Money

int GTA.Player.Money
getset

Gets or sets how much money this Player has.

Only works if current player is PedHash.Michael, PedHash.Franklin or PedHash.Trevor

◆ NativeValue

ulong GTA.Player.NativeValue
getset

◆ ParachuteSmokeTrailColor

Color GTA.Player.ParachuteSmokeTrailColor
getset

Gets or sets the color of the parachute smoke trail for this Player.

The color of the parachute smoke trail for this Player.

◆ PrimaryParachuteTint

ParachuteTint GTA.Player.PrimaryParachuteTint
getset

Gets or sets the primary parachute tint for this Player.

◆ ReserveParachuteTint

ParachuteTint GTA.Player.ReserveParachuteTint
getset

Gets or sets the reserve parachute tint for this Player.

◆ TargetedEntity

Entity GTA.Player.TargetedEntity
get

Gets the Entity this Player is targeting.

Returns
The Entity if this Player is targeting any Entity; otherwise, null

◆ WantedCenterPosition

Vector3 GTA.Player.WantedCenterPosition
getset

Gets or sets the wanted center position for this Player.

The place in world coordinates where the police think this Player is.

◆ WantedLevel

int GTA.Player.WantedLevel
getset

Gets or sets the wanted level for this Player.


The documentation for this class was generated from the following file: