Releases: scripthookvdotnet/scripthookvdotnet
ScriptHookVDotNet v3.6.0
Use the nightly version nightly.89 or later instead of this version v3.6.0 if you are using the game version v1.0.3258.0 or later, because v3.6.0 and v3.5.1 have a compatibility issue with these game versions, which crashes the game when you press F4 to open the console or instant reload! Check out the Nightly Builds to download nightly builds.
You can now run scripts in the main thread rather than a decicated thread by setting NoScriptThread
of ScriptAttributes
to true
. Note that Script.Yield()
and Script.Wait()
are not available and instead throw an exception when NoScriptThread
is set to true
(even via some scripting API such as World.CreateVehicle()
without having the model loaded in advance).
NativeHashes
enums are updated (v3 API only) as some leaked source revealed all the exact native function names that exist in 1.0.2699. Compiled scripts do not take effect since enums are embedded as constants when directly used. See f2edb0e for the changes.
Changelog
- Added
ShapeTest
class,ShapeTestHandle
andShapeTestResult
structs, andShapeTestStatus
andShapeTestOptions
- Made
World.RaycastCapsule()
as obsolete because the result may not be made in the same frame you call the method despiteSTART_SHAPE_TEST_CAPSULE
asynchronous. UseShapeTest.StartTestCapsule()
instead.
- Made
- Added missing values to
IntersectFlags
and old incorrect value as obsolete - Added
TaskInvoker.StartVehicleMission()
,TaskInvoker.StartHeliMission()
,TaskInvoker.StartPlaneMission()
, andTaskInvoker.StartBoatMission()
,Vehicle.GetActiveMissionType()
methods,VehicleMissionType
,BoatMissionFlags
, andHeliMissionFlags
enums - Added
Vehicle.BringToHalt()
,Vehicle.BringToHalt()
,Vehicle.StopBringingToHalt()
methods, andIsBeingBroughtToHalt
property - Added
Vehicle.IsParachuteDeployed
,Vehicle.IsRocketBoostActive
,Vehicle.StartParachuting()
, and the setters ofIsLeftIndicatorLightOn
andIsRightIndicatorLightOn
- Added
Projectile.FromHandle()
- Added
EulerRotationOrder
enum - Added the accurate documentation to
Ped.AlwaysKeepTask
andPed.BlockPermanentEvents
- Note that
Ped.AlwaysKeepTask
only take effect when you callPed.MarkAsNoLongerNeeded()
or setPed.IsPersistent
tofalse
as previous versions.
- Note that
- Added new peds, vehicles, weapons, weapon components, and blip sprites to
PedHash
,VehicleHash
,WeaponHash
,WeaponComponentHash
, andBlipSprite
enums - Added missing values to
AnimationFlags
and documentations for all values and made 2 old values as obsolete - Added missing values to
Font
of v3 API and documentations for all values - Added missing values to
VehicleDrivingFlags
and old incorrect values as obsolete - Added missing value for
INPUT_VEH_FLY_BOOST
toControl
enum- For developers, if you use
VehicleParachute
,VehicleBikeWings
,VehicleFlyBombBay
,VehicleFlyCounter
,VehicleFlyTransform
,QuadLocoReverse
,RespawnFaster
,HudmarkerSelect
, you should compile against v3.6.0 (v2.11.6.0 for v2 API) or later versions of SHVDN since enum values are compiled as constant values.
- For developers, if you use
- Added missing values to
EnterVehicleFlags
andEnterVehicleFlags
and old incorrect values ofEnterVehicleFlags
as obsolete - Added missing value to
Dead
toRelationship
and documentations for most values to tell script developers accurate names - Added missing values to
VehicleWeaponHash
- Fixed
WeaponComponentCollection
(Ped.Weapon.Components
) crashing the game on the collection accessed in 1.0.2802.0 or later - Fixed
World.CreateParticleEffect
not working with entity - Fixed
Ped.CanBeKnockedOffBike
- Fixed the setter of
Vehicle.RadioStation
- Fixed the
Entity.MaxHealthFloat
not working correctly in 1.0.2699.16 or later - Fixed the countermeasure for vehicle despawning not working in 1.0.2802.0 or later
- Fixed exception when attempting to initialize a custom script instance
- Made
Weapon.LocalizedName
andWeaponComponent.LocalizedName
faster. - Made
Ped.LastVehicle
more reliable. No longer returnsnull
when the ped is going to a entry point (door) or opening the door, or returns aVehicle
instance that are for the vehicle the ped is getting in. - Updated
Formation
and old values as obsolete - Updated
ParachuteLandingType
and old values as obsolete
ScriptHookVDotNet v3.5.1
v3.5.0 is skipped due to versioning issues. Almost all the changes are done in v3.5.0.
Changelog
- Added a new overload of
Entity.IsInAngledArea()
,World.DrawBoxForAngledArea()
,World.IsPointInAngledArea()
, andDrawBoxFlags
- The signature of existing overload of
Entity.IsInAngledArea()
is kept for existing script compatibilities, including the parameter names.
- The signature of existing overload of
- Added
HandlingData.BoostMaxSpeed
,HandlingData.BrakeBiasFront
,HandlingData.DownForceModifier
,HandlingData.DriveBiasFront
,HandlingData.InitialDragCoefficient
,HandlingData.InitialDriveMaxFlatVelocity
,HandlingData.LowSpeedTractionLossMultiplier
,HandlingData.PopUpLightRotation
,HandlingData.RocketBoostCapacity
andHandlingData.TractionCurveLateral
- Added
Projectile.OwnerEntity
- Made
Projectile.Owner
obsolete as the projectile owner can be other physical entities such as vehicles. The property will be marked as obsolete only in v3 api and the return value ofProjectile.Owner
will beEntity
in next major versions.
- Made
- Added new peds, vehicles, weapons, weapon components, and blip sprites to
PedHash
,VehicleHash
,WeaponHash
,WeaponComponentHash
, andBlipSprite
enums - Added additional shortcut to remove all the right characters of the cursor with
Ctrl + K
in console - Added additional shortcut to remove all the left characters of the cursor with
Ctrl + U
in console - Added ability to show/log version-less SHVDN warning multiple times in console and the log file
- This is the only change that is done in v3.5.1 and v3.5.0 does not have.
- Clarified
HandlingData
gets data from or sets data to theCHandlingData
instance as is in the documentation comments, and thus some properties ofHandlingData
may differ from the values inhandling.meta
- This is done for less confusion and existing script compatibilities.
- Fixed
Ped.CurrentVehicle
in v3 API returning the last vehicle instead of the current vehicle in 1.0.2699.0- This issue is resolved to keep the existing contract and script compatibilities although it seems Rockstar Games are responsible for this issue. See #1079 for more info.
- Fixed
World.GetAllBlips()
andWorld.GetNearbyBlips()
not getting all blips andBlip.MemoryAddress
returningIntPtr.Zero
in 1.0.2699.0 or later versions - Fixed
HandlingDataTractionLossMultiplier
not getting/setting the correct value. The property got/setted the value forfLowSpeedTractionLossMult
before. - Removed the models of
astron2
cyclone2
arbitergt
ignus2
s95
from the return values ofVehicle.GetAllModels()
,Vehicle.GetAllModelsOfClass()
,Vehicle.GetAllModelsOfClass()
, andVehicle.GetAllModelsOfType()
- The game will crash if the game try to spawn vehicles with one of the 5 models because of the stub vehicle models.
ScriptHookVDotNet v3.4.0
Changelog
- Added
InteriorProxy
(which some native functions for interior use),AnimatedBuilding
,Building
, andInteriorInstance
.- Also added the following properties and methods for
InteriorProxy
,AnimatedBuilding
,Building
, andInteriorInstance
toWorld
class:- count and capacity properties
- The methods to get handles
- The
World.GetClosest()
overloads.
- Also added the following properties and methods for
- Added
Entity.FragmentGroupCount
,Entity.IsFragmentObject
,Entity.DetachFragmentPart()
,EntityBone.FragmentGroupIndex
,World.EntityColliderCount
, andEntity.EntityColliderCapacity
- Added
Ped.SeeingRange
,Ped.HearingRange
,Ped.VisualFieldMinAngle
,Ped.VisualFieldMaxAngle
,Ped.VisualFieldMinElevationAngle
,Ped.VisualFieldMaxElevationAngle
,Ped.VisualFieldPeripheralRange
, andPed.VisualFieldCenterAngle
- Added
Ped.CauseOfDeath
,Ped.TimeOfDeath
,Ped.ClearKillerRecord()
,Ped.ClearCauseOfDeathRecord()
, andPed.ClearTimeOfDeathRecord()
- Added the getter of
Ped.FiringPattern
- Added
Game.FindPattern()
- Added
Quaternion.LookRotation()
- Added new peds, vehicles, weapons, weapon components, radio station, blip sprites, and explosion type to
PedHash
,VehicleHash
,WeaponHash
,WeaponComponentHash
,RadioStation
,BlipSprite
, andExplosionType
enums - Added the documentation note for the incorrectly named parameter
offset
toEntity.ApplyForce()
andEntity.ApplyForceRelative()
- Added the documentation note for the non-working parameter
isAmmoLoaded
toWeaponCollection.Give()
- Fixed
Stop()
method of helper classes ofEuphoria
not working - Fixed
Start()
method of helper classes ofEuphoria
not working properly when peds are ragdolled. Now the method can apply simultaneously just like in v2.10.10 or earlier versions.- Also made the
Start()
method working when peds are ragdolled but not bySET_PED_TO_RAGDOLL
, which does not work in v2.10.10 or earlier versions.
- Also made the
- Fixed
Vehicle.PassengerCount
not counting as intended in v1.0.2545.0 (or later versions) due to addition to parameters and implementation changes - Fixed
WeaponCollection.Give()
not selecting the weapon ifequipNow
is set totrue
and the ped did not have the weapon - Fixed cursor of console not moving properly when pasting clipboard content
- Fixed not showing dll names referencing version-less SHVDN in console
- Made
WeaponCollection.Give()
select the weapon only ifequipNow
is set totrue
when the ped had the weapon
ScriptHookVDotNet v3.3.2
Changelog
- Fixed
VehicleWheel.IsTouchingSurface
crashing the game in some cases - Fixed scripts using subclasses that indirectly inherit
GTA.Script
not showing the correct API version in the log file and console log (although this did not affect determining the API version)
ScriptHookVDotNet v3.3.1
Despite the minor version difference, this version is basically the same as v3.2.0 but with one bug fix, additional enum values for WeaponComponentHash
and WeaponAttachmentPoint
, and additional properties for missing enum values of WeaponAttachmentPoint
. v3.3.0 is skipped due to versioning issues.
Changelog
- Fixed
NaturalMotion.Message
not properly sendingVector3
messages - Added missing weapon component and weapon attachment point hashes to
WeaponComponentHash
andWeaponAttachmentPoint
- Added
WeaponComponentCollection.GetBarrelComponent()
,WeaponComponentCollection.BarrelVariationsCount
,WeaponComponentCollection.GetSuppressorOrMuzzleBrakeComponent()
,WeaponComponentCollection.SuppressorAndMuzzleBrakeVariationsCount
,WeaponComponentCollection.GetGunRootComponent()
, andWeaponComponentCollection.GunRootVariationsCount
- Made
WeaponComponentCollection.GetLuxuryFinishComponent()
obsolete
- Made
ScriptHookVDotNet v3.2.0
NativeHashes
enums are updated (v3 API only). Compiled scripts do not take effect since enums are embedded as constants when directly used. See f0ae67b for the changes.
Changelog
-
Fixed
NaturalMotion.Euphoria
. Now required memory offsets for the class are retrieved using memory patterns. -
Added
Native.Function.Call
overloads with 0 to 16 normalInputArgument
parameters. These overloads are provided mainly for performance.- This is also added in v2 API mainly for the API itself to improve performance, but you can use these overloads in scripts.
-
Added
GameVersionNotSupportedException
- This will be thrown if the properties or methods that are not supported in the game version you are playing (some certain getter properties or methods will return the default value instead).
-
Added
EntityDamageRecord
struct,EntityDamageRecordCollection
class, andEntity.DamageRecords
-
Added
Projectile
class,World.GetAllProjectiles()
,World.GetNearbyProjectiles()
,World.GetClosestProjectile()
,World.ProjectileCount
, andWorld.ProjectileCapacity
-
Added
MeasurementSystem
enum andGame.MeasurementSystem
-
Added
PlayerTargetingMode
enum andGame.PlayerTargetingMode
-
Added
Game.IsVibrationEnabled
andGame.GetProfileSetting()
-
Added
EntityPopulationType
enums andEntity.PopulationType
-
Added the setter of
Entity.RotationVelocity
, andEntity.WorldRotationVelocity
-
Added
Model.IsAnimalPed
,Model.IsFemalePed
,Model.IsGangPed
,Model.IsHumanPed
,Model.IsMalePed
,Model.IsMotorcycle
, andModel.IsSubmarine
, -
Added the getter of
Ped.CanBeTargetted
-
Added
Ped.SetIsPersistentNoClearTask()
andPed.GetAllLoadedModelsAppropriateForAmbientPeds()
-
Added
Player.LockedOnEntity
property -
Added
VehicleType
enum,Vehicle.Type
,Vehicle.IsRegularAutomobile
,Vehicle.IsAmphibiousAutomobile
,Vehicle.IsAutomobile
,Vehicle.IsRegularQuadBike
,Vehicle.IsAmphibiousQuadBike
,Vehicle.IsQuadBike
,Vehicle.IsAmphibious
,Vehicle.IsTrailer
,Vehicle.IsPlane
,Vehicle.IsHelicopter
,Vehicle.IsBlimp
,Vehicle.IsMotorcycle
,Vehicle.IsBicycle
,Vehicle.IsBike
,Vehicle.IsBoat
,Vehicle.IsTrain
, andVehicle.IsSubmarine
- These properties are added mainly for performance. Accessing these properties will be faster than accessing the equivalent properties of
Model
viaVehicle.Model
.
- These properties are added mainly for performance. Accessing these properties will be faster than accessing the equivalent properties of
-
Added
Vehicle.IsConsideredDestroyed
,Vehicle.GetModelMakeName()
,Vehicle.GetModelType()
,Vehicle.GetAllModelsOfType()
, andVehicle.GetAllLoadedModelsAppropriateForAmbientVehicles()
-
Added
VehicleWheelBoneId
enum,VehicleWheel.MemoryAddress
,VehicleWheel.BoneId
,VehicleWheel.LastContactPosition
,VehicleWheel.SteeringLimitMultiplier
,VehicleWheel.Temperature
,VehicleWheel.IsTouchingSurface
,VehicleWheel.IsTireOnFire
,VehicleWheel.IsSteeringWheel
,VehicleWheel.IsDrivingWheel
,VehicleWheel.IsPunctured
,VehicleWheel.IsBursted
,VehicleWheel.Health
,VehicleWheel.TireHealth
,VehicleWheel.Fix()
with abool
overload,VehicleWheel.Puncture()
, andVehicleWheel.Burst()
-
Added
Weapon.GetAllWeaponHashesForHumanPeds()
,WeaponComponent.GetAllHashes()
WeaponAsset.IsValidAsWeaponHash
-
Added
World.IsClockPaused
andWorld.MillisecondsPerGameMinute
-
Added a new overload for
World.CreateRandomPed()
-
Added
World.CreateRandomVehicle()
with a new signature- Removed the old signature of
CreateRandomVehicle
since it did not work at all in all the versions of SHVDN
- Removed the old signature of
-
Added and
PlayerTargetingMode
enums -
Added
Screen.AreScreenKillEffectsEnabled
,Screen.IsHelpTextDisplayed
,Screen.ShowSubtitle()
with additional parameters, andScreen.ClearHelpText()
-
Added new or missing peds, vehicles, weapons, weapon components, radio stations, blip sprites, explosion types, checkpoint icon type, radio station, and vehicle color to
PedHash
,VehicleHash
,WeaponHash
,WeaponComponentHash
,RadioStation
,BlipSprite
,ExplosionType
,CheckpointIcon
,RadioStation
, andVehicleColor
enums -
Added the correct enum names to
RagdollType
and mark the old and incorrect enum names ofRagdollType
as obsolete -
Added additional shortcut to remove the right character of the cursor with
Ctrl + D
in console -
Added additional shortcut to remove the left character of the cursor with
Ctrl + H
in console -
Added the ability to transpose two characters around the cursor with
Ctrl + T
in console -
Added the ability to keep console history after reloading scripts
-
Fixed
Blip.DisplayType
,Blip.CategoryType
,Blip.Priority
,Blip.NumberLabel
,Blip.Rotation
,Blip.RotationFloat
,Blip.ScaleY
returning a incorrect value in v1.0.877.1 or earlier versions -
Fixed
Model.IsBlimp
,Model.IsSubmarineCar
,Model.IsTrailer
returning a incorrect value in v1.0.877.1 or earlier versions -
Fixed All of the properties of
Checkpoint
andCheckpoint.Exists()
crashing the game on access -
Fixed
Weapon.GetDisplayNameFromHash
returningWT_INVALID
when some of the weapon hashes that are present in the stock game is present -
Fixed
Weapon.GetDisplayNameFromHash
returningWT_INVALID
when some of the weapon hashes that are present in the stock game is present -
Fixed throwing
NullReferenceException
whenWeaponCompoent.Active
,WeaponCompoent.DisplayName
,WeaponCompoent.LocalizedName
is accessed via the instance for the invalid component. Now returnsfalse
or the empty string if accessed via the instance for the invalid component. -
Made
Entity.MarkAsNoLongerNeeded()
in v3 API not setting the handle to zero (now behaves in the same way as that in v2 API)Entity.Delete()
in v3 API still sets the handle to zero, so be aware! If you need to remove entities from collecitions such asDictionary
, remove them from these collection before deting entities from the game.
-
Made getting entities handles with the methods in
World
class faster -
Made pushing
string
s to native functions faster -
Made
Entity.FromHandle
andEntity.EntityType
values faster -
Made
World.WaypointBlip
andWorld.WaypointPosition
get values faster -
Made
WeaponComponent.AttachmentPoint
get value faster -
Made
Weapon.Components
load all compatible weapon components faster -
Made
Screen.ShowHelpTextThisFrame()
show texts only one frame -
Made all of the ped and vehicle properties that directly access to memory more future-proof by using memory patterns, preventing some scripts from easily not working by game updates
ScriptHookVDotNet v3.1.0
You can now specify scripting API version to be used for source scripts via file name. For example, SHVDN runs "script.3.cs" using the v3 API.
Changelog
- Added
Blip.MemoryAddress
,Blip.DisplayType
,Blip.CategoryType
,Blip.SecondaryColor
,Blip.DisplayNameHash
,Blip.RotationFloat
,Blip.ScaleX
,Blip.ScaleY
,Blip.FlashInterval
,Blip.FlashTimeLeft
,Blip.ShowsDollarSign
,Blip.ShowsHeadingIndicator
,Blip.ShowsOutlineIndicator
,Blip.ShowsFriendIndicator
,Blip.ShowsCrewIndicator
,Blip.IsHiddenOnLegend
,Blip.GetAppropriateName()
,Blip.ResetName()
,BlipCategoryType
,BlipDisplayType
, andWorld.GetNearbyBlips()
- Added the getters of
Blip.Priority
,Blip.NumberLabel
,Blip.Name
,Blip.Rotation
, andBlip.ShowRoute
- Added
Model.IsBig
,Model.HasBulletProofGlass
,Model.HasLowriderHydraulics
,Model.HasDonkHydraulics
,Model.HasParachute
,Model.HasRocketBoost
,Model.AllowRappel
,Model.CanStandOnTop
, andModel.CanJump
- Added
Vehicle.IsBigVehicle
,Vehicle.IsBus
,Vehicle.IsDonk
,Vehicle.IsElectricVehicle
,Vehicle.IsEmergencyVehicle
,Vehicle.IsLawEnforcementVehicle
,Vehicle.IsLowrider
,Vehicle.IsOffRoadVehicle
,Vehicle.IsSubmarineCar
,Vehicle.IsTank
, andVehicle.IsVan
- Added
World.PedCount
,World.PropCount
,World.PickupObjectCount
,World.VehicleCapacity
,World.PedCapacity
,World.PropCapacity
, andWorld.PickupObjectCapacity
- Added
Entity.IsWaterCannonProof
,Entity.IsSteamProof
,Entity.IsSmokeProof
- Added the property
Vehicle.HandlingData
- Added
Ped.GetAllModels()
andWeapon.GetAllModels()
- Added new peds, vehicles, weapons, radio stations, blip sprites, and explosion types to
PedHash
,VehicleHash
,WeaponHash
,RadioStation
,BlipSprite
, andExplosionType
enums - Added
OpenWheel
toVehicleClass
enum - Added missing control values to
Control
enum - Added missing firing pattern values to
FiringPattern
enum - Added missing flag values to
LeaveVehicleFlags
enum - Added more accurate values to
VehicleLockStatus
and made confusing values obsolete - Added countermeasure against removing vehicles added in Arena War or later updates (Lowriders or later updates in 1.0.505.2 to 1.0.1493.1), using memory patterns
- Fixed
Vehicle.OilVolume
andVehicle.PetrolTankVolume
returning the wrong value - Fixed the getter of
Game.TimeScale
not working in v1.0.2060.0 or higher - Fixed some properties and methods of
EntityBone
not working in v1.0.2189.0 or higher - Fixed
Game.GetUserInput()
throwing exception for certain window titles - Fixed
Ped.SeatIndex
not necessarily returning the correct value - Fixed
Audio.PlaySoundAt
andAudio.PlaySoundFrontend
not correctly tying the returning sound id - Fixed
Notification.Show()
,Screen.ShowSubtitle()
,Screen.ShowHelpTextThisFrame()
, the setter ofTextElement.Caption
,TextElement.GetStringWidth()
, andTextElement.GetScaledStringWidth()
throwing exception when the text argument isnull
(now work as if the text argument is the empty string) - Fixed
PedHash.Corpse01UMY
using the wrong value - Improved performance of methods for getting entities in
World
andWorld.GetAllBlips()
(orWorld.GetActiveBlips()
in the v2 API) - Made
World.CreateRandomVehicle()
return immediately (the method does not work currently) - Made methods for creating entities in
World
returnnull
when the entity pool is full in order to prevent the game from crashing - Made some vehicle properties more future-proof by using memory patterns, preventing some scripts from easily not working by game updates
- Updated
GameVersion
enum to contain newer versions
ScriptHookVDotNet v3.0.4
Changelog
- Added new vehicles to
VehicleHash
enum - Added overload to
Screen.ShowHelpTextThisFrame()
to make beeping optional - Added
WeaponCollection.Give()
overload which accepts a weapon name - Added setter for
Ped.VehicleWeapon
- Added
VehicleWindowTint.Invalid
enum value for when the native returns "-1" - Fixed
Ped.Kill()
- Fixed wrong date being set and returned by
World.CurrentDate
- Fixed setter for
Vehicle.SteeringAngle
using radians instead of degrees - Fixed file version information for ScriptHookVDotNet2.dll
ScriptHookVDotNet v3.0.3
Changelog
- Fixed missing multiply operator in quaternion class for v2 API
- Fixed
IsPersistent
andMarkAsNoLongerNeeded()
using the wrong natives - Updated
GameVersion
enum to contain newer versions
ScriptHookVDotNet v3.0.2
Changelog
- Fixed "//0" being added to INI value when saving script settings
- Fixed keyboard state not updating correctly when pressing modifier keys (like Ctrl or Shift)
- Fixed scripts that were installed to subdirectories of "scripts" not loading
This should never have worked, but did in v2 because of an oversight. Unfortunately some scripts rely on this, so enabling that behavior again.