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.
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.dllfor reference) - Added support for spawning additional instances of a script (check out
Script.InstantiateScript, requires v3 API) - Added missing
headingparameter toTasks.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.WorldToScreenfrom 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.
