What's new

Tutorial [Tutorial] Simple GTA Print Mod Menu!

  • Thread starter Chr0m3 x MoDz
  • Start date
  • Views 1,234
Chr0m3 x MoDz

Chr0m3 x MoDz

From the top to the fall, lessons through it all.
VIP
Sinner Services Seasoned Veteran
Messages
5,377
Reaction score
7,882
Points
1,170
Sin$
0
Ok guys so this morning I have been helping Duck and I came up with this it's very simple something beginners can actually learn off.

The way this menu works if you press back on your controller and it will say menu activated then you press dpad right and it will scroll through your options then you press a on the option you want once done press back again to close the menu.

Code:
#include <natives.h>
#include <common.h>
#include <strings.h>
#include <types.h>
#include <consts.h>
 
#define SELECT 0xD
#define START 0xC
#define SQUARE 0xE
#define TRIANGLE 0xF
#define X 0x10
#define CIRCLE 0x11
#define DPAD_UP 0x8
#define DPAD_DOWN 0x9
#define DPAD_LEFT 0xA
#define DPAD_RIGHT 0xB
#define L2 0x5
#define R2 0x7
#define L1 0x4
#define R1 0x6
#define STICK_L 0x12
#define STICK_R 0x13
 
int menu=0;
int select=0;
int active=0;
 
// Base made by Chr0m3 x MoDz
 
void Print(char *string) /// Print function
{
PRINT_STRING_WITH_LITERAL_STRING_NOW("STRING", string, 5000, 1);
}
 
void function(void)
{
/// Mod 1
Print("Menu Slot 1 Activated");
}
 
void function_1(void)
{
/// Mod 2
Print("Menu Slot 2 Activated");
 
}
 
void menu_check(void)
{
if (IS_BUTTON_JUST_PRESSED(0, SELECT)) // button press anything in { and } will happen when you press select
{
if (menu == 0)
{
Print("Menu Activated");
menu=1;
}
else if (menu == 1)
{
menu=0;
Print("Menu Disabled");
}
}
}
 
void menu_fun(void)
{
if (menu == 1)
{
if (IS_BUTTON_JUST_PRESSED(0, DPAD_RIGHT))
{
if (select == 0)
{
Print("Menu Slot 1");
select=1;
active=1;
}
else if (select == 1)
{
Print("Menu Slot 2");
select=0;
active=2;
}
}
}
}
 
void button(void)
{
if (menu == 1)
{
if (IS_BUTTON_JUST_PRESSED(0, X))
{
if (active == 1)
{
function();
}
else if (active == 2)
{
function_1();
}
}
}
}
 
 
void main(void)
{
THIS_SCRIPT_IS_SAFE_FOR_NETWORK_GAME();
Print("Chr0m3 x MoDz");
while(true)
{
button();
menu_fun();
menu_check();
WAIT(0);
}
}

Function and Function_1 are where you would put your code then you would go down to the menu_fun function and change the prints to what your mods are.

Now to add on to this you would just do this for example

you would add this

Code:
void function_2(void)
{
/// Mod 3 here
Print("Menu Slot 3");
}

then you would go down to menu_fun and do this
change
Code:
else if (select == 1)
{
Print("Menu Slot 2");
select=0;
active=2;
}
to
Code:
else if (select == 1)
{
Print("Menu Slot 2");
select=2;
active=2;
}
and then add this under
Code:
else if (select == 2)
{
select=0; /// Will go back to first option
active=3;
}
then you will go in to the button function and add this

Code:
else if (active == 3)
{
function_2();
}

The final code will look like this after you have added a option

Code:
#include <natives.h>
#include <common.h>
#include <strings.h>
#include <types.h>
#include <consts.h>
 
#define SELECT 0xD
#define START 0xC
#define SQUARE 0xE
#define TRIANGLE 0xF
#define X 0x10
#define CIRCLE 0x11
#define DPAD_UP 0x8
#define DPAD_DOWN 0x9
#define DPAD_LEFT 0xA
#define DPAD_RIGHT 0xB
#define L2 0x5
#define R2 0x7
#define L1 0x4
#define R1 0x6
#define STICK_L 0x12
#define STICK_R 0x13
 
int menu=0;
int select=0;
int active=0;
 
// Base made by Chr0m3 x MoDz
 
void Print(char *string) /// Print function
{
PRINT_STRING_WITH_LITERAL_STRING_NOW("STRING", string, 5000, 1);
}
 
void function(void)
{
/// Mod 1
Print("Menu Slot 1 Activated");
}
 
void function_1(void)
{
/// Mod 2
Print("Menu Slot 2 Activated");
}
 
void function_2(void)
{
/// Mod 3
Print("Menu Slot 3 Activated");
 
}
 
