Jump to content

Recommended Posts

Thanks again, great job Aru icon14.gif

 

I have a problem tho, when i draw items on screen using natives in a NativeThread style script there seems to be a pause in the processing as

the items on screen now flicker showing them not to be drawn frequently enough.

They must be drawn with no delay each tick but i have no wait in my code.

Is there some wait in the scripthook.dll code maybe?

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

Thanks again, great job Aru icon14.gif

 

I have a problem tho, when i draw items on screen using natives in a NativeThread style script there seems to be a pause in the processing as

the items on screen now flicker showing them not to be drawn frequently enough.

They must be drawn with no delay each tick but i have no wait in my code.

Is there some wait in the scripthook.dll code maybe?

I had the same issues, flickering text, as the new scriptthread is using a custom fiber approach.

 

I hope aru will fix this, what you can do now, is simply copy nativethread.h and gametypes.h from the 0.3.0 hook and change your includes and compile it, thus using the nativethread approach, that fixed the flickering for me as well.

 

 

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

Thanks for all your work, Aru! I'm currently porting the .Net ScriptHook and almost everything seems to work fine. However, globals do not. GetGlobalAddress(91) returns 364, as if the pointer for the global array is 0. The same thing even happens in older versions of the game when using the new hook. It would be amazing if you could take a look at the problem, since it breaks some things (like detection of the last phone number called).

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

Thanks! i think i am close now, but the menu don't show up,

what is supposed to be under

 

SpeedoRender::SpeedoRender()

{

 

?

 

thx

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

I have no log with the debug version of new scripthook.dll (4.0), WFT ? (Usually, I used version 0.2.1, which worked perfectly, and I had update myself for the patch 1.0.4.0, but now..) ph34r.gif

 

I cannot programming without log.. catspider.gif

And some of natives of my script (which worked perfectly with 1.0.3 and 1.0.4) doesn't work in game, They crash my game.. (i cannot see the log because the log doesn't work > ahahah) rolleyes.gif

 

Have you disable the log in this scripthook version ? cool.gif

Have you disable some natives in this scripthook version ? cool.gif

 

 

When do you release the real scripthook version ? rolleyes.gifrolleyes.gifrolleyes.gif

 

 

turn.gifturn.gifturn.gifturn.gifrah.gif

 

 

 

 

 

Edit:

I think I understood the natives problem rolleyes.gifrolleyes.gif

I disassembled the new binary monocle.gifmonocle.gif

And I saw that Rockstar changed the name of some natives panic.gifpanic.gif

 

I'll have to get back to work facedesk.gif

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

someonefromhk

My GTAIV version is 1.0.0.0,

however,the Script Hook 0.4.0 couldn't detect the game version...

while the old one do work.

The log is here:

 

Log start: Sun Dec 06 09:29:18 2009-----------------------------------------------[iNFO] GTA IV Script Hook 0.4.0 - © 2009, Aru - Initialized[iNFO] Process base address: 0x810000[iNFO] Auto detecting game version[FATAL] Failed to detect game version

 

I think that the new script hook doesn't support V1.0.0.0

 

 

Sorry for poor English......

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

My GTAIV version is 1.0.0.0,

however,the Script Hook 0.4.0 couldn't detect the game version...

while the old one do work.

The log is here:

 

Log start: Sun Dec 06 09:29:18 2009-----------------------------------------------[iNFO] GTA IV Script Hook 0.4.0 - © 2009, Aru - Initialized[iNFO] Process base address: 0x810000[iNFO] Auto detecting game version[FATAL] Failed to detect game version

 

I think that the new script hook doesn't support V1.0.0.0

 

 

Sorry for poor English......

You only need the new scripthook for the newer versions anyway so why would that worry you?

 

I can't think of any benefits to staying on 1.0, you get less graphical options and less optimisation and less improvements. You probably get less performance too.

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

 

@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.

I have sent a private message to DerPlaya78 regarding the RPF Sound File Editing request.

 

It's 10 days later and no reply. I'm a big nobody to him, maybe if you could point him here he might gain interest.

 

It would be greatly appreciated not only by me. I know there is alot of ppl with a huge hunger for this modification.

 

