Readme

download Readme

of 2

description

Readme

Transcript of Readme

  • ; THIS ARCHIVE REDISTRIBUTION IS NOT ALLOWED, USE THE FOLLOWING LINK INSTEAD; http://www.dev-c.com/gtav/scripthookv/

    SCRIPT HOOK V SDK

    v1.0.393.2

    1. General conceptThe main concept is that your compiled script plugin depends only on ScriptHookV.dll,so when the game updates the only thing that user must do in order to make yourscript working again is to update script hook runtime (i.e. ScriptHookV.dll).

    2. Changesv1.0.393.2

    - added support of the latest patch 1.0.393.2v1.0.372.2a

    - added support of the latest patch 1.0.372.2- added direct x hook (see textures section of main.h)- added ability to access script global variables

    v1.0.350.2- added support of the latest patches 1.0.350.1/2

    this patch changes native function hashes, however it doesn't affect SDK

    because script hook performs hash-to-hash translation in runtime, so

    we will be using original PC hashes all the time.- added ability to reload scripts in runtime- added keyboard hook

    3. FeaturesRuntime asi script reloading:In order to use this feature you must create empty file called "ScriptHo

    okV.dev"in you game's main dir. While being ingame press CTRL + R, beep sound wi

    ll tellyou that all loaded scripts are fully unloaded and you can replace your

    *.asi,press CTRL + R again to load the scripts, triple beep will indicate thateverything is loaded. You must have the call to scriptUnregister() SDK f

    unc inyour plugin's DllMain in order reloading feature to work correctly,

    seeNativeTrainer\main.cpp for more details.Script reloading can be applied only to the *.asi plugins which were loa

    dednormally, i.e. using asi loader when the game was started. Script reload

    ing isperformed by script hook and not by asi loader.

    Keyboard hook:You must use keyboard hook instead of GetKeyState/GetAsyncKeyState WIN A

    PI funcs,because it guarantees that all key presses will be handled correctly. Ke

    yboardhandler must be registered/unregistered in DllMain of your plugin using

    SDK funcskeyboardHandlerRegister/keyboardHandlerUnregister, see NativeTrainer\mai

    n.cpp for

  • more details. Example of using keyboard hook can be found in NativeTrainer\keyboard.cp

    p, thetrainer script is using keyboard.cpp provided functions, your projects s

    hould dothe same.

    DirectX hook:Provides an ability to use custom textures, see createTexture/drawTextur

    e funcsin main.h, full description is provided there as well, you can call them

    only inthe same thread as natives. If you need to draw something using DX API directly then you need to use

    callbackfor IDXGISwapChain::Present method. Callback must be registered/unregist

    ered inDllMain of your plugin using presentCallbackRegister/presentCallbackUnre

    gister.Example of using textures can be found in NativeSpeedo\script.cpp file.

    4. CompilationAll samples here are being compiled using MSVC 2013, you may also use MSVC 2010with the same *.vcxproj files but this will require changing the platfrom toolsetin project settings.

    5. Native declarationsYou can always get the newest version of natives.h from NATIVEDB:http://www.dev-c.com/nativedb/

    6. Terms of use- You are allowed to use this SDK only for writing scripts intended to work offline.- You are not allowed to redistribute ScriptHookV.dll with your script plugins,

    provide the link to the latest runtime instead:http://www.dev-c.com/gtav/scripthookv/

    7. SamplesThere are two samples included - NativeTrainer and NativeSpeedo, for more detailssee NativeTrainer\script.cpp and NativeSpeedo\script.cpp.

    (C) Alexander Blade 2015