Release [C++] Small Code Thread

More codes?


  • Total voters
    38

Pyrex BLJ

im done :)
Messages
605
Reaction score
338
Points
953
Hey guys, I'm beginning to release some source functions from my menu
because I'm feeling generous and i don't like
keeping information from all you people

I didn't find these anywhere else (although i didn't look that hard)
and yes it is gross but idk c++ very well, ok?

Code:
char showcard[75] = "xshowgamercardbyclientnumingame ";
void showgamercard(int client) {
    char buffer[2];
    sprintf(buffer, "%d", client);
    Cbuf_AddText(0, strcat(showcard, buffer));
    buffer[0] = *"";
    buffer[1] = *"";
    buffer[2] = *"";
    showcard[32] = *"";
    showcard[33] = *"";
    showcard[34] = *"";
}

Call it like
Code:
showgamercard(1);

JcUEeuiWQt65n78PXzyKNQ.png

Code:
Cbuf_AddText(0, "xstopallparties");
c75f76ca435c618c49717059f54a83db.gif

Code:
Cbuf_AddText(0, "quit");
6bba93cec9f83c478363dd973e51de9e.gif

The First Requested Function:
this will show errors in vs, but it will still work/build
Code:
void dankestMap(uint64_t nothing) {
    int delay = 1500;
    while(var.dankestMapkek) {
        Cbuf_AddText(0, "r_lightTweakSunColor 1 0 0;r_lightTweakSunDirection 100 180 0;r_specularColorScale 1;r_specularmap 1;r_glow \"1\";r_glow_allowed \"1\";r_glowtweakbloomintensity  1;r_glowtweakradius 1;r_glowTweakEnable 1;r_glowUseTweaks 1;r_skyColorTemp 7500;");
        sleep(delay);
        Cbuf_AddText(0, "r_lightTweakSunColor 0.5 1 0");
        sleep(delay);
        Cbuf_AddText(0, "r_lightTweakSunColor 0.5 0.5 0");
        sleep(delay);
        Cbuf_AddText(0, "r_lightTweakSunColor 0 1 0");
        sleep(delay);
        Cbuf_AddText(0, "r_lightTweakSunColor 0 0.5 1");
        sleep(delay);
        Cbuf_AddText(0, "r_lightTweakSunColor 0 0.5 0.5");
        sleep(delay);
        Cbuf_AddText(0, "r_lightTweakSunColor 0 0 1");
        sleep(delay);
        Cbuf_AddText(0, "r_lightTweakSunColor 1 0 0.5");
        sleep(delay);
        Cbuf_AddText(0, "r_lightTweakSunColor 0.5 0 0.5");
        sleep(delay);
    }
    sys_ppu_thread_exit(nothing);
}
sys_ppu_thread_t suncolor;
void startDankestMap() {
    sys_ppu_thread_create(&suncolor, dankestMap, 0, 10, 0x0A, 0, "suncolor");
}
giphy.gif

Code:
void autocrouch(uint64_t nothing) {
        while (crouch) {
            *(char*)0xee4d30 = 1;
            sleep(1);
            *(char*)0xee4d30 = 0;
            sleep(1);
        }
    sys_ppu_thread_exit(nothing);
}
sys_ppu_thread_t startAutoshooting;
void startAutocrouch() {
    sys_ppu_thread_create(&startAutoshooting, autocrouch, 0, 10, 0x0A, 0, "autotbag");
}
giphy.gif

I just wrote this, may be a bit messy or glitchy but works for the most part
You need a few things for this to work, ill include them here.
Code:
int getFileSize(char *file) {
    int fd;
    int ret;
    uint64_t pos;
    uint64_t nread;
    ret = cellFsOpen(file, 0, &fd, NULL, 0);
    if (!ret) {
        CellFsStat sb;
        ret = cellFsFstat(fd, &sb);
        if (!ret) {
            return sb.st_size;
        }
    }
    return -1;
}
void readFile(char *file, char buf[], int size) {
    int fd;
    int ret;
    uint64_t pos;
    uint64_t nread;
    ret = cellFsOpen(file, 0, &fd, NULL, 0);
    if (!ret)
    {
        cellFsLseek(fd, 0, CELL_FS_SEEK_SET, &pos);
        ret = cellFsRead(fd, buf, size, &nread);
        if (!ret)
        {
            cellFsClose(fd);
        }
    }
}

int ByteLength;
unsigned int MALLOC = 0x100000;
unsigned int loc = 0xCAD88480;
void imginject(char *file) {
    ByteLength = getFileSize(file);
    if (ByteLength != -1) {
        readFile(file, (char*)loc, MALLOC);
    }
    else {
        printf("\nUnable to Inject Image, Make Sure You Have a File In The Perxy Folder & It Has The Correct Name\n");
    }
}
void injectimagepls(uint64_t nothing) {
    for (;;) {
            if (imgfirst == false) {
                sleep(6000);
                imginject("/dev_hdd0/tmp/Perxy/image.dds");
                imgfirst = true;
            }
            if (imageinjected == false && DvarGetBool("cl_ingame") == false) {
                imginject("/dev_hdd0/tmp/Perxy/image.dds");
                imageinjected = true;
            }
        sleep(3000);
    }
    sys_ppu_thread_exit(nothing);
}
sys_ppu_thread_t startimageinject;
void startimageinjectpls() {
    sys_ppu_thread_create(&startimageinject, injectimagepls, 0, 10, 0x0A, 0, "imageInjector");
}
Then Put this somewhere that constantly runs in game. (the image resets when you join a game)
Code:
if (DvarGetBool("cl_ingame")) {
        imageinjected = false;
    }
