Log in to reply
 

Complete Mystery. Car Spawn causes Player to Parachute?



  • I'm completely baffled and lost by some really really strange stuff. This is really a WTF moment!

    A few months ago I wrote my first real script, player picks up passengers at hotel and then drives, by script, to the ULSA campus. It worked perfectly and I put it aside until today.

    I want to emphasize that I did not make any revisions to the script, not that it would matter.
    However many things did change since the last time I ran the script, although none of them should cause this issue: there was a GTA V update, I installed my first car addons, with config file and heap mods. Addons work great and game is stable.

    So what is the issue, when I spawn the car that will take the player and peds to the ULSA Campus, the player for some new and unknown reason lifts off the ground, deploys a parachute although just a few feet in the air, and lands back on the ground.

    This never happened before, the player is not spawned by code, and there are no other scripts in my script folder that could conflict, particularly with the key up which numpad7. The The script is broken down in key presses. This is the code for numpad7. That's it, that's all. No interaction with player, not even the car's spawn location which is absolute and independent of player. Code is VB.Net, again not that it matters.

            PedPlayer = Game.Player.Character
            CarSpawnLoc = New Vector3(-1285, 295, 64)
            CarModel = "Stratum"
            Vehicle1 = World.CreateVehicle(CarModel, CarSpawnLoc)
    

    Vehicle1.Heading = 60.0F
    Vehicle1.PrimaryColor = VehicleColor.MetaillicVDarkBlue

    Anyone have an idea why this sudden change in behaviour for a working script, unrevised.



  • @JohnFromGWN This not a joke or premature April Fools. I'm completely at a loss as to why this stable script is behaving like this, particularly when the code does not in any way impact the player. Again, only changes have been the game update, new scripthook, and the car addons. None of these have any thing to do with spawning a car (the car in being spawned, in passing, is NOT an addon.)
    This is what is going on. Player is in front of hotel, I press the 7 key on the numpad and the car spawns in front of him. Nothing should change with player, yet for whatever reason he now teleports even though nothing in the script even remotely suggests that. Really????????


  • MODERATOR

    Disable trainers and try again with just your script.

    Could be the trainers or other mods have had a cheeky update.



  • @ikt Thanks. Doing that as I write. Have removed heap, config.xml, and the 5 car addons. Also going to try to run script as .vb rather than .dll, - shooting in the dark!



  • Update:
    I uninstalled/removed all my addons except Menyoo which hasn't been updated recently.
    I did a verify integrity on Steam which restored all my game files.
    I then updated my Mods folder and installed the latest scripthook.
    Then I checked another script and realized it was broken also. A different bug.
    In the video below, this script which ran correctly before the last update, notice how the player gets on the bike. There is an unexpected (and new bug) - a little hopping motion as she gets on. This was never there before and shouldn't be there at all.

    Conclusion: Either the new steam update or the new scripthook broke my existing scripts.
    I have to rollback and see what happens. Given I'm probably the only person in the world scripting in VB.Net (and Steam) this is possibly why nobody else has reported this.
    Also, I tried changing my donet2 to donet3 in case scripthook had broken donet2, but this resulted in many compiling errors - in other words dotnet2 is not a subset of dotnet3, they support different functions.

    This is really frustrating. I was progressing nicely in my coding, about 3 months in, and now nothing I had created works properly after these updates.



  • Ok. I solved the riddle. Wow.

    I've been using NumPad7 for many months now, without any problems, and with Menyoo installed. I did more testing, with all scripts deleted, and I hit NumPad7 and my player went up in the air - I realized that NumPad7 is used by Menyoo with Fly Manual, but only if Fly Manual is set to on - which it wasn't to supposed to be.

    Ok, so that mystery is solved although no idea how Fly Manual got enabled, but i obviously set it by mistake. Now for the second video, this time it was NumPad1, which Menyoo also uses, for Fly Manual.

    So, 2 hours or more lost installing and uninstalling because of a feature in Menyoo that I never use was enabled. LOL.



  • @ikt You were right about the trainer, Menyoo, but not because of any updates, because some idiot (me) had enabled Fly Manual without realizing it.
    Funniest part is that my testing, 2 different scripts, one called by NumPad 7, the other by NumPad1 - both scripts broken, both by coincidence the keys used by Fly Manual. Wonderful.


  • MODERATOR

    Just never trust trainers or any other scripts than your own, while testing.



  • @ikt That's good advice. Thanks.



  • @JohnFromGWN said in Complete Mystery. Car Spawn causes Player to Parachute?:

    Given I'm probably the only person in the world scripting in VB.Net (and Steam)

    You're not the only one scripting in VB.NET, or on Steam. One big name I know off the top of my head that uses VB.NET is JulioNIB, who makes all of those superhero mods and such.

    Also, the .NET language you are using doesn't matter once it is compiled (either by you to .dll, or by SHVDN automatically), because all .NET languages (C#, F#, VB.NET) are "compiled" to CIL (Common Intermediate Language), which is sort-of like the Assembly of .NET.



  • @Jitnaught Hi. I was just kidding about being the only person who uses VB.NET, having said that it is quite challenging to find anything to support/help scripting in that language. I've been using Excel for longer than I can remember and have developed hundreds if not thousands of applications using VBA, so moving to VB.NET made the transition easier for me.

    I remember when I first started with GTA V, a few months ago,, I had never used VS, and was completely confused with everything: SHV, SHVDN, trainers, OIV, natives, tasks, scenarios, animations, etc. Got past those hurdles. It's all slowly coming together now, comfortable with the jargon and what's what.

    I also do my best to script in C# when I don't want to reinvent the wheel, for example to modify the C# Freecam script that you had suggested in another thread.

    And ofc I know I'm not the only one on Steam, actually I would expect most GTA V users to be on Steam given the popularity of that platform.

    Anyway still moving on the learning curve, still having lots of fun - being locked down is no fun - this one great way to escape when taking breaks from work.



  • @JohnFromGWN I believe ImNotMental also uses VB.Net, alot of his projects are open source on github. Might be of some use to you.

    https://www.gta5-mods.com/users/ImNotMentaL
    https://github.com/qiangqiang101



  • @mcal9909 Yes, I remember watching one of his videos when I started out. He had an "onabort" sub which I've since used, as a concept, in a few scripts. Thanks for the links. Currently the Natives DB is my best resource, with trial and error. In fact, most of my functions are natives. Intellisense is a great tool as well.


Log in to reply
 

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.