Quantcast

Jump to content

» «
Photo

[V] Script/Native Documentation and Research

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

    Bon Jon Bovi

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

#1141

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
  • darkphoenixxx

    Square Civilian

  • Members
  • Joined: 13 May 2015
  • None

#1142

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
  • kagikn

    Ghillie

  • Members
  • Joined: 05 Jun 2014
  • Japan

#1143

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.
https://macoonier.gi...NativeDatabase/
the repo https://github.com/M...-NativeDatabase
  • ikt and Transmet like this

sany1991
  • sany1991

    Player Hater

  • Members
  • Joined: 14 Dec 2017
  • Russia

#1144

Posted 17 December 2017 - 07:36 AM

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


Transmet
  • Transmet

    Rat

  • Members
  • Joined: 01 Aug 2014
  • France

#1145

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

Transmet
  • Transmet

    Rat

  • Members
  • Joined: 01 Aug 2014
  • France

#1146

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.
 

https://github.com/T...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.


meimeiriver
  • meimeiriver

    Square Civilian

  • Members
  • Joined: 04 Mar 2017
  • Netherlands

#1147

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
  • bugjp2

    Player Hater

  • New Members
  • Joined: 23 Mar 2018
  • United-States

#1148

Posted 23 March 2018 - 12:52 AM

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 


moonlight79
  • moonlight79

    Player Hater

  • New Members
  • Joined: 2 weeks ago
  • Vietnam

#1149

Posted 2 weeks ago

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


Larph
  • Larph

    Player Hater

  • Members
  • Joined: 26 Oct 2017
  • Netherlands

#1150

Posted A week ago

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

 

 

  • ikt and LeeC2202 like this

ikt
  • ikt

    _

  • Members
  • Joined: 02 Oct 2006
  • None

#1151

Posted A week ago Edited by ikt, A week ago.

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.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users