ScriptHookVDotNet v2.4

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.

There is a new version out, please update to the latest version!

LATEST VERSION:

ScriptHookVDotNet v2.7

 

Installation
————

1. Make sure  you  have both  the  Microsoft .NET Framework 4.5.2 and the  Microsoft Visual C++ Redistributable Package for Visual Studio 2013 (x64) installed!
2. Download and install Script Hook V (including the ASI loader).
3. Download Script Hook V .NET and copy the ASI file into your game directory.
4. Done! You can now create C#/VB.NET scripts inside the “scripts” folder 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 ScriptHookV .NET DLL in the project properties and you are ready to go.

Changelog
———

Version 2.4:
– Added “Ped.Euphoria” and tons of euphoria helpers
– Added “PedGroup.Leader”, “PedGroup.GetMember”, “PedGroup.ToArray”, “PedGroup.ToList”, …
– Fixed returned native string values not handling unicode text correctly
– Switched back to Visual C++ 2013

Version 2.3:
– Added a few missing animal hashes to the “Native.PedHash” enum
– Added an “_0x[…]” entry for each named member of the “Native.Hash” enum to fix compatibility
with some older scripts
– Added “PedGroup” class
– Added “Ped.IsPerformingStealthKill”, “Ped.IsInCoverFacingLeft”, “Ped.IsGoingIntoCover”
– Added “Ped.IsInGroup”, “Ped.NeverLeavesGroup”
– Added “Ped.ShootRate”, “Ped.GetJacker” and “Ped.GetJackTarget”
– Added “Entity.HasGravity”, “Entity.IsOnlyDamagedByPlayer”, “Entity.LodDistance”
– Added “Vehicle.EngineCanDegrade”

Version 2.2:
– Added “UI.DrawTexture” overload which accepts an aspect ratio
– Added “Math.Matrix.FromArray”, “Math.Matrix.ToArray” and “Math.Matrix.Inverse” methods
– Added “Entity.HasCollision”, “Entity.MaxSpeed”, “Entity.IsBulletProof”, “Entity.FireProof”, etc.
– Added “Entity.IsInvincible” getter
– Changed “ScriptSettings.GetValue” to support any enum and types which inherit from IConvertible
– Fixed “Rope.Exists” and “Scaleform.Render2D” crash
– Fixed “TaskSequence.Close” crash and added overload to enable repeating

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

Version 2.0:
– Added script dependency system used via “RequireScript” attribute
– Added “Game.Language” property
– Added “World.CalculateTravelDistance”
– Added “Entity.Quaternion” and “Entity.PositionNoOffset”
– Added assembly information
– Added “World.GetStreeName” and “World.GetZoneName”
– Added missing “Besra” hash to “Native.VehicleHash” enum
– Added “Game.CurrentInputMode”
– Added FiringPattern to “Tasks.ShootAt”
– Changed settings implementation to not throw exceptions
– Changed “UI.DrawTexture” and added overload with center offset parameter
– Changed camera shaking to use “Camera.Shake” function instead of “ShakeType” property
– Renamed “Tasks.SlideToCoord” to “Tasks.SlideTo”
– Renamed “Vehicle.IsLeftHeadLightBroken” to “Vehicle.LeftHeadLightBroken” and added setter (same for the right headlight)
– Fixed native string arguments not handling unicode text correctly
– Fixed “Game.Pause” not pausing the game
– Fixed “ExplosionType” names
– Fixed “Game.GetUserInput” and added window titles
– Fixed “World.GetAllEntities/Vehicles/Props” etc. not actually returning everything
– Fixed “World.GetAllEntities” returning only props and including a lot of duplicates
– Fixed script settings not being accessible in the script constructor
– Fixed exception if null was passed to “Native.InputArgument”
– Fixed “UI.WorldToScreen” returning zero all the time
– Fixed “World.AddRope” causing the game to crash
– Updated to latest C++ Script Hook SDK
– Made menu implementation obsolete
– A lot more of additions and fixes to the scripting API
– …

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