Post: [Release] PRX Loader/Unloader
05-29-2015, 11:15 AM #1
(adsbygoogle = window.adsbygoogle || []).push({});
My first release, I know this is easy to do, well not easy but easy as hell.... with about 2 minutes from reading the SDK docs anyone can do it. but meh, if you are like me and don't want to read :troll:

     sys_prx_id_t libLoad(char* path){
return sys_prx_load_module (path, 0, NULL);
}
int libUnload(){
return sys_prx_unload_module(sprx_id, 0, NULL);
}
int libStart(){
int buffer;
return sys_prx_start_module(sprx_id, 0, (void*)0x10022080, &buffer, 0, NULL);
}
int libStop(){
int buffer;
return sys_prx_stop_module(sprx_id, 0, (void*)0x10022080, &buffer, 0, NULL);
}



void Start_sprx(){

sprx_id = libLoad("/dev_hdd0/tmp/GTANative1.sprx");

if(sprx_id > 0){
int err = libStart();
*(int*)0x10022050 = err;

if(err == 0){
console_write("\nSPRX is Started !");
}else{
console_write("\nSprx failed to start !\n");
}


}else{
console_write("\nFailed to load.\n");
}

}


remember change the address to whatever you want to just make them a variable, that is just for error ouput, I did this for Mw3 about 5 months ago so I was too lazy to cast the int as an char* so I didn't print it in the console, I decided to write it in memory. Sorry :(
Last edited by ThatNeverWas ; 05-29-2015 at 11:23 AM.

The following 2 users say thank you to ThatNeverWas for this useful post:

TheSaltCracka, WeHostModdedXP
05-29-2015, 11:17 AM #2
Wrong Sections oops, somebody fix it
05-29-2015, 12:27 PM #3
Originally posted by ThatNeverWas View Post
Wrong Sections oops, somebody fix it


Moved to the correct section for you Smile
05-30-2015, 02:23 PM #4
Winter
Purple God
Originally posted by ThatNeverWas View Post
My first release, I know this is easy to do, well not easy but easy as hell.... with about 2 minutes from reading the SDK docs anyone can do it. but meh, if you are like me and don't want to read :troll:

     sys_prx_id_t libLoad(char* path){
return sys_prx_load_module (path, 0, NULL);
}
int libUnload(){
return sys_prx_unload_module(sprx_id, 0, NULL);
}
int libStart(){
int buffer;
return sys_prx_start_module(sprx_id, 0, (void*)0x10022080, &buffer, 0, NULL);
}
int libStop(){
int buffer;
return sys_prx_stop_module(sprx_id, 0, (void*)0x10022080, &buffer, 0, NULL);
}



void Start_sprx(){

sprx_id = libLoad("/dev_hdd0/tmp/GTANative1.sprx");

if(sprx_id > 0){
int err = libStart();
*(int*)0x10022050 = err;

if(err == 0){
console_write("\nSPRX is Started !");
}else{
console_write("\nSprx failed to start !\n");
}


}else{
console_write("\nFailed to load.\n");
}

}


remember change the address to whatever you want to just make them a variable, that is just for error ouput, I did this for Mw3 about 5 months ago so I was too lazy to cast the int as an char* so I didn't print it in the console, I decided to write it in memory. Sorry :(


or you could just not use a address at all Drack

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo