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 Tuners
      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. GTA San Andreas

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

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

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    4. Bugs*

    1. Grand Theft Auto Series

      1. 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. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    6. 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

      1. GTANet 20th Anniversary
    2. Support

    3. Suggestions

[V] Script/Native Documentation and Research


Alexander Blade
 Share

Recommended Posts

unknown modder

 

int _GET_AIRCRAFT_COUNTERMEASURE_COUNT(Vehicle aircraft); // 0xF846AA63DF56B804void _SET_AIRCRAFT_COUNTERMEASURE_COUNT(Vehicle aircraft, int countermeasureCount); // 0x9BDA23BF666F0855int _GET_AIRCRAFT_BOMB_COUNT(Vehicle aircraft); // 0xEA12BD130D7569A1void _SET_AIRCRAFT_BOMB_COUNT(Vehicle aircraft, int bombCount); // 0xF4B2ED59DEB5D774BOOL _ARE_BOMB_BAY_DOORS_OPEN(Vehicle aircraft); // 0xD0917A423314BBA8float _GET_PLANE_HOVER_MODE_PERCENTAGE(Vehicle plane); // 0xDA62027C8BDB326E

You dont happen to know if there is one that checks if bomb bay doors are FULLY open?

 

I'm not sure, But I thought the _ARE_BOMB_BAY_DOORS_OPEN only returns true when they are fully open. Feel free to test it out yourself though

Link to comment
Share on other sites

I'm not sure, But I thought the _ARE_BOMB_BAY_DOORS_OPEN only returns true when they are fully open. Feel free to test it out yourself though

Returns TRUE if doors are open or opening, so immediately after the OPEN_BOMB_BAY_DOORS and until CLOSE_BOMB_BAY_DOORS is called.

Returns FALSE if doors are closed or closing, so immediately after CLOSE_BOMB_BAY_DOORS and until OPEN_BOMB_BAY_DOORS is called.

 

On the other hand, does anyone know the location and name of the file with sound for bomb bay doors opening/closing? Or a way to disable it through natives (AUDIO::STOP_SOUND maybe?).

Edited by darkphoenixxx
Link to comment
Share on other sites

  • 2 months later...

Hi, it's amazing everything I've learned from reading you.

I can manage now in reverse engineering when I knew nothing before.
So thank you for your knowledge sharing, albeit limited a few times :)
In such a short time learning in the end, I was able to create beautiful things, like a YSC disassembler, YSC edit in runtime (nop overwrite anyway) and so many interesting things.
( thanks to documentation scrProgram on gtamodding anyway for ysc :lol: )
There are far too many talents here.
Also, i saw that the registration native function was changed in b1290 ( little obfuscation i suppose ), it does not look very complex to reverse.
I could never have understood all these things without all that has been said here.
:santa:
Thanks to all reverse engineering mans ^^
Edited by Transmet
Link to comment
Share on other sites

While waiting for the repair.

 

I made a small trampoline to analyze the use of native uses in "YSC" scripts.
I do not think I'm helping anyone with that, but it's always good to share what's relevant to this topic.

https://github.com/Transmet92/GTA-V-Natives-Stats

 

It does the percentage of use of each native call during the game, I did it for basic personal use.

( trampoline native opcode in scrProgram interpreter )

I'll post an example of output in the github a little later.

Link to comment
Share on other sites

  • 4 weeks later...

 

Can anyone shed some light on how native "GET_CLOSEST_OBJECT_OF_TYPE" works ? Does this work off coordinates as get_closest_vehicle ?

 

Some further explanation of the params would be appreciated.

var object = get_closest_object_of_type(x_pos, y_pos, z_pos, max_distance, object_hash, unk_bool);

Its pretty similar to get closest vehicle only you have to specify the exact model hash you're searching for

 

 

 

I'm trying to remove a bush, like:

 

returnedProp = Function.Call<Prop>(Hash.GET_CLOSEST_OBJECT_OF_TYPE, -561.7426f, 4439.272f, 24.94009f, 0.1f, 1277635601, 0); // prop_bush_lrg_03

