Skip to content

ScriptHookVDotNet v3.6.0

Latest
Compare
Choose a tag to compare
@crosire crosire released this 29 Dec 10:02
b5a25a8

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 and ShapeTestResult structs, and ShapeTestStatus and ShapeTestOptions
    • Made World.RaycastCapsule() as obsolete because the result may not be made in the same frame you call the method despite START_SHAPE_TEST_CAPSULE asynchronous. Use ShapeTest.StartTestCapsule() instead.
  • Added missing values to IntersectFlags and old incorrect value as obsolete
  • Added TaskInvoker.StartVehicleMission(), TaskInvoker.StartHeliMission(), TaskInvoker.StartPlaneMission(), and TaskInvoker.StartBoatMission(), Vehicle.GetActiveMissionType() methods, VehicleMissionType, BoatMissionFlags, and HeliMissionFlags enums
  • Added Vehicle.BringToHalt(), Vehicle.BringToHalt(), Vehicle.StopBringingToHalt() methods, and IsBeingBroughtToHalt property
  • Added Vehicle.IsParachuteDeployed, Vehicle.IsRocketBoostActive, Vehicle.StartParachuting(), and the setters of IsLeftIndicatorLightOn and IsRightIndicatorLightOn
  • Added Projectile.FromHandle()
  • Added EulerRotationOrder enum
  • Added the accurate documentation to Ped.AlwaysKeepTask and Ped.BlockPermanentEvents
    • Note that Ped.AlwaysKeepTask only take effect when you call Ped.MarkAsNoLongerNeeded() or set Ped.IsPersistent to false as previous versions.
  • Added new peds, vehicles, weapons, weapon components, and blip sprites to PedHash, VehicleHash, WeaponHash, WeaponComponentHash, and BlipSprite 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 to Control 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.
  • Added missing values to EnterVehicleFlags and EnterVehicleFlags and old incorrect values of EnterVehicleFlags as obsolete
  • Added missing value to Dead to Relationship 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 and WeaponComponent.LocalizedName faster.
  • Made Ped.LastVehicle more reliable. No longer returns null when the ped is going to a entry point (door) or opening the door, or returns a Vehicle 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