Quantcast
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. The Diamond Casino Heist
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Red Dead Online

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

      1. Events
    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Redemption

    1. Grand Theft Auto Series

    2. GTA 6

    3. GTA V

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

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

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    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. DYOM
      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
    3. Gangs

    1. Announcements

    2. Support

    3. Suggestions

Alexander Blade

[V] Script/Native Documentation and Research

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

Share this post


Link to post
Share on other sites
darkphoenixxx

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

Share this post


Link to post
Share on other sites
sany1991

Correct the error, update the scripthook Steam version of the game 1.0.1290.2 :bbq:

Share this post


Link to post
Share on other sites
Transmet

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

Share this post


Link to post
Share on other sites
Transmet

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.

Share this post


Link to post
Share on other sites
meimeiriver

 

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

Share this post


Link to post
Share on other sites
bugjp2

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

Share this post


Link to post
Share on other sites
moonlight79

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

Share this post


Link to post
Share on other sites
Larph

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 :)

 

 

  • Like 1

Share this post


Link to post
Share on other sites
ikt

 

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

Share this post


Link to post
Share on other sites
forumapp28

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

Edited by forumapp28

Share this post


Link to post
Share on other sites
Flying Scotsman
On 7/4/2018 at 3:50 PM, forumapp28 said:

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

You can use other sites like: 

 

https://macoonier.github.io/GTA5-NativeDatabase/

Share this post


Link to post
Share on other sites
Copper_

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

Share this post


Link to post
Share on other sites
Guest
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

Share this post


Link to post
Share on other sites
mrbashiyo

@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

Share this post


Link to post
Share on other sites
Alexander Blade

 

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
therock73

When is there a new Native trainer and script hook

Share this post


Link to post
Share on other sites
SLIMslim
Posted (edited)

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

Edited by SLIMslim

Share this post


Link to post
Share on other sites
SLIMslim
Posted (edited)

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

Share this post


Link to post
Share on other sites
TP511

Any news as to when script hook will be updated? 

Thanks for your time

Share this post


Link to post
Share on other sites
LeeC22
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.

Share this post


Link to post
Share on other sites
ikt

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.

Share this post


Link to post
Share on other sites
EasyRiderGR

Will you make an update for the epic games version of GTA V.

 

Share this post


Link to post
Share on other sites
Kenny Wall
Posted (edited)

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
  • Like 8

Share this post


Link to post
Share on other sites
DanielBlacko

I love u man, no homo

  • Like 2

Share this post


Link to post
Share on other sites
hundr

Woot

Share this post


Link to post
Share on other sites
erebus_

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 4 Users Currently Viewing
    1 member, 0 Anonymous, 3 Guests

    • R3QQ
×
×
  • Create New...

Important Information

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