Maybe it would even be a huge contribution to the Machinima community as well. Ahh Custom Sounds ... moto_whistle.gif

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

Thanks for all your work, Aru! I'm currently porting the .Net ScriptHook and almost everything seems to work fine. However, globals do not. GetGlobalAddress(91) returns 364, as if the pointer for the global array is 0. The same thing even happens in older versions of the game when using the new hook. It would be amazing if you could take a look at the problem, since it breaks some things (like detection of the last phone number called).

Strange, it seems like this issue is related to Windows7 and also occurs on older versions of the hook. Something on Windows7 seems to block the retrieval of the memory addresses for globals.

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

Actually the current SDK supports the latest patch.

So, just download it and have fun, dude.

Btw...

...(where's the f*ckin' cd?)

 

Merry Xmas and a happy new freakin' year!

 

Edit>>

@Aru: Thanx a lot for this SDK since the first release and also for the SparkIV source. I've learned so much it's unbelievable...not only IV related.

So, thanx again and I wish you all the best.

 

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

Thanks for the reply oinkoink smile.gif

 

The newest SDK 0.4 doesn't seem to detect the game version I am using, that is what the scriphook log says anyhow. I have downgraded the game to patch 1.0.4.0 and it works. This is strange because I have got the mod working with the latest patch at another time but I could not go online in freemode, the game just hangs at the multiplayer laod screen. It's also dependant on the asi loader I use. odd...

 

Can anyone relate to this? Maybe I should release this trainer in the mod showroom and see if people can get it to work. Although, I want to do a bit more work on it first.

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

MadthatModsareDisabled

Hi guys

 

I'm wondering if anyone can update me on the status of getting mods to work with the lastest patch by RockStar. I have my own trainer I created 'Super Mega Trainer' that I've enjoyed working on for the last several months. What I found out from SneakyJanit0r recently is that my trainer won't work with the new patch.

 

 

This is a disgrace since I learned to code in c++ by becoming a modder. I have a pretty awesome arsenal at my fingertips. I even wrote an amazing Menu program that allows you to add menus in seconds. This is so frustrating that RS is against us. I would never manipulate or misuse the power of my trainer in any way.

 

Aru, does your lastest SDK work with the lastest patch?

 

Whenever I accept the new patch and install it later, I still get the message saying that modified files are detected and I must reinstall.

 

Any help would be appreciated.

 

And just to think, I was ready to post my trainer live for everyone to use. Latest feature: Human rocket exploder.

 

Thanks!

Steve

 

 

 

 

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

http://www.gtaforums.com/index.php?showtopic=406198

 

It does however work half of the time for some people (including me), have posted a possible work-around in the same thread, one of the last pages, if might work for you.

 

 

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

MadthatModsareDisabled

Thanks. I got the Filecheckfix.asi to work. However now for example when I use Aru's new Script hook (at the front of this page) and try to compile SampleCustomerFiber.cpp into SampleCustomerFiber.asi I can't get the mod to work when I run the game.

 

However I do notice that some of the other mods are working (strange).

 

These are the new files I added to GTA IV root folder:

 

SampleCustomerfiber.dll (I changed this to SampleCustomerFiber.asi).

FilecheckFix.asi (this works since I don't get any error messages telling me its not supported).

 

I also notice this in my ScriptHook text file:

 

Log start: Tue Dec 22 03:14:37 2009

-----------------------------------------------

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

[iNFO] Process base address: 0x1010000

[iNFO] Auto detecting game version

[iNFO] Using game version 1.0.4 (patch 5)

[iNFO] Script Hook - Shutdown

 

 

So the Script Hook is not working.

 

The FileCheckfix text file shows this:

 

// --- GTA IV FILE CHECK FIX --- //

//-- © Alexander Blade 2008-9 --//

http://Alexander.SannyBuilder.com

http://OpenIV.com

 

Started ...

Game version is 1.0.0.4

Files check started

All files are ok

 

I'm at a loss. RockStar is trying to put modding out of business forever.

 

If I can at least get one asi mod working then I know I will be able to convert my personal trainer to the new Hook.

 

Any suggestions?

- StevorNtheHouse

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