if (returnedProp != null && returnedProp.Handle != 0) returnedProp.Delete();

 

But the bush stubbornly remains undeleted. What am I doing wrong?!

 

Edited by meimeiriver
Link to comment
Share on other sites

  • 2 months later...

idk when the next update for script v will be out but i am very anxious on its release after having soo much fun before the update of gta5 and now having to delete the latest script hook im kinda bummed out buuut in the long run i wait patiently hoping for that next update keep up the good work alex

Link to comment
Share on other sites

  • 3 weeks later...
moonlight79

Hi everyone, do you guys know any ways to make player move around the city automatically? Thank you very much!

Link to comment
Share on other sites

Hi all,

 

Was having trouble making a countdown before a race/event, and after some digging found from decompiled script "country_race":

 

ScaleformID "COUNTDOWN" with scaleform movie function "SET_MESSAGE", text component "NUMBER", add text component integer with a number (for countdown).

 

This will display the number on a circle background, like the countdown before races.

 

Combined with REQUEST_SCRIPT_AUDIO_BANK "HUD_321_GO" and playing the sounds "3_2_1" and "GO" from "HUD_MINI_GAME_SOUNDSET" it's almost like the real thing :)

 

 

Link to comment
Share on other sites

 

static void _DISABLE_VEHICLE_NEON_LIGHTS(Vehicle vehicle, BOOL disable) { invoke<Void>(0x83F813570FF519DE, vehicle, disable); }
Been in the game since 573 but hasn't been documented. Saves you the headache of storing neon states and detecting if you messed with them, or the game messed with them, if you simply wanna turn sets on or off.

 

(Native is used in the vehicle interaction menu in Online)

 

Edit:

It's _DISABLE_VEHICLE_NEON_LIGHTS. Unknown's remark.

Edited by ikt
Link to comment
Share on other sites

  • 4 weeks later...
  • 1 month later...
forumapp28

How can i get original natives? Some natives edited by kids and is no longer working.

Edited by forumapp28
Link to comment
Share on other sites

  • 5 months later...

Still after downloading Script Hook V 1.0.1604.0, it still gives me the critical error message when loading up my game. I've deleted the old one and the dsound.dll aswell but I am still stumped

Link to comment
Share on other sites

26 minutes ago, Copper_ said:

Still after downloading Script Hook V 1.0.1604.0, it still gives me the critical error message when loading up my game. I've deleted the old one and the dsound.dll aswell but I am still stumped

This isn't a support thread, it's a documentation thread... look in the Scripts & Plugins section, there's a thread in there.

Edited by Guest
Link to comment
Share on other sites

  • 9 months later...

@Alexander Blade G

 

Good 

Good afternoon. Please 🙏, Could you  help us fixing ScriptHookV to the lastest version of GTA 5,  1.0.1737.6? 

I use this mod frequently, please brother... Thanks

Link to comment
Share on other sites

  • 1 month later...
Alexander Blade

 

Link to comment
Share on other sites

  • 3 weeks later...
Jupiter_Hortenzievich

I've noticed, that somebody who is working on Native DB, have changed the declaration of some natives' parameters' and/or return type's value from the original to pointer!

For example, let's see the very first, 'PLAYER:: GET_PLAYER_PED'. It was originally a 'Player' now it is a 'Player*'. Dumb mistake! The script crashes when I try to dereference the 'pointer'. What changed? Nothing - they do the same!

I found a bunch of natives, like this, whose type or some parameters has been changed into a pointer. I also found falsified 'Entity', 'Vector3', 'Any', 'Vehicle', 'Ped' or 'Train' pointers.

The question is 'Why did they change?'. Particularly for n00b ScriptHookV ASI modders, this is a serious problem. Also a problem for me - I am the one who is working on the ScriptHookV Pascal SDK, and cannot decide which is really a pointer, or which is a falsified pointer. It also cannot be automatized to decide!

 

Anyway, thanks for creating the Native DB - but please, do not trash it for fun!

