PPRX's GTA:IV Simple Script Coding Tutorial
for Script Beginners
* Sorry for My Bad English *
In this tutorial used Sublime Text 3.
Hi guys. today i will show you how to add simple freeze gun protection to MD Essentials source.
There is no detailed explanation of the native function in this tutorial.
1. Go to MD_Menu_Contents Folder
2. Next, Create New C File. / File Name: MC_Protection_Loop.c
3. Next, Open MC_Protection_Loop.c with your own text editor and add protection code
This code must be in a loop. If it detects that the player have "WEAPON ROCKET", it will be deleted automatically.
4. Next, go up the directory, open MD_Essentials.c and include "MC_Protection_Loop.C
5. Next, Place "MC_Protection_Loop" inside the loop of the menu. Protection is not needed offline, so place it inside "IS_NETWORK_SESSION".
6. Next, go to the MD_Menu_Config folder and open "MD_Vars.h" with your own text editor.
7. Next, Add a new bool for freeze gun protection. since it is set to "true", protection is set ON by default. by setting it to "false" you can set it to OFF by default.
8. Next, go to MD_Menu Contents folder, open MC_Menu_Settins.c with your own text editor and add new code.
In this example, I will create freeze gun protection bool in the menu setting. This will make can protection OFF and ON.
This code is needed for make protection OFF & ON. please note the number of "Selected Item". if you make a mistake number, bool does not work.
OK. freeze gun protection has been added to MD Essentials. Next, compile. For compiling, use the attached Motions97 Compiler.
When compiling is completed normally, the SCO file is output. If you work from a clean MD Essential, the SCO size will be 249 KB.
SCO can be compressed and there is no problem.
That's all. Thanks
I hope this tutorial will help as many script beginners.
Credits:
PPRX
DEVILSDESIGN (MD Essential Menu Base)
for Script Beginners
* Sorry for My Bad English *
In this tutorial used Sublime Text 3.
Hi guys. today i will show you how to add simple freeze gun protection to MD Essentials source.
There is no detailed explanation of the native function in this tutorial.
1. Go to MD_Menu_Contents Folder
2. Next, Create New C File. / File Name: MC_Protection_Loop.c
3. Next, Open MC_Protection_Loop.c with your own text editor and add protection code
This code must be in a loop. If it detects that the player have "WEAPON ROCKET", it will be deleted automatically.
4. Next, go up the directory, open MD_Essentials.c and include "MC_Protection_Loop.C
5. Next, Place "MC_Protection_Loop" inside the loop of the menu. Protection is not needed offline, so place it inside "IS_NETWORK_SESSION".
6. Next, go to the MD_Menu_Config folder and open "MD_Vars.h" with your own text editor.
7. Next, Add a new bool for freeze gun protection. since it is set to "true", protection is set ON by default. by setting it to "false" you can set it to OFF by default.
8. Next, go to MD_Menu Contents folder, open MC_Menu_Settins.c with your own text editor and add new code.
In this example, I will create freeze gun protection bool in the menu setting. This will make can protection OFF and ON.
This code is needed for make protection OFF & ON. please note the number of "Selected Item". if you make a mistake number, bool does not work.
OK. freeze gun protection has been added to MD Essentials. Next, compile. For compiling, use the attached Motions97 Compiler.
When compiling is completed normally, the SCO file is output. If you work from a clean MD Essential, the SCO size will be 249 KB.
SCO can be compressed and there is no problem.
That's all. Thanks
I hope this tutorial will help as many script beginners.
Credits:
PPRX
DEVILSDESIGN (MD Essential Menu Base)