Post: [C++] Xx James T xX's TU8 Menu Base Converted To PS3
12-01-2014, 09:27 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); I got bored and converted this menu base to PS3 for the hell of it. It's a pretty nice base if you're just learning how to mod and how to use SPRX. Anyways here is the code

    
#include "PS3.h"
#include "Dialogs.h"

#include <wchar.h>
#include <sys/prx.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/syscall.h>
#include <sys/ppu_thread.h>
#include <string.h>
#include <sys/sys_time.h>
#include <sys/time_util.h>
#include <stdarg.h>
#include <assert.h>
#include <sys/process.h>
#include <sys/memory.h>
#include <sys/timer.h>
#include <sys/return_code.h>
#include <sys/prx.h>
#include <stddef.h>
#include <math.h>
#include <stdarg.h>
#include <cellstatus.h>
#include <typeinfo>
#include <vector>
#include <pthread.h>
#include <locale.h>
#include <cell/error.h>
#include <sys/paths.h>//Hello
#include <time.h>


opd_s SV_GameSendServerCommand_t = { 0x0021A0A0, TOC };
typedef void(*SV_GSSC)(int clientNum, int type, const char *text);
SV_GSSC SV = (SV_GSSC)(opd_s*)&SV_GameSendServerCommand_t;

opd_s Dvar_GetFloat_t = { 0x00277068, TOC };
typedef float(*D_GF)(const char *dvar);
D_GF Dvar_GetFloat = (D_GF)(opd_s*)&Awesome facevar_GetFloat_t;

opd_s Dvar_GetString_t = { 0x00276F60, TOC };
typedef const char*(*D_GS)(const char *dvar);
D_GS Dvar_GetString = (D_GS)(opd_s*)&Awesome facevar_GetString_t;

opd_s Dvar_GetBool_t = { 0x00277138, TOC };
typedef bool(*D_GB)(const char *dvar);
D_GB Dvar_GetBool = (D_GB)(opd_s*)&Awesome facevar_GetBool_t;

opd_s Console_t = { 0x001D9EC0, TOC };
typedef void(*_C)(int LocalClientNum, const char *Command);
_C Console = (_C)(opd_s*)&Console_t;

opd_s Dvar_GetInt_t = { 0x002770C8, TOC };
typedef int(*D_GI)(const char *dvar);
D_GI Dvar_GetInt = (D_GI)(opd_s*)&Awesome facevar_GetInt_t;

opd_s CG_BoldGameMessage_t = { 0x0005EF68, TOC };
typedef void(*CG_BGM)(int localClientNumber, const char *message);
CG_BGM CG_BoldGameMessage = (CG_BGM)(opd_s*)&CG_BoldGameMessage_t;

opd_s CG_GameMessage_t = { 0x0005EFB0, TOC };
typedef void(*CG_GM)(int localClientNumber, const char *message);
CG_GM CG_GameMessage = (CG_GM)(opd_s*)&CG_GameMessage_t;

opd_s G_GivePlayerWeapon_t = { 0x001C0890, TOC };
typedef void(*G_GPW)(int pPS, int iWeaponIndex, int Camo, int Akimbo);
G_GPW G_GivePlayerWeapon = (G_GPW)(opd_s*)&G_GivePlayerWeapon_t;

opd_s G_GetWeaponIndexForName_t = { 0x001BF4A0, TOC };
typedef int(*G_GWIFN)(const char *weaponName);
G_GWIFN GetWeaponIndex = (G_GWIFN)(opd_s*)&G_GetWeaponIndexForName_t;

opd_s giveAmmo_t = { 0x00186638, TOC };
typedef void(*gA)(int clientNumber, unsigned int weaponIndex, char weaponModel, int count, int fillClip);
gA giveAmmo = (gA)(opd_s*)&giveAmmo_t;

opd_s G_LocalizedStringIndex_t = { 0x001BE7C8, TOC };
typedef int(*G_LSI)(const char *string);
G_LSI G_LocalizedStringIndex = (G_LSI)(opd_s*)&G_LocalizedStringIndex_t;

opd_s CacheElem_t = { 0x001806E0, TOC };
typedef int(*CE)(int clientNum, int TeamNum);
CE CacheElem = (CE)(opd_s*)&CacheElem_t;

