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

Uninstall GTAV and remove all files enitrely, then install game again.

HHnErXC.png


Link to comment
Share on other sites

1) VS2015 installed
2) Source code for GTALua and scripthookv obtained
3) Build -> Error: error LNK2001: unresolved external symbol for scripthookv elements.
4) Realize that it must be referring to the ScripthookV library
And then, i start guessing..
5) Copy scripthookv.dll into thirdparty\scripthookv\lib\ directory
6) Right-click -> Add -> Existing item -> pick scripthookv.dll
7) Build -> Build successful, but hahaha , we updated your GTALua directory , overwriting native_call_layouts.ini and natives.ini
8) And here we are, diffing backup vs new vs menu code to find all the undefined natives.

Progress!

Edited by zh0ul
Link to comment
Share on other sites

There's a alternative to re-install the game. Go to program manager > GTA V

 

Right click chose repair.

I have done it several times and works great.

Link to comment
Share on other sites

 

1) VS2015 installed

2) Source code for GTALua and scripthookv obtained

3) Build -> Error: error LNK2001: unresolved external symbol for scripthookv elements.

4) Realize that it must be referring to the ScripthookV library

And then, i start guessing..

5) Copy scripthookv.dll into thirdparty\scripthookv\lib\ directory

6) Right-click -> Add -> Existing item -> pick scripthookv.dll

7) Build -> Build successful, but hahaha , we updated your GTALua directory , overwriting native_call_layouts.ini and natives.ini

8) And here we are, diffing backup vs new vs menu code to find all the undefined natives.

Progress!

 

 

Great News: Compiling GTALua with new scripthook was simple.

Horrible News: Still the same issue while melee near other peds.

The debugger grants us only the offending address and access violation message.

Unhandled exception at 0x00007FF7C7458DDA in GTA5.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF

Back in Win XP, I was used to similar messages meaning the process has run out of addressable memory.

So the problem in total:

- After updating GTA and scripthookv

- After removing all mods except for GTALua.asi

- After disabling my own mod menu so the only thing that loads is scripthook/GTALua base.

- After downloading GTALua source, ScripthookV SDK, and Visual Studio 2015

- After compiling GTALua.asi successfully.

- After re-doing the natives so that none were pointing improperly (probably?) or named oddly.

- When melee at thin air, no issues.

- When melee at vehicles, no issues.

- When melee at/near any ped (and if the melee attack would have connected) I crash.

- 100% reproducible (happens every time, no fail) with *only* ScripthookV and GTALua loaded (no other mods or sub-mods).

 

Did I hear someone say something about Euphoria? Isnt that the 'ragdoll system' ? Could this issue be related?

 

*Edit* Does anyone know when this native changed from inputs of ib , to inputs of CMemblock and int?!?! What reason?(speed?)

 

< natives.ENTITY.GET_ENTITY_COORDS=ib)V
> natives.ENTITY.GET_ENTITY_COORDS=mi)V

To add to this mystery:

 

static Vector3 GET_ENTITY_COORDS(Entity entity, BOOL alive) { return invoke<Vector3>(0x3FEF770D40960D5A, entity, alive); } // 0x3FEF770D40960D5A 0x1647F1CB

 

Unless I'm missing something, It appears its inputs should still be an integer (non CMemblock style) and a boolean. But the green line above is what comes out after building project.

 

I've updated natives.h from dev-c.com , yet still the same result, both in my initial issue and ^^ GET_ENTITY_COORDS being oddly set to =mi)V

 

Edited by zh0ul
Link to comment
Share on other sites

Like wow Scoob.. Mystery Solved

 

GET_ENTITY_COORDS=ib)V

 

When incorrectly using scripthookv.dll , instead of scripthookv.lib to build the project, 'interesting' effects occur.

 

Worry not about me... I'll talk myself through this issue eventually.. o/

Link to comment
Share on other sites

unknown modder

 

 

1) VS2015 installed

2) Source code for GTALua and scripthookv obtained

3) Build -> Error: error LNK2001: unresolved external symbol for scripthookv elements.

4) Realize that it must be referring to the ScripthookV library

And then, i start guessing..

5) Copy scripthookv.dll into thirdparty\scripthookv\lib\ directory

6) Right-click -> Add -> Existing item -> pick scripthookv.dll

7) Build -> Build successful, but hahaha , we updated your GTALua directory , overwriting native_call_layouts.ini and natives.ini

