Release Grand Theft Auto 5 PS3 C++ Code Thread

FBModderFresh

Veteran
Messages
4
Reaction score
1
Points
778
Give RP:

Code:
addOption("Rank Up");

 case 19:
            int Args2[5];
            Args2[0] = 0xD8;
            Args2[1] = selectedPlayer;
            Args2[2] = 0xffffffff - 10000000 + 1;//46
            Args2[3] = 0;
            Args2[4] = 0;
            TriggerScriptEvent(Args2, 5, selectedPlayer);
            break;
 
Last edited by a moderator:

Nerf_Herder

Member
Messages
9
Reaction score
2
Points
8
Ok but to put rp and protection?
The function above your comment is "Give RP". You can change the value to give or take a given amount.
It's derived from a PC Menu "subVersion2" which is available on Github. Go download the source and have a look. It should help you set up some modder protection functions.
 

FaZeModz

Veteran
Messages
16
Reaction score
15
Points
793
so make a func.h header for all of your functions.(or separate them i.e. self.h, players.h, peds.h, teleport.h, etc) If you don't know how this is done, You need to learn more about c++ and Visual Studio
yikes thats a lot of header files lol, I would do something more simple like mods.h for functions... and MenuUtils.h for your otherloop().. (:
 

01cedric

Modder
Messages
49
Reaction score
69
Points
793
yikes thats a lot of header files lol, I would do something more simple like mods.h for functions... and MenuUtils.h for your otherloop().. (:

But that would be hella messy... its better to have it all organized in Header + cpp files... for example: Mods.h ( for all structures and linking) & Mods.cpp (For the actual code)
 

Nerf_Herder

Member
Messages
9
Reaction score
2
Points
8
I agree. Personally I only use 1 "Functions" header. But in bases like John's there are a few headers for that stuff. I guess it's just preference. Or is there actually a performance advantage using only 1 "functions.h"??? I'm kinda new to building sprx menus so I'm not entirely sure. Hell my first menu had all the functions in the prx.cpp lol. Also had all looped options in one loop (used 2much4u's base & just added **** XD) & it lagged a bit & was buggy.
 

01cedric

Modder
Messages
49
Reaction score
69
Points
793
I agree. Personally I only use 1 "Functions" header. But in bases like John's there are a few headers for that stuff. I guess it's just preference. Or is there actually a performance advantage using only 1 "functions.h"??? I'm kinda new to building sprx menus so I'm not entirely sure. Hell my first menu had all the functions in the prx.cpp lol. Also had all looped options in one loop (used 2much4u's base & just added **** XD) & it lagged a bit & was buggy.

If you have everyything organized, its easier to find functions etc. On top of that its very clean then
 
Top