Jump to content

[V] Script/Native Documentation and Research


Alexander Blade

Recommended Posts

gamerzworld

Ahh non-english folder names!!!!

 

 

Edited by gamerzworld
  • Like 3
Link to comment
Share on other sites

STATS::PLAYSTATS_CLOTH_CHANGE

Hash: 0x3AFF9E58

void PLAYSTATS_CLOTH_CHANGE(Any p0, Any p1, Any p2, Any p3, Any p4) // 0x3AFF9E58

 

Anyone know what are the parameters?

Edited by splintter
Link to comment
Share on other sites

STATS::PLAYSTATS_CLOTH_CHANGE

Hash: 0x3AFF9E58

void PLAYSTATS_CLOTH_CHANGE(Any p0, Any p1, Any p2, Any p3, Any p4) // 0x3AFF9E58

 

Anyone know what are the parameters?

You will look assembly and decompile script.rpf! Gta v Useing crypt lib and decrypt lib(win32) when GTA open the rpf. Soo USE DEBUGGER!!! x64dbg

Link to comment
Share on other sites

Alexander Blade

Are you from Fukushima ?

 

STATS::PLAYSTATS_CLOTH_CHANGE
Hash: 0x3AFF9E58
void PLAYSTATS_CLOTH_CHANGE(Any p0, Any p1, Any p2, Any p3, Any p4) // 0x3AFF9E58

Anyone know what are the parameters?


You will look assembly and decompile script.rpf! Gta v Useing crypt lib and decrypt lib(win32) when GTA open the rpf. Soo USE DEBUGGER!!! x64dbg

 

  • Like 3
Link to comment
Share on other sites

 

Are you from Fukushima ?

 

STATS::PLAYSTATS_CLOTH_CHANGE

Hash: 0x3AFF9E58

void PLAYSTATS_CLOTH_CHANGE(Any p0, Any p1, Any p2, Any p3, Any p4) // 0x3AFF9E58

 

Anyone know what are the parameters?

You will look assembly and decompile script.rpf! Gta v Useing crypt lib and decrypt lib(win32) when GTA open the rpf. Soo USE DEBUGGER!!! x64dbg

 

 

Difference you. I live in the kagawa of japan!!

 

NOT Just like that... :cry:

Fukashima.jpg

Link to comment
Share on other sites

x64dbg

 

How's x64dbg? Is it like ollydbg or IDA or much different? I'll check it out when I have time :)

 

Also, how did you find out for example how to decrypt the rpf? Most of us don't know these and others are very secretive sometimes.

Link to comment
Share on other sites

 

x64dbg

 

How's x64dbg? Is it like ollydbg or IDA or much different? I'll check it out when I have time :)

 

Also, how did you find out for example how to decrypt the rpf? Most of us don't know these and others are very secretive sometimes.

 

I going to try to find out decrypt and crypt key!!!

GTA is decrypt other file when load the game in virtual memory.

That's why found out (eaxmple:weapons.meta handling.dat value(float) when search Memory. Edited by Bucho
Link to comment
Share on other sites

Great :D Also it would be helpful to know how to do it ourselves as well :) I'm guessing you can try to find out which part of the code actually reads the .rpf ( maybe by placing a breakpoint on file open function? ) and see what happens afterwards in the assembly?

Link to comment
Share on other sites

Is there a way to hook into specific events?

 

For example, once a player enters a vehicle or changes the radio station?

 

I could really get a use of those :/

Link to comment
Share on other sites

If you want events, you got to implement that yourself. By now, we are using each-frame to check if something is happening.

 

You can use: PED::IS_PED_GETTING_INTO_A_VEHICLE to check if a Player is getting into a vehicle

 

 

About the changing radio station, no Idea...

Link to comment
Share on other sites

Hmm alright, thanks @kallas.

 

Other question then:

 

static void SET_VEH_RADIO_STATION(Any p0, Any *p1) { invoke<Void>(0x1B9C0099CB942AC6, p0, p1); } // 1B9C0099CB942AC6 E391F55F

 

What is the 2nd argument there?

Using Integers doesn't work...

 

Also, is there a method like

static Any GET_VEH_RADIO_STATION(Any p0)
to get the current vehicle radio station selected?
Link to comment
Share on other sites

sasuke78200

Look at the decompiled scripts,

 

AUDIO::SET_VEH_RADIO_STATION(num3, "OFF");

 

AUDIO::SET_VEH_RADIO_STATION(l_5859, "RADIO_02_POP");

 

AUDIO::SET_VEH_RADIO_STATION(l_5860, "RADIO_09_HIPHOP_OLD");

 

 

 

Or you can use AUDIO::GET_RADIO_STATION_NAME(int id)

