Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Forum Support

    3. Suggestions

Script Hook V


Alexander Blade
 Share

Recommended Posts

Online content (like races, deathmatches, etc ...) aren't scripts, they're json downloaded from R* servers and then they're processed by the game.

Link to comment
Share on other sites

Alexander Blade

Script Hook V is updated , SDK is updated as well !

 

v1.0.617.1a
- added ability to access pickup pool
- added ability to get base object pointer using script handle

Link to comment
Share on other sites

Script Hook V is updated , SDK is updated as well !

v1.0.617.1a

- added ability to access pickup pool

- added ability to get base object pointer using script handle

Wow, now we can create scripts for pickups, I looked forward to adding this feature for a long time! Edited by kagikn
Link to comment
Share on other sites

InfamousSabre

Script Hook V is updated , SDK is updated as well !

 

v1.0.617.1a

- added ability to access pickup pool

- added ability to get base object pointer using script handle

WOOOOO! Thank you for adding this feature! :D I can finally let my Pickups script support the weapons hidden in the world. You're the best!

Link to comment
Share on other sites

 

I mean multiplayer stuff like heist and their setup, multiplayer yacht, etc.

:bored: am_mp_yacht

 

 

 

Online content (like races, deathmatches, etc ...) aren't scripts, they're json downloaded from R* servers and then they're processed by the game.

 

great! i didn't notice theses scripts

thx for your answer

Edited by 3dplanet
Link to comment
Share on other sites

runitsalpha

So basically, to use a steering wheel with GTA 5, you need to use x360ce which uses dinput8.dll

Therefore I cannot use normal scripthook mods with it because they have their own dinput8.dll
How do I use x360ce with the mods?
The link method with asiloader didn't work.
I also want to be able to use OpenIV
Link to comment
Share on other sites

Alexander Blade

You need to use dsound based asiloader

https://dl.dropboxusercontent.com/u/1237747/temp/dsound.dll

 

 

So basically, to use a steering wheel with GTA 5, you need to use x360ce which uses dinput8.dll

Therefore I cannot use normal scripthook mods with it because they have their own dinput8.dll
How do I use x360ce with the mods?
The link method with asiloader didn't work.
I also want to be able to use OpenIV

 

Link to comment
Share on other sites

Alex, What is this for?. Is it in single player.?

- added ability to access pickup pool

Link to comment
Share on other sites

how can i use that kind of native?

__573_$77FE3402004CD1B0(&l_6FC);

 

scripthook do not accept it

Link to comment
Share on other sites

how can i use that kind of native?

__573_$77FE3402004CD1B0(&l_6FC);

 

scripthook do not accept it

Example for this native:

invoke<Void>(0x77FE3402004CD1B0, "YOUR TEXT HERE");

or add this to natives.h

static void _0x77FE3402004CD1B0(char *p0) { invoke<Void>(0x77FE3402004CD1B0, p0); } // 0x77FE3402004CD1B0

 

 

Alex, What is this for?. Is it in single player.?

- added ability to access pickup pool

It's for mod creators:

#define DLLIMPORT __declspec(dllimport)// Get entities from internal pools// return value represents filled array elements count// can be called only in the same thread as nativesDLLIMPORT int worldGetAllObjects(int *arr, int arrSize);DLLIMPORT int worldGetAllPeds(int *arr, int arrSize);DLLIMPORT int worldGetAllPickups(int *arr, int arrSize);DLLIMPORT int worldGetAllVehicles(int *arr, int arrSize);