Link to comment
Share on other sites

  • 4 months later...

this is 2020 april 2  there is no updated script hook v when will there be one released or avalible

Edited by SLIMslim
Link to comment
Share on other sites

this is 2020 april 2  the is no updated script hook v when will there be one released or avalible thanks for updateing.  script hook v it very useful for me it would be very hard for me with out it at this time I live on gta 5 and its mods I need to have it I love gta 5 and its mods I hope you get done with the upde soon I just got some new matieral and was woking it out and gta 5 updated trying to get this new zmodler 3 working well I just spent some money getting my gaming pc fixed the other day and got some software done so im waiting to get the new script hook v update pretty bad

thanks.

Edited by SLIMslim
Link to comment
Share on other sites

1 hour ago, TP511 said:

Any news as to when script hook will be updated? 

Thanks for your time

No and there won't be any news until the updated version is released on the site of the person updating it... that's pretty much how it works. Only one person knows, that's how it's always been.

Link to comment
Share on other sites

There's several (open source) drop-in replacements, but they're old.

 

OpenVHook, but stuck at 1365

Give-Two's ScriptHookV, afaik also 1365

 

Also there'd been some more significant changes after the Casino update, which might hamper just dropping in a new native map.

 

RagePluginHook is *not* compatible currently, but if it's updated before ScriptHookV and you're in a hurry for some reason, you can also try the Asi support for RPH.

 

So basically just wait.

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...
Kenny Wall

Hello everyone, we are all waiting when Alex Blade will update ScriptHookV for EGS version of the game. Meanwhile i were able to patch ScriptHookV.dll,

so now it supports EGS version of Gta5 1.0.1868.4 and i want to share my work.

 

Luckily, natives' "hashes" were not changed, so i only had to change 12 game offsets which hook uses during its work.

I understand that this can look suspicious, but on this forum there are several people who know what is reverse engineering, so they can simply binary compare 
original ScriptHookV.dll with one from my archive and see that there are changes only in offset tables, game version check function and in couple of text messages.

 

Use it only with Gta5 1.0.1868.4 EGS, because i had to patch game version check function in such way that it will probably skip older versions. 
Also i had to use 1868.1 places in offset tables to hold new 1868.4 values, so 1868.1 won't work too. This is not a big problem for now, main goal was to support 1868.4 EGS.

 

Download link for ScriptHookV_1.0.1868.4.zip:

https://mega.nz/folder/X84UwS7a#WoDgLYaQHNed-IX7ETStCA

SHA256 of the archive: 7d10ef4468baf0f7d9588f0a96b4c328697a89631f3393adc4ac83133b16a9d0

 

Virustotal for archive:
https://www.virustotal.com/gui/file/7d10ef4468baf0f7d9588f0a96b4c328697a89631f3393adc4ac83133b16a9d0/detection

 

Virustotal for ScriptHookV.dll:

https://www.virustotal.com/gui/file/1112075e7cd4f0bf62e9c40638471ecd8abacc02c2314df99cfe9fd728a9db7e/detection

 

I've tested hook with NativeTrainer included with original archive, it seems to be working fine. Also there are reports from people on other forum, that LSPDFR is working with my updated scripthookv on Gta 1868.4 EGS.

 

 

Edited by Kenny Wall
typos
Link to comment
Share on other sites

the ScriptHookV_1.0.1868.4.zip works great for me using the https://github.com/LukeRoss00/gta5-real-mod to play on Oculus Rift and on Quest using Oculus Link. But, it does not work for me when trying to use SteamVR via Radeon Relive VR (AMD's built in solution to playing SteamVR games on wireless headsets). I don't know if this also means it isn't working on Quest using Virtual Desktop either, has anyone tried? I can see the HUD and pause screens, but not the game. It is all black, but occasionaly will flash 1 frame of the actual game. People were experiencing this with old scripthookv i wonder if there's something that could be changed.

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
    0 members, 0 Anonymous, 2 Guests

×
×
  • Create New...

Important Information

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