8) And here we are, diffing backup vs new vs menu code to find all the undefined natives.

Progress!

 

 

Great News: Compiling GTALua with new scripthook was simple.

Horrible News: Still the same issue while melee near other peds.

The debugger grants us only the offending address and access violation message.

Unhandled exception at 0x00007FF7C7458DDA in GTA5.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF

Back in Win XP, I was used to similar messages meaning the process has run out of addressable memory.

So the problem in total:

- After updating GTA and scripthookv

- After removing all mods except for GTALua.asi

- After disabling my own mod menu so the only thing that loads is scripthook/GTALua base.

- After downloading GTALua source, ScripthookV SDK, and Visual Studio 2015

- After compiling GTALua.asi successfully.

- After re-doing the natives so that none were pointing improperly (probably?) or named oddly.

- When melee at thin air, no issues.

- When melee at vehicles, no issues.

- When melee at/near any ped (and if the melee attack would have connected) I crash.

- 100% reproducible (happens every time, no fail) with *only* ScripthookV and GTALua loaded (no other mods or sub-mods).

 

Did I hear someone say something about Euphoria? Isnt that the 'ragdoll system' ? Could this issue be related?

 

*Edit* Does anyone know when this native changed from inputs of ib , to inputs of CMemblock and int?!?! What reason?(speed?)

 

< natives.ENTITY.GET_ENTITY_COORDS=ib)V
> natives.ENTITY.GET_ENTITY_COORDS=mi)V

To add to this mystery:

 

static Vector3 GET_ENTITY_COORDS(Entity entity, BOOL alive) { return invoke<Vector3>(0x3FEF770D40960D5A, entity, alive); } // 0x3FEF770D40960D5A 0x1647F1CB

 

Unless I'm missing something, It appears its inputs should still be an integer (non CMemblock style) and a boolean. But the green line above is what comes out after building project.

 

I've updated natives.h from dev-c.com , yet still the same result, both in my initial issue and ^^ GET_ENTITY_COORDS being oddly set to =mi)V

 

 

Euphoria is an issue with SHVDN, not ScriptHookV or GTALua

Link to comment
Share on other sites

Uninstall GTAV and remove all files enitrely, then install game again.

This!

 

The problem I ran into was Steam had already updated my game somehow so what I thought was my pre Biker DLC GTAV folder was already updated.

Luckily I had a backup folder of the previous version build on my hard drive.

So I uninstalled GTAV and reinstalled it with the latest build.

Then copied and pasted the following folders from my backup pre Bike DLC folder

 

Updates

Installers

Mods

Scripts

X64

Along with all the other place in directory file mods

like the previous version scripthook that worked before the dlc update

 

Started my game and waaahhlaaa previous version before stupid scripthook update rpf breaking bike dlc.

 

Like I said......If you do not have a previous backup of those folders and directory files including pre Biker DLC scripthook...you are pretty much screwed.

Edited by rastakilla
Link to comment
Share on other sites

 

Uninstall GTAV and remove all files enitrely, then install game again.

This!

 

The problem I ran into was Steam had already updated my game somehow so what I thought was my pre Biker DLC GTAV folder was already updated.

Luckily I had a backup folder of the previous version build on my hard drive.

So I uninstalled GTAV and reinstalled it with the latest build.

Then copied and pasted the following folders from my backup pre Bike DLC folder

 

Updates

Installers

Mods

Scripts

X64

Along with all the other place in directory file mods

like the previous version scripthook that worked before the dlc update

 

Started my game and waaahhlaaa previous version before stupid scripthook update rpf breaking bike dlc.

 

Like I said......If you do not have a previous backup of those folders and directory files including pre Biker DLC scripthook...you are pretty much screwed.

 

 

Say it until you are blue in the face...*then* Check out this page. http://techfaqs.net/games/patches-for-gta-5-online/

Link to comment
Share on other sites

 

 

Uninstall GTAV and remove all files enitrely, then install game again.

This!

 

The problem I ran into was Steam had already updated my game somehow so what I thought was my pre Biker DLC GTAV folder was already updated.

Luckily I had a backup folder of the previous version build on my hard drive.

So I uninstalled GTAV and reinstalled it with the latest build.

Then copied and pasted the following folders from my backup pre Bike DLC folder

 

Updates

Installers

Mods

Scripts

X64

Along with all the other place in directory file mods

like the previous version scripthook that worked before the dlc update

 

Started my game and waaahhlaaa previous version before stupid scripthook update rpf breaking bike dlc.

 

