Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      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. Forum Support

    3. Suggestions

[BETA] GTAIV .Net ScriptHook


HazardX
 Share

Recommended Posts

Can anyone help me?After i start playing GTAIV with scripthook the game shuts down in about 20 minutes.I have the 1.0.7.0 version and the newest of scripthook(i think).Please advice something.

Any error message?

 

What does the ScriptHook.log and ScriptHookDotNet.log files say?

Link to comment
Share on other sites

I can't find those logs.Any directory or something?

In the game folder. The same folder as the EFLC.exe or GTAIV.exe files are.

Link to comment
Share on other sites

I don't know there are no such folders.Maybe i have the wrong scripthook.net if that's possible.I also tried every script one at a time to see if there is a problem in any of them but no dice.

Link to comment
Share on other sites

Suggestion for Vehicle.EngineRunning. Make a getter.

 

Something like

 

 

get { return this.CurrentRPM > 0.0f; }

 

Link to comment
Share on other sites

Link for scripthook 0.40 is down, please fix it smile.gif .

Link to comment
Share on other sites

Link for scripthook 0.40 is down, please fix it smile.gif .

Won't be fixed. Update your game.

Link to comment
Share on other sites

I'm using .net script hook on 1.0.4.0 with a .net trainer but in game nothing comes up when I press the buttons for the trainer??

Link to comment
Share on other sites

Link for scripthook 0.40 is down, please fix it  smile.gif  .

Won't be fixed. Update your game.

No wink.gif

 

Update ENB first then.

 

What a crappy-ass answer.

Link to comment
Share on other sites

 

Link for scripthook 0.40 is down, please fix it  smile.gif  .

Won't be fixed. Update your game.

No wink.gif

 

Update ENB first then.

 

What a crappy-ass answer.

You too. ENB has been updated long ago.

 

 

 

 

 

What a crappy-ass answer.

If you don't want people to answer, don't ask questions.

Edited by MulleDK19
Link to comment
Share on other sites

Btw, Model.Hash is wrong. It's an int, while it should be a uint.

 

 

Eg. M_Y_COP has hash 4111764146 (0xF5148AB2). Model.Hash shows -183203150 in decimal, because it's signed.

 

Signed int with value 0xF5148AB2 = -183203150

Unsigned int with value 0xF5148AB2 = 4111764146

 

You can't compare 0xF5148AB2 with Model.Hash because Model.Hash is signed, and as thus, does not allow values as high as 4111764146.

 

if(ped.Model.Hash == 0xF5148AB2) //Comparison to integral constant is useless; the constant is outside the range of type 'int'

 

 

So to compare, you need to do

 

if((uint)ped.Model.Hash == 0xF5148AB2)

 

Edited by MulleDK19
Link to comment
Share on other sites

motorsport71

I'm having the dumbest problem... i can't get the world.weather function to work in v.b.

"Public Shared Property Weather As GTA.Weather"

Foggy is in GTA.Weather in weather enum's.

 

I tried:

 

World.weather = FoggyWorld.weather = weather.FoggyWorld.weather(Foggy)World.Weather(weather.Foggy)World.weather = (Foggy)World.Weather = (weather.Foggy)Dim w as weather = world.weatherw = foggy

 

and just about every combination in between. I get the error's all stating that "foggy" isn't a member of "weather", and i tried all other weather enums and got the same result. What am i doing wrong? I've used all the other "world.blah" easily enough, so i'm a little frustrated and REALLY sorry to bother the real coders confused.gif

 

BTW, i did look through native functions but the pages were incomplete suicidal.gif

Edited by motorsport71
Link to comment
Share on other sites

lindsayslorach

@motorsport71, Make sure you use correct casing:

 

 

World.Weather = Weather.Foggy

 

Link to comment
Share on other sites

motorsport71

@lindsayslorach

I tried it with the correct casing as per your recommendation just to make sure, but still no luck... barf8bd.gif

Link to comment
Share on other sites

Eyho..

 

any pro having knowledge about getting a trigger if a vehicle having an angle?

In special yaw, pitch, roll? I would need both, positive and negative as a trigger and can't find a proper way.

Link to comment
Share on other sites

hi all. dont know if this is the right place but i want to request the scripthookdotnet.asi be updated for patch 1070 as i have found its part of the cause of the rain bug! i have fixed both rain bugs (raining inside and no collision) but as soon as scripthookdotnet.asi is put back it has the bugs again! heres the link to the fix!

 

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

 

without the scripthookdotnet.asi we loose a lot of mods! sad.gif dont think many of you will swap rain for mods! lol but at least we know it can be fixed at last!

 

