Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. GTANet.com

    2. GTANet 20th Anniversary

    1. GTA Online

      1. The Cayo Perico 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. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

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

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

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

      1. Guides & Strategies
      2. Help & Support
    8. Portable Games

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

    2. Support

      1. Court House
    3. Suggestions

[V] Script/Native Documentation and Research


Alexander Blade

Recommended Posts

 

http://pastebin.com/Va2bRu58

 

Nice looking tool, GTA V uses the Bob Jenkins algorithm, not sure if GTA IV uses it aswell. Take a look at the hash generator I made awhile back. It uses the same algorithm as GTA V.

GTA V's hash function actually uses a StrToLower function before hashing may wanna sort your tool out for that

 

I did but when I released people were bitching about it so I removed it.

Link to post
Share on other sites

 

That tool is for models , not for natives

Note: I'm not sure GTA V is using the same hash algorithm like GTA IV but for the natives it seems to work (GET_PLAYER_PED => 0x6e31e993)...

My original comment was aimed at that part of his post that's all.

 

 

It's for both...

 

Example:

APP_DATA_VALIDAPP_GET_INTAPP_GET_FLOATAPP_GET_STRINGAPP_SET_INTAPP_SET_FLOATAPP_SET_STRINGAPP_SET_APPAPP_SET_BLOCKAPP_CLEAR_BLOCKAPP_CLOSE_APPAPP_CLOSE_BLOCKAPP_HAS_SYNCED_DATAAPP_SAVE_DATAAPP_DELETE_APP_DATA//...

Result...

APP_DATA_VALID = 0x72BDE002,APP_GET_INT = 0x2942AAD2,APP_GET_FLOAT = 0xD87F3A1C,APP_GET_STRING = 0x849CEB80,APP_SET_INT = 0x1B509C32,APP_SET_FLOAT = 0xF3076135,APP_SET_STRING = 0x23DF19A8,APP_SET_APP = 0x8BAC4146,APP_SET_BLOCK = 0xC2D54DD9,APP_CLEAR_BLOCK = 0xDAB86A18,APP_CLOSE_APP = 0x3767C7A,APP_CLOSE_BLOCK = 0xED97B202,APP_HAS_SYNCED_DATA = 0x1DE2A63D,APP_SAVE_DATA = 0x84A3918D,APP_DELETE_APP_DATA = 0x2A2FBD1C,//...

 

Nice looking tool, GTA V uses the Bob Jenkins algorithm, not sure if GTA IV uses it aswell. Take a look at the hash generator I made awhile back. It uses the same algorithm as GTA V.

http://pastebin.com/Va2bRu58

 

Thanx :) Yes, it's the Jenkins algorithm - also used in GTA IV!

 

Link to post
Share on other sites

 

The IV PC script natives used a different hashing algorithm from patch 5 (?) onwards so perhaps this will be the case with V too?

 

Doesn't rly matter :)

 

Payne hasn't bothered changing it despite cheating in multiplayer being common; and don't start about V being irrelevant compared to Payne as the main thing V changed is the merging in of San Diego's frameworks as used in RDR (streaming, base archetypes, lots of things but also the relevant scrProgram resources -- and possibly matching up SD's changes to script since IV).

 

Also, I can imagine the interest in writing scripts matching all V functions with their order in console, as happened with IV. :p

Edited by NTAuthority
  • Like 1
Link to post
Share on other sites

Also, I can imagine the interest in writing scripts matching all V functions with their order in console, as happened with IV. :p

 

 

We didn't compare scripts when this happened in IV , hash translation map was done by listener via native body signature comparing :)

Link to post
Share on other sites

if pc version dont include native names, what will you guys do? guessing remaining native names just like 3D era opcode names by research?

 

GTA V never had native names included :)

Edited by Alexander Blade
Link to post
Share on other sites

 

Also, I can imagine the interest in writing scripts matching all V functions with their order in console, as happened with IV. :p

 

 

We didn't compare scripts when this happened in IV , hash translation map was done by listener via native body signature comparing :)

 

 

Not entirely true. I mapped things using the scripts. Listener mapped things using body signature matching. He figured some natives I didn't. I figured some natives he didn't. We merged to get a full picture.

  • Like 3
Link to post
Share on other sites

Okay guys , seems like we have a working wiki now , I've created an article with native declarations , it's actually was copied from my current header and adopted a little to match simplest wiki formatting

 

http://www.gtamodding.com/index.php?title=GTA_V_Native_declarations

Link to post
Share on other sites

Okay guys , seems like we have a working wiki now , I've created an article with native declarations , it's actually was copied from my current header and adopted a little to match simplest wiki formatting

 

http://www.gtamodding.com/index.php?title=GTA_V_Native_declarations

