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

Script Hook V


Alexander Blade
 Share

Recommended Posts

 

 

Vehicle GET_VEHICLE_INDEX_FROM_ENTITY_INDEX(Entity entity)
But how can I reverse this, I have a vehicle and I want an entity, so I can add it to the mission.

A vehicle is an entity. You don't need this native at all. R* uses this to cast an entity to a vehicle but in reality it simply returns whatever is passed to it.

 

 

Thanks.

About :

GAMEPLAY::SET_MISSION_FLAG(true);

Is that supposed to do something visibly, because for me it looks like its not doing anything.

Or in other words, how do I start my own mission?

 

SET_MISSION_FLAG disables the ability to save the game.

I'd look at a decompiled mission script and see how it's done.

Link to comment
Share on other sites

I'm sorry I didn't read the entire code, but seeing what others have done with your program I see that spawned peds and cars arent added to the garbage cleanup lists... this can leave huge piles of dead peds forever cluttering up the session for as long as it exists in online derivatives *cough* money drops *cough*

 

anyway, same is true when adding bodyguards in story mode... when I switch from trevor to michael... the bodyguards lose conciousness when switching but stay forever in the map, dead or not

 

I think it certainly good to know which function adds entity to the cleanup-list or whatever... it's only good coding practice..

 

if you can try to mail me, if the function is there do tell me

Link to comment
Share on other sites

I'm sorry I didn't read the entire code, but seeing what others have done with your program I see that spawned peds and cars arent added to the garbage cleanup lists... this can leave huge piles of dead peds forever cluttering up the session for as long as it exists in online derivatives *cough* money drops *cough* anyway, same is true when adding bodyguards in story mode... when I switch from trevor to michael... the bodyguards lose conciousness when switching but stay forever in the map, dead or not I think it certainly good to know which function adds entity to the cleanup-list or whatever... it's only good coding practice.. if you can try to mail me, if the function is there do tell me

Ped -> SET_ENTITY_AS_NO_LONGER_NEEDED(Entity* entity) // ≙ SET_PED_AS_NO_LONGER_NEEDED(Ped* ped)Model -> SET_MODEL_AS_NO_LONGER_NEEDED(Hash model)

PS: NO 'online' discussions here ;)

Link to comment
Share on other sites

 

I cannot get this to work. Deleting the mods folder has no effect. I don't want to reinstall the game entirely because I have poor internet and it won't handle a Steam re-download without waiting a week.

 

Anyone have a fix for this? The author has been dead silent, and everyone is reporting that they are struggling to get this to work.

He is silent because you are just one of many people who have problems. I can assure you the problem is not ScriptHookV but something you are doing (or not doing) on your end. It works just fine for the majority of people. My first point of advice would be to make sure you have the the correct MVS C++ redistributable installed.

 

 

You said he's quiet because "many people have problems" and then you said it's my fault and that it works for the majority of people. I think you're just guessing at this point.

 

I've been using Scripthook for some time, and it's critical for use with many other mods. Normally, Blade is responsive and updates quickly. This time, the reports of it not working are widespread here on the forum (look around) as well as on Reddit and GTA5-mods.com. A HUGE number of people are having problems getting this to work.

 

This is unusual, given the normal high-quality Blade has shown.

Link to comment
Share on other sites

Hi, I just installed it and most online cars won't stay ... they vanish after a few seconds. :( any idea if there's a fix?

Link to comment
Share on other sites

 

Hi, I just installed it and most online cars won't stay ... they vanish after a few seconds. :( any idea if there's a fix?

 

 

same.. dlc content disappears on native trainer

Link to comment
Share on other sites

Hi,

I am a phd student in computer vision and machine learning. Our group is collecting car images for research.

The data should be like this : images of a stationary car from different viewpoints (maybe 20 viewpoints) are a group of data, which means within one group the car is the same and only the viewpoint changes. We need tens of thousands of groups captured for different cars in different scenes. Obviously, it can not be done manually.

It is nice that Script Hook can spawn cars and change scenes. Is it possible to customize the script so that it can automatically spawn a car, change the scene, rotate the view in 360 degrees and this cycle repeats?

We appreciate any suggestions. Thank you for your reply!

Edited by hnwxc00
Link to comment
Share on other sites

Lamborghini1335

 

Hi,
I am a phd student in computer vision and machine learning. Our group is collecting car images for research.
The data should be like this : images of a stationary car from different viewpoints (maybe 20 viewpoints) are a group of data, which means within one group the car is the same and only the viewpoint changes. We need tens of thousands of groups captured for different cars in different scenes. Obviously, it can not be done manually.
It is nice that Script Hook can spawn cars and change scenes. Is it possible to customize the script so that it can automatically spawn a car, change the scene, rotate the view in 360 degrees and this cycle repeats?
We appreciate any suggestions. Thank you for your reply!

 

Why don't you do that yourself? I mean spawn and then snap a pic, then get in car rotate and snap a new pic.. and repeat..

Link to comment
Share on other sites

 

 

 

Hi,

I am a phd student in computer vision and machine learning. Our group is collecting car images for research.

The data should be like this : images of a stationary car from different viewpoints (maybe 20 viewpoints) are a group of data, which means within one group the car is the same and only the viewpoint changes. We need tens of thousands of groups captured for different cars in different scenes. Obviously, it can not be done manually.

It is nice that Script Hook can spawn cars and change scenes. Is it possible to customize the script so that it can automatically spawn a car, change the scene, rotate the view in 360 degrees and this cycle repeats?

