Post: RPC Problems.
12-07-2014, 06:18 PM #1
ItzMatriix
Are you high?
(adsbygoogle = window.adsbygoogle || []).push({}); I am having problems with the RPC. I am using Sharks version. One problem is when I do iPrintln everything works fine, except i then cannot end the game. Another thing is the CBuf_AddText is not working for me. I am trying to set the score limit to 100 using scr_tdm_scorelimit but nothing changes. Any help?

Here is the Code:
    
MW3.RPC.CBuf_AddText(100, "scr_tdm_scorelmit");
MW3.RPC.iPrintln(0,"Score Limit Changed");


the printing to the screen works fine so i know it should be working. but the score limit change isnt doing anything
and then of course its not letting me end the game after activating the iPrintln either

RPC Code:
    
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using PS3Lib;
using System.Threading;

namespace MW3_TS_Tool
{
class MW3
{
private static PS3API PS3 = new PS3API();
private static void GetMemoryR(uint Address, ref byte[] Bytes)
{
PS3.GetMemory(Address, Bytes);
}
private static byte[] ReverseBytes(byte[] inArray)
{
Array.Reverse(inArray);
return inArray;
}
private static void WriteSingle(uint address, float input)
{
byte[] array = new byte[4];
BitConverter.GetBytes(input).CopyTo(array, 0);
Array.Reverse(array, 0, 4);
PS3.SetMemory(address, array);
}

private static void WriteSingle(uint address, float[] input)
{
int length = input.Length;
byte[] array = new byte[length * 4];
for (int i = 0; i < length; i++)
{
ReverseBytes(BitConverter.GetBytes(input[i])).CopyTo(array, (int)(i * 4));
}
PS3.SetMemory(address, array);
}
public static class RPC
{
#region SV_GameSendServerCommand
public static void SV_GameSendServerCommand(int client, string command)
{
uint Sv_GameSendServerCommand = 0x228FA8;
Call(Sv_GameSendServerCommand, (uint)client, 0, command);
}
#endregion
#region iPrintln (Send Message Middle Screen)
public static void iPrintln(int client, string Text)
{
SV_GameSendServerCommand(client, "c \"" + Text + "\"");
Thread.Sleep(20);
}
#endregion
#region iPrintlnBold (Send Message Killfeed Screen)
public static void iPrintlnBold(int client, string Text)
{
SV_GameSendServerCommand(client, "f \"" + Text + "\"");
Thread.Sleep(20);
}
#endregion
#region CBuf_AddText
public static void CBuf_AddText(int client, string command)
{
Call(0x1DB240, (uint)client, command, 0, 0, 0);
Thread.Sleep(20);
}
#endregion
#region RPC
public static uint func_address = 0x0277208; //FPS Address 1.24
/*
* MW3 FPS RPC by VezahHFH!
* This function get written at the FPS Offset!
*
lis r28, 0x1005
lwz r12, 0x48(r2Cool Man (aka Tustin)
cmpwi r12, 0
beq loc_277290
lwz r3, 0x00(r2Cool Man (aka Tustin)
lwz r4, 0x04(r2Cool Man (aka Tustin)
lwz r5, 0x08(r2Cool Man (aka Tustin)
lwz r6, 0x0C(r2Cool Man (aka Tustin)
lwz r7, 0x10(r2Cool Man (aka Tustin)
lwz r8, 0x14(r2Cool Man (aka Tustin)
lwz r9, 0x18(r2Cool Man (aka Tustin)
lwz r10, 0x1C(r2Cool Man (aka Tustin)
lwz r11, 0x20(r2Cool Man (aka Tustin)
lfs f1, 0x24(r2Cool Man (aka Tustin)
lfs f2, 0x28(r2Cool Man (aka Tustin)
lfs f3, 0x2C(r2Cool Man (aka Tustin)
lfs f4, 0x30(r2Cool Man (aka Tustin)
lfs f5, 0x34(r2Cool Man (aka Tustin)
lfs f6, 0x38(r2Cool Man (aka Tustin)
lfs f7, 0x3C(r2Cool Man (aka Tustin)
lfs f8, 0x40(r2Cool Man (aka Tustin)
lfs f9, 0x44(r2Cool Man (aka Tustin)
mtctr r12
bctrl
li r4, 0
stw r4, 0x48(r2Cool Man (aka Tustin)
stw r3, 0x4C(r2Cool Man (aka Tustin)
stfs f1, 0x50(r2Cool Man (aka Tustin)
b loc_277290
*/
public static uint GetFuncReturn()
{
byte[] ret = new byte[4];
GetMemoryR(0x114AE64, ref ret);
Array.Reverse(ret);
return BitConverter.ToUInt32(ret, 0);
}
public static void Enable()
{
if (PS3.Extension.ReadString(0x00277213) == "H")
{
//This will check if the RPC is set already, to prevent freeze's.
}
else
{
byte[] WritePPC = new byte[] {0x3F,0x80,0x10,0x05,0x81,0x9C,0x00,0x48,0x2C,0x0C,0x00,0x00,0x41,0x82,0x00,0x78,
0x80,0x7C,0x00,0x00,0x80,0x9C,0x00,0x04,0x80,0xBC,0x00,0x08,0x80,0xDC,0x00,0x0C,
0x80,0xFC,0x00,0x10,0x81,0x1C,0x00,0x14,0x81,0x3C,0x00,0x18,0x81,0x5C,0x00,0x1C,
0x81,0x7C,0x00,0x20,0xC0,0x3C,0x00,0x24,0xC0,0x5C,0x00,0x28,0xC0,0x7C,0x00,0x2C,
0xC0,0x9C,0x00,0x30,0xC0,0xBC,0x00,0x34,0xC0,0xDC,0x00,0x38,0xC0,0xFC,0x00,0x3C,
0xC1,0x1C,0x00,0x40,0xC1,0x3C,0x00,0x44,0x7D,0x89,0x03,0xA6,0x4E,0x80,0x04,0x21,
0x38,0x80,0x00,0x00,0x90,0x9C,0x00,0x48,0x90,0x7C,0x00,0x4C,0xD0,0x3C,0x00,0x50,
0x48,0x00,0x00,0x14};
PS3.SetMemory(func_address, new byte[] { 0x41 });
PS3.SetMemory(func_address + 4, WritePPC);
PS3.SetMemory(func_address, new byte[] { 0x40 });
Thread.Sleep(10);
RPC.DestroyAll();
}
}
public static Int32 Call(UInt32 address, params Object[] parameters)
{
Int32 length = parameters.Length;
Int32 index = 0;
UInt32 count = 0;
UInt32 Strings = 0;
UInt32 Single = 0;
UInt32 Array = 0;
while (index < length)
{
if (parameters[index] is Int32)
{
PS3.Extension.WriteInt32(0x10050000 + (count * 4), (Int32)parameters[index]);
count++;
}
else if (parameters[index] is UInt32)
{
PS3.Extension.WriteUInt32(0x10050000 + (count * 4), (UInt32)parameters[index]);
count++;
}
else if (parameters[index] is Int16)
{
PS3.Extension.WriteInt16(0x10050000 + (count * 4), (Int16)parameters[index]);
count++;
}
else if (parameters[index] is UInt16)
{
PS3.Extension.WriteUInt16(0x10050000 + (count * 4), (UInt16)parameters[index]);
count++;
}
else if (parameters[index] is Byte)
{
PS3.Extension.WriteByte(0x10050000 + (count * 4), (Byte)parameters[index]);
count++;
} //Should work now Happy let me try
else
{
UInt32 pointer;
if (parameters[index] is String)
{
pointer = 0x10052000 + (Strings * 0x400);
PS3.Extension.WriteString(pointer, Convert.ToString(parameters[index]));
PS3.Extension.WriteUInt32(0x10050000 + (count * 4), pointer);
count++;
Strings++;
}
else if (parameters[index] is Single)
{
WriteSingle(0x10050024 + (Single * 4), (Single)parameters[index]);
Single++;
}
else if (parameters[index] is Single[])
{
Single[] Args = (Single[])parameters[index];
pointer = 0x10051000 + Array * 4;
WriteSingle(pointer, Args);
PS3.Extension.WriteUInt32(0x10050000 + count * 4, pointer);
count++;
Array += (UInt32)Args.Length;
}

}
index++;
}
PS3.Extension.WriteUInt32(0x10050048, address);
Thread.Sleep(20);
return PS3.Extension.ReadInt32(0x1005004c);
}
public static void DestroyAll()
{
Byte[] clear = new Byte[0xB4 * 1024];
PS3.SetMemory(0xF0E10C, clear);
}
private static byte[] GetMemory(uint offset, int length)
{
byte[] array = new byte[length];
PS3.GetMemory(offset, array);
return array;
}
private static byte[] ReadBytes(uint address, int length)
{
return GetMemory(address, length);
}
public static Single[] ReadSingle(uint address, int length)
{
byte[] mem = ReadBytes(address, length * 4);
Array.Reverse(mem);
float[] numArray = new float[length];
for (int index = 0; index < length; ++index)
numArray[index] = BitConverter.ToSingle(mem, (length - 1 - index) * 4);
return numArray;
}
#endregion
}
}
}
(adsbygoogle = window.adsbygoogle || []).push({});
12-12-2014, 12:54 PM #2
ItzMatriix
Are you high?
Anyone?
12-12-2014, 01:06 PM #3
kiwi_modz
I defeated!
Originally posted by ItzMatriix View Post
I am having problems with the RPC. I am using Sharks version. One problem is when I do iPrintln everything works fine, except i then cannot end the game. Another thing is the CBuf_AddText is not working for me. I am trying to set the score limit to 100 using scr_tdm_scorelimit but nothing changes. Any help?