Like I said......If you do not have a previous backup of those folders and directory files including pre Biker DLC scripthook...you are pretty much screwed.

 

 

Say it until you are blue in the face...*then* Check out this page. http://techfaqs.net/games/patches-for-gta-5-online/

 

This patch can be installed only on Social Club and DVD version of the game. In steam this patch set is not possible.

 

Any other crap links you wanna post that don't work for Steam version of the game?????

Edited by rastakilla
Link to comment
Share on other sites

 

 

 

Uninstall GTAV and remove all files enitrely, then install game again.

This!

 

The problem I ran into was Steam had already updated my game somehow so what I thought was my pre Biker DLC GTAV folder was already updated.

Luckily I had a backup folder of the previous version build on my hard drive.

So I uninstalled GTAV and reinstalled it with the latest build.

Then copied and pasted the following folders from my backup pre Bike DLC folder

 

Updates

Installers

Mods

Scripts

X64

Along with all the other place in directory file mods

like the previous version scripthook that worked before the dlc update

 

Started my game and waaahhlaaa previous version before stupid scripthook update rpf breaking bike dlc.

 

Like I said......If you do not have a previous backup of those folders and directory files including pre Biker DLC scripthook...you are pretty much screwed.

 

 

Say it until you are blue in the face...*then* Check out this page. http://techfaqs.net/games/patches-for-gta-5-online/

 

This patch can be installed only on Social Club and DVD version of the game. In steam this patch set is not possible.

 

Any other crap links you wanna post that don't work for Steam version of the game?????

 

 

If all you were looking for were your files, then the 'crap link' gives you that.

 

If you have steam version and still wanted to downgrade, its entirely possible to do, is just the directions are not posted there for anyone not bright enough to figure it out for themselves.

 

I think my point is, never claim anything is impossible.

 

@Ikt 1 more note: I've gotten past the melee crash bug with GTALua by rebuilding it properly. Thanks for direction.

Link to comment
Share on other sites

Remove scripthook.dll and put a new one. That one don't even support previous patch.

HHnErXC.png


Link to comment
Share on other sites

scripthook.dll from ScriptHookV_1.0.877.1.zip is not new enough?

 

Just delete the ScriptHookV.dll in your GTAV directory and copy a new one there again.

Edited by Slash_Alex
Link to comment
Share on other sites

Welp, learned my lesson for not backing up my files. Couldn't get my GTA to start no matter how many mods I deleted. Deleted and reinstalling.

Link to comment
Share on other sites

- Keep in mind when reading this, that the issue pertains directly to GTALua, the recent update and subsequent ScripthookV update.

 

- While I'm 'here' because I've created a mod menu that is no longer operational due to patch, the issue is not with my menu specifically, because i've removed it entirely (while keeping scripthook, and GTALua active) and issue still persists.

 

So the feeling I had *after* the patch, was that 'theres something offset improperly'.

 

In fact, I found there were many things offset improperly.

When using c memory blocks:
- Before patch, I had to define them 24 in size for floats (i guess 24 is bits? 8 bits per float?)
- This meant when I would read them, I would jump *2 like so:

local cur_dim1 = Vector( mBlocks[18]:ReadFloat(0), mBlocks[18]:ReadFloat(2), mBlocks[18]:ReadFloat(4) )

- After the update, many crashes (mostly related to things that operated off of or directly with cmemory blocks that used more than 1 element per variable)

 

- While looking at screen and after having disabled most of my menu, I noticed that the 'dimensions' variables had 0 for y and z.

As seen here:

 

GTA-5-Mod-Menu-Fucked-001.PNG

- So I keep a table of cmemblocks for use by various functions, so i can watch whats going on in it.
- I notice that now, values for vectors are spread *8

As seen here:

 

GTA-5-Mod-Menu-Fucked-002.PNG

-
So I set my mblocks to (64) in size, then set my ReadXXX to 0/8/16 , and success!

 

- Revised code:

local cur_dim1 = Vector( mBlocks[18]:ReadFloat(0), mBlocks[18]:ReadFloat(8), mBlocks[18]:ReadFloat(16) )

As seen here:

 

GTA-5-Mod-Menu-Fucked-003.PNG

-
But while my code can be repaired like this, theres no telling what GTALua is doing thats causing me to crash every time I go to punch something.

 

- I've fixed all the cosmetic stuff in GTALua internals, but still something exists that is crashing me (most likely due to this odd off-setting thats happening to begin with)

 

