Jump to content

Recommended Posts

So can we still refer to objects by name? or must we know the hash of everything? Why the change from the previous method?

Did rockstar f*ck around with the hashing algorithm?

Yes, you can still refer to objects by their name.

 

Rockstar changed the hashing algorithm for the natives names and only the natives names in hopes of reducing MP cheating. The hashing algorithm for everything else still remains the same.

 

Their efforts to stop MP cheaters were honorable and hopefully the checks and protections I placed in ScriptHook will still keep the honest players honest and the cheaters at bay for non-Freeroam and non-LAN modes. To be brutally honest, the guys at Rockstar have a better chance of working with the modding community to stop cheaters rather than doing it on their own, but then again, I don't think they trust us after the whole hot coffee fiasco.

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

Wonderful man, I am so grateful biggrin.gif Had a great session with friends earlier, I've really enjoyed myself again with gta4.

Too bad that some other mods (LOLcops_Lite v3 and TuningMod don't work anymore) but at least my favorite mod Simple Native Trainer 4.5 is fully functional lol.gif

Again thanks a lot man, your hard work is really appreciated here icon14.gificon14.gificon14.gif

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

Has anyone got Realizm IV 6.2 to work with the new patch?

 

I notice a g4mhook.dll in the folder, maybe thats the reason why it doesn't work. I get an Xnetstartup error.

 

EDIT:

 

I got Realizm IV 6.2 working with the new patch now. The problem was caused by the automatic installer, even after I had copied over the new updated filecheck and scripthook, the auto installer had been doing something causing issues.

 

Manually installing solved my issues. I just used the automatic installer to install into an empty directory and then copied from there to my modded IV directory. This way I could check IV was running correctly after each directory copy to isolate any problems.

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

my LCPDFR and other script mods wont work, only some ASI mods load with new patch

 

 

Do i need a Scripthookdotnet.asi file? As i used to have one and this didnt include that

the scriphtook asi is used by the .Net scripthook. You'll have to wait for that hook to be updated.

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

Does anyone know my problem, when i leave Freemode or try to play a mission my game crashes with a Runtime C++ Error

It seems to crash everytime i go in to a loading screen cause i can play freemode with the trainer (Simple Native Trainer 4.6) for hours but when I try to exit Bam sad.gif crashed

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

Does anyone know my problem, when i leave Freemode or try to play a mission my game crashes with a Runtime C++ Error

It seems to crash everytime i go in to a loading screen cause i can play freemode with the trainer (Simple Native Trainer 4.6) for hours but when I try to exit Bam sad.gif crashed

I've heard of bug reports about it crashing when coming out of Video Editor, but it should work normally for coming out of Freeroam mode. Can you get the exact error message?

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

Hi! I'm hoping someone could help me with a problem I got into while "porting" NixoMod 2 from g4m-hook to this hook.

 

This is the error message I get:

 

1>------ Build started: Project: SampleCustomFiber, Configuration: Release Win32 ------1>Compiling...1>Main.cpp1>Linking...1>Main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static void __cdecl ScriptHookManager::RegisterDirectXHook(void (__cdecl*)(struct IDirect3DDevice9 *,struct _D3DPRESENT_PARAMETERS_ *),void (__cdecl*)(struct IDirect3DDevice9 *),void (__cdecl*)(void))" (__imp_?RegisterDirectXHook@ScriptHookManager@@SAXP6AXPAUIDirect3DDevice9@@PAU_D3DPRESENT_PARAMETERS_@@@ZP6AX0@ZP6AXXZ@Z)1>C:\Users\Nicolas\Desktop\g4m\NixoMod2\Release\SampleCustomFiber.asi : fatal error LNK1120: 1 unresolved externals

 

 

here is what i do in scripthookmanager

 

#ifdef DIRECT3D_VERSIONstatic void RegisterDirectXHook(void(*Initialize)(IDirect3DDevice9*, D3DPRESENT_PARAMETERS*), void(*Render)(IDirect3DDevice9*), void(*Reset)());#endif

 

 

and in Main.cpp

 

void DXHookInitialize(IDirect3DDevice9* m_device, D3DPRESENT_PARAMETERS* pPresentationParameters);void DXHookRender(IDirect3DDevice9* m_device);void DXHookReset().............ScriptHookManager::RegisterDirectXHook(&DXHookInitialize, &DXHookRender, &DXHookReset);

 

 

I'm using a pretty much copy/pasted file called DXhook.cpp which can be seen in source...

 

 

 

and here is full source: http://files.uploadffs.com/1/fe28163d/NixoMod2.rar

 

If anyone could tell me where i have gone wrong, I would be very happy (like really) smile.gif

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

@nixolas1, you need to create a class that inherits from ID3DDeviceHook. Look at Speedo/SpeedoRender.h and .cpp in the samples. It's a little different but the general idea is the same.

 

DXHookInitialize becomes SpeedoRender::OnResetDevice

DXHookReset becomes SpeedoRender::OnLostDevice

DXHookRender becomes SpeedoRender::OnRender

 

Instead of calling ScriptHookManager::RegisterDirectXHook (this function doesn't exist), look at how the hook is registered in SpeedoRender::InstallHook. This is called from SpeedoThread::RunScript to install it. Also, SpeedoRender::RemoveHook is called from SpeedoThread::OnKill to remove it.

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

Any idea as to why this is happening?

 

[iNFO] GTA IV Script Hook 0.4.0 - © 2009, Aru - Initialized

[iNFO] Process base address: 0xde0000

[iNFO] Auto detecting game version

[iNFO] Using game version 1.0.4 (patch 5)

[iNFO] [CustomThread] Thread started

[WARN] [CustomThread] Thread instance is being deleted while still hooked

[iNFO] [CustomThread] Thread killed

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

 

New version 0.4.0 released. More information in first post.

 

Most older scripts should work unless they use one of the unsupported natives (there are a few natives that do nothing and thus are no longer supported in the new version).

 

Big thanks to listener and sjaak327 for all their help!

Hi Aru, First of all ... Thanks so much for updating the new Script Hook! Does this make gm4hook work too?

 

I know this next question is going to be off topic but I'm not getting a response in the SparkIV thread, so here goes...

 

I am wondering ... Do you have any plans to make rpf files editable via SparkIV? Specifically for radio & player/ped commentary.

 

Several people are convinced it's over but I know how sometimes ppl just need a break from the code as I've posted about it here.

 

EDIT >> Here is a quick link to my reply to aru's reply below

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

@PandaX... its just a warning indicating that the thread was not properly shutdown, could be bad code, or could be that the game did something unexpected, or the game was shutdown improperly. That's all... nothing to worry about.

 

@gtastyles... although I have been contributing much to the SparkIV source lately, I haven't been ignoring the topic. The idea of SparkIV going open source was so that others could jump in and start writing support for things like that because I really don't have time to do all the research for it. Editing the audio in the ways you suggested would require that we have a complete understanding of the audio formats and I know almost nothing about audio formats smile.gif. Most of the audio loading/exporting code was contributed by a brilliant guy named DerPlaya78. We haven't been in touch lately, but he's the guy you should be bugging to add support for proper audio editing.

Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/40/#findComment-1059660257
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.