Jump to content

[V] Script/Native Documentation and Research


Alexander Blade

Recommended Posts

-snip-

 

Thanks, updating nativedb will be helpful. Can I ask you some details about the UI::_DRAW_TEXT() function? I saw your native trainer that you do a sort of scaling, this is necessary? if I call UI::_DRAW_TEXT(10,10) it will print on exactly position 10,10 of my screen or of my GTA window?

Link to comment
Share on other sites

identitymatrix

Not sure if this has been mentioned before but you can open all of the Decompiled Scripts in notepad++ and search in all documents for a string - it definitely helps:

 

vMx4D.jpg

 

oASy2.jpg

 

Yep :) Or alternatively, you can use my simple little tool, if you don't have notepad++ or can't be bothered open 693 .txt in notepad++

 

https://gta5base.com/tools/GTA_V_Decompiled_Natives_Finder-f7

Edited by TheVideoVolcano
Link to comment
Share on other sites

Alexander Blade

It was copied from original scripts

 

-snip-

 

Thanks, updating nativedb will be helpful. Can I ask you some details about the UI::_DRAW_TEXT() function? I saw your native trainer that you do a sort of scaling, this is necessary? if I call UI::_DRAW_TEXT(10,10) it will print on exactly position 10,10 of my screen or of my GTA window?

 

Link to comment
Share on other sites

Has anyone got animations to play at all on command? How much do we know on this subject?

Link to comment
Share on other sites

Has anyone got animations to play at all on command? How much do we know on this subject?

You use "TASK_PLAY_ANIM" for animations.

Not hard to do since some modders did it.

First parameter is the ped handle and second is the AnimationID and third is the AnimationSet and fourth is the speed.

Eighth parameter is X and ninth parameter is Y and tenth paratmeter is Z

Link to comment
Share on other sites

Thanks.

 

ARGH, I wanted to stick with LUA or .NET but it seems some of the native parameter definitions are wrong:

 

tick: scripts/addins/test.lua:10: error in function 'TASK_PLAY_ANIM'.
argument #3 is 'string'; 'number' expected.
This happens a lot with other native functions as well. I guess I'll go back to C++ and test there (and rant a little in the LUA thread).
Link to comment
Share on other sites

Yep :) Or alternatively, you can use my simple little tool, if you don't have notepad++ or can't be bothered open 693 .txt in notepad++

 

https://gta5base.com/tools/GTA_V_Decompiled_Natives_Finder-f7

 

 

Looks like a nice utility. However, the website brings me to do a survey and looks dodgy when attempting to download.

 

When opening all 693 text files, notepad++ uses about <600 megs. The number will climb when searching all docs (it saves all searches in the bottom panel). As long as you have 2 gig free and a decent PC, anyone can use this and I feel notepad++ is more comprehensive (clicking on the found line automatically jumps to the txt file and line for contextual research). It has already helped solve a few riddles. If only I had more time... :(

Link to comment
Share on other sites

 

Yep :) Or alternatively, you can use my simple little tool, if you don't have notepad++ or can't be bothered open 693 .txt in notepad++

 

https://gta5base.com/tools/GTA_V_Decompiled_Natives_Finder-f7

 

 

Looks like a nice utility. However, the website brings me to do a survey and looks dodgy when attempting to download.

 

When opening all 693 text files, notepad++ uses about <600 megs. The number will climb when searching all docs (it saves all searches in the bottom panel). As long as you have 2 gig free and a decent PC, anyone can use this and I feel notepad++ is more comprehensive (clicking on the found line automatically jumps to the txt file and line for contextual research). It has already helped solve a few riddles. If only I had more time... :(

 

 

You DONT have to open all files to search in them with Notepad++. There is already a menu called "Search in Files" in Search. Just select the folder script files in.

Edited by gta.bullet
Link to comment
Share on other sites

No clue yet about which Native activates the mouse? It's really dragging my work back and i don't have a clue on how to find it out through debugging with IDA and alike.

Link to comment
Share on other sites

 

You DONT have to open all files to search in them with Notepad++. There is already a menu called "Search in Files" in Search. Just select the folder script files in.

 

 

Thanks! Learning something new everyday. Ctrl+Shift+F is the shortcut key.

 

sKs5f.jpg

Link to comment
Share on other sites

Hey guys, any ideas on how to get/set these:

 

1-Neon lights (layout and colour)

2-License plate style

3-Tire smoke colour

4-Wheel (rim) colour

 

Also, I'm using TOGGLE_VEHICLE_MOD(veh, 22, bool) for Zenon lamps, but the result is inconsistent, but I can 'get' that toggelable by IS_TOGGLE_MOD_ON(veh, 22), so I don't know if it's bugged or what.

Link to comment
Share on other sites

Is anyone doing ongoing research on obtaining the animation list? I would be happy to help but I am unsure where to start. Here's to hoping we can start scripting animated scenes for movie creation in San Andreas.

Link to comment
Share on other sites

TheRouLetteBoi

Hey guys, any ideas on how to get/set these:

 

1-Neon lights (layout and colour)

2-License plate style

3-Tire smoke colour

4-Wheel (rim) colour

 

Also, I'm using TOGGLE_VEHICLE_MOD(veh, 22, bool) for Zenon lamps, but the result is inconsistent, but I can 'get' that toggelable by IS_TOGGLE_MOD_ON(veh, 22), so I don't know if it's bugged or what.

added to the DB.

Edited by TheRouLetteBoi
Link to comment
Share on other sites

I don't understand what the readme means when it says "Now you need to check everything that you see in that file !"

I am not sure what I'm checking for, I guess I should say. Any way I can help aside from just having bruted these names?

Link to comment
Share on other sites

For anyone interested I've finished documenting the onscreen keyboard functions (mostly anyway, that first one is still a mess):

 

GAMEPLAY::DISPLAY_ONSCREEN_KEYBOARD

GAMEPLAY::UPDATE_ONSCREEN_KEYBOARD

GAMEPLAY::GET_ONSCREEN_KEYBOARD_RESULT

NOTE: This example won't work unless you've updated your natives.h to reflect the changes made to the nativesdb

Ped playerPed = PLAYER::PLAYER_PED_ID();// No point in displaying the keyboard if they aren't in a vehicleif (!PED::IS_PED_IN_ANY_VEHICLE(playerPed, false)) return;// Invoke keyboardGAMEPLAY::DISPLAY_ONSCREEN_KEYBOARD(true, "", "", VEHICLE::GET_VEHICLE_NUMBER_PLATE_TEXT(PED::GET_VEHICLE_PED_IS_IN(playerPed, false)), "", "", "", 9);// Wait for the user to editwhile (GAMEPLAY::UPDATE_ONSCREEN_KEYBOARD() == 0) WAIT(0);// Make sure they didn't exit without confirming their change, and that they're still in a vehicleif (!GAMEPLAY::GET_ONSCREEN_KEYBOARD_RESULT() || !PED::IS_PED_IN_ANY_VEHICLE(playerPed, false)) return;// Update the licenseplateVEHICLE::SET_VEHICLE_NUMBER_PLATE_TEXT(PED::GET_VEHICLE_PED_IS_IN(playerPed, false), GAMEPLAY::GET_ONSCREEN_KEYBOARD_RESULT());
Edited by SK83RJOSH
Link to comment
Share on other sites

Any information on missions in general? Using the mission replay feature, I've noticed that a few of them have certain times of day they are set to be played at - even the ones that don't do the timelapse thing when you first start them in Story Mode. Really curious to see what each mission's time of day/night is set to if possible. Would be a lot easier than replaying every single mission and marking down the time.

Link to comment
Share on other sites

 

For anyone interested I've finished documenting the onscreen keyboard functions (mostly anyway, that first one is still a mess):

 

GAMEPLAY::DISPLAY_ONSCREEN_KEYBOARD

GAMEPLAY::UPDATE_ONSCREEN_KEYBOARD

GAMEPLAY::GET_ONSCREEN_KEYBOARD_RESULT

NOTE: This example won't work unless you've updated your natives.h to reflect the changes made to the nativesdb

The onscreen keyboard is the same "box" that appears when you press ~ to type cheats?

Link to comment
Share on other sites

SK83RJOSH

 

 

For anyone interested I've finished documenting the onscreen keyboard functions (mostly anyway, that first one is still a mess):

 

GAMEPLAY::DISPLAY_ONSCREEN_KEYBOARD

GAMEPLAY::UPDATE_ONSCREEN_KEYBOARD

GAMEPLAY::GET_ONSCREEN_KEYBOARD_RESULT

NOTE: This example won't work unless you've updated your natives.h to reflect the changes made to the nativesdb

The onscreen keyboard is the same "box" that appears when you press ~ to type cheats?

 

 

Yeap, it's the same one

Link to comment
Share on other sites

 

 

 

For anyone interested I've finished documenting the onscreen keyboard functions (mostly anyway, that first one is still a mess):

 

GAMEPLAY::DISPLAY_ONSCREEN_KEYBOARD

GAMEPLAY::UPDATE_ONSCREEN_KEYBOARD

GAMEPLAY::GET_ONSCREEN_KEYBOARD_RESULT

NOTE: This example won't work unless you've updated your natives.h to reflect the changes made to the nativesdb

The onscreen keyboard is the same "box" that appears when you press ~ to type cheats?

 

 

Yeap, it's the same one

 

Doesn't work on PC (the last time I tried).

I had to make my own keyboard function xD.

 

 

Hey guys, any ideas on how to get/set these:

 

1-Neon lights (layout and colour)

2-License plate style

3-Tire smoke colour

4-Wheel (rim) colour

 

Also, I'm using TOGGLE_VEHICLE_MOD(veh, 22, bool) for Zenon lamps, but the result is inconsistent, but I can 'get' that toggelable by IS_TOGGLE_MOD_ON(veh, 22), so I don't know if it's bugged or what.

1. You can use the airport lights for neons, or use DRAW_LIGHT_WITH_RANGE.

2. SET_VEHICLE_NUMBER_PLATE_TEXT_INDEX (Ranges from 0 to 5 - 5th is the Yankton plate).

3. SET_VEHICLE_TIRE_SMOKE_COLOUR.

4. SET_VEHICLE_EXTRA_COLOURS

 

.

That toggle should thing should work. It works for me. IS_TOGGLE_MOD_ON to check it, and TOGGLE_VEHICLE_MOD to turn it on.

Link to comment
Share on other sites

 

-snip-

 

Thanks, updating nativedb will be helpful. Can I ask you some details about the UI::_DRAW_TEXT() function? I saw your native trainer that you do a sort of scaling, this is necessary? if I call UI::_DRAW_TEXT(10,10) it will print on exactly position 10,10 of my screen or of my GTA window?

 

The GTA Window.

The scaling is done via SET_TEXT_SCALE(float,float);

Link to comment
Share on other sites

 

Do you guys want a release?

923999d3e4.png

 

Another one? Also... http://i.imgur.com/5SRttgG.png

 

I didn't realize that one was already released and I made mine so that you don't have to open every script in Notepad and search for it.

Link to comment
Share on other sites

Hollistupid

I saw this native in the database:

DRAW_SPOT_LIGHT

 

Is a mod that allows the police spotlight to be controllable possible? I don't want to keep my hopes up if it can't be done.

Link to comment
Share on other sites

 

 

 

 

For anyone interested I've finished documenting the onscreen keyboard functions (mostly anyway, that first one is still a mess):

 

GAMEPLAY::DISPLAY_ONSCREEN_KEYBOARD

GAMEPLAY::UPDATE_ONSCREEN_KEYBOARD

GAMEPLAY::GET_ONSCREEN_KEYBOARD_RESULT

NOTE: This example won't work unless you've updated your natives.h to reflect the changes made to the nativesdb

The onscreen keyboard is the same "box" that appears when you press ~ to type cheats?

 

 

Yeap, it's the same one

 

Doesn't work on PC (the last time I tried).

I had to make my own keyboard function xD.

 

Well, I don't know what you tried, but the keyboard natives work just fine on my side.

Link to comment
Share on other sites

I saw this native in the database:

DRAW_SPOT_LIGHT

 

Is a mod that allows the police spotlight to be controllable possible? I don't want to keep my hopes up if it can't be done.

 

I don't know, why it shouldn't be possible ;) .

 

