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.PedComponent Class Reference
Inheritance diagram for GTA.PedComponent:
GTA.IPedVariation

Public Member Functions

bool SetVariation (int index, int textureIndex=0)
 
bool IsVariationValid (int index, int textureIndex=0)
 
override string ToString ()
 

Public Attributes

string Name => Type.ToString()
 
int Count => Function.Call<int>(Hash.GET_NUMBER_OF_PED_DRAWABLE_VARIATIONS, _ped.Handle, Type)
 
bool HasVariations => Count > 1
 
bool HasTextureVariations => Count > 0 && TextureCount > 1
 
bool HasAnyVariations => HasVariations || HasTextureVariations
 

Properties

PedComponentType Type [get]
 
int Index [get, set]
 
int TextureCount [get]
 
int TextureIndex [get, set]
 
- Properties inherited from GTA.IPedVariation
int Count [get]
 
int Index [get, set]
 
int TextureCount [get]
 
int TextureIndex [get, set]
 
string Name [get]
 
bool HasVariations [get]
 
bool HasTextureVariations [get]
 
bool HasAnyVariations [get]
 

Member Function Documentation

◆ IsVariationValid()

bool GTA.PedComponent.IsVariationValid ( int  index,
int  textureIndex = 0 
)

Implements GTA.IPedVariation.

◆ SetVariation()

bool GTA.PedComponent.SetVariation ( int  index,
int  textureIndex = 0 
)

Implements GTA.IPedVariation.

◆ ToString()

override string GTA.PedComponent.ToString ( )

Member Data Documentation

◆ Count

int GTA.PedComponent.Count => Function.Call<int>(Hash.GET_NUMBER_OF_PED_DRAWABLE_VARIATIONS, _ped.Handle, Type)

◆ HasAnyVariations

bool GTA.PedComponent.HasAnyVariations => HasVariations || HasTextureVariations

◆ HasTextureVariations

bool GTA.PedComponent.HasTextureVariations => Count > 0 && TextureCount > 1

◆ HasVariations

bool GTA.PedComponent.HasVariations => Count > 1

◆ Name

string GTA.PedComponent.Name => Type.ToString()

Property Documentation

◆ Index

int GTA.PedComponent.Index
getset

◆ TextureCount

int GTA.PedComponent.TextureCount
get

◆ TextureIndex

int GTA.PedComponent.TextureIndex
getset

◆ Type

PedComponentType GTA.PedComponent.Type
get

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