the point is i want it to display the message for 2.5 seconds then call the shut off for the messageYou could always just remove the sleep() method entirely but it would run better with it. You say it freezes the game for 2.5 seconds? You could lower it to 500 or 1000 milliseconds.
Let me know if anything happens.
void Notify(char *notifTitle, char *notifBody, char *notifShader) {
unsigned char byte28[1] = { 0x28 };
unsigned char byte32on[32] = { 0x00, 0x00, 0x00, 0x00, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
unsigned char byte20[1] = { 0x20 };
write_process(0x1C1FE73, &byte28[1], 1);
sys_dbg_write_string(0x01C1FC65, notifTitle);
sys_dbg_write_string(0x01C1FE65, notifShader);
sys_dbg_write_string(0x1C1FD65, notifBody);
write_process(0x1C1FF66, &byte32on[32], 32);
write_process(0x0D50025, &byte20[1], 1);
sleep(2500);
unsigned char byte32off[32] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
write_process(0x1C1FF66, &byte32off[32], 32);
sys_dbg_write_string(0x1C1FD65, "");
}
this is the c# function Release - (C#) BO2 Notification | CabConModding
this is what i have in c++ so far, all i need is the sleep
Code:void Notify(char *notifTitle, char *notifBody, char *notifShader) { unsigned char byte28[1] = { 0x28 }; unsigned char byte32on[32] = { 0x00, 0x00, 0x00, 0x00, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; unsigned char byte20[1] = { 0x20 }; write_process(0x1C1FE73, &byte28[1], 1); sys_dbg_write_string(0x01C1FC65, notifTitle); sys_dbg_write_string(0x01C1FE65, notifShader); sys_dbg_write_string(0x1C1FD65, notifBody); write_process(0x1C1FF66, &byte32on[32], 32); write_process(0x0D50025, &byte20[1], 1); sleep(2500); unsigned char byte32off[32] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; write_process(0x1C1FF66, &byte32off[32], 32); sys_dbg_write_string(0x1C1FD65, ""); }
void Notify(char *notifTitle, char *notifBody, char *notifShader) {
unsigned char byte28[1] = { 0x28 };
unsigned char byte32on[32] = { 0x00, 0x00, 0x00, 0x00, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
unsigned char byte20[1] = { 0x20 };
write_process(0x1C1FE73, &byte28[1], 1);
sys_dbg_write_string(0x01C1FC65, notifTitle);
sys_dbg_write_string(0x01C1FE65, notifShader);
sys_dbg_write_string(0x1C1FD65, notifBody);
write_process(0x1C1FF66, &byte32on[32], 32);
write_process(0x0D50025, &byte20[1], 1);
unsigned char byte32off[32] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
write_process(0x1C1FF66, &byte32off[32], 32);
sleep(2500);
sys_dbg_write_string(0x1C1FD65, "");
}
I'm not very experienced in C++ but, I'll try to help you as best as I can.
You might be able to do this.
Code:void Notify(char *notifTitle, char *notifBody, char *notifShader) { unsigned char byte28[1] = { 0x28 }; unsigned char byte32on[32] = { 0x00, 0x00, 0x00, 0x00, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; unsigned char byte20[1] = { 0x20 }; write_process(0x1C1FE73, &byte28[1], 1); sys_dbg_write_string(0x01C1FC65, notifTitle); sys_dbg_write_string(0x01C1FE65, notifShader); sys_dbg_write_string(0x1C1FD65, notifBody); write_process(0x1C1FF66, &byte32on[32], 32); write_process(0x0D50025, &byte20[1], 1); unsigned char byte32off[32] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; write_process(0x1C1FF66, &byte32off[32], 32); sleep(2500); sys_dbg_write_string(0x1C1FD65, ""); }
Since I see the code and you used sleep() then tried writing a process
so I don't know if that will work or not.
nothing happens because whats before the sleep creates the notification then whats after the sleep deletes the notificationDid you remove the sleep() and try the 'Notify" and see if it actually ever worked?
Maybe check out this question:I'm converting this notify to c++ and the sleep() method just freezes the game for 2.5 seconds without actually displaying the message, what is the best way to get around that freezing and have the message display? Thanks