void menu_check(void)
{
if (IS_BUTTON_JUST_PRESSED(0, SELECT)) // button press anything in { and } will happen when you press select
{
if (menu == 0)
{
Print("Menu Activated");
menu=1;
}
else if (menu == 1)
{
menu=0;
Print("Menu Disabled");
}
}
}
 
void menu_fun(void)
{
if (menu == 1)
{
if (IS_BUTTON_JUST_PRESSED(0, DPAD_RIGHT))
{
if (select == 0)
{
Print("Menu Slot 1");
select=1;
active=1;
}
else if (select == 1)
{
Print("Menu Slot 2");
select=2;
active=2;
}
else if (select == 2)
{
Print("Menu Slot 3");
select=0;
active=3;
}
}
}
}
 
void button(void)
{
if (menu == 1)
{
if (IS_BUTTON_JUST_PRESSED(0, X))
{
if (active == 1)
{
function();
}
else if (active == 2)
{
function_1();
}
else if (active == 3)
{
function_2();
}
}
}
}
 
 
void main(void)
{
THIS_SCRIPT_IS_SAFE_FOR_NETWORK_GAME();
Print("Chr0m3 x MoDz");
while(true)
{
button();
menu_fun();
menu_check();
WAIT(0);
}
}
 
Last edited:
daxxphenom

daxxphenom

Enthusiast
Messages
219
Reaction score
101
Points
85
Sin$
7
Good little base chrome, this is good for a trolly menu tbh and its really easy for the noobs to understand this
 
Chr0m3 x MoDz

Chr0m3 x MoDz

From the top to the fall, lessons through it all.
VIP
Sinner Services Seasoned Veteran
Messages
5,377
Reaction score
7,882
Points
1,170
Sin$
0
Good little base chrome, this is good for a trolly menu tbh and its really easy for the noobs to understand this
It's something for the noobs to learn how to use and not just copy and paste without learning anything. Also it's really not hard to convert this to a full blown menu.
 
daxxphenom

daxxphenom

Enthusiast
Messages
219
Reaction score
101
Points
85
Sin$
7
It's something for the noobs to learn how to use and not just copy and paste without learning anything. Also it's really not hard to convert this to a full blown menu.
No i didnt mean like that i meant to say like this would be good for attaching objects or even for fun cars. Or even just a car spawner on this would be good too
 
Liquid44

Liquid44

Banned
Programmer
Messages
1,158
Reaction score
691
Points
245
Sin$
0
It's something for the noobs to learn how to use and not just copy and paste without learning anything. Also it's really not hard to convert this to a full blown menu.

Nice tut, quite useful for people wanting to learn.
I wrote a simple print menu for colours ages ago but nobody was interested in learning back then lol

http://www.se7ensins.com/forums/threads/basic-menu-for-colours.715455/

No i didnt mean like that i meant to say like this would be good for attaching objects or even for fun cars. Or even just a car spawner on this would be good too

The thread example I posted above is how my objects menu is made for attaching stuff to people.
 
Chr0m3 x MoDz

Chr0m3 x MoDz

From the top to the fall, lessons through it all.
VIP
Sinner Services Seasoned Veteran
Messages
5,377
Reaction score
7,882
Points
1,170
Sin$
0
ImStuartB

ImStuartB

Aye so...
Experienced Veteran Forum Addict Hardened Veteran
Messages
2,933
Reaction score
2,138
Points
505
Sin$
0
Nice one Chrome.
Nice to see you helping out the community once again :smile:
 
ImStuartB

ImStuartB

Aye so...
Experienced Veteran Forum Addict Hardened Veteran
Messages
2,933
Reaction score
2,138
Points
505
Sin$
0
I know that DUH...It was a joke because it just reminded me of cathering when he had that topic about Approved thing.
Lol that was funny.
releasebadgesmall.png
 
Mrlobbies

Mrlobbies

Enthusiast
Messages
186
Reaction score
23
Points
70
Sin$
0
Ok guys so this morning I have been helping Duck and I came up with this it's very simple something beginners can actually learn off.

The way this menu works if you press back on your controller and it will say menu activated then you press dpad right and it will scroll through your options then you press a on the option you want once done press back again to close the menu.

Code:
#include <natives.h>
#include <common.h>
#include <strings.h>
#include <types.h>
#include <consts.h>
 
#define SELECT 0xD
#define START 0xC
#define SQUARE 0xE
#define TRIANGLE 0xF
#define X 0x10
#define CIRCLE 0x11
#define DPAD_UP 0x8
#define DPAD_DOWN 0x9
#define DPAD_LEFT 0xA
#define DPAD_RIGHT 0xB
#define L2 0x5
#define R2 0x7
#define L1 0x4
#define R1 0x6
#define STICK_L 0x12
#define STICK_R 0x13
 
int menu=0;
int select=0;
int active=0;
 