post the code you're using to change the tdm scorelimit?
12-12-2014, 04:11 PM #4
ItzMatriix
Are you high?
Originally posted by ResistTheKiwi View Post
post the code you're using to change the tdm scorelimit?


I will later tonight when I get home. And do you have any idea about the iPrintln problem?
12-12-2014, 05:22 PM #5
ItzMatriix
Are you high?
Originally posted by ResistTheKiwi View Post
post the code you're using to change the tdm scorelimit?


updated with the Codes being used
12-12-2014, 10:38 PM #6
kiwi_modz
I defeated!
Originally posted by ItzMatriix View Post
I am having problems with the RPC. I am using Sharks version. One problem is when I do iPrintln everything works fine, except i then cannot end the game. Another thing is the CBuf_AddText is not working for me. I am trying to set the score limit to 100 using scr_tdm_scorelimit but nothing changes. Any help?

Here is the Code:
    
MW3.RPC.CBuf_AddText(100, "scr_tdm_scorelmit");
MW3.RPC.iPrintln(0,"Score Limit Changed");


the printing to the screen works fine so i know it should be working. but the score limit change isnt doing anything
and then of course its not letting me end the game after activating the iPrintln either

RPC Code:
    
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using PS3Lib;
using System.Threading;

namespace MW3_TS_Tool
{
class MW3
{
private static PS3API PS3 = new PS3API();
private static void GetMemoryR(uint Address, ref byte[] Bytes)
{
PS3.GetMemory(Address, Bytes);
}
private static byte[] ReverseBytes(byte[] inArray)
{
Array.Reverse(inArray);
return inArray;
}
private static void WriteSingle(uint address, float input)
{
byte[] array = new byte[4];
BitConverter.GetBytes(input).CopyTo(array, 0);
Array.Reverse(array, 0, 4);
PS3.SetMemory(address, array);
}

private static void WriteSingle(uint address, float[] input)
{
int length = input.Length;
byte[] array = new byte[length * 4];
for (int i = 0; i < length; i++)
{
ReverseBytes(BitConverter.GetBytes(input[i])).CopyTo(array, (int)(i * 4));
}
PS3.SetMemory(address, array);
}
public static class RPC
{
#region SV_GameSendServerCommand
public static void SV_GameSendServerCommand(int client, string command)
{
uint Sv_GameSendServerCommand = 0x228FA8;
Call(Sv_GameSendServerCommand, (uint)client, 0, command);
}
#endregion
#region iPrintln (Send Message Middle Screen)
public static void iPrintln(int client, string Text)
{
SV_GameSendServerCommand(client, "c \"" + Text + "\"");
Thread.Sleep(20);
}
#endregion
#region iPrintlnBold (Send Message Killfeed Screen)
public static void iPrintlnBold(int client, string Text)
{
SV_GameSendServerCommand(client, "f \"" + Text + "\"");
Thread.Sleep(20);
}
#endregion
#region CBuf_AddText
public static void CBuf_AddText(int client, string command)
{
Call(0x1DB240, (uint)client, command, 0, 0, 0);
Thread.Sleep(20);
}
#endregion
#region RPC
public static uint func_address = 0x0277208; //FPS Address 1.24
/*
* MW3 FPS RPC by VezahHFH!
* This function get written at the FPS Offset!
*
lis r28, 0x1005
lwz r12, 0x48(r2Cool Man (aka Tustin)
cmpwi r12, 0
beq loc_277290
lwz r3, 0x00(r2Cool Man (aka Tustin)
lwz r4, 0x04(r2Cool Man (aka Tustin)
lwz r5, 0x08(r2Cool Man (aka Tustin)
lwz r6, 0x0C(r2Cool Man (aka Tustin)
lwz r7, 0x10(r2Cool Man (aka Tustin)
lwz r8, 0x14(r2Cool Man (aka Tustin)
lwz r9, 0x18(r2Cool Man (aka Tustin)
lwz r10, 0x1C(r2Cool Man (aka Tustin)
lwz r11, 0x20(r2Cool Man (aka Tustin)
lfs f1, 0x24(r2Cool Man (aka Tustin)
lfs f2, 0x28(r2Cool Man (aka Tustin)
lfs f3, 0x2C(r2Cool Man (aka Tustin)
lfs f4, 0x30(r2Cool Man (aka Tustin)
lfs f5, 0x34(r2Cool Man (aka Tustin)
lfs f6, 0x38(r2Cool Man (aka Tustin)
lfs f7, 0x3C(r2Cool Man (aka Tustin)
lfs f8, 0x40(r2Cool Man (aka Tustin)
lfs f9, 0x44(r2Cool Man (aka Tustin)
mtctr r12
bctrl
li r4, 0
stw r4, 0x48(r2Cool Man (aka Tustin)
stw r3, 0x4C(r2Cool Man (aka Tustin)
stfs f1, 0x50(r2Cool Man (aka Tustin)
b loc_277290
*/
public static uint GetFuncReturn()
{
byte[] ret = new byte[4];
GetMemoryR(0x114AE64, ref ret);
Array.Reverse(ret);
return BitConverter.ToUInt32(ret, 0);
}
public static void Enable()
{
if (PS3.Extension.ReadString(0x00277213) == "H")
{
//This will check if the RPC is set already, to prevent freeze's.
}
else
{
byte[] WritePPC = new byte[] {0x3F,0x80,0x10,0x05,0x81,0x9C,0x00,0x48,0x2C,0x0C,0x00,0x00,0x41,0x82,0x00,0x78,
0x80,0x7C,0x00,0x00,0x80,0x9C,0x00,0x04,0x80,0xBC,0x00,0x08,0x80,0xDC,0x00,0x0C,
0x80,0xFC,0x00,0x10,0x81,0x1C,0x00,0x14,0x81,0x3C,0x00,0x18,0x81,0x5C,0x00,0x1C,
0x81,0x7C,0x00,0x20,0xC0,0x3C,0x00,0x24,0xC0,0x5C,0x00,0x28,0xC0,0x7C,0x00,0x2C,
0xC0,0x9C,0x00,0x30,0xC0,0xBC,0x00,0x34,0xC0,0xDC,0x00,0x38,0xC0,0xFC,0x00,0x3C,
0xC1,0x1C,0x00,0x40,0xC1,0x3C,0x00,0x44,0x7D,0x89,0x03,0xA6,0x4E,0x80,0x04,0x21,
0x38,0x80,0x00,0x00,0x90,0x9C,0x00,0x48,0x90,0x7C,0x00,0x4C,0xD0,0x3C,0x00,0x50,
0x48,0x00,0x00,0x14};
PS3.SetMemory(func_address, new byte[] { 0x41 });
PS3.SetMemory(func_address + 4, WritePPC);
PS3.SetMemory(func_address, new byte[] { 0x40 });
Thread.Sleep(10);
RPC.DestroyAll();
}
}
public static Int32 Call(UInt32 address, params Object[] parameters)
{
Int32 length = parameters.Length;
Int32 index = 0;
UInt32 count = 0;
UInt32 Strings = 0;
UInt32 Single = 0;
UInt32 Array = 0;
while (index < length)
{
if (parameters[index] is Int32)
{
PS3.Extension.WriteInt32(0x10050000 + (count * 4), (Int32)parameters[index]);
count++;
}
else if (parameters[index] is UInt32)
{
PS3.Extension.WriteUInt32(0x10050000 + (count * 4), (UInt32)parameters[index]);
count++;
}
else if (parameters[index] is Int16)
{
PS3.Extension.WriteInt16(0x10050000 + (count * 4), (Int16)parameters[index]);
count++;
}
else if (parameters[index] is UInt16)
{
PS3.Extension.WriteUInt16(0x10050000 + (count * 4), (UInt16)parameters[index]);
count++;
}
else if (parameters[index] is Byte)
{
PS3.Extension.WriteByte(0x10050000 + (count * 4), (Byte)parameters[index]);
count++;
} //Should work now Happy let me try
else
{
UInt32 pointer;
if (parameters[index] is String)
{
pointer = 0x10052000 + (Strings * 0x400);
PS3.Extension.WriteString(pointer, Convert.ToString(parameters[index]));
PS3.Extension.WriteUInt32(0x10050000 + (count * 4), pointer);
count++;
Strings++;
}
else if (parameters[index] is Single)
{
WriteSingle(0x10050024 + (Single * 4), (Single)parameters[index]);
Single++;
}
else if (parameters[index] is Single[])
{
Single[] Args = (Single[])parameters[index];
pointer = 0x10051000 + Array * 4;
WriteSingle(pointer, Args);
PS3.Extension.WriteUInt32(0x10050000 + count * 4, pointer);
count++;
Array += (UInt32)Args.Length;
}

}
index++;
}
PS3.Extension.WriteUInt32(0x10050048, address);
Thread.Sleep(20);
return PS3.Extension.ReadInt32(0x1005004c);
}
public static void DestroyAll()
{
Byte[] clear = new Byte[0xB4 * 1024];
PS3.SetMemory(0xF0E10C, clear);
}
private static byte[] GetMemory(uint offset, int length)
{
byte[] array = new byte[length];
PS3.GetMemory(offset, array);
return array;
}
private static byte[] ReadBytes(uint address, int length)
{
return GetMemory(address, length);
}
public static Single[] ReadSingle(uint address, int length)
{
byte[] mem = ReadBytes(address, length * 4);
Array.Reverse(mem);
float[] numArray = new float[length];
for (int index = 0; index < length; ++index)
numArray[index] = BitConverter.ToSingle(mem, (length - 1 - index) * 4);
return numArray;
}
#endregion
}
}
}