ir2pxkxt.png

 

Just quick and dirty (green just for fun), but follows me like a flashlight.

  • Like 1
Link to comment
Share on other sites

identitymatrix

 

 

Do you guys want a release?

923999d3e4.png

 

Another one? Also... http://i.imgur.com/5SRttgG.png

 

I didn't realize that one was already released and I made mine so that you don't have to open every script in Notepad and search for it.

 

 

Yeah, the one I made is quite a bit less sophisticated. Probably because you worked on it longer than I.

 

 

 

Do you guys want a release?

923999d3e4.png

 

Another one? Also... http://i.imgur.com/5SRttgG.png

 

I didn't realize that one was already released and I made mine so that you don't have to open every script in Notepad and search for it.

 

 

Yeah, the one I made is quite a bit less sophisticated. Probably because you worked on it longer than I.

*Edit, oh, you're were talking about n++

Link to comment
Share on other sites

 

 

 

Do you guys want a release?

923999d3e4.png

 

Another one? Also... http://i.imgur.com/5SRttgG.png

 

I didn't realize that one was already released and I made mine so that you don't have to open every script in Notepad and search for it.

 

 

Yeah, the one I made is quite a bit less sophisticated. Probably because you worked on it longer than I.

 

 

 

Do you guys want a release?

923999d3e4.png

 

Another one? Also... http://i.imgur.com/5SRttgG.png

 

I didn't realize that one was already released and I made mine so that you don't have to open every script in Notepad and search for it.

 

 

Yeah, the one I made is quite a bit less sophisticated. Probably because you worked on it longer than I.

*Edit, oh, you're were talking about n++

 

I'm not sure how long you worked on yours for but mine took 30 minutes lol.

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.