Can someone tell what decompiled scripts in GTA V do?
-
Can you please send a link where I can find the description of these decompiled scripts? Or describe yourself, if there is no link. It would be helpful not only to me, but to other modders.
Link to GitHib: https://github.com/Sainan/GTA-V-Decompiled-Scripts
-
teach you how to use the natives. and if you are lucky and skill, find new ones.
-
If you mean what each one does?
https://github.com/Sainan/GTA-V-Decompiled-Scripts/tree/master/decompiled_scriptsThere are 990 scripts. Which one?
As @Niziul hinted, you are better off looking at the native functions, also found here, and 20 other sites.
Better still, look at the SHVDN documentation.
https://github.com/crosire/scripthookvdotnet/wiki/How-Tos
https://github.com/crosire/scripthookvdotnet/wiki/How-Tos#calling-native-c-hash-functions
-
@Niziul @JohnFromGWN, it seems there was already a description of these scripts. But, unfortunately, the link (pastebin.com/yLNWicUi) is not working now.
As for native functions description, I've been already known about these before writing this question.
-
@AlexSam said in Can someone tell what decompiled scripts in GTA V do?:
As for native functions description, I've been already known about these before writing this question.
have you seen this one?
void TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME(const char* scriptName)
// ambient_mrsphilips.ysc @ L778 void func_20() { if (SCRIPT::_GET_NUMBER_OF_REFERENCES_OF_SCRIPT_WITH_NAME_HASH(joaat("mission_stat_watcher")) > 0) { if (func_21()) { if (Global_61466 && !Global_61465) { Global_61466 = 0; MISC::TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME("mission_stat_watcher"); } } else { MISC::TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME("mission_stat_watcher"); } } }
-
@Niziul sorry if I was not clear, so I will repeat my problem.
I want to use a native function — "terminate_all_scripts_with_this_name". This function passes name of a script as a parameter. For example, terminate_all_scripts_with_this_name("cellphone_controller"). This command disables player's phone so that he can't use it.
But, here is the problem. I don't know other names of the scripts. Actually, I know names, but I don't know what these scripts do. Let's say, I want to terminate ALL of the random events. It seems that these events are stored in scripts, like "abigale...",but I don't know what exactly such scripts do.Thus, it would be useful for me to find a list with description of the decompiled scripts.
-
I think you're looking for something that doesn't exist and was never in the pastebin link you posted either.
If you look at the comments in the native database you will see there is very little documentation. It seems the author's focused on the most important scripts only.In fact GTA5 legend Alexander Blade started a thread on this topic back in 2016 where he clearly states that the Native DB is the repository for the native functions as well as their descriptions. This was initiated on the console version, PC version came out in 2015.
I've only been here one year and I'm not a programmer but I've done my share of googling and posting for help and have never found adequate descriptions or documentation other than the Native DB and what you can use with intelisense in Visual Studio.
If you do find something, and good luck, please post it here - but pretty confident you will not find it, either on FiveM or SP sites.
The amount of work to decompile the scripts, extract and document the native functions (over 6000 I think?), must have been overwhelming. It would have taken teams of experts to do this.
-
@AlexSam
I understand now.So, I can't help you much. but keep searching and saving the ones you find. I found this post with John participation, where Jitnaught shows how menyoo can turn off the restricted areas using
TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME
too.
-
@Niziul I'm confused, I don't think @AlexSam is looking for script names to terminate right? He wants the descriptions of all the decompiled scripts. Am I wrong?
I think he just used terminate as an example. The link to pastebin was gone, but those links only showed names, not descriptions.
For all the names, they are already on Github. For example, https://github1s.com/Sainan/GTA-V-Decompiled-Scripts/blob/master/all_script_names.txt
-
@Niziul @JohnFromGWN well, it seems that there is indeed no documentation on this topic. Maybe later I will create the documentation of several scripts on my own, if I'll have some free time. Anyway, guys, I appreciate your help very much!
P.s. And yes, @JohnFromGWN, I wanted the descriptions of all the decompiled scripts. @Niziul also, thank you for the example of using this function. I was looking for it as well.
-
@AlexSam That would be fantastic. Thanks!
-
@AlexSam said in Can someone tell what decompiled scripts in GTA V do?:
@Niziul @JohnFromGWN, it seems there was already a description of these scripts. But, unfortunately, the link (pastebin.com/yLNWicUi) is not working now.
god bless the wayback machine! http://pastebin.com/yLNWicUi
-
@Niziul
I already posted that link above, all it is are the names in a text file. No descriptions.https://github1s.com/Sainan/GTA-V-Decompiled-Scripts/blob/master/all_script_names.txt
-
@JohnFromGWN I was very distracted right now, sorry.
-
@Niziul no problem. In fact, good idea to think of the wayback machine - can be a game saver - although it is slowly dying of neglect, not to mention the explosion of the web and different web technologies (server side) that can't be archived like they were in the past.
-
@Niziul @JohnFromGWN Well, guys, I'm again here:)
So, I've terminated the scripts (turned off player's cellphone), but how can I turn on these scripts again? Unfortunately, I didn't find proper function in the Native Database.
-
This post is deleted!
-
@AlexSam did you check the System section of the native database. There are some scripts that could be what you're looking for, well maybe ...
SYSTEM::START_NEW_SCRIPT
Examples: g_384A = SYSTEM::START_NEW_SCRIPT("cellphone_flashhand", 1424); l_10D = SYSTEM::START_NEW_SCRIPT("taxiService", 1828); SYSTEM::START_NEW_SCRIPT("AM_MP_YACHT", 5000); SYSTEM::START_NEW_SCRIPT("emergencycall", 512); SYSTEM::START_NEW_SCRIPT("emergencycall", 512); SYSTEM::START_NEW_SCRIPT("FM_maintain_cloud_header_data", 1424); SYSTEM::START_NEW_SCRIPT("FM_Mission_Controller", 31000); SYSTEM::START_NEW_SCRIPT("tennis_family", 3650); SYSTEM::START_NEW_SCRIPT("Celebrations", 3650); Decompiled examples of usage when starting a script:
SCRIPT::REQUEST_SCRIPT(a_0);
if (SCRIPT::HAS_SCRIPT_LOADED(a_0)) {
SYSTEM::START_NEW_SCRIPT(a_0, v_3);
SCRIPT::SET_SCRIPT_AS_NO_LONGER_NEEDED(a_0);
return 1;
}
-
@JohnFromGWN great, thanks! Do you know what does parameter "stackSize" mean?
Upd: it seems that stackSize is stored in gameconfig. I will check that.
-
@AlexSam Exactly.
You might want to look at this old post as well.
https://gtaforums.com/topic/863943-how-do-i-restart-a-script-i-stopped/
-
SCRIPT::_GET_NUMBER_OF_INSTANCES_OF_STREAMED_SCRIPT
to make sure it isn't already running before you start it.source: same post linked above
stack size values apparently in main_persistent.ysc
-
@JohnFromGWN you're so helpful, many thanks!
-
Anyone following this thread in the future, as @AlexSam wrote, the stack size values can be found in gameconfig.xml.
Search for
ConfigScriptStackSizes
-
@AlexSam I'd be more helpful if I was a programmer! Hope you can help me in the future.
-
@JohnFromGWN said in Can someone tell what decompiled scripts in GTA V do?:
Anyone following this thread in the future, as @AlexSam wrote, the stack size values can be found in gameconfig.xml.
Search for
ConfigScriptStackSizes
This is very useful! thanks.