Jump to content

» «

[V] Script/Native Documentation and Research

1,147 replies to this topic
unknown modder
  • unknown modder

    Bon Jon Bovi

  • Members
  • Joined: 04 Jul 2012
  • United-Kingdom


Posted 23 September 2017 - 04:28 PM


int _GET_AIRCRAFT_COUNTERMEASURE_COUNT(Vehicle aircraft); // 0xF846AA63DF56B804
void _SET_AIRCRAFT_COUNTERMEASURE_COUNT(Vehicle aircraft, int countermeasureCount); // 0x9BDA23BF666F0855
int _GET_AIRCRAFT_BOMB_COUNT(Vehicle aircraft); // 0xEA12BD130D7569A1
void _SET_AIRCRAFT_BOMB_COUNT(Vehicle aircraft, int bombCount); // 0xF4B2ED59DEB5D774
BOOL _ARE_BOMB_BAY_DOORS_OPEN(Vehicle aircraft); // 0xD0917A423314BBA8
float _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

  • darkphoenixxx

    Square Civilian

  • Members
  • Joined: 13 May 2015
  • None


Posted 24 September 2017 - 12:40 PM Edited by darkphoenixxx, 24 September 2017 - 12:43 PM.

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?).

  • kagikn


  • Members
  • Joined: 05 Jun 2014
  • Japan


Posted 16 December 2017 - 10:22 PM Edited by kagikn, 16 December 2017 - 10:23 PM.

I found a site containing natives that don't exist in the first version by accident.
There are way more extra natives than I thought.
the repo https://github.com/M...-NativeDatabase
  • ikt and Transmet like this

  • sany1991

    Player Hater

  • Members
  • Joined: 14 Dec 2017
  • Russia


Posted 17 December 2017 - 07:36 AM

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

  • Transmet

    LS:MP Leader & Developper

  • Members
  • Joined: 01 Aug 2014
  • France


Posted 18 December 2017 - 09:40 PM Edited by Transmet, 18 December 2017 - 09:42 PM.

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.
Thanks to all reverse engineering mans ^^

  • Transmet

    LS:MP Leader & Developper

  • Members
  • Joined: 01 Aug 2014
  • France


Posted 25 December 2017 - 11:19 PM

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.



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.

  • meimeiriver

    Square Civilian

  • Members
  • Joined: 04 Mar 2017
  • Netherlands


Posted 21 January 2018 - 08:54 AM Edited by meimeiriver, 21 January 2018 - 08:58 AM.


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?!

  • bugjp2

    Player Hater

  • New Members
  • Joined: A day ago
  • United-States


Posted A day ago

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 

5 user(s) are reading this topic

0 members, 5 guests, 0 anonymous users