opd_s GetMaterialIndex_t = { 0x001BE758, TOC };
typedef int(*GMI)(const char *material);
GMI GetMaterialIndex = (GMI)(opd_s*)&GetMaterialIndex_t;

opd_s Com_Sprintf_t = { 0x0027E2F8, TOC };
typedef int(*C_S)(char *dest, size_t size, const char *fmt, ...);
C_S Com_Sprintf = (C_S)(opd_s*)&Com_Sprintf_t;

int Scroll[18], MenuType[18], Freeze[18],
Shader[18], Select[18],
Text1[18], Text2[18], Text3[18], Text4[18], Text5[18], Text6[18], Text7[18], Text8[18], Text9[18], Text10[18],
Loaded = 0;
bool MenuOpen[18], ResetValues = false;

int gEntity(int client, int mod = 0x00)
{
return (0x1319800 + mod + (client * 0x280));
}
int gClient(int client, int mod=0x00)
{
return (0x14E2200 + mod + (client * 0x3700));
}

typedef enum OffsetsAndValues
{
RS = 1024,
LS = 2097664,
RT = 256,
LT = 134742016,
RB = 4194304,
LB = 8388608,
//No Y
X = 8192,
A = 262144,
CROUCHED = 131072,
PRONED = 65536,

elem = 0x012E9858,
xOffset = 0x08,
yOffset = 0x04,
textOffset = 0x84,
fontOffset = 0x28,
fontSizeOffset = 0x14,
colorOffset = 0x34,
relativeOffset = 0x2c,
widthOffset = 0x48,
heightOffset = 0x44,
shaderOffset = 0x4C,
alignOffset = 0x30,
GlowColor = 0x8C
};
int xstrCmp(const char* str1, const char* str2)
{
int diff = 0;

if (*(str1) == 0x00 || *(str2) == 0x00) { return -1; }

for (int i = 0; i < 0x600; i++)
{
if (*(str1 + i) == 0x00 || *(str2 + i) == 0x00) { break; }
if (*(str1 + i) != *(str2 + i)) { diff++; }
}

return diff;
}
bool ButtonPressed(int client, int button)
{
if (*(int*)gClient(client, 0x31DD) == button) return true;
else return false;
}
void SwitchToWeap(int Client, const char *Weapon, int WeaponIndex = 0)//Used like: SwitchToWeap(0, "deserteaglegold_mp"); or SwitchToWeap(0, "", 46);
{
if (WeaponIndex == 0)
{
char buffer[100];
Com_Sprintf(buffer, sizeof(buffer),"a %i", GetWeaponIndex(Weapon));
SV(Client, 1, buffer);
}
else
{
char buffer[100];
Com_Sprintf(buffer, sizeof(buffer), "a %i", WeaponIndex);
SV(Client, 1, buffer);
}
}

void GiveWeapon(int client, const char* Weapon, bool akimbo, bool GiveAmmo, bool SwitchToWeapon)
{
G_GivePlayerWeapon(gClient(client), GetWeaponIndex(Weapon), 0, akimbo);
if (SwitchToWeapon){ SwitchToWeap(client, Weapon); }
if (GiveAmmo){ giveAmmo(gEntity(client), GetWeaponIndex(Weapon), 0, 999, 1); }
}

void DelElem(int ElemOffset)
{
*(float*)(ElemOffset + xOffset) = 1500;
}

void DelText(int i)
{
DelElem(Text1[i]);
DelElem(Text2[i]);
DelElem(Text3[i]);
DelElem(Text4[i]);
DelElem(Text5[i]);
DelElem(Text6[i]);
DelElem(Text7[i]);
DelElem(Text8[i]);
DelElem(Text9[i]);
DelElem(Text10[i]);
}