You should add char* to the allowed types, alot of natives return/take string pointers

Edited by unknown modder
Link to post
Share on other sites

Hi, I'm new to this awesome community, I wonder if I can call natives correctly trough XRPC? Or is there any special use to call natives? Great thread :D

Edited by Scriz
Link to post
Share on other sites

Hi, I'm new to this awesome community, I wonder if I can call natives correctly trough XRPC? Or is there any special use to call natives? Great thread :D

No console modding here

Edited by Alexander Blade
Link to post
Share on other sites

 

Hi, I'm new to this awesome community, I wonder if I can call natives correctly trough XRPC? Or is there any special use to call natives? Great thread :D

No console modding here

 

Oh yes sorry.

Edited by Scriz
Link to post
Share on other sites

Hi, I'm new to this awesome community, I wonder if I can call natives correctly trough XRPC? Or is there any special use to call natives? Great thread :D

1. No console modding

2. It can be done although, the less people that know how the better.

Link to post
Share on other sites

 

Hi, I'm new to this awesome community, I wonder if I can call natives correctly trough XRPC? Or is there any special use to call natives? Great thread :D

1. No console modding

2. It can be done although, the less people that know how the better.

 

Yes I did'nt know, sorry about it and thank you :)

Link to post
Share on other sites

Natives like what for example ?

 

R* started patching some of the natives, they can't no longer be set on playerid...

Link to post
Share on other sites

 

Natives like what for example ?

 

R* started patching some of the natives, they can't no longer be set on playerid...

 

The only thing I know of about rockstar "patching" natives is they made it so you can only force tasks on peds you have control of (i.e cant perform tasks on other network players)

Link to post
Share on other sites

 

Natives like what for example ?

 

R* started patching some of the natives, they can't no longer be set on playerid...

 

This isn't exactly what he is talking about but someone said something about not being able to create pickups.

Link to post
Share on other sites

 

Natives like what for example ?

This isn't exactly what he is talking about but someone said something about not being able to create pickups.

 