Example of how this can be used:

 

 

		if (showAllPickups)		{			Pickup pickups[1024];			int count = worldGetAllPickups(pickups, 1024);			std::vector<std::pair<float, float>> coordsOnScreen;			for (int i = 0; i < count; i++)			{				DWORD model = GET_ENTITY_MODEL(pickups[i]);				Vector3 v = GET_ENTITY_COORDS(pickups[i], TRUE);				float x, y;				if (_WORLD3D_TO_SCREEN2D(v.x, v.y, v.z, &x, &y))				{					Vector3 plv = GET_ENTITY_COORDS(PLAYER_PED_ID(), TRUE);					float dist = GET_DISTANCE_BETWEEN_COORDS(plv.x, plv.y, plv.z, v.x, v.y, v.z, TRUE);					if (dist <= 200.0)					{						bool bFitsOnscreen = true;						for (auto iter = coordsOnScreen.begin(); iter != coordsOnScreen.end(); iter++)						{							float textDist = sqrtf((iter->first - x)*(iter->first - x) + (iter->second - y)*(iter->second - y));							if (textDist < 0.05)							{								bFitsOnscreen = false;								break;							}						}						if (!bFitsOnscreen) continue;						coordsOnScreen.push_back({ x, y });						char buf[256];						sprintf_s(buf, "^\nDistance: %.0f m\nHash: 0x%08X\nType: ~o~PICKUP", dist, model);						SET_TEXT_FONT(0);						SET_TEXT_SCALE(0.2, 0.2);						SET_TEXT_COLOUR(255, 255, 255, 255);						SET_TEXT_WRAP(0.0, 1.0);						SET_TEXT_CENTRE(0);						SET_TEXT_DROPSHADOW(0, 0, 0, 0, 0);						SET_TEXT_EDGE(1, 0, 0, 0, 205);						_SET_TEXT_ENTRY("STRING");						_ADD_TEXT_COMPONENT_STRING(buf);						_DRAW_TEXT(x, y);						DRAW_RECT(x + 0.027f, y + 0.043f, 0.058f, 0.056f, 20, 20, 20, 150);					}				}			}		} 

 

 

Edited by Unknown_Modder
Link to comment
Share on other sites

runitsalpha

 

You need to use dsound based asiloader

https://dl.dropboxusercontent.com/u/1237747/temp/dsound.dll

 

 

So basically, to use a steering wheel with GTA 5, you need to use x360ce which uses dinput8.dll

Therefore I cannot use normal scripthook mods with it because they have their own dinput8.dll
How do I use x360ce with the mods?
The link method with asiloader didn't work.
I also want to be able to use OpenIV

 

 

 

I do not understand that.

Because the x360ce dinput.dll is required so I cannot use the one you sent without breaking the x360ce.

Link to comment
Share on other sites

Alexander Blade

Fully described here http://gtaforums.com/topic/788343-script-hook-v/?p=1067500740

 

 

 

You need to use dsound based asiloader

https://dl.dropboxusercontent.com/u/1237747/temp/dsound.dll

 

 

So basically, to use a steering wheel with GTA 5, you need to use x360ce which uses dinput8.dll

Therefore I cannot use normal scripthook mods with it because they have their own dinput8.dll
How do I use x360ce with the mods?
The link method with asiloader didn't work.
I also want to be able to use OpenIV

 

 

 

I do not understand that.

Because the x360ce dinput.dll is required so I cannot use the one you sent without breaking the x360ce.

 

Link to comment
Share on other sites

runitsalpha

Fully described here http://gtaforums.com/topic/788343-script-hook-v/?p=1067500740

 

 

 

You need to use dsound based asiloader

https://dl.dropboxusercontent.com/u/1237747/temp/dsound.dll

 

 

So basically, to use a steering wheel with GTA 5, you need to use x360ce which uses dinput8.dll

 

Therefore I cannot use normal scripthook mods with it because they have their own dinput8.dll

 

How do I use x360ce with the mods?

 

The link method with asiloader didn't work.

 

I also want to be able to use OpenIV

 

I do not understand that.

Because the x360ce dinput.dll is required so I cannot use the one you sent without breaking the x360ce.

 

I followed that post multiple times and it does not work with the mods and steering wheel.

 

It worked before the latest update but it doesn't anymore.

 

I do loads of modding so I did not do an error when following that post because it worked before.

 

Could you make it so scripthook can use a different dinput so I can use the x360ce one?

Link to comment
Share on other sites

Alexander Blade
runitsalpha

- make it work without x360ce

- delete dinput8.dll which comes with script hook and put provided dsound.dll instead

- check if it still works again , if yes then install x360ce

Link to comment
Share on other sites

runitsalpha

runitsalpha

- make it work without x360ce

- delete dinput8.dll which comes with script hook and put provided dsound.dll instead

- check if it still works again , if yes then install x360ce

 

 

Worked, awesome bro thanks.