void setIcon(int client, int ElemAddress, int Width, int Height, float x, float y, int align, int R = 0, int G = 0, int B = 0, int A = 255)
{
*(int *)ElemAddress = 0x06;
*(int *)(ElemAddress + 0xACool Man (aka Tustin) = client;
*(int *)(ElemAddress + 0xA4) = 1;
*(int *)(ElemAddress + relativeOffset) = 0x05;
*(int *)(ElemAddress + relativeOffset - 4) = 0x06;
*(int *)(ElemAddress + shaderOffset) = GetMaterialIndex("white");
*(int *)(ElemAddress + heightOffset) = Height;
*(int *)(ElemAddress + widthOffset) = Width;
*(int *)(ElemAddress + alignOffset) = align;
*(int *)(ElemAddress + textOffset + 0x4) = 0;
*(float *)(ElemAddress + xOffset) = x;
*(float *)(ElemAddress + yOffset) = y;
*(char *)(ElemAddress + colorOffset + 3) = A;
*(char *)(ElemAddress + colorOffset + 2) = B;
*(char *)(ElemAddress + colorOffset + 1) = G;
*(char *)(ElemAddress + colorOffset) = R;
}
void setText(int client, int ElemAddress, const char* Text, int font, float fontscale, float x, float y, int align, int relative, float GlowR = 0, float GlowG = 0, float GlowB = 0, float GlowA = 0)
{
*(int *)(ElemAddress) = 0x01;
*(int *)(ElemAddress + 0xACool Man (aka Tustin) = client;
*(int *)(ElemAddress + 0xA4) = 1;
*(int *)(ElemAddress + textOffset) = G_LocalizedStringIndex(Text);
*(int *)(ElemAddress + relativeOffset) = relative;//Left - 0x2, Center - 0x05, Right - 0x8
*(int *)(ElemAddress + relativeOffset - 4) = 0x06;
*(int *)(ElemAddress + fontOffset) = font;
*(int *)(ElemAddress + alignOffset) = align;
*(int *)(ElemAddress + textOffset + 4) = 0x40;
*(float*)(ElemAddress + fontSizeOffset) = fontscale;
*(float *)(ElemAddress + xOffset) = x;
*(float *)(ElemAddress + yOffset) = y;
*(char *)(ElemAddress + GlowColor + 3) = GlowA;
*(char *)(ElemAddress + GlowColor + 2) = GlowB;
*(char *)(ElemAddress + GlowColor + 1) = GlowG;
*(char *)(ElemAddress + GlowColor) = GlowR;
}
float Location(int Scroll)
{
Scroll--;//Remove this if you are using 0 as the default Scroll value
return(97 + (Scroll * 21.55));//21.55 is what I use as the space inbetween each line
}
char CurrentGamertag[18][15];
int Host;

int _GetHost()
{
for (int i = 0; i<18; i++)//Functions:Happyvar_GetString("sv_hostname")
if (xstrCmp(Dvar_GetString("sv_hostname"), (char*)gClient(i, 0x320Cool Man (aka Tustin)) == 0)
return i;
}
int _GetClients()
{
int ps;
for (int clientID = 0; clientID < 18; clientID++)
{
ps = gClient(clientID);
ps += 0x44;
strcpy(CurrentGamertag[clientID], (char*)ps);
if (CurrentGamertag[clientID] == "")
{
Com_Sprintf(CurrentGamertag[clientID], sizeof(CurrentGamertag[clientID]), "No Client %i\0", clientID);
}
}
return _GetHost();
}

void Menu_Thread(uint64_t swag)
{
for (;Winky Winky
{
if (Dvar_GetBool("cl_ingame"))
{
if (Loaded == 0)
{
sleep(8000);
Host = _GetClients();
SV(-1, 1, "v loc_warningsUI \"0\" loc_warnings \"0\"");
for (int i = 0; i < 18; i++)
{
Shader[i] = CacheElem(i, 0);
Select[i] = CacheElem(i, 0);
Text1[i] = CacheElem(i, 0);
Text2[i] = CacheElem(i, 0);
Text3[i] = CacheElem(i, 0);
Text4[i] = CacheElem(i, 0);
Text5[i] = CacheElem(i, 0);
Text6[i] = CacheElem(i, 0);
Text7[i] = CacheElem(i, 0);
Text8[i] = CacheElem(i, 0);
Text9[i] = CacheElem(i, 0);
Text10[i] = CacheElem(i, 0);

Scroll[i] = 1;
MenuOpen[i] = false;
MenuType[i] = 1;
Freeze[i] = 1;

char Msg[100];//Welcome message to the clients
Com_Sprintf(Msg, sizeof(Msg), "c \"^1Welcome ^2%s ^1To the Modded Lobby!\"", (const char *)gClient(i, 0x320Cool Man (aka Tustin));
SV(i, 1, Msg);
}
sleep(1500);
SV(-1, 1, "c \"Press and hold [{+speed_throw}] & [{+melee}] to open/close the menu!\"");
Loaded = 1;
ResetValues = true;
}
for (int i = 0; i < 18; i++)//all client button monitoring, i = client
{
sleep(3);//To slow down the fast scroll, 3 x 17 = 51 So there is a 51MS gap inbetween each scroll

if (ButtonPressed(i, LT + RS))//Open & cLOSE
{
switch (MenuOpen[i])
{
case false:
{
Scroll[i] = 1;
MenuType[i] = 1;
setIcon(i,Shader[i], 200, 800, 320, 200, 1, 0, 0, 0, 210);//Main shader
setIcon(i,Select[i], 200, 20, 320, Location(Scroll[i]), 1, 255, 255, 255, 195);//Selector
setText(i,Text1[i], "SubMenu 1", 4, 1.80, 320, 96, 1, 0x5);
setText(i,Text3[i], "\x0015\nSubMenu 2", 4, 1.80, 320, 96, 1, 0x5);
setText(i,Text4[i], "\x0015\n\nSubMenu 3", 4, 1.80, 320, 96, 1, 0x5);
setText(i,Text5[i], "\x0015\n\n\nSubMenu 4", 4, 1.80, 320, 96, 1, 0x5);
MenuOpen[i] = true;
break;
}
case true:
{
DelElem(Shader[i]);
DelElem(Select[i]);
DelText(i);
MenuOpen[i] = false;
break;
}
}
}
if (MenuOpen[i])
{//Start of MenuOpen
if (ButtonPressed(i, RB))
{
Scroll[i]++;
Freeze[i] = 0;
}

if (ButtonPressed(i, LB))
{
Scroll[i]--;
Freeze[i] = 0;
}

if (ButtonPressed(i, RS))//Go back to main menu
{
if (MenuType[i] != 1)//if MenuType dosn't equal 1 do this
{
MenuType[i] = 1;
Scroll[i] = 1;
Freeze[i] = 0;
DelText(i);
setText(i, Text1[i], "SubMenu 1", 4, 1.80, 320, 96, 1, 0x5);
setText(i, Text3[i], "\x0015\nSubMenu 2", 4, 1.80, 320, 96, 1, 0x5);
setText(i, Text4[i], "\x0015\n\nSubMenu 3", 4, 1.80, 320, 96, 1, 0x5);
setText(i, Text5[i], "\x0015\n\n\nSubMenu 4", 4, 1.80, 320, 96, 1, 0x5);
}
}

if (Freeze[i] == 0)//To update the scroll and loop back arround to start/end insted of scrolling off the screen
{
switch (MenuType[i])
{
case 1:
{
if (Scroll[i] == 5){ Scroll[i] = 1; }//if Scroll equals 5(1 more that the amount of lines in the sub menu) it becomes 1
if (Scroll[i] == 0){ Scroll[i] = 4; }
break;
}
case 2:
{
if (Scroll[i] == 6){ Scroll[i] = 1; }
if (Scroll[i] == 0){ Scroll[i] = 5; }
break;
}
case 3:
{
if (Scroll[i] == 5){ Scroll[i] = 1; }
if (Scroll[i] == 0){ Scroll[i] = 4; }
break;
}
case 4:
{
if (Scroll[i] == 5){ Scroll[i] = 1; }
if (Scroll[i] == 0){ Scroll[i] = 4; }
break;
}
case 5:
{
if (Scroll[i] == 5){ Scroll[i] = 1; }
if (Scroll[i] == 0){ Scroll[i] = 4; }
break;
}
}
setIcon(i,Select[i], 200, 20, 320, Location(Scroll[i]), 1, 255, 255, 255, 195);
Freeze[i] = 1;
}

if (ButtonPressed(i, X))
{
switch (MenuType[i])
{
case 1:
{
switch (Scroll[i])
{
case 1:
{
MenuType[i] = 2;
Scroll[i] = 1;
DelText(i);
setIcon(i, Shader[i], 200, 800, 320, 200, 1, 0, 0, 0, 210);
setIcon(i, Select[i], 200, 20, 320, Location(Scroll[i]), 1, 255, 255, 255, 195);
setText(i, Text1[i], "Give Gold Deagle", 4, 1.80, 320, 96, 1, 0x5);
setText(i, Text3[i], "\x0015\nOption 2", 4, 1.80, 320, 96, 1, 0x5);
setText(i, Text4[i], "\x0015\n\nOption 3", 4, 1.80, 320, 96, 1, 0x5);
setText(i, Text5[i], "\x0015\n\n\nOption 4", 4, 1.80, 320, 96, 1, 0x5);
setText(i, Text6[i], "\x0015\n\n\n\nOption 5", 4, 1.80, 320, 96, 1, 0x5);
break;
}
case 2:
{
MenuType[i] = 3;
Scroll[i] = 1;
DelText(i);
setIcon(i, Shader[i], 200, 800, 320, 200, 1, 0, 0, 0, 210);
setIcon(i, Select[i], 200, 20, 320, Location(Scroll[i]), 1, 255, 255, 255, 195);
setText(i, Text1[i], "Give Akimbo RPG", 4, 1.80, 320, 96, 1, 0x5);
setText(i, Text3[i], "\x0015\nOption 2", 4, 1.80, 320, 96, 1, 0x5);
setText(i, Text4[i], "\x0015\n\nOption 3", 4, 1.80, 320, 96, 1, 0x5);
setText(i, Text5[i], "\x0015\n\n\nOption 4", 4, 1.80, 320, 96, 1, 0x5);
break;
}
case 3:
{
MenuType[i] = 4;
Scroll[i] = 1;
DelText(i);
setIcon(i, Shader[i], 200, 800, 320, 200, 1, 0, 0, 0, 210);
setIcon(i, Select[i], 200, 20, 320, Location(Scroll[i]), 1, 255, 255, 255, 195);
setText(i, Text1[i], "Give Default Weapon", 4, 1.80, 320, 96, 1, 0x5);
setText(i, Text3[i], "\x0015\nOption 2", 4, 1.80, 320, 96, 1, 0x5);
setText(i, Text4[i], "\x0015\n\nOption 3", 4, 1.80, 320, 96, 1, 0x5);
setText(i, Text5[i], "\x0015\n\n\nOption 4", 4, 1.80, 320, 96, 1, 0x5);
break;
}
case 4:
{
MenuType[i] = 5;
Scroll[i] = 1;
DelText(i);
setIcon(i, Shader[i], 200, 800, 320, 200, 1, 0, 0, 0, 210);
setIcon(i, Select[i], 200, 20, 320, Location(Scroll[i]), 1, 255, 255, 255, 195);
setText(i, Text1[i], "Give Walking AC130", 4, 1.80, 320, 96, 1, 0x5);
setText(i, Text3[i], "\x0015\nOption 2", 4, 1.80, 320, 96, 1, 0x5);
setText(i, Text4[i], "\x0015\n\nOption 3", 4, 1.80, 320, 96, 1, 0x5);
setText(i, Text5[i], "\x0015\n\n\nOption 4", 4, 1.80, 320, 96, 1, 0x5);
break;
}
}
break;
}

case 2:
{
switch (Scroll[i])
{
case 1:
{
GiveWeapon(i, "deserteaglegold_mp", false, true, true);
SV(i, 1, "f \"Gold Deagle ^2Given!\"");
break;
}
case 2:
{
SV(i, 1, "f \"You Have Selected: SubMenu 1, Option 2\"");
break;
}
case 3:
{
SV(i, 1, "f \"You Have Selected: SubMenu 1, Option 3\"");
break;
}
case 4:
{
SV(i, 1, "f \"You Have Selected: SubMenu 1, Option 4\"");
break;
}
case 5:
{
SV(i, 1, "f \"You Have Selected: SubMenu 1, Option 5\"");
break;
}
}
break;
}
case 3:
{
switch (Scroll[i])
{
case 1:
{
GiveWeapon(i, "rpg_mp", true, true, true);
SV(i, 1, "f \"Akimbo RPG ^2Given!\"");
break;
}
case 2:
{
SV(i, 1, "f \"You Have Selected: SubMenu 2, Option 2\"");
break;
}
case 3:
{
SV(i, 1, "f \"You Have Selected: SubMenu 2, Option 3\"");
break;
}
case 4:
{
SV(i, 1, "f \"You Have Selected: SubMenu 2, Option 4\"");
break;
}
}
break;
}
case 4:
{
switch (Scroll[i])
{
case 1:
{
GiveWeapon(i, "defaultweapon_mp", false, true, true);
SV(i, 1, "f \"Default Weapon ^2Given!\"");
break;
}
case 2:
{
SV(i, 1, "f \"You Have Selected: SubMenu 3, Option 2\"");
break;
}
case 3:
{
SV(i, 1, "f \"You Have Selected: SubMenu 3, Option 3\"");
break;
}
case 4:
{
SV(i, 1, "f \"You Have Selected: SubMenu 3, Option 4\"");
break;
}
}
break;
}
case 5:
{
switch (Scroll[i])
{
case 1:
{
GiveWeapon(i, "ac130_105mm_mp", true, true, true);
GiveWeapon(i, "ac130_40mm_mp", true, true, false);
GiveWeapon(i, "ac130_25mm_mp", true, true, false);
SV(i, 1, "f \"Walking AC130 ^2Given!\"");
break;
}
case 2:
{
SV(i, 1, "f \"You Have Selected: SubMenu 4, Option 2\"");
break;
}
case 3:
{
SV(i, 1, "f \"You Have Selected: SubMenu 4, Option 3\"");
break;
}
case 4:
{
SV(i, 1, "f \"You Have Selected: SubMenu 4, Option 4\"");
break;
}
}
break;
}
}
}
}//End of MenuOpen
}
}
else//If it's not in game it will reset the the menu so it dosn't resume
{
if (ResetValues)
{
Loaded = 0;
ResetValues = false;
}
console_write("\nNot In Game\n");
}
sleep(100);
}
sleep(100);
}


This is pretty much the same exact code in his menu base, except a few changes to get it running on 1.14 PS3 MW2...

You'll also need this in a PS3.h
    
#include <wchar.h>
#include <sys/prx.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/syscall.h>
#include <sys/ppu_thread.h>
#include <string.h>
#include <sys/sys_time.h>
#include <sys/time_util.h>
#include <stdarg.h>
#include <assert.h>
#include <sys/process.h>
#include <sys/memory.h>
#include <sys/timer.h>
#include <sys/return_code.h>
#include <sys/prx.h>
#include <stddef.h>
#include <math.h>
#include <stdarg.h>
#include <cellstatus.h>
#include <typeinfo>
#include <vector>
#include <pthread.h>
#include <locale.h>
#include <cell/error.h>
#include <sys/paths.h>
#include <time.h>
//Credits to seb
#define TOC ( 0x00724C38 )// 0x30F2310

#include <sys/types.h>

struct opd_s
{
int32_t sub;
int32_t toc;
};
//Credits to shark
int sys_ppu_thread_exit()
{
system_call_1(41, 0);
return_to_user_prog(int);
}

int console_write(const char * s)
{
uint32_t len;
system_call_4(403, 0, (uint64_t)s, std::strlen(s), (uint64_t)&len);
return_to_user_prog(int);
}

sys_ppu_thread_t MenuThread;
sys_ppu_thread_t Jetpack;
sys_ppu_thread_t create_thread(void(*entry)(uint64_t), int priority, size_t stacksize, const char* threadname, sys_ppu_thread_t tid)
{
if (sys_ppu_thread_create(&tid, entry, 0, priority, stacksize, 0, threadname) != CELL_OK)
{
console_write("Thread creation failed\n");
}
else
{
console_write("Thread created\n");
}
return tid;
}

void sleep(usecond_t time)
{
sys_timer_usleep(time * 1000);
}

void delay(unsigned int mseconds)
{
clock_t goal = (mseconds * 1000) + clock();
while (goal > clock());
}
int32_t write_process(uint64_t ea, const void * data, uint32_t size)
{
system_call_4(905, (uint64_t)sys_process_getpid(), ea, size, (uint64_t)data);
return_to_user_prog(int32_t);
}
namespace PS3
{
float floatArray[100];
float* ReadFloat(int address, int length)
{
for (int i = 0; i < length; i++)
{
floatArray[i] = *(float*)(address + (i * 0x04));
}
return floatArray;
}
char byteArray[100];
char* ReadBytes(int address, int length)
{
for (int i = 0; i < length; i++)
{
byteArray[i] = *(char*)(address + (i));
}
return byteArray;
}
void WriteFloat(int address, float* input, int length)
{
for (int i = 0; i < length; i++)
{
*(float*)(address + (i * 4)) = input[i];
}
}
void WriteBytes(int address, char* input, int length)
{
for (int i = 0; i < length; i++)
{
*(char*)(address + (i)) = input[i];
}
}
float intArray[100];
float* ReadInt(int address, int length)
{
for (int i = 0; i < length; i++)
{
intArray[i] = *(int*)(address + (i * 0x04));
}
return intArray;
}
void WriteInt(int address, int* input, int length)
{
for (int i = 0; i < length; i++)
{
*(int*)(intArray + (i * 0x04)) = input[i];
}
}
void WriteString(int address, char* string)
{
int FreeMem = 0x1D00000;
int strlength = std::strlen(string);
char* strpointer = *(char**)FreeMem = string;
char* StrBytes = PS3::ReadBytes(*(int*)FreeMem, strlength);
PS3::WriteBytes(address, StrBytes, strlength);
}
char returnRead[100];
char* ReadString(int address)
{
memset(&returnRead[0], 0, sizeof(returnRead));
int strlength = 100;
char* StrBytes = ReadBytes(address, strlength);
for (int i = 0; i < strlength; i++)
{
if (StrBytes[i] != 0x00)
returnRead[i] = StrBytes[i];
else
break;
}
return returnRead;
}
void WriteInt32(int Address, int Input)
{
*(int*)Address = Input;
}
int ReadInt32(int Address)
{
return *(int*)Address;
}
};


If you need anything else, just let me know.

Pic of menu base
You must login or register to view this content.

HOW TO USE:
    
L1 + R3 - open /close
R2/L2 - scroll
Square - select
R3 - go back menu


CREDITS
Xx james t xX - Making this fun little menubase
Me - Converting to PS3

The following 8 users say thank you to Black Panther for this useful post:

/SneakerStreet/, EternalHabit, Geo, KranK, SC58, SnaY, Taylor, Synergy
12-02-2014, 10:02 AM #2
SnaY
Former Lead of GS
Really nice :p

The following user thanked SnaY for this useful post:

12-02-2014, 04:22 PM #3
Who converted it Happy
12-02-2014, 04:27 PM #4
CrEaTiiOn_LiMiT
Do a barrel roll!
Originally posted by RoundHouseHacke View Post
Who converted it Happy


You must login or register to view this content.
Facepalm
12-02-2014, 05:28 PM #5
Originally posted by RoundHouseHacke View Post
Who converted it Happy


I did :p
12-02-2014, 05:28 PM #6
Originally posted by SnaY View Post
Really nice :p


Thanks Smile
12-02-2014, 05:47 PM #7
Originally posted by Doctor
I did :p


Awesome dude Enzo whats it for 1.14 or no?
12-02-2014, 08:38 PM #8
Originally posted by RoundHouseHacke View Post
Awesome dude Enzo whats it for 1.14 or no?


Yeah it's meant to be put in a sprx
12-03-2014, 04:04 PM #9
Originally posted by Doctor
Yeah it's meant to be put in a sprx


Good Job man Winky Winky
12-03-2014, 06:23 PM #10
Originally posted by Connerg123 View Post
Good Job man Winky Winky


It's not really my work it's 98% james I just tweaked it to work with PSDK

The following user thanked Black Panther for this useful post:

Connerg123

Copyright © 2025, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo