Jump to content

[V] Script/Native Documentation and Research


Recommended Posts

jfmherokiller

 

I have figured out 2 of the parameters to CHANGE_PLAYER_PED the first one is the output of PLAYER.GET_PLAYER_INDEX() and the second one is the id of the ped you wish to change to.

here is my example code that works to change the ped

natives.PLAYER.CHANGE_PLAYER_PED(natives.PLAYER.GET_PLAYER_INDEX(),ped.ID,false,false)

sorry that it is in GTALua I just found it easier than writing test code that would require me to restart the game for every little edit.

void PLAYER::CHANGE_PLAYER_PED(int playerindex, int PedEntityId, BOOL p2, BOOL p3)--changes the Ped of the player to the one specified by PedEntityId

based upon what I have found I have updated the function.

 

Just wondering if you were able to get this to work? I've tried this in C++ and it doesn't seem to work unless i'm writing it wrong. I'm currently working on something that would be much easier if this were to work.

 

I made a minor mistake on the post it seems its not the id of the ped but the entity id of said ped

Neutrinobeam

So PED::REMOVE_NIGHTVISION_MELEE should be

 

PED::GET_NUMBER_OF_PED_PROP_TEXTURE_VARIATIONS.

 

Can anyone else confirm they have the same hash? And that REMOVE_NIGHTVISION_MELEE can't be changed since it's the correct hash?

 

jfmherokiller

 

How exactly are you getting the pedEntityID? From the decompiled scripts, it seems to be a pointer, but I couldn't get CHANGE_PLAYER_PED to work.

Edited by Neutrinobeam

So PED::REMOVE_NIGHTVISION_MELEE should be

 

PED::GET_NUMBER_OF_PED_PROP_TEXTURE_VARIATIONS.

 

Can anyone else confirm they have the same hash? And that REMOVE_NIGHTVISION_MELEE can't be changed since it's the correct hash?

 

 

Agree. Also STREAMING::STOP_PLAYER_REMAIN_ARCADE should be renamed back to STREAMING::_0xD9D2CFFF49FAB35F because it doesn't make any sense. It is some kind of boolean check on something having to do with switching or loading.

Edited by derkk
  • Like 1

 

So PED::REMOVE_NIGHTVISION_MELEE should be

 

PED::GET_NUMBER_OF_PED_PROP_TEXTURE_VARIATIONS.

 

Can anyone else confirm they have the same hash? And that REMOVE_NIGHTVISION_MELEE can't be changed since it's the correct hash?

 

 

Agree. Also STREAMING::STOP_PLAYER_REMAIN_ARCADE should be renamed back to STREAMING::_0xD9D2CFFF49FAB35F because it doesn't make any sense. It is some kind of boolean check on something having to do with switching or loading.

 

It's how R* named them. If you would hash STOP_PLAYER_REMAIN_ARCADE(with Jenkins one at time), you would get 0x56135acc hash, as in console version was. I don't know why they name (or maybe Alexander's matching tool made a mistake ? Or you matched by yourself Alexander ?) that. but please, don't edit it globally, you can make a comment or something, or change name in your native header file :)

 

EDIT: Hash collision have occurred, and these two strings seems to have the same hash. Sorry for misleading.

 

All the best,

Paul.

Edited by leftas
  • Like 1
Neutrinobeam

We're saying that REMOVE_NIGHTVISION_MELEE and STOP_PLAYER_REMAIN_ARCADE aren't what R* named them. Those are two nonsense strings that happen to hash to the same value as R*s names.

 

I have a working mod that uses REMOVE_NIGHTVISION_MELEE as if it were GET_NUMBER_OF_PED_PROP_TEXTURE_VARIATIONS, as far as I can tell they have the same hash, and I cannot edit the name in the natives database as the hash is correct even though the name isn't.

We're saying that REMOVE_NIGHTVISION_MELEE and STOP_PLAYER_REMAIN_ARCADE aren't what R* named them. Those are two nonsense strings that happen to hash to the same value as R*s names.

 

I have a working mod that uses REMOVE_NIGHTVISION_MELEE as if it were GET_NUMBER_OF_PED_PROP_TEXTURE_VARIATIONS, as far as I can tell they have the same hash, and I cannot edit the name in the natives database as the hash is correct even though the name isn't.

Yep, you're right. Hash collision have occurred. It's rare case, but it happened in this case. Sorry for misleading, I said that before I tested the hashes.

Sorry.

 

Best wishes,

Paul.

Edited by leftas

hey guys i installed the latest openiv with mods folder but when i'm going online the .rpf mods are still active.

i presume this isn't normal?

I like this idea with mods folder but don't want to use mods online in case of ban.

 

Any help?

Game:Steam edt. OS: Windows 8.1 x64

 

Modded handling.meta in /mods/update/update.rpf
Non modded handling.meta in /update/update.rpf

Edited by ryzeart
InfamousSabre

hey guys i installed the latest openiv with mods folder but when i'm going online the .rpf mods are still active.

 

i presume this isn't normal?

 