Ok i see your problems.

So first off cbuf is not client based

Use this.
    public static void CBuf_AddText(String Command)
{// 0x1DB240
RPC.Call(0x1DB240, new Object[] { 0, Command });
}


And you're calling the function completely wrong.

See where you have 100? thats actually coded to be client the number but you can't change the scorelimit only for only one client so theres no need for it as fixed in my CBUF_ADDTEXT i posted up above
    MW3.RPC.CBuf_AddText([SIZE=3][B]100[/B][/SIZE], "scr_tdm_scorelmit");


Correct way
    MW3.RPC.CBuf_AddText("[SIZE=3][B]scr_tdm_scorelmit 100"[/B][/SIZE]);


Your "iPrintln" is coded to only show for client 0.

As seen here in the function "public static void iPrintln(int client, string Text)"

Its asking for the client number then the string of text to be sent to that number "client"

I don't know about your end game glitch.
12-13-2014, 12:30 AM #7
ItzMatriix
Are you high?
Originally posted by ResistTheKiwi View Post
Ok i see your problems.

So first off cbuf is not client based

Use this.
    public static void CBuf_AddText(String Command)
{// 0x1DB240
RPC.Call(0x1DB240, new Object[] { 0, Command });
}


And you're calling the function completely wrong.

See where you have 100? thats actually coded to be client the number but you can't change the scorelimit only for only one client so theres no need for it as fixed in my CBUF_ADDTEXT i posted up above
    MW3.RPC.CBuf_AddText([SIZE=3][B]100[/B][/SIZE], "scr_tdm_scorelmit");