- Other people experience similar issues if you hear them complaining about 'running out of memory' or 'having memory problems' (because the cmemblocks arent large enough when defined (24), to capture all the data since its spaced so far apart)

 

Any thoughts?

 

*EDIT*

 

- Below is a screenshot of the registers at the same breakpoint as when it crashes. ( 0x00007FF66EE18DDA )

- The last entry of each grouping is the registers when it crashed.

- Colorized entries are duplicates making it easier to pick out what changed and what might be wrong.

 

GTA-5-Mod-Menu-Fucked-004.PNG

 

Below are release notes for the mod menu I update: https://www.gta5-mods.com/scripts/community-mod-menu

 

## 1.0.877.HOLY.sh*t.IT.PROBABLY.WORKS.Edition_RC1 ##
- The build name says it all.
- After many sleepless nights, I fixed (or disabled) GTALua features in a language I havnt seen in more than 15 years (Greek, if you're wondering.)
- Contained in this mod is now the only known/working GTALua.ASI (at least that I'm aware of and surely on this site.)
- There are probably still a few other bugs remaining, as I chopped up a lot of the code in attempts to make it work before finding/fixing the GTALua issues.
- If you encounter any oddities, please report them!
- In case you're wondering, the bastard was this bit of douche-hackery found in OnVehicleCreated.cpp
- The current solution was to simply comment out this bit and anything related to OnVehicleCreated
// =================================================================================// Install=================================================================================// //void GameEvents::Install::OnVehicleCreated()//{// OnVehicleCreated// Memory::HookFunction(GameMemory::Find((PBYTE)"\x48\x8B\xC4\x48\x89\x58\x08\x48\x89\x70\x18\x48\x89\x78\x20\x55\x41\x54\x41\x55\x41\x56\x41\x57\x48\x8D\x68\xB9", "xxxxxxxxxxxxxxxxxxxxxxxxxxxx"), &World__CreateVehicle, (void**)&pWorld_CreateVehicle);//}

- Once commented out, I rebuilt GTALua and can punch people (as hard or as soft, but usually as hard) as I want!

Edited by zh0ul
Link to comment
Share on other sites

Hey :)

 

As I yesterday started my GTA 5, I received this error message.

 

[ COPIED FROM THE LOGS ]

 

[22:39:49] FATAL: Can't find native 0xC1F1920BAF281317

 

 

I´ve searched for hours, but I couldn't find anything in the internet.

 

Thanks for your help :)

 

 

Have a great day!

Link to comment
Share on other sites

Hey :)

 

As I yesterday started my GTA 5, I received this error message.

 

[ COPIED FROM THE LOGS ]

 

[22:39:49] FATAL: Can't find native 0xC1F1920BAF281317

 

 

I´ve searched for hours, but I couldn't find anything in the internet.

 

Thanks for your help :)

 

 

Have a great day!

- I have a list of all natives right in front of me and that native, and nothing like it, are on it.

- If i had to guess, thats probably a native from PSX or XBOX, somehow leaked into a PC mod? (leaked being a bad thing in this case)

- Simply search your GTA5 directory (all files) for any file that contains: 0xC1F1920BAF281317

 

- It will likely be a mod that you find with that in it ^^.

- You probably want to remove that mod.

Link to comment
Share on other sites

Ah, a pattern scan. How else do you suggest we find these things? It's not like GTA V offers a proper API for events, or anything at all :p

Link to comment
Share on other sites

Ah, a pattern scan. How else do you suggest we find these things? It's not like GTA V offers a proper API for events, or anything at all :p

 

- Pattern Scan is last resort

- The similar but better alternative is to use pointers and labels.

- The pointers usually stay pointing in the right area and labels can be applied similar to the way you pattern scan now, but the calculation is done once per new version (and can be automated with same pitfalls as pattern scans, but since it can be pre-planned to be automated, much like scripthookv is i imagine, its simply better, not as dirty, intensive, etc).

 

A lot of the uses ive seen with pattern scans have had natives found or hooks accommodating.

 

Lets use this GTALua bug as a great example.

void GameEvents::Install::OnVehicleCreated(){  OnVehicleCreated  Memory::HookFunction(GameMemory::Find((PBYTE)"\x48\x8B\xC4\x48\x89\x58\x08\x48\x89\x70\x18\x48\x89\x78\x20\x55\x41\x54\x41\x55\x41\x56\x41\x57\x48\x8D\x68\xB9", "xxxxxxxxxxxxxxxxxxxxxxxxxxxx"), &World__CreateVehicle, (void**)&pWorld_CreateVehicle);}

