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