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

    1. Red Dead Redemption 2

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

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

      1. Recruitment
    2. Events

    1. GTA Online

      1. Diamond Casino & Resort
      2. DLC
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

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

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA IV Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA SA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA VC Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA III Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

Alexander Blade

[V] Script/Native Documentation and Research

Recommended Posts

XeClutch

 

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.

Share this post


Link to post
Share on other sites
Skorpro

 

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!

 

Share this post


Link to post
Share on other sites
NTAuthority

 

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

Share this post


Link to post
Share on other sites
Alexander Blade

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

Share this post


Link to post
Share on other sites
gta.bullet

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

Share this post


Link to post
Share on other sites
Alexander Blade

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

Share this post


Link to post
Share on other sites
gta.bullet

i know, but half of natives are still unnamed. i am talking about how to find/match/guess them.

Share this post


Link to post
Share on other sites
XeClutch

i know, but half of natives are still unnamed. i am talking about how to find/match/guess them.

They bruteforce the hash. I made a program to do it awhile back.

http://pastebin.com/kH3FM6aU

Share this post


Link to post
Share on other sites
aru

 

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.

Share this post


Link to post
Share on other sites
unknown modder

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

Share this post


Link to post
Share on other sites
Scriz

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

Share this post


Link to post
Share on other sites
Alexander Blade

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

Share this post


Link to post
Share on other sites
Scriz

 

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

Share this post


Link to post
Share on other sites
XeClutch

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.

Share this post


Link to post
Share on other sites
Scriz

 

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

Share this post


Link to post
Share on other sites
emiL

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

Edited by emiL

Share this post


Link to post
Share on other sites
MulleDK19

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

Huh? Natives use the player index.

Share this post


Link to post
Share on other sites
Alexander Blade

Natives like what for example ?

 

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

Share this post


Link to post
Share on other sites
unknown modder

 

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)

Share this post


Link to post
Share on other sites
XeClutch

 

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.

Share this post


Link to post
Share on other sites
NTAuthority

 

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

Share this post


Link to post
Share on other sites
NTAuthority

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?

Share this post


Link to post
Share on other sites
emiL

 

 

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

Share this post


Link to post
Share on other sites
XeClutch

 

 

 

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

Share this post


Link to post
Share on other sites
XBLToothPik

 

 

 

 

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

Share this post


Link to post
Share on other sites
XeClutch

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.

Share this post


Link to post
Share on other sites
fOmey

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

Share this post


Link to post
Share on other sites
XeClutch

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

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.
Note: Your post will require moderator approval before it will be visible.

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.


  • 3 Users Currently Viewing
    0 members, 0 Anonymous, 3 Guests

×
×
  • Create New...

Important Information

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