I first installed x360ce to work with the wheel without mods.

 

Then put the scripthookv.dll and the dsound.dll into it and then openiv and everything works!

Link to comment
Share on other sites

On Intel HD 530 igpu script hook V is bugging the rain. When it rains the lakes on ground are pixelated. Without the script everything is alright. Maybe add a config file to change some settings, or enable disable things.

Link to comment
Share on other sites

Alexander Blade

What mods do you have installed ?

 

On Intel HD 530 igpu script hook V is bugging the rain. When it rains the lakes on ground are pixelated. Without the script everything is alright. Maybe add a config file to change some settings, or enable disable things.

Link to comment
Share on other sites

It is bugged without any mods ... From what I can see in logs I think is from a changed DX value ...

Edited by Vorin
Link to comment
Share on other sites

Alexander Blade

Show me your asiloader.log and ScriptHookV.log

 

It is bugged without any mods ... From what I can see in logs I think is from a changed DX value ...

Edited by Alexander Blade
Link to comment
Share on other sites

// GTA V SCRIPT HOOK (build Feb 25 2016, v1.0.617.1a)
// © Alexander Blade 2015-2016
[17:03:26] INIT: Started
[17:03:26] INIT: Success
[17:03:26] INIT: Registering script 'NativeTrainer.asi' (0x00007FFF53D0A510)
[17:03:39] INIT: Pool 1 extended
[17:03:39] INIT: Pool 2 extended
[17:03:39] INIT: Pool 3 extended
[17:03:39] INIT: Pool 4 extended
[17:03:44] INIT: GtaThread collection size 175
[17:03:44] INIT: wnd proc 0x00000000FFFF0B6D
[17:03:44] INIT: IDXGISwapChain 0x00007FFF6DD396B8 (0x00007FFF6DD2CDE0)
[17:03:44] INIT: IDXGISwapChain set
[17:03:44] INIT: DX init started
[17:03:44] INIT: DX feature level A100
[17:03:44] INIT: DX init succeeded
[17:04:05] CORE: Requesting thread creation
[17:04:05] CORE: Creating threads
[17:04:06] CORE: Started control thread, id 36 active 1
[17:04:06] CORE: Started thread 'NativeTrainer.asi' (0x00007FFF53D0A510), id 37 active 1
[17:04:06] CORE: Launching main() for 'NativeTrainer.asi' (0x00007FFF53D0A510), id 37

[17:19:03] UNINIT: Unregistering script 'NativeTrainer.asi'

 

I removed that NativeTrainer.asi and still the same ... only removing ScriptHookV.dll fixed the rain bug.

Edited by Vorin
Link to comment
Share on other sites

Alexander Blade

ScriptHookV.dll can't be loaded without .asi , meaning your bug has nothing to do with scripts .

 

// GTA V SCRIPT HOOK (build Feb 25 2016, v1.0.617.1a)
// © Alexander Blade 2015-2016
[17:03:26] INIT: Started
[17:03:26] INIT: Success
[17:03:26] INIT: Registering script 'NativeTrainer.asi' (0x00007FFF53D0A510)
[17:03:39] INIT: Pool 1 extended
[17:03:39] INIT: Pool 2 extended
[17:03:39] INIT: Pool 3 extended
[17:03:39] INIT: Pool 4 extended
[17:03:44] INIT: GtaThread collection size 175
[17:03:44] INIT: wnd proc 0x00000000FFFF0B6D
[17:03:44] INIT: IDXGISwapChain 0x00007FFF6DD396B8 (0x00007FFF6DD2CDE0)
[17:03:44] INIT: IDXGISwapChain set
[17:03:44] INIT: DX init started
[17:03:44] INIT: DX feature level A100
[17:03:44] INIT: DX init succeeded
[17:04:05] CORE: Requesting thread creation
[17:04:05] CORE: Creating threads
[17:04:06] CORE: Started control thread, id 36 active 1
[17:04:06] CORE: Started thread 'NativeTrainer.asi' (0x00007FFF53D0A510), id 37 active 1
[17:04:06] CORE: Launching main() for 'NativeTrainer.asi' (0x00007FFF53D0A510), id 37

