Struct Model
Inherited Members
Namespace: GTA
Assembly: ScriptHookVDotNet3.dll
Syntax
public struct Model : IEquatable<Model>, INativeValue
Constructors
| Improve this Doc View SourceModel(PedHash)
Declaration
public Model(PedHash hash)
Parameters
Type | Name | Description |
---|---|---|
PedHash | hash |
Model(VehicleHash)
Declaration
public Model(VehicleHash hash)
Parameters
Type | Name | Description |
---|---|---|
VehicleHash | hash |
Model(WeaponHash)
Declaration
public Model(WeaponHash hash)
Parameters
Type | Name | Description |
---|---|---|
WeaponHash | hash |
Model(Int32)
Declaration
public Model(int hash)
Parameters
Type | Name | Description |
---|---|---|
Int32 | hash |
Model(String)
Declaration
public Model(string name)
Parameters
Type | Name | Description |
---|---|---|
String | name |
Properties
| Improve this Doc View SourceDimensions
Gets the dimensions of this Model.
Declaration
public readonly (Vector3 rearBottomLeft, Vector3 frontTopRight) Dimensions { get; }
Property Value
Type | Description |
---|---|
(T1, T2)<Vector3, Vector3> | rearBottomLeft is the minimum dimensions, which contains the rear bottom left relative offset from the origin of the model, frontTopRight is the maximum dimensions, which contains the front top right relative offset from the origin of the model. |
Hash
Gets the hash for this Model.
Declaration
public int Hash { readonly get; }
Property Value
Type | Description |
---|---|
Int32 |
IsAmphibiousCar
Gets a value indicating whether this Model is an amphibious car.
Declaration
public readonly bool IsAmphibiousCar { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is an amphibious car; otherwise, false. |
IsAmphibiousQuadBike
Gets a value indicating whether this Model is an amphibious quad bike.
Declaration
public readonly bool IsAmphibiousQuadBike { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is an amphibious quad bike; otherwise, false. |
IsAmphibiousVehicle
Gets a value indicating whether this Model is an amphibious vehicle.
Declaration
public readonly bool IsAmphibiousVehicle { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is an amphibious vehicle; otherwise, false. |
IsAnimalPed
Gets a value indicating whether this Model is a animal pedestrian.
Declaration
public readonly bool IsAnimalPed { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is a animal pedestrian; otherwise, false. |
IsBicycle
Gets a value indicating whether this Model is a bicycle.
Declaration
public readonly bool IsBicycle { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is a bicycle; otherwise, false. |
IsBigVehicle
Gets a value indicating whether this Model is a big vehicle whose vehicle flag has "FLAG_BIG".
Declaration
public readonly bool IsBigVehicle { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is a big vehicle; otherwise, false. |
IsBike
Gets a value indicating whether this Model is a bike (either a motorcycle or a bicycle).
Declaration
public readonly bool IsBike { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is a bike; otherwise, false. |
IsBlimp
Gets a value indicating whether this Model is a blimp.
Declaration
public readonly bool IsBlimp { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is a blimp; otherwise, false. |
IsBoat
Gets a value indicating whether this Model is a boat.
Declaration
public readonly bool IsBoat { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is a boat; otherwise, false. |
IsBus
Gets a value indicating whether this Model is an emergency vehicle.
Declaration
public readonly bool IsBus { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is an emergency vehicle; otherwise, false. |
IsCar
Gets a value indicating whether this Model is a car.
Declaration
public readonly bool IsCar { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is a car; otherwise, false. |
IsCargobob
Gets a value indicating whether this Model is a cargobob.
Declaration
public readonly bool IsCargobob { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is a cargobob; otherwise, false. |
IsCollisionLoaded
Gets a value indicating whether the collision for this Model is loaded.
Declaration
public readonly bool IsCollisionLoaded { get; }
Property Value
Type | Description |
---|---|
Boolean | true if the collision is loaded; otherwise, false. |
IsDonk
Gets a value indicating whether this Model is a donk car.
Declaration
public readonly bool IsDonk { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is a donk car; otherwise, false. |
IsElectricVehicle
Gets a value indicating whether this Model is an electric vehicle.
Declaration
public readonly bool IsElectricVehicle { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is an electric vehicle; otherwise, false. |
IsEmergencyVehicle
Gets a value indicating whether this Model is an emergency vehicle.
Declaration
public readonly bool IsEmergencyVehicle { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is an emergency vehicle; otherwise, false. |
IsFemalePed
Gets a value indicating whether this Model is a female pedestrian.
Declaration
public readonly bool IsFemalePed { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is a female pedestrian; otherwise, false. |
IsGangPed
Gets a value indicating whether this Model is a gangster pedestrian.
Declaration
public readonly bool IsGangPed { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is a gangster pedestrian; otherwise, false. |
IsHelicopter
Gets a value indicating whether this Model is a helicopter.
Declaration
public readonly bool IsHelicopter { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is a helicopter; otherwise, false. |
IsHumanPed
Gets a value indicating whether this Model is a human pedestrian.
Declaration
public readonly bool IsHumanPed { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is a human pedestrian; otherwise, false. |
IsInCdImage
Gets a value indicating whether this Model is in the CD image.
Declaration
public readonly bool IsInCdImage { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is in the CD image; otherwise, false. |
IsJetSki
Gets a value indicating whether this Model is a jet ski.
Declaration
public readonly bool IsJetSki { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is a jet ski; otherwise, false. |
IsLawEnforcementVehicle
Gets a value indicating whether this Model is a law enforcement vehicle.
Declaration
public readonly bool IsLawEnforcementVehicle { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is a law enforcement vehicle; otherwise, false. |
IsLoaded
Gets a value indicating whether this Model is loaded so it can be spawned.
Declaration
public readonly bool IsLoaded { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is loaded; otherwise, false. |
IsLowrider
Gets a value indicating whether this Model is a regular lowrider.
Declaration
public readonly bool IsLowrider { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is a regular lowrider; otherwise, false. |
IsMalePed
Gets a value indicating whether this Model is a male pedestrian.
Without modding pedpersonality.ymt
, returns true if the Hash is one of the animal hashes.
Declaration
public readonly bool IsMalePed { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is a male pedestrian; otherwise, false. |
IsMlo
Gets a value indicating whether this Model is a movable interior loader (also known as MLO or MILO).
Declaration
public readonly bool IsMlo { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is a car; otherwise, false. |
IsMotorcycle
Gets a value indicating whether this Model is a motorcycle.
Declaration
public readonly bool IsMotorcycle { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is a motorcycle; otherwise, false. |
IsOffRoadVehicle
Gets a value indicating whether this Model is an off-road vehicle.
Declaration
public readonly bool IsOffRoadVehicle { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is an off-road vehicle; otherwise, false. |
IsPed
Gets a value indicating whether this Model is a pedestrian.
Declaration
public readonly bool IsPed { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is a pedestrian; otherwise, false. |
IsPlane
Gets a value indicating whether this Model is a plane.
Declaration
public readonly bool IsPlane { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is a plane; otherwise, false. |
IsProp
Gets a value indicating whether this Model is a prop.
Declaration
public readonly bool IsProp { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is a prop; otherwise, false. |
IsQuadBike
Gets a value indicating whether this Model is a quad bike.
Declaration
public readonly bool IsQuadBike { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is a quad bike; otherwise, false. |
IsSubmarine
Gets a value indicating whether this Model is a submarine.
Declaration
public readonly bool IsSubmarine { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is an submarine; otherwise, false. |
IsSubmarineCar
Gets a value indicating whether this Model is a submarine car.
Declaration
public readonly bool IsSubmarineCar { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is an submarine car; otherwise, false. |
IsTank
Gets a value indicating whether this Model is a tank.
Declaration
public readonly bool IsTank { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is a tank; otherwise, false. |
IsTrailer
Gets a value indicating whether this Model is a trailer.
Declaration
public readonly bool IsTrailer { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is a trailer; otherwise, false. |
IsTrain
Gets a value indicating whether this Model is a train.
Declaration
public readonly bool IsTrain { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is a train; otherwise, false. |
IsValid
Gets if this Model is valid.
Declaration
public readonly bool IsValid { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is valid; otherwise, false. |
IsVan
Gets a value indicating whether this Model is a van.
Declaration
public readonly bool IsVan { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is a van; otherwise, false. |
IsVehicle
Gets a value indicating whether this Model is a vehicle.
Declaration
public readonly bool IsVehicle { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Model is a vehicle; otherwise, false. |
NativeValue
Gets the native representation of this Model.
Declaration
public ulong NativeValue { get; set; }
Property Value
Type | Description |
---|---|
UInt64 |
Methods
| Improve this Doc View SourceEquals(Model)
Declaration
public bool Equals(Model model)
Parameters
Type | Name | Description |
---|---|---|
Model | model |
Returns
Type | Description |
---|---|
Boolean |
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Overrides
| Improve this Doc View SourceGetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
| Improve this Doc View SourceMarkAsNoLongerNeeded()
Tells the game we have finished using this Model and it can be freed from memory.
Declaration
public void MarkAsNoLongerNeeded()
Request()
Attempts to load this Model into memory.
Declaration
public void Request()
Request(Int32)
Attempts to load this Model into memory for a given period of time.
Declaration
public bool Request(int timeout)
Parameters
Type | Name | Description |
---|---|---|
Int32 | timeout | The time (in milliseconds) before giving up trying to load this Model. |
Returns
Type | Description |
---|---|
Boolean | true if this Model is loaded; otherwise, false. |
RequestCollision()
Attempts to load this Model's collision into memory.
Declaration
public void RequestCollision()
RequestCollision(Int32)
Attempts to load this Model's collision into memory for a given period of time.
Declaration
public bool RequestCollision(int timeout)
Parameters
Type | Name | Description |
---|---|---|
Int32 | timeout | The time (in milliseconds) before giving up trying to load this Model. |
Returns
Type | Description |
---|---|
Boolean | true if this Model's collision is loaded; otherwise, false. |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |
Overrides
Operators
| Improve this Doc View SourceEquality(Model, Model)
Declaration
public static bool operator ==(Model left, Model right)
Parameters
Type | Name | Description |
---|---|---|
Model | left | |
Model | right |
Returns
Type | Description |
---|---|
Boolean |
Implicit(Model to InputArgument)
Declaration
public static implicit operator InputArgument(Model value)
Parameters
Type | Name | Description |
---|---|---|
Model | value |
Returns
Type | Description |
---|---|
InputArgument |
Implicit(Model to PedHash)
Declaration
public static implicit operator PedHash(Model source)
Parameters
Type | Name | Description |
---|---|---|
Model | source |
Returns
Type | Description |
---|---|
PedHash |
Implicit(Model to VehicleHash)
Declaration
public static implicit operator VehicleHash(Model source)
Parameters
Type | Name | Description |
---|---|---|
Model | source |
Returns
Type | Description |
---|---|
VehicleHash |
Implicit(Model to WeaponHash)
Declaration
public static implicit operator WeaponHash(Model source)
Parameters
Type | Name | Description |
---|---|---|
Model | source |
Returns
Type | Description |
---|---|
WeaponHash |
Implicit(Model to Int32)
Declaration
public static implicit operator int (Model source)
Parameters
Type | Name | Description |
---|---|---|
Model | source |
Returns
Type | Description |
---|---|
Int32 |
Implicit(PedHash to Model)
Declaration
public static implicit operator Model(PedHash source)
Parameters
Type | Name | Description |
---|---|---|
PedHash | source |
Returns
Type | Description |
---|---|
Model |
Implicit(VehicleHash to Model)
Declaration
public static implicit operator Model(VehicleHash source)
Parameters
Type | Name | Description |
---|---|---|
VehicleHash | source |
Returns
Type | Description |
---|---|
Model |
Implicit(WeaponHash to Model)
Declaration
public static implicit operator Model(WeaponHash source)
Parameters
Type | Name | Description |
---|---|---|
WeaponHash | source |
Returns
Type | Description |
---|---|
Model |
Implicit(Int32 to Model)
Declaration
public static implicit operator Model(int source)
Parameters
Type | Name | Description |
---|---|---|
Int32 | source |
Returns
Type | Description |
---|---|
Model |
Implicit(String to Model)
Declaration
public static implicit operator Model(string source)
Parameters
Type | Name | Description |
---|---|---|
String | source |
Returns
Type | Description |
---|---|
Model |
Inequality(Model, Model)
Declaration
public static bool operator !=(Model left, Model right)
Parameters
Type | Name | Description |
---|---|---|
Model | left | |
Model | right |
Returns
Type | Description |
---|---|
Boolean |