Skip to content

@crosire crosire released this Dec 30, 2020

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, and World.GetNearbyBlips()
  • Added the getters of Blip.Priority, Blip.NumberLabel, Blip.Name, Blip.Rotation, and Blip.ShowRoute
  • Added Model.IsBig, Model.HasBulletProofGlass, Model.HasLowriderHydraulics, Model.HasDonkHydraulics, Model.HasParachute, Model.HasRocketBoost, Model.AllowRappel, Model.CanStandOnTop, and Model.CanJump
  • Added Vehicle.IsBigVehicle, Vehicle.IsBus, Vehicle.IsDonk, Vehicle.IsElectricVehicle, Vehicle.IsEmergencyVehicle, Vehicle.IsLawEnforcementVehicle, Vehicle.IsLowrider, Vehicle.IsOffRoadVehicle, Vehicle.IsSubmarineCar, Vehicle.IsTank, and Vehicle.IsVan
  • Added World.PedCount, World.PropCount, World.PickupObjectCount, World.VehicleCapacity, World.PedCapacity, World.PropCapacity, and World.PickupObjectCapacity
  • Added Entity.IsWaterCannonProof, Entity.IsSteamProof, Entity.IsSmokeProof
  • Added the property Vehicle.HandlingData
  • Added Ped.GetAllModels() and Weapon.GetAllModels()
  • Added new peds, vehicles, weapons, radio stations, blip sprites, and explosion types to PedHash, VehicleHash, WeaponHash, RadioStation,BlipSprite, and ExplosionType enums
  • Added OpenWheel to VehicleClass 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 and Vehicle.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 and Audio.PlaySoundFrontend not correctly tying the returning sound id
  • Fixed Notification.Show(), Screen.ShowSubtitle(), Screen.ShowHelpTextThisFrame(), the setter of TextElement.Caption, TextElement.GetStringWidth(), and TextElement.GetScaledStringWidth() throwing exception when the text argument is null (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 and World.GetAllBlips() (or World.GetActiveBlips() in the v2 API)
  • Made World.CreateRandomVehicle() return immediately (the method does not work currently)
  • Made methods for creating entities in World return null 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
25 people reacted
Assets 3

@crosire crosire released this Jul 3, 2020

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
Assets 3

@crosire crosire released this Feb 17, 2020

Changelog

  • Fixed missing multiply operator in quaternion class for v2 API
  • Fixed IsPersistent and MarkAsNoLongerNeeded() using the wrong natives
  • Updated GameVersion enum to contain newer versions
1 person reacted
Assets 3

@crosire crosire released this Oct 15, 2019

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.
Assets 3

@crosire crosire released this Oct 14, 2019

You can now change the default key used to toggle the in-game console. Reloading via a key press in addition to the Reload() command in the console is possible again too.
To modify those shortcut keys, edit ScriptHookVDotNet.ini in the game folder (e.g.):

ReloadKey=Insert
ConsoleKey=F4

Changelog

  • Added reload key again and support for changing the console toggle key
  • Fixed some scripts failing to load with a TypeLoadException
  • Fixed characters going missing when rendering strings greater than 198 characters
Assets 3

@crosire crosire released this Oct 12, 2019

It's time to finally release the major v3 update. This includes a new in-game console with C# expression support, a cleaned up scripting API and support for using scripts written against different scripting API versions side by side (so you can continue to load old v2 scripts, but also new ones using the v3 API). All of this works automatically, just drop all scripts into the "scripts" directory as before and ScriptHookVDotNet will do the magic behind the scenes. This update also includes the v2.10.11 update to v2.

The console is opened with the F4 key. Open it and enter Help() for more information on how to use it. It has full access to the scripting API, so is a powerful tool for all kinds of purposes (e.g. type V.Repair() to repair your current vehicle). There is a command history, use the arrow up/down keys to go through it. Page up/down can be used to go through the log history.

Console Screenshot

Changelog

  • Added in-game console
  • Added in-game notification when a script crashes
  • Added new scripting API with lots of new features, like particles, advanced notifications, ... (see ScriptHookVDotNet3.dll for reference)
  • Added support for spawning additional instances of a script (check out Script.InstantiateScript, requires v3 API)
  • Added missing heading parameter to Tasks.StartScenario
  • Fixed Weather.Halloween
  • Fixed potential crash when calling Entity.Persistent = false
  • Fixed World.GetNearbyPeds() and similar crashing the game when called with a model
  • Removed support for loading script assemblies from a subdirectory inside "scripts"
  • Removed GTA.UI.WorldToScreen from v2 (impossible to implement due to how the new loader works)
    Scripts using this method won't work unfortunately. They need to be compiled against the v3 API.
Assets 3

@crosire crosire released this Aug 6, 2019

Starting from this version, required .NET Framework version has been changed to 4.8, and required Visual C++ redistributable version has been changed to 2019. Make sure you have these versions installed!!
Changing required versions basically don't affect existing scripts, because scripts run on the version of .NET Framework 4 you installed (e.g. if you have .NET Framework 4.8, all scripts will be run on .NET Framework 4.8, regardness of target Framework). See #839 for more information.

Changelog

  • Use memory patterns for some vehicle properties to make the properties future-proof, preventing some scripts from easily not working by game updates
  • Fixed returning true whose internal value is not 1 from Native.Function.Call in v2.10.9. This can be a problem and can make scripts not working properly, especially when C# version of scripts is lower than 8.0 and switch statements. are used.
  • Fixed the possible problem where some native calls doesn't work properly
  • Fixed Vehicle.Acceleration returning a wrong value in 1.0.1604.0 or later
  • Fixed the getter of Vehicle.LandingGear
  • Fixed Scaleform.CallFunction for char arguments
  • Updated VehicleWheelType to add missing enums
  • Updated GameVersion enum to contain newer versions
Assets 3

@crosire crosire released this Jan 27, 2019

Changelog

  • Improved performance of the loader and native calls
  • Fixed memory offsets that were changed in 1.0.1604.0
  • Fixed some methods such as UI.Notify not showing entire texts when texts contains any non-ASCII characters and the lengths in UTF-8 are more than 99 bytes
  • Fixed Native.Function.Call throwing a NullReferenceException when the method calls from a thread other than the main thread of script and nativeCall fails. Now the method throws InvalidOperationException in that situation.
  • Extended the acceptable range of Vehicle.HighGear in 1.0.1604.0 to between 0 and 10 (inclusive), since the maximum supported vehicle gear is changed to 10 in 1.0.1604.0.
  • Updated enums with ped, vehicle hashes, weapons, and weapon components
  • Updated BlipColor and BlipSprite to add missing enums
  • Fixed the StrangersAndFreaks and ArmoredTruck values of BlipSprite
  • Added summaries to some enums in BlipColor and BlipSprite (most of them are wrongly named)
  • Updated GameVersion enum to contain newer versions
Assets 3

@crosire crosire released this Nov 3, 2018

Changelog

  • Updated GameVersion enum to contain newer versions
Assets 3

@crosire crosire released this Sep 11, 2018

Changelog

  • Fixed Game.RadioStation not working properly when the value is RadioStation.Off
  • Added Unknown to RadioStation enum. When the Game.RadioStation getter can't find the proper enum, this will be returned.
  • Updated enums with vehicle hashes and radio stations
  • Updated GameVersion enum to contain newer versions
Assets 3