Here is a tutorial i made on creating injectable images, although i made quite a few that ill release with the next perxy update
Code:
https://www.youtube.com/watch?v=AD0qhfgfwNM
NUPwatSCTVaIb58WsT9Ugw.png

This one was submitted by @Harry (thx)
Optimized by @DevOps
Code:
void muteplayer(u32 id) {
   char buffer[100];
   sprintf(buffer, "xmuteplayer %d", id);
   Cbuf_AddText(LOCAL_CLIENT_FIRST, buffer);
   sys_memory_free((sys_addr_t)buffer);
}
i dont have a pic/vid of this but u know what it does

If you have any specific things you want from Perxy or one of my programs just ask and ill post them here :smile:

Enjoy​
 
Last edited:

Harry

Certified Sick ℂunt
Premium Member
Messages
1,263
Reaction score
969
Points
973
I'll drop my InGame Name Changer + Fix Talking here later today
 

Harry

Certified Sick ℂunt
Premium Member
Messages
1,263
Reaction score
969
Points
973
Hey guys, I'm beginning to release some source functions from my menu
because I'm feeling generous and i don't like
keeping information from all you people

I didn't find these anywhere else (although i didn't look that hard)
and yes it is gross but idk c++ very well, ok?

Code:
char showcard[75] = "xshowgamercardbyclientnumingame ";
void showgamercard(int client) {
    char buffer[2];
    sprintf(buffer, "%d", client);
    Cbuf_AddText(0, strcat(showcard, buffer));
    buffer[0] = *"";
    buffer[1] = *"";
    buffer[2] = *"";
    showcard[32] = *"";
    showcard[33] = *"";
    showcard[34] = *"";
}

Call it like
Code:
showgamercard(1);

JcUEeuiWQt65n78PXzyKNQ.png

Code:
Cbuf_AddText(0, "xstopallparties");
c75f76ca435c618c49717059f54a83db.gif

Code:
Cbuf_AddText(0, "quit");
6bba93cec9f83c478363dd973e51de9e.gif

The First Requested Function:
this will show errors in vs, but it will still work/build
Code:
void dankestMap(uint64_t nothing) {
    int delay = 1500;
    while(var.dankestMapkek) {
        Cbuf_AddText(0, "r_lightTweakSunColor 1 0 0;r_lightTweakSunDirection 100 180 0;r_specularColorScale 1;r_specularmap 1;r_glow \"1\";r_glow_allowed \"1\";r_glowtweakbloomintensity  1;r_glowtweakradius 1;r_glowTweakEnable 1;r_glowUseTweaks 1;r_skyColorTemp 7500;");
        sleep(delay);
        Cbuf_AddText(0, "r_lightTweakSunColor 0.5 1 0");
        sleep(delay);
        Cbuf_AddText(0, "r_lightTweakSunColor 0.5 0.5 0");
        sleep(delay);
        Cbuf_AddText(0, "r_lightTweakSunColor 0 1 0");
        sleep(delay);
        Cbuf_AddText(0, "r_lightTweakSunColor 0 0.5 1");
        sleep(delay);
        Cbuf_AddText(0, "r_lightTweakSunColor 0 0.5 0.5");
        sleep(delay);
        Cbuf_AddText(0, "r_lightTweakSunColor 0 0 1");
        sleep(delay);
        Cbuf_AddText(0, "r_lightTweakSunColor 1 0 0.5");
        sleep(delay);
        Cbuf_AddText(0, "r_lightTweakSunColor 0.5 0 0.5");
        sleep(delay);
    }
    sys_ppu_thread_exit(nothing);
}
sys_ppu_thread_t suncolor;
void startDankestMap() {
    sys_ppu_thread_create(&suncolor, dankestMap, 0, 10, 0x0A, 0, "suncolor");
}
giphy.gif

Code:
void autocrouch(uint64_t nothing) {
        while (crouch) {
            *(char*)0xee4d30 = 1;
            sleep(1);
            *(char*)0xee4d30 = 0;
            sleep(1);
        }
    sys_ppu_thread_exit(nothing);
}
sys_ppu_thread_t startAutoshooting;
void startAutocrouch() {
    sys_ppu_thread_create(&startAutoshooting, autocrouch, 0, 10, 0x0A, 0, "autotbag");
}
giphy.gif

If you have any specific things you want from Perxy or one of my programs just ask and ill post them here :smile:

Enjoy​
Ill send you a better auto crouch
 

Harry

Certified Sick ℂunt
Premium Member
Messages
1,263
Reaction score
969
Points
973
wallhack no blur :wink:
lmao, disable the RoF offset skid
Code:
0x1CBF9F8 - 0x00
If you can make c++ to disable/enable dlc in pre-game :smile:
Game looks for files to be existent, dlc files would be existent, searching with DLC enabled could possibly edited but the "in pre-game" part probably won't happen... Ill look for it
 
Top