I like this idea with mods folder but don't want to use mods online in case of ban.

 

Any help?

 

Game:Steam edt. OS: Windows 8.1 x64

 

Modded handling.meta in /mods/update/update.rpf

Non modded handling.meta in /update/update.rpf

Are you using some sort of special loader?

Edited by InfamousSabre

 

hey guys i installed the latest openiv with mods folder but when i'm going online the .rpf mods are still active.

 

i presume this isn't normal?

 

I like this idea with mods folder but don't want to use mods online in case of ban.

 

Any help?

 

Game:Steam edt. OS: Windows 8.1 x64

 

Modded handling.meta in /mods/update/update.rpf

Non modded handling.meta in /update/update.rpf

Are you using some sort of special loader?

 

nope the only loader i'm using is the one from alex's site itself

InfamousSabre

 

 

hey guys i installed the latest openiv with mods folder but when i'm going online the .rpf mods are still active.

 

i presume this isn't normal?

 

I like this idea with mods folder but don't want to use mods online in case of ban.

 

Any help?

 

Game:Steam edt. OS: Windows 8.1 x64

 

Modded handling.meta in /mods/update/update.rpf

Non modded handling.meta in /update/update.rpf

Are you using some sort of special loader?

 

nope the only loader i'm using is the one from alex's site itself

 

No idea why anything would load from this "mods" folder, then.

InfamousSabre

We're saying that REMOVE_NIGHTVISION_MELEE and STOP_PLAYER_REMAIN_ARCADE aren't what R* named them. Those are two nonsense strings that happen to hash to the same value as R*s names.

 

I have a working mod that uses REMOVE_NIGHTVISION_MELEE as if it were GET_NUMBER_OF_PED_PROP_TEXTURE_VARIATIONS, as far as I can tell they have the same hash, and I cannot edit the name in the natives database as the hash is correct even though the name isn't.

Definitely not the right names, you're right.

 

This should be an example for anyone attempting to bruteforce native names.

Just because the hash matches does NOT mean it is the correct name. Use common sense/logic, guys.

 

Appy-polly-loggies for the double-post :x

Edited by InfamousSabre

 

 

 

hey guys i installed the latest openiv with mods folder but when i'm going online the .rpf mods are still active.

 

i presume this isn't normal?

 

I like this idea with mods folder but don't want to use mods online in case of ban.

 

Any help?

 

Game:Steam edt. OS: Windows 8.1 x64

 

Modded handling.meta in /mods/update/update.rpf

Non modded handling.meta in /update/update.rpf

Are you using some sort of special loader?

 

nope the only loader i'm using is the one from alex's site itself

 

No idea why anything would load from this "mods" folder, then.

 

no idea either :/ it works in single player when i go online its all still active its really messed up i'll try a few different loaders maybe as the only thing i can think is the loader is dodgy or something but i got it from http://www.dev-c.com/gtav/

 

Edit: Tried a few different things but nope they were still active online the only way i can make it not be active online is to delete the mods folder completely

 

I really don't get what is wrong with it i'm not exactly a novice user..

 

 

Edit 2

 

kNNtjPI.jpg

 

That's the way its laid out the only time mods aren't active are when mods folder is deleted online or offline.

Edited by ryzeart

I managed to make a police searchlight that follows a vehicle with DRAW_SPOT_LIGHT, but I cannot create the actual light cone, any idea how to get it working? Picture related, I made a line as a placeholder where the cone should be.

 

 

tejyoo.png

 

 

 

I've also tried _0x5BCA583A583194DB with no luck. It's the same as DRAW_SPOT_LIGHT but the light actually casts a shadow, but it has another unknown parameter.

Edited by Guad
boss of g-unit

guys is this the function to turn on the car lights ?if yes, what are the parameters ?if no, what is ?

 

void SET_VEHICLE_LIGHTS(Any p0, Any p1) // 34E710FF01247C5A E8930226

 

the other thing is what does this function do ?

 

void SET_VEHICLE_LIGHT_MULTIPLIER(Vehicle vehicle, float multiplier)

// 0xB385454F8791F57C 0x48039D6A

Edited by boss of g-unit

guys is this the function to turn on the car lights ?if yes, what are the parameters ?if no, what is ?

 

void SET_VEHICLE_LIGHTS(Any p0, Any p1) // 34E710FF01247C5A E8930226

 

the other thing is what does this function do ?

 

void SET_VEHICLE_LIGHT_MULTIPLIER(Vehiclevehicle, floatmultiplier)

// 0xB385454F8791F57C 0x48039D6A

I'd bet that it's (Vehicle veh, bool lightsOn).

I'd say that the multiplier is the light intensity, but that's just a guess.

Edited by LetsPlayOrDy
Alexander Blade

Few decompilation bugs were fixed , scripts are updated , download

 

0xsatoshi

read 1st post

Edited by Alexander Blade
  • Like 1

 

Hey guys, how can I edit the data in the nativedb? I don't see any edit button nor any register form of any kind.

 

Little pencil icon to the left of the entry. =)

 