Now, while im sure this was great for its time?!?, it would clearly need to be updated. Theres only 5 people smart enough to do it, and 4 dont care anymore ;)

 

To top it off, ^^ this sits next to the better solution, scripthookV's exposed function calls like worldGetAllObjects , worldGetAllPeds, worldGetAllPickups, worldGetAllVehicles. They sit here, unmapped, unused.. in favor of something probably 50-100 times more intensive and bound to break eventually.

 

I dunno, maybe teh GTALua just aint gettin the love it deserves ;)

 

-Z

Edited by zh0ul
Link to comment
Share on other sites

Yes, this is a use case where there is a better alternative available, but what about things like finding and disabling or changing a certain instruction? I do notice a performance hit when trying to pattern scan often.

Link to comment
Share on other sites

Well yeah. If pattern scanning is the lowest form of 'hackery', then certainly doing that a bunch of times in succession is ultra-fail.

 

But again let me bring the point, most people 'using' such solutions are not the ones who came up with the solution.

 

When it breaks, their project is busted (usually for good) or until someone gives them a fix.

 

Its this alone that kills the interest maybe? in figuring sh*t out proper.

 

Not to mention, this is the first 'idea' that any 'would-be-hacker' has!

 

One must not forget how bad our first ideas about anything are , and strive to best them by at least 10 fold when all is said and done.

 

^^ that said, The method(s) that alexander uses to keep scripthookv alive..is one recently successful example ;)

Link to comment
Share on other sites

  • 2 weeks later...

Sorry guys but I think the game might be updated again and the ScriptHookV will be broken again after only about 1 day. There seems Rockstar announced a new clothing items and new vehicles for GTA Online players coming out tomorrow and I think GTA V maybe is going to receive an another GTA Online update again! I accidentally found this: http://www.rockstargames.com/newswire/article/52679/gta-online-halloween-specials-anniversary-bonuses-new (it was posted about almost 1 day and half above ago). :monocle: So @Alexander Blade might have to update his ScriptHookV plugin again if this is going to happen!

Edited by 65536
Link to comment
Share on other sites

Sorry guys but I think the game might be updated again and the ScriptHookV will be broken again after only about 1 day. There seems Rockstar announced a new clothing items and new vehicles for GTA Online players coming out tomorrow and I think GTA V maybe is going to receive an another GTA Online update again! I accidentally found this: http://www.rockstargames.com/newswire/article/52679/gta-online-halloween-specials-anniversary-bonuses-new (it was posted about almost 1 day and half above ago). :monocle: So @Alexander Blade might have to update his ScriptHookV plugin again if this is going to happen!

No, these types of "updates" are done via tunables (they simply unlock new stuff which is already in the game or change variables by forcing your game to download the latest tunables version in the background), meaning that an update is not required.

Link to comment
Share on other sites

rollschuh2282

Sorry guys but I think the game might be updated again and the ScriptHookV will be broken again after only about 1 day. There seems Rockstar announced a new clothing items and new vehicles for GTA Online players coming out tomorrow and I think GTA V maybe is going to receive an another GTA Online update again! I accidentally found this: http://www.rockstargames.com/newswire/article/52679/gta-online-halloween-specials-anniversary-bonuses-new (it was posted about almost 1 day and half above ago). :monocle: So @Alexander Blade might have to update his ScriptHookV plugin again if this is going to happen!

no the clothes and vehicles you mean are already in the game since the Biker Update.

this means we have 5 vehicles, 3 adv. modes, etc.in the Biker dlc files that are not used yet,and Rockstar only have to pull a "Switch" to unlock them.

 

PS: i hope it's readable

Link to comment
Share on other sites

*Snip*

 

 

 

Hey man,

 

I would like to join your skype group for developers.

Edited by Vanzant
Unneeded Quote
Link to comment
Share on other sites

You quoted the whole f*cking post, but you didn't see the very info you need?

We have skype group for developers with released plugins , if you are one then PM me and I'll send you the link

Edited by Claude_Lib
Link to comment
Share on other sites

I need help i cant start gta5 endless i have scripthookv uninstalled ive deleted all the mods and still cant do it i want to play again help me

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

    • ZloiVasja
×
×
  • Create New...

Important Information

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