Edited by sasuke78200
Link to comment
Share on other sites

 

Hmm alright, thanks @kallas.

 

Other question then:

static void SET_VEH_RADIO_STATION(Any p0, Any *p1) { invoke<Void>(0x1B9C0099CB942AC6, p0, p1); } // 1B9C0099CB942AC6 E391F55F

What is the 2nd argument there?

Using Integers doesn't work...

 

Also, is there a method like

static Any GET_VEH_RADIO_STATION(Any p0)
to get the current vehicle radio station selected?

 

Could do something like this:

 

 

Vehicle veh =  PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), 0);AUDIO::SET_VEH_RADIO_STATION(veh, AUDIO::GET_RADIO_STATION_NAME(0));
Link to comment
Share on other sites

I should definitely check the decompiled scripts out! :D

Didn't think it would be a String with the radio-station, but alright, thanks guys :)

 

Only thing open now is a way to check which Radio-station is currently selected.

I'm sure it is in the code, but there is nothing in the natives, unfortunately.

 

//EDIT:

It's not working at all, it throws me this error:

26-04-2015_15-48-16.png

 

Error: The argument from type "const char*" is incompatible with the parameter from type "Any *".

 

Edited by Lordmau5
Link to comment
Share on other sites

sasuke78200

Download this one, http://dev-c.com/nativedb/natives.h

 

 

 

edit : Nope, don't use it, it still use the old hashes for consoles.

 

Change the prototype to take a char* instead of Any

Edited by sasuke78200
Link to comment
Share on other sites

or change the definition of the native yourself :) I use a scripting override header file where I put all the natives in that I have changed.

Link to comment
Share on other sites

sasuke78200

We should centralize researches by using Alexander Blade's website, so no need to override the header :p

Link to comment
Share on other sites

Oh also, is it possible to write to the asiloader.log or would I have to write my own methods to write to a custom log file? :p

Edited by Lordmau5
Link to comment
Share on other sites

im trying to spawn clones of my playermodel to protect me, so far I have the CLONE_PED native working, however I don't know what to put beneath it to add them to my group.

PED::CLONE_PED(PLAYER::PLAYER_PED_ID(), -852.4f, 160.0f, 65.6f);
is working and spawns clones wherever I am in the world. (I gave it Michael's house coordinates just in case but it ignores them anyway)

also, for some reason, it spawns 5 or so clones instead of just 1, any fix for that? (this isn't important)
Link to comment
Share on other sites

sasuke78200

Does anyone know what encryption system R* use to cypher .ysc ? From what I'm reading it AES but GoodNTS told me they don't use it.

Link to comment
Share on other sites

So apparently

UI::IS_PAUSE_MENU_ACTIVE()

either always returns false or it's completely broken.

 

 

This code doesn't work at all.

It should pause the currently playing song once the pause menu is opened, and unpause it again once it's closed.

isActive is the boolean I use to check if the script / song is actually being played / mod-functionality being active:

void updatePauseMenu() {  if (UI::IS_PAUSE_MENU_ACTIVE()) {    if (isActive && !currentSong->getIsPaused())      currentSong->setIsPaused(true);  }  else {    if (isActive && currentSong->getIsPaused())      currentSong->setIsPaused(false);  }}
Edited by Lordmau5
Link to comment
Share on other sites

Alexander Blade

I would really like you to make your changes in the nativedb (when it will be adopted for PC) instead of separate header

or change the definition of the native yourself :) I use a scripting override header file where I put all the natives in that I have changed.

Link to comment
Share on other sites

 

UI::IS_PAUSE_MENU_ACTIVE()

I think that one is related to pause menu in mission.

You should do something like this:

 

if (UI::GET_PAUSE_MENU_STATE() == 1 && UI::IS_PAUSE_MENU_ACTIVE() == 1 && PLAYER::IS_SYSTEM_UI_BEING_DISPLAYED() == 1) { }

Or try with different combinations of them.

Link to comment
Share on other sites

Alright, I'll check that out tomorrow, thanks @kallas :)

There is no real documentation on those yet, so ye... Kinda hard to figure out what works properly :p

 

Also, it's really annoying having to restart GTA V everytime I change some code in my .asi file.

Isn't there a way to let them reload mid-game?

Edited by Lordmau5
Link to comment
Share on other sites

Anyone know parameters for this? I reckon it wants a group but nothing I've tried has worked so far.

PLAYER::SET_PLAYER_TEAM(Any p0, Any p1)
Link to comment
Share on other sites

 

PLAYER::SET_PLAYER_TEAM(Player PlayerID, UINT32 teamId)

 

Function is used with multiplayer tho.

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
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

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