pickups weren't synchronized in IV, however apparently they are in V (seeing CNetObjPickup) - I'd assume it got changed recently so only the session host can create them (as there's no need for other peers to do so unlike vehicles/peds being required for population; and pickups from dead peds could either be made local or somehow synchronized through script broadcast). Edited by NTAuthority
Link to post
Share on other sites

The only thing I know of about rockstar "patching" natives is they made it so you can only force tasks on peds you have control of (i.e cant perform tasks on other network players)

didn't people use to do this by requesting control of the player ped's network ID?
Link to post
Share on other sites

 

 

Natives like what for example ?

 

R* started patching some of the natives, they can't no longer be set on playerid...

 

The only thing I know of about rockstar "patching" natives is they made it so you can only force tasks on peds you have control of (i.e cant perform tasks on other network players)

 

 

 

 

 

Natives like what for example ?

 

R* started patching some of the natives, they can't no longer be set on playerid...

 

This isn't exactly what he is talking about but someone said something about not being able to create pickups.

 

 

You are both correct, they changed the way some natives work ( or just made it so you don't have control over others) in the latest update, so now you can't preform tasks on other players, like animations, attaching objects, pickups, teleporting etc.. At least not in the way we could before.. Further investigation is underway

 

EDIT: after personally testing online with/on other players on 1.16 ps3, animations don't work, attaching objects/myself works, creating (money) pickups works, teleporting others to you doesn't work. So I've been given some misinformation, but they surely made some changes...

Edited by emiL
Link to post
Share on other sites

 

 

 

Natives like what for example ?

 

R* started patching some of the natives, they can't no longer be set on playerid...

 

The only thing I know of about rockstar "patching" natives is they made it so you can only force tasks on peds you have control of (i.e cant perform tasks on other network players)

 

 

 

 

 

Natives like what for example ?

 

R* started patching some of the natives, they can't no longer be set on playerid...

 

This isn't exactly what he is talking about but someone said something about not being able to create pickups.

 

 

You are both correct, they changed the way some natives work ( or just made it so you don't have control over others) in the latest update, so now you can't preform tasks on other players, like animations, attaching objects, pickups, teleporting etc.. At least not in the way we could before.. Further investigation is underway

 

EDIT: after personally testing online with/on other players on 1.16 ps3, animations don't work, attaching objects/myself works, creating (money) pickups works, teleporting others to you doesn't work. So I've been given some misinformation, but they surely made some changes...

 

No idea if this would work, worth a shot though.

// this is C# btwuint ped = PLAYER_PED_ID(); // ped you want to take control of..NETWORK_REQUEST_CONTROL_OF_NETWORK_ID(PED_TO_NET(ped)); // convert ped to net id and request controlwhile (!NETWORK_HAS_CONTROL_OF_NETWORK_ID(PED_TO_NET(ped)) WAIT(0); // wait for server to grant controlif (IS_PED_IN_ANY_VEHICLE(ped, 0)) // idk the 2nd arg    SET_PED_COORDS_KEEP_VEHICLE(ped, 0f, 0f, 0f); // change to coords you wantelse    SET_PED_COORDS_NO_GANG(ped, 0f, 0f, 0f); // change to coords you want
Edited by XeClutch
Link to post
Share on other sites

 

 

 

 

Natives like what for example ?

 

R* started patching some of the natives, they can't no longer be set on playerid...

 

The only thing I know of about rockstar "patching" natives is they made it so you can only force tasks on peds you have control of (i.e cant perform tasks on other network players)

 

 

 

 

 

Natives like what for example ?

 

R* started patching some of the natives, they can't no longer be set on playerid...

 

This isn't exactly what he is talking about but someone said something about not being able to create pickups.

 

 

You are both correct, they changed the way some natives work ( or just made it so you don't have control over others) in the latest update, so now you can't preform tasks on other players, like animations, attaching objects, pickups, teleporting etc.. At least not in the way we could before.. Further investigation is underway

 

EDIT: after personally testing online with/on other players on 1.16 ps3, animations don't work, attaching objects/myself works, creating (money) pickups works, teleporting others to you doesn't work. So I've been given some misinformation, but they surely made some changes...

 

No idea if this would work, worth a shot though.

// this is C# btwuint ped = PLAYER_PED_ID(); // ped you want to take control of..NETWORK_REQUEST_CONTROL_OF_NETWORK_ID(PED_TO_NET(ped)); // convert ped to net id and request controlwhile (!NETWORK_HAS_CONTROL_OF_NETWORK_ID(PED_TO_NET(ped)) WAIT(0); // wait for server to grant controlif (IS_PED_IN_ANY_VEHICLE(ped, 0)) // idk the 2nd arg    SET_PED_COORDS_KEEP_VEHICLE(ped, 0f, 0f, 0f); // change to coords you wantelse    SET_PED_COORDS_NO_GANG(ped, 0f, 0f, 0f); // change to coords you want

 

Like IV, you cannot grab control of a player's ped across the network.

 

Any TASK native (other than 1, which I will not say) has been patched in a way that you cannot use it on anyone's ped except ones you have control of, this can be bypassed with a JTAG/RGH/SPRX via XEX editing.

Edited by XBLToothPik
Link to post
Share on other sites

Like IV, you cannot grab control of a player's ped across the network.

 

Any TASK native (other than 1, which I will not say) has been patched in a way that you cannot use it on anyone's ped except ones you have control of, this can be bypassed with a JTAG/RGH/SPRX via XEX editing.

Oh okay, thanks for clearing that up. Like I said, I had no idea if it would work.

Link to post
Share on other sites

I recently started working on a C# RPC tool for the PS3, I've hit a bit of a road block..

 

Im attempting to utilize "GET_ENTITY_COORDS" native..

 

 

I wasnt aware of what a Vector3 was until coming across this thread to be honest, from what I gather its simply a array which generally holds coordinates.

 

 

The issue I'm having and what I'm not getting my head around is the data being returned from the native...

 

The data being returned is: "2.369571E-38", I assumed it would be a float as per the code posted on this thread so I'm treating it like one.. I may return a double for experimentation

 

Shortly after returning that value GTA V freezes.. I'm quite stumped to be honest, any assistance, advice or further information would be greatly appreciated.

Edited by fOmey
Link to post
Share on other sites

I recently started working on a C# RPC tool for the PS3, I've hit a bit of a road block..

 

Im attempting to utilize "GET_ENTITY_COORDS" native..

 

 

I wasnt aware of what a Vector3 was until coming across this thread to be honest, from what I gather its simply a array which generally holds coordinates.

 

 

The issue I'm having and what I'm not getting my head around is the data being returned from the native...

 

The data being returned is: "2.369571E-38", I assumed it would be a float as per the code posted on this thread so I'm treating it like one.. I may return a double for experimentation

 

Shortly after returning that value GTA V freezes.. I'm quite stumped to be honest, any assistance, advice or further information would be greatly appreciated.

I can't even get it working, my console freezes when I call it. I use this:

Vector3 GET_ENTITY_COORDS(){    float[] xyz = Jtag.CallArray<float>(0x82C500A8, 3, PLAYER_PED_ID(), 1);    Vector3 v;    v.x = xyz[0];    v.y = xyz[1];    v.z = xyz[2];    return v;}
Edited by XeClutch
Link to post
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
  • 4 Users Currently Viewing
    0 members, 0 Anonymous, 4 Guests

×
×
  • Create New...

Important Information

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