Correct way
    MW3.RPC.CBuf_AddText("[SIZE=3][B]scr_tdm_scorelmit 100"[/B][/SIZE]);


Your "iPrintln" is coded to only show for client 0.

As seen here in the function "public static void iPrintln(int client, string Text)"

Its asking for the client number then the string of text to be sent to that number "client"

I don't know about your end game glitch.


Ok thanks for help I'll test that out. And I know about the iPrintln. I wanted it be client 0 only
12-13-2014, 02:43 AM #8
ItzMatriix
Are you high?
Originally posted by ResistTheKiwi View Post
Ok i see your problems.

So first off cbuf is not client based

Use this.
    public static void CBuf_AddText(String Command)
{// 0x1DB240
RPC.Call(0x1DB240, new Object[] { 0, Command });
}


And you're calling the function completely wrong.

See where you have 100? thats actually coded to be client the number but you can't change the scorelimit only for only one client so theres no need for it as fixed in my CBUF_ADDTEXT i posted up above
    MW3.RPC.CBuf_AddText([SIZE=3][B]100[/B][/SIZE], "scr_tdm_scorelmit");


Correct way
    MW3.RPC.CBuf_AddText("[SIZE=3][B]scr_tdm_scorelmit 100"[/B][/SIZE]);


Your "iPrintln" is coded to only show for client 0.

As seen here in the function "public static void iPrintln(int client, string Text)"

Its asking for the client number then the string of text to be sent to that number "client"

I don't know about your end game glitch.

ok so i loaded the stuff up. nothing changed except for now after i click the Score limit button the game also wont end. its like whenever i use RPC at all the game wont end. i am testing in split screen so idk if thats a problem

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo