Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Criminal Enterprises
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

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

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

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

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

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    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. Design Your Own Mission
      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
    1. Announcements

    2. Support

    3. Suggestions

*DO NOT* SHARE MEDIA OR LINKS TO LEAKED COPYRIGHTED MATERIAL. Discussion is allowed.

[BETA] GTAIV .Net ScriptHook


HazardX
 Share

Recommended Posts

i know i'm late to the party, but i have several questions to ask hazardx about scripthook?

 

first:

- how to change character model's outfit (randomize outfit doesn't seem to work properly and no other alternative could be found)

 

second:

- how to scale down marker (or blip) - the only way i found to add a marker is by blip and when i change it's scale, only the minimap marker is affected, not the world marker

 

and also a (possible) bug i found: when i set the interval to negative number, ticks don't stop triggering

Link to comment
Share on other sites

  • 4 weeks later...
Lord Trolldemort

I got a problem?

 

I seem to have an error with some scripts. I have been trying to fix it for ages, to no avail.

 

I have installed many scripts, the bank account one, weapon weight, pickups e.t.c. The problem is, for these scripts the text that is supposed to appear, is not working.

The bank account script, is supposed to bring about an interface, out of text. But it doesn't appear. The functions work, but the text is invisible. I found the problem in the log.

 

//LOG////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

2015-09-22 17:07:54 - Error during Direct3D rendering:
System.NullReferenceException: Object reference not set to an instance of an object.
at GTA.Direct3D.DrawString(String Text, Rectangle area, TextAlignment alignment, Int32 Color, Int32 FontID)
at GTA.Graphics.DrawText(String Text, RectangleF Area, TextAlignment Alignment, Color Color, Font Font)
at GTA.Graphics.DrawText(String Text, Single X, Single Y)
at GTA.NetHook.Draw()
at GTA.Direct3D.OnRender()
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Does anyone know a way to fix this? Please answer ASAP.
Thanks for reading
Link to comment
Share on other sites

  • 6 months later...
iriedreadlock23

This error happens after calling native functions for 6,7 hours, for example DISPLAY_TEXT_WITH_LITERAL_STRING. It seems that issue is in GetStringPointer function in ScripthookDotNet code. After reloading scripts all is back to normal.

                System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.                         at System.Collections.Generic.List`1.set_Capacity(Int32 value)                         at System.Collections.Generic.List`1.EnsureCapacity(Int32 min)                         at System.Collections.Generic.List`1.Add(T item)                         at GTA.Native.Function.GetStringPointer(String input)                         at GTA.Native.Parameter.op_Implicit(String source)
Link to comment
Share on other sites

  • 6 months later...
  • 2 months later...

Scripthook isn't working, I've reinstalled it wrong, or TrafficFlow isn't working, because...well...it isn't working.

Link to comment
Share on other sites

Scripthook isn't working, I've reinstalled it wrong, or TrafficFlow isn't working, because...well...it isn't working.

It's the new patch, hopefully enventually he will release a new version of Scripthook for the current patch.

Link to comment
Share on other sites

 

Scripthook isn't working, I've reinstalled it wrong, or TrafficFlow isn't working, because...well...it isn't working.

It's the new patch, hopefully eventually he will release a new version of ScriptHook for the current patch.

 

 

I don't know, but it's better if someone send a message to @AlexanderBlade about the new GTA IV's patch about if he can make a new normal ScriptHook for IV / EFLC (and might also Hazards' ScriptHook .NET) from scratch which to replace their outdated versions since:

 

1. This ScriptHook .NET (and the original ScriptHook too as well) still have various nasty bugs, and also their authors wasn't active on GTAForums for more than an year here now;

2. Also, seems the normal ScriptHook's author @aru most likely doesn't allow anyone to back engineering his partially broken (and still BETA) plugin without anyone ask him first, which means without able to contact him for permission, we're in fact stuck! Unfortunately now appears - cannot contact current ScriptHook's author @aru (he isn't active anymore and he might also NO LONGER WORKING on this anymore) - NO ONE from the currently active modders here CAN UPDATE this to current patch without getting author's permission (which sadly appears impossible now since @aru is completely vanished)...

 

I think beside the variant IV's modding community to ask @AlexanderBlade about he to make a new ScriptHook for GTA IV 1.0.8.0 / GTA EFLC 1.1.3.0, we'll will not be able to use any script mods anymore for these games. :cry:

Edited by 65536
Link to comment
Share on other sites

 

 

Scripthook isn't working, I've reinstalled it wrong, or TrafficFlow isn't working, because...well...it isn't working.

It's the new patch, hopefully eventually he will release a new version of ScriptHook for the current patch.

 

 

I don't know, but it's better if someone send a message to @AlexanderBlade about the new GTA IV's patch about if he can make a new normal ScriptHook for IV / EFLC (and might also Hazards' ScriptHook .NET) from scratch which to replace their outdated versions since:

 

1. This ScriptHook .NET (and the original ScriptHook too as well) still have various nasty bugs, and also their authors wasn't active on GTAForums for more than an year here now;

2. Also, seems the normal ScriptHook's author @aru most likely doesn't allow anyone to back engineering his partially broken (and still BETA) plugin without anyone ask him first, which means without able to contact him for permission, we're in fact stuck! Unfortunately now appears - cannot contact current ScriptHook's author @aru (he isn't active anymore and he might also NO LONGER WORKING on this anymore) - NO ONE from the currently active modders here CAN UPDATE this to current patch without getting author's permission (which sadly appears impossible now since @aru is completely vanished)...

 

I think beside the variant IV's modding community to ask @AlexanderBlade about he to make a new ScriptHook for GTA IV 1.0.8.0 / GTA EFLC 1.1.3.0, we'll will not be able to use any script mods anymore for these games. :cry:

 

Our best bet for now is to do what we do on GTA San Andreas. Make a downgrader. That is till someone makes a new Script Hook.

Link to comment
Share on other sites

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

CAN YOU MOD IT TO WORK ON PATCH 1.8

THE CREATOR OF GTAIV SCRIPTHOOK HASN'T BEEN ACTIVE TO UPDATE IT FOR PATCH 1.8

Link to comment
Share on other sites

  • 3 months later...

The C++ ScriptHook was (kind of) updated (by that I mean the ScriptHook got hooked into to enable 1.0.8.0 functionality), so can't someone do the same thing here?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 1 month later...

I just signed up some minutes ago, to comment on this... because...

 

I just installed GTA IV Complete Edition (STEAM) and updated to last game versions gta iv/eflc v.1.0.8.0/1.1.3.0

 

When I unpacked my mod packages backup to play and enjoy (like some years ago), then I figure out, ScripHook for IV is broken on this version (I'm running Windows 10) so some minutes ago I started some research...

 

I see now, "this crucial" tool, is abandoned by original author, who published the code, then another author vanished without notice at the end of 2013, but that is not the worse thing (because people evolve or change hobbies and interests)... Ohh my surprise comes when I realized that ScripHook is DEAD WTF... oh for Christ Shake, a key important tool on GTA IV modding almost killed or force users to downgrade.

 

Now a lot of people on GTA IV modding would be orphans, or forced to stay on old version (maybe with conflicts on Windows 10 newest releases)

 

How this can be happening, a massive community, from years, brotherhood of great and powerful scripting and immersive mods like LCPDFR among others, a crucial framework base of modding development and execution ScripHook is discontinued, no development poorly-depending of "one man" who dissapear years ago... This is a shame...

 

Now with GTA V major developers will not interested on work on new C++ ScripHook update for GTA IV...

 

I hope someone contact author or at least we could found a solution... GTA IV is a lot of ways better than GTA V... and there are beautiful scripting mods.

 

I am very angry now... retro gaming or modding is about freedom, it is essential legacy and open source, in some ways...

 

I am not and expert on GTA IV scripting, but (for people who knows about this stuff? What we could do from now on? To update and maintain this 😢

 

Edited by Rifelecnak
typos correction.
Link to comment
Share on other sites

  • 3 weeks later...

I just registered, some minutes ago, to comment on this... Because

 

I just installed GTA IV Complete Edition (STEAM) and updated to last game versions gta iv/eflc v.1.0.8.0/1.1.3.0 and

 

When I unpacked my mod packages backup to play and enjoy (like some years ago), then I figure out, ScripHook for IV is broken on this version (I'm running Windows 10) so some minutes ago I started some research...

 

I see now, "this crucial" tool, is abandoned by original author, who published the code, then another author vanished without notice at the end of 2013, but that is not the worse thing (because people evolve or change hobbies and interests)... Ohh my surprise comes when I realized that ScripHook is DEAD WTF... oh for Christ Shake, a key important tool on GTA IV modding killed because it seems author "patterns of coding" are a totally mess.. who don't like so it is difficult to make community-driven updates...

 

Now a lot of people on GTA IV modding would be orphans, or forced to stay on old version (maybe with conflicts on Windows 10 newest releases)

 

How this can be happening, a massive community, from years, brotherhood of great and powerful scripting and immersive mods like LCPDFR among others, a crucial framework base of modding development and execution ScripHook is badly programmed, badly development poorly-depending of "one man" who dissapear years ago... This is a shame...

 

Now with GTA V major developers will not interested on build from scratch a new ScripHook (Thanks to people who don't release work when they retire, or without proper statement before vanished.

 

I hope someone contact author or at least we could found a solution... GTA IV is a lot of ways better than GTA V... and there are beautiful scripting mods.

 

I am very angry now... retro gaming or modding is about freedom, it is essential legacy and open source, in some ways...

 

f*ckin' amnesia and Tábula Rasa of purges like this.

 

I am not and expert on GTA IV scripting, but (for people who knows about this stuff? What we could do from now on? To update and maintain this :'(

C++ ScriptHook is already usable http://gtaforums.com/topic/390582-gtaivrelsrc-c-script-hook/?p=1069729638

Edited by Zolika1351
Link to comment
Share on other sites

  • 3 months later...
  • 1 month later...
Marcus101RR

Looks like 1.0.8.0 got released, and all they really did was remove the damn songs. Now we need a new scripthook...who even does this kind of bs? Oh right, only R*

Link to comment
Share on other sites

Looks like 1.0.8.0 got released, and all they really did was remove the damn songs. Now we need a new scripthook...who even does this kind of bs? Oh right, only R*

Eh, no? The music removal isn't a real patch, all it did is change files in audio folders, nothing in the game executable or anything to warrant a new version. Also, 1080 was released like, 1.5 years ago?

Edited by B Dawg
Link to comment
Share on other sites

Marcus101RR

 

Looks like 1.0.8.0 got released, and all they really did was remove the damn songs. Now we need a new scripthook...who even does this kind of bs? Oh right, only R*

Eh, no? The music removal isn't a real patch, all it did is change files in audio folders, nothing in the game executable or anything to warrant a new version. Also, 1080 was released like, 1.5 years ago?

 

 

People are saying that the owner no longer exists and this is why this won't update...who runs this site then and makes ScripthookV?

http://www.dev-c.com/gtav/scripthookv/

 

They even have a copyright at the bottom for both GTA4 and 5, but only 5 is up to date.

Link to comment
Share on other sites

  • 8 months later...

the latest version has a bug that is the rain drop will not show splash on objects and road ingame after you install scripthook.   will someone fix it? please.

Link to comment
Share on other sites

  • 3 months later...

I know this is probably far too late in the day to mention this, but it seems World.GetZoneName() is using the wrong native.

 

There are 2 zone related natives, GET_NAME_OF_ZONE and GET_NAME_OF_INFO_ZONE. The game scripts use the former and SHDN uses the latter. Where this makes a difference, is when you try and use GET_STRING_FROM_HASH_KEY to get the full name.

 

Because SHDN is using GET_NAME_OF_INFO_ZONE, the return value is not a valid string for the GET_STRING_FROM_HASH_KEY native, so you get nothing back.

 

Whereas if you use:

string nZone = Function.Call<string>("GET_NAME_OF_ZONE", pos.X, pos.Y, pos.Z);

You can then use:

string fZone = Function.Call<string>("GET_STRING_FROM_HASH_KEY", Game.GenerateHash(nZone));

To get the proper value.

 

As I say, this is an old game but this might help anyone who is still scripting for GTA IV and is having similar problems with the zone names.

Link to comment
Share on other sites

  • 2 weeks later...

Does anyone know why this is in the source:

	int Vehicle::MemoryAddress::get(){
		return unmanaged::MemoryAccess::GetAddressOfVehicle(pHandle);
	}

But you can't do myVehicle.MemoryAddress. You can get .Metadata and then the next property is .Model

 

Is the source just a random snapshot during the dev cycle that bears no relationship to the actuall dll that was last released? I thought I might have been able to get the Alarm state like I did in GTA V, but SHVDN has a .MemoryAddress property that you can actually use.

 

Edit: After further checking, it seems the Public modifier for that property is wrapped in an #if... debug. I don't see any sense or purpose in that. *sigh*

Edited by Guest
Link to comment
Share on other sites

I know I am wasting my time but what the heck... this:

Function.Call<uint>("START_PTFX", ptfxName, pos.X, pos.Y, pos.Z, 0, 0, 0, 1065353216);

Generates an exception when you try and use the return value from it, because it returns NULL.

 

Why would a function that is supposed to return a uint, return NULL,. when uint is not a nullable object? How are you supposed to even work with that? You can't even control it, because the NULL is assigned at Native level, so all you can do is catch the exception and leave particles in the game world.

 

Because of that, all Looped particles are unusable, because you can't get their ID to stop them and manage them... so frustrating. 😧

 

Link to comment
Share on other sites

  • 7 months later...
  • 2 months later...

I'm trying to use this with a fresh copy of the game, all patched up to 1.0.7.0 and everything, but immediately after loading a save file it crashes and this comes up in the text file:

 

2020-04-07 20:25:17 - Error during NetHook.Tick:
                      System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
                         at Scripting.NativeContext2.Invoke(SByte* name, NativeContext2* cxt)
                         at GTA.Native.Function.BaseCall(String Name, Parameter[] Arguments)
                         at GTA.Native.Function.Call(String Name, Parameter[] Arguments)
                         at GTA.Native.Template.Invoke()
                         at GTA.ScriptDomain.RemoteEvent(RemoteEventArgs ev)
                         at GTA.ScriptDomain.ProcessRemoteEvents()
                         at GTA.ScriptDomain.Tick()
                         at GTA.NetHook.Tick()
2020-04-07 20:25:17 - Error during NetHook.Tick:
                      System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
                         at Scripting.NativeContext2.Invoke(SByte* name, NativeContext2* cxt)
                         at GTA.Native.Function.BaseCall(String Name, Parameter[] Arguments)
                         at GTA.Native.Function.Call(String Name, Parameter[] Arguments)
                         at GTA.Native.Template.Invoke()
                         at GTA.ScriptDomain.RemoteEvent(RemoteEventArgs ev)
                         at GTA.ScriptDomain.ProcessRemoteEvents()
                         at GTA.ScriptDomain.Tick()
                         at GTA.NetHook.Tick()

 

 I have only one ped mod, TrainerIV, ScriptHook and ASI Loader. Any help would be appreciated. Thanks!

Link to comment
Share on other sites

  • 4 months later...
PacketOverload_x64bit

Any chance a raindrops fix is coming? Considering the fidelity of GTA V raindrops would be really nice to have in GTA IV...
Can't go without .Net though! So that's why I ask.

Link to comment
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
 Share

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