ScriptHookVDotNET

Script Hook V .NET

This is an ASI plugin for Grand Theft Auto V, based on the C++ ScriptHook by Alexander Blade, which allows running scripts written in any .NET language ingame. It’s full source code is hosted on Github, development  is community-driven and  open to everybody, so contributions are warmly welcomed: https://github.com/crosire/scripthookvdotnet.

This version is outdated, please use the latest release!

NEWEST VERSION:

ScriptHookVDotNet v2.6

 

PREVIOUS VERSIONS:

ScriptHookVDotNet v2.5 and ScriptHookVDotNet v2.5.1

ScriptHookVDotNet v2.4

Installation
————

1. Make  sure  you  have  both  the  Microsoft .NET Framework 4.5 and the  Microsoft  Visual  C++
Redistributable Package for Visual Studio 2013 (x64) installed.
2. Download and install ScriptHookV (including the ASI loader).
3. Download ScriptHookVDotNET below and copy the ASI file into your game directory.
4. Start creating C#/VB.NET scripts inside “/scripts/” in your game directory!

Writing Scripts
—————

Either use notepad to  edit source code  scripts directly or  use Visual Studio to compile  them to
assemblies. Going  down  the Visual  Studio way  has the  advantage of  syntax  highlighting,  code
completion and intellisense. Just create a C# or VisualBasic class library project, add a reference
to the ScriptHookVDotNET DLL in the project properties and you are ready to go.

Changelog
———

 

Version 2.3
– Added some more entity methods, a new class for handling ped groups and some missing animal hashes to the “Native.PedHash”
enum.

Version 2.2
– Fixed a few possible crashes, including task sequences and added more entity methods.

Version 2.1
– Changed “UI.DrawTexture” to work as previously again and fixed the now obsolete menu implementation.

Version 2.0
– Added a lot of new features to the scripting API, like access to globals and fixed all known bugs to date.

Version 1.1:
– Added native memory access, providing some new functions and properties:
– Added “Game.Version”, “World.GetNearbyPeds/Vehicles” overloads which accept a position
– Added “Vehicle.Steering”, “Vehicle.Acceleration”, “Vehicle.CurrentRPM”, …
– Added “UI.DrawTexture” which allows custom texture drawing using the new ScriptHook Direct3D hook
– Fixed “World.GetNextPositionOnStreet”
– Fixed “Vehicle.PlaceOnNextStreet” heading
– …

Version 1.0:
– Updated “Native.Hash” enumeration with new information
– A lot of additions and fixes to the scripting API

Version 0.9:
– Added “Vehicle.SoundHorn”, “Vehicle.IsTireBurst” and “Vehicle.FixTire”
– Added “Ped.WetnessHeight”, “Ped.ResetVisibleDamage” and “Ped.ResetBloodDamage”
– Added “Entity.isTouching” and “Entity.HasBeenDamagedBy”
– Fixed “NullReferenceException” when calling natives from inside the script constructor

Version 0.8:
– Reworked script management backend
– Reworked “PedHash” enum
– Added Vehicle NeonLightsColor property and SetNeonLightsOn method
– Added “Ped.DrivingSpeed”, “Ped.MaxDrivingSpeed” and “Ped.DrivingStyle”
– Added “Ped.Weapons”, “WeapongCollection” and “Weapon” classes
– Added “Vector2.RandomXY”, “Vector3.Around”, “Vector3.RandomXY” and “Vector3.RandomXYZ”
– Added “Vector2.DistanceTo” and “Vector3.DistanceTo”
– Added “Vehicle.PlaceOnGround”, “Vehicle.PlaceOnNextStreet” and “Vehicle.CreatePedOnSeat”
– Added Entity attach and range methods
– Added “Blip” class and implementation
– Added “Prop” class
– Added “Camera” and “GameplayCamera” class and implementation
– Added “Entity.Delete”
– Added “World.CreateObject”
– Added getter to “Ped.CanRagdoll” and fixed setter
– Added “Tasks.PlayAnimation” and animation handling
– Added “Tasks.ReactAndFlee” and “Tasks.SkyDive”
– Added “TaskSequence” implementation
– Added “Player.Money” property
– Added simple UI menu rendering
– Moved “Script.IsKeyPressed” to “Game.IsKeyPressed”
– Renamed “Entity.ID” to “Entity.Handle”
– Fixed crash after loading savegame
– Fixed “Entity.IsInAir”
– Fixed crash if unable to write to log file
– Fixed “Vehicle.LightsOn”
– Fixed logged exceptions not containing line and file information

Version 0.6:
– Added “Vehicle.GetPedOnSeat”
– Added notifications and subtitles
– Added “World.AddExplosion”
– Added “Game.GetUserInput”
– Added “Player.IsFreeAiming”
– Added “Tasks.Cower”
– Added “Game.PlaySound”
– Added “Vehicle.GetMod”, “Vehicle.PrimaryColor”, …
– Added “Vehicle.OpenDoor”, “Vehicle.CloseDoor”, “Vehicle.FixWindow”, “Vehicle.RollDownWindow”, …

Version 0.5:
– Added three new example scripts
– Added model hash enumerations
– Added first UI classes and a basic UI component system
– Added ped tasks for AI scripting
– Added equality operators to scripting objects
– Added “World.GetClosestVehicle”
– Changed keyboard handling to use new handler from Script Hook SDK
– Fixed “Vehicle.EngineRunning” not working when attempting to switch it on
– Fixed crash when using native functions inside keyboard event handlers
– Fixed random crash after a certain amount of time passed
– Fixed “Ped.CurrentVehicle” returning an invalid  vehicle object instead of null  when ped is not
sitting in any vehicle

Version 0.4:
– Updated for game version 1.0.350.
– Added “World.GetNearbyPeds” and “World.GetNearbyVehicles”
– Added DisplayName property to “Vehicle”
– Moved logging into separate class
– Fixed Player/Vehicle type error in “Native.GetResult”
– Fixed issue preventing more than one script to be loaded per assembly

Version 0.3:
– Added “World.CreatePed” and “World.CreateVehicle” to instantiate entities
– Added a lot of new members to the “Entity”, “Ped” and “Vehicle” classes
– Added some additional members to the “Model” class
– Added “Wait” function to script class
– Added option to pass and return scripting objects to/from native functions
– Added “Vector2” class
– Added INI file reader, see “Script.Settings”
– Moved “Vector3”, “Matrix” and “Quaternion” classes into separate “Math” namespace
– Changed assembly file loading so the files are no longer blocked once loaded
– Changed “Ped.CurrentVehicle” to use “GET_VEHICLE_PED_IS_IN” instead of “GET_VEHICLE_PED_IS_USING”
– Fixed “Game.RadarZoom” not being of type int

Version 0.2:
– Added unrestricted permissions to script appdomain
– Changed project to target framework version 4.5 instead of 4.0 again
– Changed native function calling to use hash enumeration instead of strings
– Changed script domain implementation to support multiple instances for different source directories

Version 0.1:
– First public release

Download Button




  • Add Comment