Jump to content

Recommended Posts

Is there a way to use DevLoader to completely load and unload NEW dlls without having to restart the game? As it is now, you cannot delete the mod dlls from the system as GTA4 is running because they are in use. That would be awesome, it would bring development time down by enormous amounts.

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

Unload, delete, replace it with the same name, and reload?

 

Technically when you unload, the DLLs are no longer in use (unless you are using some weird ASI loader in conjunction with DevLoader).

Thanks for your answer, but that is my problem when I unload and try to delete the specific dll the OS doesn't let me do it because it is "in use by GTAIV.exe". Have you managed to really do it, if the how?

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

Unload, delete, replace it with the same name, and reload?

 

Technically when you unload, the DLLs are no longer in use (unless you are using some weird ASI loader in conjunction with DevLoader).

Thanks for your answer, but that is my problem when I unload and try to delete the specific dll the OS doesn't let me do it because it is "in use by GTAIV.exe". Have you managed to really do it, if the how?

You can only reload asi's that were previously loaded. I do this all the time, I use the menu to unload a specific asi, then simply replace it with a new version, and reload it again using the menu.

 

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

Ok, I've been trying to get this done for ages, but for the life of me, I just can't seem to succeed:

 

How can I read from (or less importantly -- write to) .ini files with C++ or in this script hook?

Look at Speedo\Settings.h and Settings.cpp... this saves things as XML in a .config file. You can easily change ".config" -> ".ini" and

 

configService->Create(IConfigService::ConfigTypeXml)

 

to

 

configService->Create(IConfigService::ConfigTypeIni)

 

and the rest should work the same.

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

Ok, I've been trying to get this done for ages, but for the life of me, I just can't seem to succeed:

 

How can I read from (or less importantly -- write to) .ini files with C++ or in this script hook?

By using getprivateprofilestring and getprivateprofileint. For writing you can use writeprivateprofilestring, pretty easy.

 

 

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

 

I decided to go with the "getprivateprofilestring" approach (since I found it to be simpler, given my abilities) and it worked out great!

 

Thanks a lot for your help guys, I really appreciate it -- finally I can get with the times and make use of configuration files! biggrin.gif

 

 

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

Almost there;

I keep getting this error “Error loading library 126” from the xlive.dll log.

I’m just trying to run the Samplecustomfiber with no changes. It compiles fine using VC++ 2008 express.

 

Any hints at what I’m missing? Some option settings in VC maybe?

 

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

Yep, it does need an update for the new patch. Not sure how exactly we are going to do this though. Rockstar effectively turned a run-time cat and mouse game into a compile-time game of time complexity and for that, they have my regards. And we have those who cheat in MP to blame and point our fingers at.

 

Translation: They made it quite difficult for ScriptHook to support patch 5. Infact, if they did what they did now with the original game release, ScriptHook wouldn't even exist. So if you want an update, it's going to take quite a while...

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

I had a pretty nice organized track which loaded perfectly but now I installed the patch (retarded action I know lol) and now I'm roaming in free mode without the building fun that I and some others had cryani.gif I don't give a damn about blasting people countless of times on free mode, what I do care about is building something nice for others to enjoy (and even better, to make them laugh)

I believe that when rockstar heard that it was possible to cheat on other modes then free and party mode they took the step with this patch.

Aru, I truly hope you get around their ugly fence with your skills, it will make me play the game with more gratitude then before. Good luck wink.gif

 

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

 

how can a reverse the patching of my game?

yes i was stupid enough to install the patch sad.gif

can i go back to 1.0.4.0 without having to reinstall and patch up again?

You *could* try to install patch 4 over it, but I'm guessing it will introduce other strange stuff, so the best thing to do here is simply re-install.

 

@deadsuitman, care to share your track, at least I could still load it on 1.0.4.0 smile.gif

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

how can a reverse the patching of my game?

yes i was stupid enough to install the patch sad.gif

can i go back to 1.0.4.0 without having to reinstall and patch up again?

You *could* try to install patch 4 over it, but I'm guessing it will introduce other strange stuff, so the best thing to do here is simply re-install.

 

@deadsuitman, care to share your track, at least I could still load it on 1.0.4.0 smile.gif

Ah sh*t man, a bit too late cry.gif I used the Sytem Recovery from Windows to reload a certain computer savepoint (from yesterday) to try and restore the game as it was before the patch which kinda worked. Some parts are a bit distorted in the menu but everything else works... until 5 minutes ago when some parts started twitching and the game crashed (which never happened before offline)

In my moment of anger I started building other things since I guessed it's gonna take a while for Aru to fix Rockstar's "security patch" as I'd like to call it. So I saved those objects which override my previous track blush.gif Think I'm gonna reinstall the game and patch it to 1.0.4.0 to build something new.

I miss seeing people fly through the air sad.gif When you go on Free mode now it's nothing but people shooting you all the time when you spawn thinking they are playing death match or something...

 

 

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

Yep, it does need an update for the new patch. Not sure how exactly we are going to do this though. Rockstar effectively turned a run-time cat and mouse game into a compile-time game of time complexity and for that, they have my regards. And we have those who cheat in MP to blame and point our fingers at.

 

Translation: They made it quite difficult for ScriptHook to support patch 5. Infact, if they did what they did now with the original game release, ScriptHook wouldn't even exist. So if you want an update, it's going to take quite a while...

Yo, seems its not that easy like in versions before. Thought I found adresses to update hook. Threads running, no crashing, get right hashes for native functions from game, only then it ends, Script_FindNativeAddress always gets zero back from the called game-function sad.gif

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

Ah ha! Got it working now, took a lot of filtering of crappy advice, but it works.

Sad part is, the new patch kills things by the sound of it, lucky I didn’t update.

 

I think I’ll start on some mission mods anyways, and hope we can get a fix for the new patch.

 

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

I really really wish I had turned off auto update on steam a few days ago. I don't play mp, although I can understand why they wanted to stop the cheaters in it, but in sp it's not even fun without the trainer. Fps are a bit better, but not even being able to reload ammo, give more health etc is a pain in the ass....

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

I'd say aru is doing the best he can, its not as simple to run a scripthook as it was before, apparently rockstar added alot of blocks in, so it will be harder to do, if possible at all, so folks give aru a break and let him do his thing, there will be a new one "when its done"

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

Alex Blade has just released a new filecheckfix which is fully compatible with 1.0.0.4 now PLUS it contains code to disable the new DLL / ASI checks that R* built into the new patch.

 

Basically R* now scan the install directory for mod's and other files to stop modding (and maybe scan active memory for mods).

FileCheckFix removes these checks.

 

Just wondering if this makes the process of updating the C++ hook any easier? I assume that if he just disables a file scan then this won't help at all, but if he does more than this in the new FileCheckFix maybe it will help.

 

From what someone was saying about natives returning 0 on every call this may not be any help but be interesting to know.

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

×
×
  • Create New...

Important Information

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