so what are the chances of getting a new scripthookdotnet.asi that dont cause the bugs?

 

great work anyways people! keep it up! biggrin.gif

Link to comment
Share on other sites

Eyho..

 

any pro having knowledge about getting a trigger if a vehicle having an angle?

In special yaw, pitch, roll? I would need both, positive and negative as a trigger and can't find a proper way.

And btw why can't I catch LeftCtrl and LeftShift.. damn that makes things pretty difficult.

Link to comment
Share on other sites

Eyho..

 

any pro having knowledge about getting a trigger if a vehicle having an angle?

In special yaw, pitch, roll? I would need both, positive and negative as a trigger and can't find a proper way.

And btw why can't I catch LeftCtrl and LeftShift.. damn that makes things pretty difficult.

Catch LeftCtrl? Huh? You mean in the KeyDown event?

 

Ctrl, Shift and Alt are modifiers. e.Control, e.Shift and e.Alt.

Link to comment
Share on other sites

Thank you, gonna try that immediately. Only found a difference for LeftCtrl, RightCtrl so far, .NEt did not use it.

 

// edit: nope. No reaction. I have a config file which defines the keys. If I use ANY key like A,B,C or else, it works, if I use Control or Shift, nothing works.

 

// edit two:

 

Got it. The game reads it as:

 

LControlKey LShift

 

// edit three:

 

Hazard, why does

 

                              float rotMx = 0f;                              float rotMy = 1f;                              float rotMz = 0f;                                                               Vector3 rotMzNew =   new Vector3(rotMx, rotMy, rotMz);                               veh.ApplyForceRelative(new Vector3(1f, 0f, 0f), rotMzNew);

 

result in a rotation around Z?

Edited by Threepwood
Link to comment
Share on other sites

What are you rotating? Maybe the object is already rotated, so that the Y axis is where the Z axis should be.

 

I think I had that problem when placing weapon pickups.

Link to comment
Share on other sites

Hey biggrin.gif

 

I am new here and first i have to say: My english isnt that good. Sorry.

 

At first, thanks to HazardX for developing this .Net ScriptHook.

After reading some Posts, i thought about coding a nice mod that will allow me to control Nico's animations. Easier said i want Niko to play an animation i choose.

i learn VB.Net for two years. Can you tell me how to get Niko playing an animation i choose?

 

And again... Sorry for my bad english biggrin.gif

 

Madretsma

Link to comment
Share on other sites

 

What are you rotating? Maybe the object is already rotated, so that the Y axis is where the Z axis should be.

 

I think I had that problem when placing weapon pickups.

 

                               veh.ApplyForceRelative(new Vector3(0f, 0f, 0f), rotMzNew);

 

 

This is what I use (edited it in, forgot that, sorry). I rotate a vehicle in relative to its position or vectors, if thats the better term. As you can see, not Z is given a value, but Y. And I wonder how that can result in a rotation around Z.

Link to comment
Share on other sites

For me collisions working good. I have also edited handling.cfg to make even more real. I will give probably stupid and common question. Will be a little hot fix for rain bug? I don't mind rain indoors too much but no cool splashes it's a crime. I haven't updated PC not to enjoyed game at full effects tounge.gif

Link to comment
Share on other sites

The rain bug has been reported many times, but I don't think it's likely to be fixed.

 

Not everyone has the bug, so apparently it's some kind of conflict between the scripthook and certain computers (video drivers maybe?). I have the bug, and it's really a shame. I haven't seen the awesome rain splashes in years.

 

One little detail I noticed, maybe it'll help someone find the problem: the splashes actually appear when I open the menu screen, but only while the screen is fading to black. When I close the menu screen, the splashes disappear again.

Link to comment
Share on other sites

hello ! biggrin.gif

 

can someone explain how i could change the text color in Game.Displaytext ?

and is there any tutorial for a menu like in all these in-game trainers etc. ?

Link to comment
Share on other sites

thaCURSEDpie

Game.DisplayText() doesnt allow text colours.

 

If you want to make menus, either uses the GTA.Form class, or the GTA.Script.onPerFrameDrawing event.

The latter will allow you to draw text of your choice, rectangles, lines, etc. The former will allow you to make forms (which are kinda like windows in MS Windows)

Link to comment
Share on other sites

Game.DisplayText() doesnt allow text colours.

 

If you want to make menus, either uses the GTA.Form class, or the GTA.Script.onPerFrameDrawing event.

The latter will allow you to draw text of your choice, rectangles, lines, etc. The former will allow you to make forms (which are kinda like windows in MS Windows)

Thank you ! smile.gif

 

Is there any tutorial for using GTA.Forms ?

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.