Jump to content

Recommended Posts

  • 2 weeks later...
  • 1 month later...
  • 2 weeks later...
  • 1 month later...

 

here's the code of my hook to make it work with version 1.0.8

it mostly works, but stuff like SNT crashes on keyboard input when open.

 

 

Very nice work. I've been playing around with this and notice that SNT crashes when calling TIMERA and SETTIMERA. I was able to bypass these calls, but they are used to limit keypress repetition speed, so the menu stops working after first keypress. However, the game is no longer crashing.

Not entirely sure how to proceed further here, I tried mimicking the behaviour of these functions, but so far no luck getting it to work, crashes whenever I touch the context stack.

 

Edited by redddor
Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/60/#findComment-1069727510
Share on other sites

After some more fiddling I made this ASI, which injects avail's scripthookhook.dll into scripthook.dll and does some basic trickery so Simple Native Trainer partially works.

However, there are several native calls which cause a crash: So far I found TIMER(A/B/C) and SETTIMER(A/B/C), REQUEST_MODEL, TASK_SIT_DOWN, TASK_CAR_DRIVE_WANDER and PLAY_SOUND_FROM_POSITION. There are probably more.

To make SNT work I reimplemented the timerfunctions, for the others I made some functionality that allows to disable calls to certain natives. The lack of REQUEST_MODEL is probably the worst - when spawning cars/peds/objects the trainer waits until the requested model is loaded, which renders it unusable until the object is loaded naturally in-game. Apart from that, a lot actually works. You can edit the ignorelist if you encounter more crashing natives.

I only tested it with Alexander's ASI loader. My ASI must be loaded first and his ASI-Loader seems to load the plugins sorted by filename, which is good. When another scripthook-ASI is loaded first, none of this will work.

Of course, all this is just a big hack on top of another big hack for an outdated scripthook. It's really far from perfect. However, any pointers to find out why these certain native calls crash are greatly appreciated.

 

I included the source as well as the scripthookhook-source, compile with freepascal (zoink!). I slightly modified scripthookhook to export two functions which I use, because I couldn't get out of my comfort zone.

Again, kudos to avail for making his work avail-able. *bada-bumm-tsss*

Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/60/#findComment-1069729638
Share on other sites

  • 2 weeks later...

 

After some more fiddling I made this ASI, which injects avail's scripthookhook.dll into scripthook.dll and does some basic trickery so Simple Native Trainer partially works.

 

However, there are several native calls which cause a crash: So far I found TIMER(A/B/C) and SETTIMER(A/B/C), REQUEST_MODEL, TASK_SIT_DOWN, TASK_CAR_DRIVE_WANDER and PLAY_SOUND_FROM_POSITION. There are probably more.

 

To make SNT work I reimplemented the timerfunctions, for the others I made some functionality that allows to disable calls to certain natives. The lack of REQUEST_MODEL is probably the worst - when spawning cars/peds/objects the trainer waits until the requested model is loaded, which renders it unusable until the object is loaded naturally in-game. Apart from that, a lot actually works. You can edit the ignorelist if you encounter more crashing natives.

 

I only tested it with Alexander's ASI loader. My ASI must be loaded first and his ASI-Loader seems to load the plugins sorted by filename, which is good. When another scripthook-ASI is loaded first, none of this will work.

 

Of course, all this is just a big hack on top of another big hack for an outdated scripthook. It's really far from perfect. However, any pointers to find out why these certain native calls crash are greatly appreciated.

 

I included the source as well as the scripthookhook-source, compile with freepascal (zoink!). I slightly modified scripthookhook to export two functions which I use, because I couldn't get out of my comfort zone.

 

Again, kudos to avail for making his work avail-able. *bada-bumm-tsss*

 

 

Could you also make it compatible with EFLC 1.1.3.0? That seems to crash on load and the Scripthook log says

[FATAL] Failed to detect game version
Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/60/#findComment-1069754289
Share on other sites

Could you also make it compatible with EFLC 1.1.3.0?

 

 

 

Actually, yes. I modified avail's scripthookhook so it also patches EFLC1.1.3.0 - just had to adjust some offsets. Beware, it's barely tested, but I don 't see why it should work any less, apart from the known problems stated in my earlier post. Same download url.

 

Edited by redddor
  • Like 2
Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/60/#findComment-1069761370
Share on other sites

 

Could you also make it compatible with EFLC 1.1.3.0?

 

 

 

 

Actually, yes. I modified avail's scripthookhook so it also patches EFLC1.1.3.0 - just had to adjust some offsets. Beware, it's barely tested, but I don 't see why it should work any less, apart from the known problems stated in my earlier post. Same download url.

 

 

Thank you, everything seem to work except I'm having problems with the Simple Native Trainer. The trainer itself freezes after picking a couple of options and can't be used. Anyone else having this problem?

Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/60/#findComment-1069762938
Share on other sites


 

Thank you, everything seem to work except I'm having problems with the Simple Native Trainer. The trainer itself freezes after picking a couple of options and can't be used. Anyone else having this problem?

 

Spawning cars/objects/peds doesn't work, or are you running into any other problems?

Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/60/#findComment-1069764014
Share on other sites

I'm hoping that sjaak327 sees this and makes a modified version of his trainer that has the same anti-freeze in Model, Ped, Object spawning and Neons as in Car spawning so the trainer doesn't freeze permanently like it does now.

Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/60/#findComment-1069764141
Share on other sites

Sorry for asking so much, but could you possibly get the .NET ScriptHook to work? I tried to do it myself but when building it in Visual Studio I got this error: LNK1181: cannot open input file 'Lib\x86\d3dx9.lib'