// Base made by Chr0m3 x MoDz
 
void Print(char *string) /// Print function
{
PRINT_STRING_WITH_LITERAL_STRING_NOW("STRING", string, 5000, 1);
}
 
void function(void)
{
/// Mod 1
Print("Menu Slot 1 Activated");
}
 
void function_1(void)
{
/// Mod 2
Print("Menu Slot 2 Activated");
 
}
 
void menu_check(void)
{
if (IS_BUTTON_JUST_PRESSED(0, SELECT)) // button press anything in { and } will happen when you press select
{
if (menu == 0)
{
Print("Menu Activated");
menu=1;
}
else if (menu == 1)
{
menu=0;
Print("Menu Disabled");
}
}
}
 
void menu_fun(void)
{
if (menu == 1)
{
if (IS_BUTTON_JUST_PRESSED(0, DPAD_RIGHT))
{
if (select == 0)
{
Print("Menu Slot 1");
select=1;
active=1;
}
else if (select == 1)
{
Print("Menu Slot 2");
select=0;
active=2;
}
}
}
}
 
void button(void)
{
if (menu == 1)
{
if (IS_BUTTON_JUST_PRESSED(0, X))
{
if (active == 1)
{
function();
}
else if (active == 2)
{
function_1();
}
}
}
}
 
 
void main(void)
{
THIS_SCRIPT_IS_SAFE_FOR_NETWORK_GAME();
Print("Chr0m3 x MoDz");
while(true)
{
button();
menu_fun();
menu_check();
WAIT(0);
}
}

Function and Function_1 are where you would put your code then you would go down to the menu_fun function and change the prints to what your mods are.

Now to add on to this you would just do this for example

you would add this

Code:
void function_2(void)
{
/// Mod 3 here
Print("Menu Slot 3");
}

then you would go down to menu_fun and do this
change
Code:
else if (select == 1)
{
Print("Menu Slot 2");
select=0;
active=2;
}
to
Code:
else if (select == 1)
{
Print("Menu Slot 2");
select=2;
active=2;
}
and then add this under
Code:
else if (select == 2)
{
select=0; /// Will go back to first option
active=3;
}
then you will go in to the button function and add this

Code:
else if (active == 3)
{
function_2();
}

The final code will look like this after you have added a option

Code:
#include <natives.h>
#include <common.h>
#include <strings.h>
#include <types.h>
#include <consts.h>
 
#define SELECT 0xD
#define START 0xC
#define SQUARE 0xE
#define TRIANGLE 0xF
#define X 0x10
#define CIRCLE 0x11
#define DPAD_UP 0x8
#define DPAD_DOWN 0x9
#define DPAD_LEFT 0xA
#define DPAD_RIGHT 0xB
#define L2 0x5
#define R2 0x7
#define L1 0x4
#define R1 0x6
#define STICK_L 0x12
#define STICK_R 0x13
 
int menu=0;
int select=0;
int active=0;
 
// Base made by Chr0m3 x MoDz
 
void Print(char *string) /// Print function
{
PRINT_STRING_WITH_LITERAL_STRING_NOW("STRING", string, 5000, 1);
}
 
void function(void)
{
/// Mod 1
Print("Menu Slot 1 Activated");
}
 
void function_1(void)
{
/// Mod 2
Print("Menu Slot 2 Activated");
}
 
void function_2(void)
{
/// Mod 3
Print("Menu Slot 3 Activated");
 
}
 
void menu_check(void)
{
if (IS_BUTTON_JUST_PRESSED(0, SELECT)) // button press anything in { and } will happen when you press select
{
if (menu == 0)
{
Print("Menu Activated");
menu=1;
}
else if (menu == 1)
{
menu=0;
Print("Menu Disabled");
}
}
}
 
void menu_fun(void)
{
if (menu == 1)
{
if (IS_BUTTON_JUST_PRESSED(0, DPAD_RIGHT))
{
if (select == 0)
{
Print("Menu Slot 1");
select=1;
active=1;
}
else if (select == 1)
{
Print("Menu Slot 2");
select=2;
active=2;
}
else if (select == 2)
{
Print("Menu Slot 3");
select=0;
active=3;
}
}
}
}
 
void button(void)
{
if (menu == 1)
{
if (IS_BUTTON_JUST_PRESSED(0, X))
{
if (active == 1)
{
function();
}
else if (active == 2)
{
function_1();
}
else if (active == 3)
{
function_2();
}
}
}
}
 
 
void main(void)
{
THIS_SCRIPT_IS_SAFE_FOR_NETWORK_GAME();
Print("Chr0m3 x MoDz");
while(true)
{
button();
menu_fun();
menu_check();
WAIT(0);
}
}
Great job, finally someone is helping the beginners I will be using this thanks
 
Top Bottom
Login
Register