Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Summer Special
      2. The Diamond Casino Heist
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Frontier Pursuits
      2. Find Lobbies & Outlaws
      3. Help & Support
    3. Crews

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Redemption

    1. Grand Theft Auto Series

    2. GTA 6

      1. St Andrews Cathedral
    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    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. DYOM
      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
    3. Gangs

    1. Announcements

    2. Support

    3. Suggestions

HazardX

[BETA] GTAIV .Net ScriptHook

Recommended Posts

LMS

The problem is VS 2008 doesn't have .net Framework 4 but the new .net scripthook is compiled with .net framework 4 so you also have to compile your scripts with 4.

Share this post


Link to post
Share on other sites
Threepwood

Why does this:

 

if (IsControlPressed(1,41))

 

not work for me? O_o

Share this post


Link to post
Share on other sites
iriedreadlock23

A very important question for HazardX.

 

Is it possible for us to use your D3D hook to access image in every frame? I am talking here about output image, the one you put your console overlay to. Help me out HazardX, i would aprreciate it very much.

Share this post


Link to post
Share on other sites
elevator1313

SUPER-EDIT: nevermind, had to get the x86 redistributable. all good

 

 

 

Sadly, this doesn't work at all for me sad.gif

 

I'm running Windows 7 64-bit, and I've installed .NET Framework 4 and restarted my computer, but still nothing. I tried copying the Bodyguard .vb file into the scripts folder, and it didn't work. Then I tried accessing the console by pressing tilde, still nothing. Here's the dump from Alexander's AsiLoader:

 

 

// -- GTA IV ASI LOADER LOG -- //

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

C:\Windows\system32\dsound.dll is loaded, address 0x74B60000

Hooking dsound proc named "DirectSoundCreate"

"DirectSoundCreate" hooked, address 0x74B67E3D

Hooking dsound proc named "DirectSoundEnumerateA"

"DirectSoundEnumerateA" hooked, address 0x74BAD993

Hooking dsound proc named "DirectSoundEnumerateW"

"DirectSoundEnumerateW" hooked, address 0x74BAD9B0

Hooking dsound proc named "DllCanUnloadNow"

"DllCanUnloadNow" hooked, address 0x74B941BB

Hooking dsound proc named "DllGetClassObject"

"DllGetClassObject" hooked, address 0x74B67792

Hooking dsound proc named "DirectSoundCaptureCreate"

"DirectSoundCaptureCreate" hooked, address 0x74BAD2C5

Hooking dsound proc named "DirectSoundCaptureEnumerateA"

"DirectSoundCaptureEnumerateA" hooked, address 0x74BAD9CD

Hooking dsound proc named "DirectSoundCaptureEnumerateW"

"DirectSoundCaptureEnumerateW" hooked, address 0x74BAD9EA

Hooking dsound proc named "GetDeviceID"

"GetDeviceID" hooked, address 0x74BAD160

Hooking dsound proc named "DirectSoundFullDuplexCreate"

"DirectSoundFullDuplexCreate" hooked, address 0x74BAD429

Hooking dsound proc named "DirectSoundCreate8"

"DirectSoundCreate8" hooked, address 0x74B9DE69

Hooking dsound proc named "DirectSoundCaptureCreate8"

"DirectSoundCaptureCreate8" hooked, address 0x74BAD371

Loading ASI c:\program files (x86)\steam\steamapps\common\grand theft auto iv\GTAIV\Contagium.asi

ASI loaded : c:\program files (x86)\steam\steamapps\common\grand theft auto iv\GTAIV\Contagium.asi, Address 0x6B700000

Loading ASI c:\program files (x86)\steam\steamapps\common\grand theft auto iv\GTAIV\ScriptHookDotNet.asi

ASI loaded : c:\program files (x86)\steam\steamapps\common\grand theft auto iv\GTAIV\ScriptHookDotNet.asi, Address 0x00000000

 

 

Is there anything I need to enable/disable like administrative rights to make this work? Also, it's not the AsiLoader because the Contagium mod works fine.

 

The ScriptHook.log file:

 

Log start: Sun Jan 02 03:19:11 2011

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

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

[iNFO] Process base address: 0x220000

[iNFO] Auto detecting game version

[iNFO] Using game version 1.0.7

[iNFO] [Contagium] Thread started

[iNFO] [VehicleMod] Thread started

[iNFO] [VehicleMod] Thread killed

[iNFO] [Contagium] Thread killed

[iNFO] Script Hook - Shutdown

 

 

No idea what VehicleMod is.

Edited by elevator1313

Share this post


Link to post
Share on other sites
tgp1994