[17:19:03] UNINIT: Unregistering script 'NativeTrainer.asi'

 

I removed that NativeTrainer.asi and still the same ... only removing ScriptHookV.dll fixed the rain bug.

Link to comment
Share on other sites

Ok, I tested again only with ScriptHookV.dll and removed all .asi and is not loading and the rain is ok, After adding any .asi the rain is bugging. Then after I pause the game and alt+tab and then go back in game with alt+tab rain bug disapear ... Is strange. I will disable any script for for now. Seems like something is wrong somewhere.

Edited by Vorin
Link to comment
Share on other sites

Alexander Blade

It's your gpu drivers and old game patch .

 

Ok, I tested again only with ScriptHookV.dll and removed all .asi and is not loading and the rain is ok, After adding any .asi the rain is bugging. Then after I pause the game and alt+tab and then go back in game with alt+tab rain bug disapear ... Is strange. I will disable any script for for now. Seems like something is wrong somewhere.

Link to comment
Share on other sites

franklingalaxy

Guys i have a Big Problem. I dont know its because i upgraded to Windows 10, or because the newest ScriptHook. The GAME crashes on Loading!!! ScriptHookDotNET is the ISSUE, but on Windows 7, the Game NEVER Crashed!!! NOT ONE SINGLE TIME! I think, ScriptHook v1.0.617.1a is the Problem, maybe its not Compatible with ScriptHookDotNET?ONWindows 7, í had ScriptHook v1.0.617.1, and NO ASI or NET Mods crashed the Game!! Please help me, i dont know why the game Crashes. Because the latest ScriptHook, or because Windows 10?

Edited by franklingalaxy
Link to comment
Share on other sites

Alexander Blade

Any logs ?

 

Guys i have a Big Problem. I dont know its because i upgraded to Windows 10, or because the newest ScriptHook. The GAME crashes on Loading!!! ScriptHookDotNET is the ISSUE, but on Windows 7, the Game NEVER Crashed!!! NOT ONE SINGLE TIME! I think, ScriptHook v1.0.617.1a is the Problem, maybe its not Compatible with ScriptHookDotNET?ONWindows 7, í had ScriptHook v1.0.617.1, and NO ASI or NET Mods crashed the Game!! Please help me, i dont know why the game Crashes. Because the latest ScriptHook, or because Windows 10?

Link to comment
Share on other sites

Guys i have a Big Problem. I dont know its because i upgraded to Windows 10, or because the newest ScriptHook. The GAME crashes on Loading!!! ScriptHookDotNET is the ISSUE, but on Windows 7, the Game NEVER Crashed!!! NOT ONE SINGLE TIME! I think, ScriptHook v1.0.617.1a is the Problem, maybe its not Compatible with ScriptHookDotNET?ONWindows 7, í had ScriptHook v1.0.617.1, and NO ASI or NET Mods crashed the Game!! Please help me, i dont know why the game Crashes. Because the latest ScriptHook, or because Windows 10?

 

Well, the first thing to is to move the scripthook and all files associated with out of the game's folder and see if you can run it normally.

Now I used to be able to play GTAV untill I upgraded to win10, and scripts or no scripts, the game does not run, even if it does load, it crashed after a few moments of playing. I have yet to figure out why.

Link to comment
Share on other sites

InfamousSabre

So it looks like WorldGetAllPickups does not actually return Pickups. Instead, it returns the Entities belonging to those Pickups. This makes no difference for what I need it for at the moment, but it does mean that natives that take a Pickup as a parameter will not work. for example, using anything returned by WorldGetAllPickups with OBJECT::DOES_PICKUP_EXIST will return 0.

Edited by InfamousSabre
Link to comment
Share on other sites

Alexander Blade

Yeah it returns pickup objects which exist in the game's world .

 

So it looks like WorldGetAllPickups does not actually return Pickups. Instead, it returns the Entities belonging to those Pickups. This makes no difference for what I need it for at the moment, but it does mean that natives that take a Pickup as a parameter will not work. for example, using anything returned by WorldGetAllPickups with OBJECT::DOES_PICKUP_EXIST will return 0.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 2 Users Currently Viewing
    1 member, 0 Anonymous, 1 Guest

    • c0d3x94
×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.