We appreciate any suggestions. Thank you for your reply!

 

Why don't you do that yourself? I mean spawn and then snap a pic, then get in car rotate and snap a new pic.. and repeat.. 

 

why don't you just walk to pluto?

 

yes it is possible. just need to know all the safe places you could spawn the car. considering you need to alter the "script" it might be easier to physically move to any cars you want to photograph

 

just how much you no of scripthook or coding in general..

 

sure its possible to make a small bot that uses scripthook to do your wish

 

if you really so intent of teleporting the cars and the player to different places, you'll need a list of some safe places to spawn.. not just random points in the map

 

I say its better to tp yourself around the car.. just change the facing angle and shot it... scenery changes then too..

 

also donno if u notice, but its a videogame.. I mean the output will be unrealistic.. pixellated.. blurred

 

whatever

 

first off you'll need to write that bot. sh is open-source so "possible" yes.. and easy too if you're already somewhat good at coding.. gta not so, in fact im sure if you distribute the content in any form you'll have r* at you in no time

Edited by kajotex
Link to comment
Share on other sites

Lamborghini1335

 

 

 

Hi,

I am a phd student in computer vision and machine learning. Our group is collecting car images for research.

The data should be like this : images of a stationary car from different viewpoints (maybe 20 viewpoints) are a group of data, which means within one group the car is the same and only the viewpoint changes. We need tens of thousands of groups captured for different cars in different scenes. Obviously, it can not be done manually.

It is nice that Script Hook can spawn cars and change scenes. Is it possible to customize the script so that it can automatically spawn a car, change the scene, rotate the view in 360 degrees and this cycle repeats?

We appreciate any suggestions. Thank you for your reply!

 

Why don't you do that yourself? I mean spawn and then snap a pic, then get in car rotate and snap a new pic.. and repeat..
 

 

why don't you just walk to pluto?

 

yes it is possible. just need to know all the safe places you could spawn the car. considering you need to alter the "script" it might be easier to physically move to any cars you want to photograph

 

You asked the question not me, disable wanted level and TP to the airport runway and do what I said in my prev. comment.

Link to comment
Share on other sites

4.dead.in.car.crash

Alexander, thanks for the great framework! I was wondering if there was a way to disabled the DirectX hooks that you offer (i.e. present, etc...) so that other tools (like RenderDoc, Reshade) that hook into DirectX can be used simultaneously with ScriptHookV?

 

Please see this issue for more deails: https://github.com/openai/universe-windows-envs/issues/6#issuecomment-272472566

Link to comment
Share on other sites

Would it be possible to make it so that .asi files can be placed within their own sub-folder, rather than in the root GTA V folder?

Link to comment
Share on other sites

I believe ASI scripts can be placed inside the /scripts/ subfolder, but I'm not sure how the scripts which need an INI will work. Some of them expect it to be in the game's root folder, while the others need it to be in the same folder where the ASI file itself is.

Edited by Claude_Lib
Link to comment
Share on other sites

update IV please. seriously how can people still be interested in modding V, as at each update everything breaks loose. is this a masochist thing or something :lol:

Edited by jpm1
Link to comment
Share on other sites

Get off, IV mad guy.

HHnErXC.png


Link to comment
Share on other sites

Yes.

HHnErXC.png


Link to comment
Share on other sites

Sigh, such a bummer lol. I stoped playing GTA IV altogether for almost two years and just when I"ve decide to give it yet another playthrough, R* decided to patch it and screw us over

Link to comment
Share on other sites

anyone else having an issue with the in-game televisions? I started a new game and got to the point where I need to assassinate Jay Norris for Lester, but the tv is a black screen... no sound no video, i loaded a full completed save and tried it with all three protagonists on there, and the same thing, black screen, no audio. Flipping through the channels and adjusting the audio doesn't bring it back either...

Link to comment
Share on other sites

Disable all time-related trailer functions, like system time sync.

Thanks! That worked!!

Link to comment
Share on other sites

Hello.
Please sorry my English.
Please give me some examples of scripts. Interested in more than just the appearance of people.
For example the script, I press ctrl + g, there is a man in front of me and began to beat me.
Who can show me these scripts?
Thank you in advance!

Link to comment
Share on other sites

Lamborghini1335

Hello.

Please sorry my English.

Please give me some examples of scripts. Interested in more than just the appearance of people.

For example the script, I press ctrl + g, there is a man in front of me and began to beat me.

Who can show me these scripts?

Thank you in advance!

That's not a script, that's everyone calls a keybind or in some cases you could say controller bind. Which is what you use to use the Trainer. F3/F4 to open this trainer. I also suggest you read the trainer.ini file to learn the keys.

Link to comment
Share on other sites

This ScriptHook does not work as ScriptHook in GTA 4?
In GTA 4 was just checking the key, then create an object of class ped and all.

Link to comment
Share on other sites

Lamborghini1335

Wrong mod, GTA IV was updated, but the SH was not, so there is no trainer for gta iv anymore.

Link to comment
Share on other sites

Hello.
I have a question.
What knowledge do I need C ++ for scripting in C ++ and ScriptHook?
I am writing scripts using C # and ScriptHook .NET, but I'm learning C ++, and I'm wondering how the scripts that I write in C #, will look like in C ++.
All thanks in advance!

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

  • 2 Users Currently Viewing
    1 member, 0 Anonymous, 1 Guest

    • ZloiVasja
×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.