I'd recommend taking out Contagium, it crashes after about 15 minutes into the third round. Consistently, too.

Share this post


Link to post
Share on other sites
D5 Driver

Yay it crashes!! biggrin.gif But why... =_= And my second GTA IV version is... 1.0.4.0 . And I try to use the latest scripthook.net, but it crashes, when loading the savegame. sad.gif So, what could be the answer to this crashing? O.o

-D5 Driver, happy new year! biggrin.gif (Little late, eh?)

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

Signature NOT Disabled!

Share this post


Link to post
Share on other sites
tgp1994
Yay it crashes!! biggrin.gif But why... =_= And my second GTA IV version is... 1.0.4.0 . And I try to use the latest scripthook.net, but it crashes, when loading the savegame. sad.gif So, what could be the answer to this crashing? O.o

-D5 Driver, happy new year! biggrin.gif (Little late, eh?)

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

Signature NOT Disabled!

The savegame is crashing? If only the savegame is, and you can start a new game safely, that most surely indicates a corrupted savegame. I've honestly never seen a savegame become corrupted before.

Share this post


Link to post
Share on other sites
Walker2027

I just noticed that this script makes rain inside interiors.

 

Dont know if someone posted before, I didn't search.

Share this post


Link to post
Share on other sites
D5 Driver

 

Yay it crashes!! biggrin.gif  But why... =_=  And my second GTA IV version is... 1.0.4.0 .  And I try to use the latest scripthook.net, but it crashes, when loading the savegame. sad.gif  So, what could be the answer to this crashing? O.o

-D5 Driver, happy new year! biggrin.gif  (Little late, eh?)

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

Signature NOT Disabled!

The savegame is crashing? If only the savegame is, and you can start a new game safely, that most surely indicates a corrupted savegame. I've honestly never seen a savegame become corrupted before.

Uhm... I didn't know, it could become a corrupted savegame for a while... lol.gif But it works fine with older scripthook's, but then some of scripts don't work. sad.gif (The ASI files, I mean.)

But I go testing that. wink.gif

EDIT: THE RESULTS!!! The GTA IV crashes, when loading, it, if I use the latest scripthook .net . sad.gif And I try'ed that, starting a new game... smile.gif -But didn't work. rampage_ani.gif

So is this normal? The game version is still 1.0.4.0.

Edited by D5 Driver

Share this post


Link to post
Share on other sites
SlingShotUK
@HazardX

 

I can't get your Documentation file .chm to read directly from my desktop. Every selection i pick says "no page displayed." I'm learning to code off your examples in the SHDN download, but some views on available tasks, loops, native functions would help expand me my miniscule knowledge of spawning peds, bodyguards, vehicles, and combinations thereof. I'm working on a mod now, topic is on coding forum, and some additional examples / instruction would be spectacular. Thanks smile.gif

Hey there Motorsport71,

 

Did you fix this issue?

 

If not, are you loading it over a network? If so, copy it to your local machine and you shouldn't have that issue anymore.

 

If you are loading it locally, then try right clicking on it, selecting 'properties' then looking for an 'unblock' button on the general tab. Windows can block access to .chm's based on Internet security settings or something.

 

Hope this helps.

Share this post


Link to post
Share on other sites
tgp1994
Uhm... I didn't know, it could become a corrupted savegame for a while... lol.gif But it works fine with older scripthook's, but then some of scripts don't work. sad.gif (The ASI files, I mean.)

But I go testing that. wink.gif

EDIT: THE RESULTS!!! The GTA IV crashes, when loading, it, if I use the latest scripthook .net . sad.gif And I try'ed that, starting a new game... smile.gif -But didn't work. rampage_ani.gif

So is this normal? The game version is still 1.0.4.0.

It could actually be your game version. Is there any reason why you can't update to the latest patch?

Share this post


Link to post
Share on other sites
iriedreadlock23

I have very annoying problem with ScripthookDotNet.

 

I cannot use mouse in Gta Forms. Its just frozen in the screen centre.

 

I tried to remove all scripts, but no improvements.

Share this post


Link to post
Share on other sites
D5 Driver

 

Uhm... I didn't know, it could become a corrupted savegame for a while...  lol.gif  But it works fine with older scripthook's, but then some of scripts don't work. sad.gif  (The ASI files, I mean.)

But I go testing that. wink.gif

EDIT: THE RESULTS!!! The GTA IV crashes, when loading, it, if I use the latest scripthook .net . sad.gif  And I try'ed that, starting a new game... smile.gif  -But didn't work.  rampage_ani.gif

So is this normal? The game version is still 1.0.4.0.

It could actually be your game version. Is there any reason why you can't update to the latest patch?

YES!!! Because it laggs...! sad.gif And a lot. tounge2.gif And it crashes easier, on my computer. sad.gif

And I get that "MV..." -error, still, and I have that f*cking "microsoft visual 2010 pack" or something. mercie_blink.gif And almost forgot, I CANNOT use any weapons or shoot with them or even kick/punch, cause then the game crash, with no reason. sad.gif So there was 'some' of my problems of Grand Theft Auto: IV. biggrin.gif

-D5 Driver

Edited by D5 Driver

Share this post


Link to post
Share on other sites
tgp1994

"Visual Studio 2010 pack"?

 

Did you try updating, then removing all mods?

Share this post


Link to post
Share on other sites
infazci_94

My asi loader and scripthook works fine. But net scripthook isn't working... Asi files are working like simple native trainer and ragdoll... But net_dll files not working in the game... Help please... confused.gifconfused.gif

Share this post


Link to post
Share on other sites
ddongee

How do you change color of a car in console command??

Share this post


Link to post
Share on other sites
d1an45

Can you help me,i downloaded asi loader patch which comes wit aru's scripthook and alice and xliveless. it converted the game to version 1.0.4.0 Whe i put some mods in the script folder they didnt appear. I dont think its the asi loader cause alice works and the mods are from different authors

Share this post


Link to post
Share on other sites
d1an45

ok,i really need help. i have gta 1.0.7.0 but i used a program which removed live,added alice,asi loader,aru's scripthook,and downgraded to 1.0.4.0 when i add scriphook.net it doesnt work

Share this post


Link to post
Share on other sites
joemandel

i really need scripthook for version 1.0.4., cuz that link up is disfunctional

Share this post


Link to post
Share on other sites
Donny78

Why not update your game ?

Share this post


Link to post
Share on other sites
tgp1994
Why not update your game ?

Yes. There really shouldn't be any reason not to upgrade your game, they fix so many things.

Share this post


Link to post
Share on other sites
lindsayslorach

Hey guys, I posted my own topic a day or two ago, but it doesn't seem to be getting much attention, I wont post those questions here, I'll just ask one.

 

I think the GTA.Forms.Imagebox should have a SizeMode property, like the Windows PictureBox does, so we can choose wether to stretch the image or keep it its normal size, just wondering if this is possible?

 

Thanks.

Share this post


Link to post
Share on other sites
D5 Driver

The patch 1.0.7.0 didn't fix things, but I am using it now, cause the 1.0.4.0 doesn't work anymore... =/ and one thing, what sucks on 1.0.7.0 is; The Enb Series don't work good, if haven't edited that "enbseries.config" file. sad.gif

And how many vehicles and weapons can be added to GTA IV, without "5 seconds crashes"?

-D5 Driver

Share this post


Link to post
Share on other sites
monster875.
And how many vehicles and weapons can be added to GTA IV, without "5 seconds crashes"?

-D5 Driver

about 38, and over 50 if u're lucky

Share this post


Link to post
Share on other sites
Threepwood
Why does this:

 

if (IsControlPressed(1,41))

 

not work for me? O_o

Anyone, PLEASE?

Come on guys. There must be any working way to get the brake instead of MoveBackwards..

Share this post


Link to post
Share on other sites
Donny78

I don't seem to have that function, is it a custom ?

 

 

if (Player.Character.CurrentVehicle != null && Game.isGameKeyPressed(GameKey.MoveBackward))

 

 

With that you are either stopping or reversing, speed is positive forward or back, it's just speed but if it's decreasing since last frame/tick then you're hitting the brake in most cases.

Share this post


Link to post
Share on other sites
Threepwood

Actually, thats the code I use, and no, it does not catch the brake. Users use different key bindings for the brake, and MoveBackwards does not cover enough of them.

The use of a native

 

GTA.Native.Function.Call("IS_CONTROL_PRESSED", 41, var);

 

does not work at all - in which combination ever. 1,41,var | 41,var, | var, 41, | var,1,41, and so on and so on - none of them works. And sadly the wiki has no entry about that native.

Share this post


Link to post
Share on other sites
Donny78

Well a config file which the user adds thier reverse/brake key to would solve the key issue dude.

 

 

 

Share this post


Link to post
Share on other sites
Threepwood

Not really, Gamepad users are still left out. Workarounds stay always what they are: workarounds. There is no alternative for the original thing, and that is the brake command itself. Guess some mem-hacking/scanning might be the last solution confused.gif

Share this post


Link to post
Share on other sites
Donny78

Yeah I can agree there.

 

I never thought about the gamepad users and maybe you could grab it with memory reading, you may also be able to use SlimDX or something which handles gamepads ?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


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