Thank you, but there's no such icon for me... I think I either need to register somewhere OR perhaps the icon shows when you hover something and that's not working for me... I'm using Chrome because FF screwed my Sync stuff and I lost important data so I'm not using that sheesh again :p.

 

Here's a screenshot... perhaps there's an edit button somewhere and I'm blind: :D

https://drive.google.com/file/d/0B6RP3uoh07LuTTNoMEl4OVJMdms/view?usp=sharing

 

IMPORTANT EDIT:

Nevermind guys, that was a problem on my end. Sorry for that :(.

Edited by Szabo

Thank you, but there's no such icon for me... I think I either need to register somewhere OR perhaps the icon shows when you hover something and that's not working for me... I'm using Chrome because FF screwed my Sync stuff and I lost important data so I'm not using that sheesh again :p.

 

Here's a screenshot... perhaps there's an edit button somewhere and I'm blind: :D

https://drive.google.com/file/d/0B6RP3uoh07LuTTNoMEl4OVJMdms/view?usp=sharing

I'm using Google Chrome as well, and it seems to work for me. There isn't any registration set up for the dev-c website.

http://prntscr.com/7ahf0u

Try right clicking on the web page, click Inspect Element, and see if there are any errors. Maybe the images weren't able to load? I don't know... I'm just guessing here lol.

Alexander Blade

Checking the scripts among with natives located near .

 

I read the first post.

when you say that some native names are known, how do you know they are the real names and not hash collisions?

Edited by Alexander Blade

 

Checking the scripts among with natives located near .

 

I read the first post.

 

when you say that some native names are known, how do you know they are the real names and not hash collisions?

 

weren't there multiple sets of hashes released?

 

couldnt you just check "found" valid natives and rerun them with the different hash algorithm and if it also returns a valid hash then you know you have a valid native. this way you eliminate manual checking.

Alexander Blade

Different hash algorithm ? No such thing .

 

 

 

Checking the scripts among with natives located near .

 

I read the first post.

when you say that some native names are known, how do you know they are the real names and not hash collisions?

 

weren't there multiple sets of hashes released?

 

couldnt you just check "found" valid natives and rerun them with the different hash algorithm and if it also returns a valid hash then you know you have a valid native. this way you eliminate manual checking.

 

The 360 hashes are the same as the PC hashes?

 

Different hash algorithm ? No such thing .

 

 

 

Checking the scripts among with natives located near .

 

I read the first post.

when you say that some native names are known, how do you know they are the real names and not hash collisions?

 

weren't there multiple sets of hashes released?

 

couldnt you just check "found" valid natives and rerun them with the different hash algorithm and if it also returns a valid hash then you know you have a valid native. this way you eliminate manual checking.

 

 

Alexander Blade

There are no actual native hashes on PC , it's just random values .

 

 

The 360 hashes are the same as the PC hashes?

 

Different hash algorithm ? No such thing .

 

 

 

Checking the scripts among with natives located near .

 

I read the first post.

when you say that some native names are known, how do you know they are the real names and not hash collisions?

 

weren't there multiple sets of hashes released?

 

couldnt you just check "found" valid natives and rerun them with the different hash algorithm and if it also returns a valid hash then you know you have a valid native. this way you eliminate manual checking.

 

 

 

  • Like 2
darkphoenixxx

Ok, can someone point me where i am wrong with this?

 

AI::TASK_PLAY_ANIM(playerPed, (Any *)GAMEPLAY::GET_HASH_KEY((char *)"oddjobs@assassinate@multi@yachttarget@lapdance"), (Any *)GAMEPLAY::GET_HASH_KEY((char *)"yacht_ld_f"), 8.0, 0.0, 10, 0, 0.0, 0, 0, 0);

 

1. ped of the player

2. animation folder. I assume my (Any *) conversion is not the right thing to do, but it does not eat string or hash. Do i even need to GAMEPLAY::GET_HASH_KEY?

3. animation name. same ^

4. animation speed. in the source i find different numbers, so it is not 1.0 = normal speed. Or is it?

5. god knows what

6. duration?

7. some value

8. some float?

9, 10, 11. lock positions by x, y ,z ?

 

Y it no work :panic: ?

Edited by darkphoenixxx
sasuke78200

http://dev-c.com/nativedb/func/info/ea47fe3719165b94

 

"char *animDictionary, char *animationName"

 

So no need to pass their hashes.

 

AI::TASK_PLAY_ANIM(playerPed, "oddjobs@assassinate@multi@yachttarget@lapdance", "yacht_ld_f", 8.0, 0.0, 10, 0, 0.0, 0, 0, 0);

 

should work

darkphoenixxx

argument of type "const char *" is incompatible with parameter of type "Any *"

 

if i use (char *) "oddjobs@assassinate@multi@yachttarget@lapdance" i get

 

argument of type "char *" is incompatible with parameter of type "Any *"

 

 

I need to put pointer to an animation from what i understand.

 

 

EDIT: i guess i need REQUEST_ANIM_DICT(char *AminSet) and stuff

Edited by darkphoenixxx

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.