Also it seems to have some addresses for different versions and a way to get them for 1.0.8.0 so maybe it could be more compatible than the normal ScriptHook is?

 

Memoryaccess.h:

 

// IMPORTANT: EASY way to get the adresses! Run "FunctionAddressScript" or get adresses of object script function manually (subtract baseAddress).
// Then open IDA Pro and jump to the adresses. Enter the inner function (usually first and only CALL).
// In the inner function, first call usually takes the index and THE POOL ADDRESS)
// funcs: GET_CAR_HEALTH, GET_CHAR_HEALTH, SET_OBJECT_VISIBLE, GET_BLIP_COLOUR
EDIT: also sorry for double post I actually forgot that I posted already
Edited by Zolika1351
Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/60/#findComment-1069766285
Share on other sites

  • 3 weeks later...

Legendary triple hack here everyone, I just wrote an SCO to load the first 2 pages of Model Spawning and the entirety of Car Spawning!

It does completely fill up your VRAM after a few loads though, but it clears out 30 seconds after each time you load the SCO.

https://mega.nz/#!nE4zESZA!qkQFbieBYldZSbEHQobR2jTcZvFiqE-_-rqc3GtPCug

Usage:

Try spawning the model/car you want, then after pressing numpad 5, press whatever key is Skorpro's SCO loader. I set it to Page Down in the ini and by default it's F12 (123 in ini).

Wait about 5-10 seconds for the game to go through the list of models to request and then it should spawn.

 

Thanks to Skorpro for his SCO loader so I didn't have to include some shady mod loader thing.

Edited by Zolika1351
Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/60/#findComment-1069803832
Share on other sites

Ok

 

If the peds/vehicles/objects are already loaded (anything around the player), then he can. The ones that aren't loaded, he loads in with an SCO script, and then spawns them via Trainer.

 

That's a rather convoluted work-around. I was requested to update trainer for this, but I don't think I am going to bother. To be honest, WHY did anyone upgrade in the first place ? What does 1.0.8 offer in terms of benefits over 1.0.7 ?

Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/60/#findComment-1069816808
Share on other sites

Well, there's also the fact that all mod checks are removed for the newest versions, and you no longer get separated into mod only lobbies for changing any data file or having any asi mod, which is a plus for me (I can have modified carcols for races, have cars spawn with gang only extras, etc...).

I only keep EFLC at 1120 since random players on it are very rare.

Edited by B Dawg
Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/60/#findComment-1069817897
Share on other sites

  • 4 weeks later...

who can tell team make new script hook please.

Please some people and who people can fix and how long to update scripthook.dll+scripthook.net.dll and dsound.dll to come for 1.0.8.0/1.1.3.0? for All old mod on game gta iv/eflc v.1.0.8.0/1.1.3.0 please.

 

sorry my eng it's badly.

Edited by FeelAlone
Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/60/#findComment-1069869698
Share on other sites

If the peds/vehicles/objects are already loaded (anything around the player), then he can. The ones that aren't loaded, he loads in with an SCO script, and then spawns them via Trainer.

BDawg you can make [[[Mod]]] you can make friend Backup same >>>>>> TLAD: Tough Backup to [close friend] to gta iv [Freind For Niko Bellic]>>>Jacob Hughes and >>>TBOGT Gta IV The gay tony ballad [Friend of Luis Lopez] >>>Armando Torres & Henrique Bardas please.

Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/60/#findComment-1069869723
Share on other sites

  • 4 weeks later...
EDU.GAMEYR291

 

 

Thank you, everything seem to work except I'm having problems with the Simple Native Trainer. The trainer itself freezes after picking a couple of options and can't be used. Anyone else having this problem?

 

Spawning cars/objects/peds doesn't work, or are you running into any other problems?

 

Man, its works correctly in my normal GTA IV, but when l put the EFLC version (1.1.3.0) its simply dont work, it dont crash nothing, it dont appear the Menu. Please help me

Edited by EDU.GAMEYR291
Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/60/#findComment-1069908027
Share on other sites

  • 4 weeks later...
  • 1 month later...

I'm hoping that sjaak327 sees this and makes a modified version of his trainer that has the same anti-freeze in Model, Ped, Object spawning and Neons as in Car spawning so the trainer doesn't freeze permanently like it does now.

Sorry for the late response, but I did update the trainer as requested:

 

Changes from version 6.5 (almost five years ago!)

-reduced waiting time for spawning cars from 10 to 3 seconds.

-included the same waiting time for anything involving requesting models (cars, peds, objects, neons, subway and taxi)

The two changes are for people wanting to run on the latest patch with a modified scripthook:

 

http://gtaforums.com...entry1069729638

 

Now this has NOT been tested at all, so any feedback is welcome.

 

I have included the modified scripthook + the asi needed to make it all work inside the archive.

 

http://forum.jvangent.com/download/trainerv66.rar

Edited by sjaak327
Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/60/#findComment-1070025876
Share on other sites

(Japan) GTA Love

 

here's the code of my hook to make it work with version 1.0.8

it mostly works, but stuff like SNT crashes on keyboard input when open.

 

I will crash at the (mission's Lure) TV in the game will not be displayed If this goes well I think that you can also proceed with Lure Please modify (Fix Please)

 

Sorry Bad English

Edited by JPN GTA LOVE
Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/60/#findComment-1070037014
Share on other sites

  • 2 weeks later...
Igor Bogdanoff

 

Now this has NOT been tested at all, so any feedback is welcome.

 

Can't spawn any object and cant spawn any car except ambulance .

Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/60/#findComment-1070051427
Share on other sites

Igor Bogdanoff

Unable to load model

Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/60/#findComment-1070058168
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
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

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