//Vezah FPS RPC
class RPC
{
#region RPC
public static void EnableRPC()
{
PS3.SetMemory(0x523B10, new byte[2175]);
PS3.SetMemory(0x18BE6C, new byte[] { 0x60, 0x00, 0x00, 0x00 });
PS3.SetMemory(0x3BC9CC, new byte[] { 0x60, 0x00, 0x00, 0x00 });
PS3.SetMemory(0x18BE74, new byte[] { 0x48, 0x00, 0x00, 0x68 });
PS3.SetMemory(0x1DB1244, new byte[4]);
PS3.SetMemory(0x114AE64, new byte[4]);
PS3.SetMemory(0x3BC9E4, new byte[] { 0x41, 0x82, 0x02, 0x20, 0x3D, 0x00, 0x00, 0x52, 0x80, 0x68, 0x3B, 0x10, 0x80, 0x88, 0x3B, 0x14, 0x80, 0xA8, 0x3B, 0x18, 0x80, 0xC8, 0x3B, 0x1C, 0x80, 0xE8, 0x3B, 0x20, 0x39, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x1D, 0x3C, 0x80, 0x01, 0x15, 0x90, 0x64, 0xAE, 0x64, 0x38, 0x80, 0x00, 0x00, 0x3C, 0x60, 0x01, 0xDB, 0x90, 0x83, 0x12, 0x44, 0x48, 0x00, 0x01, 0xE8, 0x4E, 0x80, 0x00, 0x20, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00 });
}
public static uint str_pointer(string str)
{
uint addr = 0x523B30;
byte[] check = new byte[1];
uint i;
for (i = 0; i < 5; i++)
{
PS3.GetMemoryR(addr, ref check);
if (check[0] == 0x00)
break;
if (i == 4)
{
i = 0; break;
}
}
addr = (0x523B30 + (i * 0x6);
PS3.SetMemory(addr, new byte[0x68]);
PS3.SetMemory(addr, Encoding.UTF8.GetBytes(str));
return addr;
}
public static void CallFunc(uint func_addr, uint param1 = 0, uint param2 = 0, uint param3 = 0, uint param4 = 0, uint param5 = 0)
{
byte[] par1 = BitConverter.GetBytes(param1);
byte[] par2 = BitConverter.GetBytes(param2);
byte[] par3 = BitConverter.GetBytes(param3);
byte[] par4 = BitConverter.GetBytes(param4);
byte[] par5 = BitConverter.GetBytes(param5);
Array.Reverse(par1);
Array.Reverse(par2);
Array.Reverse(par3);
Array.Reverse(par4);
Array.Reverse(par5);
PS3.SetMemory(0x523B10, par1);
PS3.SetMemory(0x523B14, par2);
PS3.SetMemory(0x523B18, par3);
PS3.SetMemory(0x523B1C, par4);
PS3.SetMemory(0x523B20, par5);
PS3.SetMemory(0x3BCA04, MakeBl(0x3BCA04, func_addr));
PS3.SetMemory(0x1DB1244, new byte[] { 0x00, 0x00, 0x00, 0x01 });
}
public static uint GetFuncReturn()
{
byte[] ret = new byte[4];
PS3.GetMemoryR(0x114AE64, ref ret);
Array.Reverse(ret);
return BitConverter.ToUInt32(ret, 0);
}
public static byte[] MakeBl(uint callAddr, uint addrToBlTo)
{
byte[] instruction = new byte[4];
uint addr_t = (uint)(((int)addrToBlTo - (int)callAddr) + 1);
if ((int)addrToBlTo > (int)callAddr) instruction[3] = 0x48;
else
{
instruction[3] = 0x4B; addr_t = (uint)(0x1000000 - ((int)callAddr - (int)addrToBlTo) + 1);
}
byte[] addr = BitConverter.GetBytes(addr_t);
for (int i = 0; i < 3; i++)
{
instruction[i] = addr[i];
}
Array.Reverse(instruction);
return instruction;
}
public static void SV_GameSendServerCommand(uint client, string command)
{
CallFunc(0x228FA8, (uint)client, 0, str_pointer(command));
}
public static void iPrintln(int client, string Text)
{
SV_GameSendServerCommand((uint)client, "f \"" + Text + "\"");
Thread.Sleep(20);
}
public static void iPrintlnBold(uint client, string Text)
{
SV_GameSendServerCommand(client, "c \"" + Text + "\"");
Thread.Sleep(20);
}
public static void SetModel(uint client, string model)
{
CallFunc(0x1BEF5C, (uint)(0xFCA280 + (client * 0x280)), str_pointer(model));
}
public static void Visions(uint client, string VisionName)
{
SV_GameSendServerCommand((uint)client, "J \"" + VisionName + "\"");
}
public static void GiveWeapon(int client, int weaponIndex)
{
CallFunc(0x1C3034, (uint)(0x110A280 + (client * 0x3980)), (uint)weaponIndex, 0);
CallFunc(0x18A29C, (uint)(0xFCA280 + (client * 0x280)), (uint)weaponIndex, 0, 9999, 1);
}
#endregion
}
}
class Offsets
{
public static UInt32
G_HudElems = 0xF0E10C,
HudelemSize = 0xB8,
InGame = 0x7F072C,
LevelTime = 0xFC3DB0,
G_Client = 0x110A280,
G_ClientSize = 0x3980,
G_Entity = 0xFCA280,
G_EntitySize = 0x280,
ButtonMonitoring = 0xFCA280,
PlayerName = 0x1BBBC2C,
ClientName = G_Client + 0x338C,
FreezeClient = G_Client + 0x35FF;
}
}
class Hudelem
{
#region Huds
public static class HElems
{
public static uint
xOffset = 0x04,
yOffset = 0x08,
zOffset = 0xC,
textOffset = 0x84,
fontOffset = 0x24,
fontSizeOffset = 0x14,
colorOffset = 0x30,
relativeOffset = 0x2c,
widthOffset = 0x44,
heightOffset = 0x48,
shaderOffset = 0x4C,
GlowColor = 0x8C,
alignOffset = 0x2C,
clientOffset = 0xA8,
AllClient = 0x7FF;
public static uint duration = 0x7c;
public static uint fadeStartTime = 0x38;
public static uint fadeTime = 60;
public static uint flags = 0xa4;
public static uint fromAlignOrg = 0x68;
public static uint fromAlignScreen = 0x6c;
public static uint fromHeight = 0x54;
public static uint fromWidth = 80;
public static uint fromX = 0x60;
public static uint fromY = 0x64;
public static uint fxBirthTime = 0x90;
public static uint fxDecayDuration = 0x9c;
public static uint fxDecayStartTime = 0x98;
public static uint fxLetterTime = 0x94;
public static uint label = 0x40;
public static uint moveStartTime = 0x70;
public static uint moveTime = 0x74;
public static uint scaleStartTime = 0x58;
public static uint scaleTime = 0x5c;
public static uint sort = 0x88;
public static uint soundID = 160;
public static uint time = 120;
public static uint value = 0x80;
public static uint
type = 0x00,
targetEntNum = 0x10,
fontScale = 0x14,
fromFontScale = 0x18,
fontScaleStartTime = 0x1C,
fontScaleTime = 0x20,
font = 0x24,
alignOrg = 0x28,
alignScreen = 0x2C,
color = 0x30,
fromColor = 0x34,
width = 0x44,
height = 0x48,
materialIndex = 0x4C,
text = 0x84,
glowColor = 0x8C;
}
public static uint CreateText(string text)
{
RPC.CallFunc(1828556u, RPC.str_pointer(text));
System.Threading.Thread.Sleep(50);
return RPC.GetFuncReturn();
}
public static byte[] uintBytes(uint input) { byte[] data = BitConverter.GetBytes(input); Array.Reverse(data); return data; }
public static String[] centerString(String[] StringArray)
{
Int32 maxSize = 0;
Int32 trimSize = 0;
String tempStr = "";
for (Int32 i = 0; i < StringArray.Length; i++)
{
if (StringArray[i].Length > maxSize)
maxSize = StringArray[i].Length;
}
for (Int32 i = 0; i < StringArray.Length; i++)
{
tempStr = "";
if (StringArray[i].Length < maxSize)
{
trimSize = maxSize - StringArray[i].Length;
for (Int32 x = 0; x < trimSize; x++)
tempStr += " ";
}
tempStr += StringArray[i];
StringArray[i] = tempStr;
}
return StringArray;
}
public static String buildString(String[] StringArray)
{
String str = "";
for (Int32 i = 0; i < StringArray.Length; i++)
str += StringArray[i] + "\n";
return str;
}
public static byte[] SetText(string text)
{
byte[] Index = uintBytes(CreateText(text + "\0"));
return Index;
}
public static byte[] ReverseBytes(byte[] inArray) { Array.Reverse(inArray); return inArray; }
public static byte[] ToHexFloat(float Axis) { byte[] bytes = BitConverter.GetBytes(Axis); Array.Reverse(bytes); return bytes; }
public static byte[] RGBA(decimal R, decimal G, decimal B, decimal A) { byte[] RGBA = new byte[4]; byte[] RVal = BitConverter.GetBytes(Convert.ToInt32(R)); byte[] GVal = BitConverter.GetBytes(Convert.ToInt32(G)); byte[] BVal = BitConverter.GetBytes(Convert.ToInt32(B)); byte[] AVal = BitConverter.GetBytes(Convert.ToInt32(A)); RGBA[0] = RVal[0]; RGBA[1] = GVal[0]; RGBA[2] = BVal[0]; RGBA[3] = AVal[0]; return RGBA; }
public static void ChangeShaderColor(uint elemIndex, int r, int g, int b, int a)
{
uint elem = Offsets.G_HudElems + ((elemIndex) * 0xB4);
PS3.SetMemory(elem + HElems.colorOffset, RGBA(r, g, b, a));
}
public static void ChangeTextColor(uint elemIndex, int r, int g, int b, int a)
{
uint elem = Offsets.G_HudElems + ((elemIndex) * 0xB4);
PS3.SetMemory(elem + HElems.colorOffset, RGBA(r, g, b, a));
}
public static void ZigZagText(uint elemIndex, short Speed)
{
uint Elem = Offsets.G_HudElems + (elemIndex) * 0xB4;
float i = 0;
PS3.SetMemory(Elem + HElems.xOffset, ToHexFloat(-400));
for (; ; )
{
float X = PS3.Extension.ReadFloat(Elem + HElems.xOffset);
if (i == 480)
{
break;
}
if (X == (float)-400)
{
float y = i += 120;
float x = 800;
MoveOverTime(elemIndex, Speed, x, y);
}
if (X == (float)800)
{
float y = i += 120;
float x = -400;
MoveOverTime(elemIndex, Speed, x, y);
}
Thread.Sleep(Speed);
}
}
public static void SpinText(uint Index, int Radius, int X, int Y)
{
int cx = X;
int cy = Y;
int rad = Radius;
int i = 0;
for (; ; )
{
double xx = cx + Math.Sin(i) * rad;
double yy = cy + Math.Cos(i) * rad;
MoveShaderXY(Index, (int)xx, (int)yy);
Thread.Sleep(100);
i++;
}
}
public static void ChangeFontScaleOverTime(uint elemIndex, short Time, float OldFont, float NewFont)
{
uint Elem = Offsets.G_HudElems + (elemIndex) * 0xB4;
PS3.Extension.WriteFloat(Elem + HElems.fromFontScale, OldFont);//fromFontScale
PS3.Extension.WriteUInt32(Elem + HElems.fontScaleStartTime, GetLevelTime());//fontScaleStartTime
PS3.Extension.WriteInt32(Elem + HElems.fontScaleTime, Time);//fontScaleTime
PS3.Extension.WriteFloat(Elem + HElems.fontScale, NewFont);
}
public static void ScaleOverTime(uint elemIndex, short Time, decimal Width, decimal Height)
{
uint Elem = Offsets.G_HudElems + ((elemIndex) * 0xB4);
PS3.Extension.WriteFloat(Elem + HElems.fromHeight, PS3.Extension.ReadFloat(Elem + HElems.heightOffset));//From Height
PS3.Extension.WriteFloat(Elem + HElems.fromWidth, PS3.Extension.ReadFloat(Elem + HElems.widthOffset));//from Width
PS3.Extension.WriteInt32(Elem + HElems.scaleTime, Time);
PS3.Extension.WriteInt32(Elem + HElems.scaleStartTime, (Int32)GetLevelTime());//MoveStartTime
PS3.SetMemory(Elem + HElems.heightOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(Height))));
PS3.SetMemory(Elem + HElems.widthOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(Width))));
}
public static uint MoveOverTime(uint Elem, short Time, float X, float Y)
{
uint elem = Offsets.G_HudElems + ((uint)Elem) * 0xB4;
WriteFloat(elem + HElems.fromX, PS3.Extension.ReadFloat(elem + HElems.xOffset));
WriteFloat(elem + HElems.fromY, PS3.Extension.ReadFloat(elem + HElems.yOffset));
PS3.Extension.WriteInt32(elem + HElems.moveTime, Time);
PS3.Extension.WriteInt32(elem + HElems.moveStartTime, (Int32)GetLevelTime());
WriteFloat(elem + HElems.xOffset, X);
WriteFloat(elem + HElems.yOffset, Y);
return Elem;
}
public static void FadeOverTime(uint elem, short Time, int R, int G, int B, int A)
{
uint Elem = Offsets.G_HudElems + (elem) * 0xB4;
byte[] RVal = PS3.GetMemory(Elem + HElems.color, 1);//Gets Current RVal
byte[] GVal = PS3.GetMemory(Elem + HElems.color + 0x01, 1);//Gets Current GVal
byte[] BVal = PS3.GetMemory(Elem + HElems.color + 0x02, 1);//Gets Current BVal
byte[] AVal = PS3.GetMemory(Elem + HElems.color + 0x03, 1);//Gets Current AVal
PS3.SetMemory(Elem + HElems.fromColor, RVal);//Sets Current RVal
PS3.SetMemory(Elem + HElems.fromColor + 0x01, GVal);//Sets Current GVal
PS3.SetMemory(Elem + HElems.fromColor + 0x02, BVal);//Sets Current BVal
PS3.SetMemory(Elem + HElems.fromColor + 0x03, AVal);//Sets Current AVal
PS3.Extension.WriteUInt32(Elem + HElems.fadeStartTime, GetLevelTime());//Fade Start Time
PS3.Extension.WriteInt32(Elem + HElems.fadeTime, Time);//Fade Time
PS3.SetMemory(Elem + HElems.color, RGBA(R, G, B, A));//Set New Colors
}
public static void FadeAlphaOverTime(uint elem, short Time, int OldAlpha, int NewAlpha)
{
uint Elem = Offsets.G_HudElems + (elem) * 0xB4;
byte[] OldAVal = BitConverter.GetBytes(Convert.ToInt32(OldAlpha));//Convert Bytes To Int
PS3.SetMemory(Elem + 0x37, OldAVal);//Set Old Alpha
PS3.Extension.WriteUInt32(Elem + Hudelem.HElems.fadeStartTime, GetLevelTime());//Fade Start Time
PS3.Extension.WriteInt32(Elem + Hudelem.HElems.fadeTime, Time);//Fade Time
byte[] NewAVal = BitConverter.GetBytes(Convert.ToInt32(NewAlpha));//Convert Bytes To Int
PS3.SetMemory(Elem + 0x33, NewAVal);//Set New Alpha
}
public static void WriteFloat(UInt32 offset, Single input)
{
Byte[] single = new Byte[4];
BitConverter.GetBytes(input).CopyTo(single, 0);
Array.Reverse(single, 0, 4);
PS3.SetMemory(offset, single);
}
public static void doTypeWriter(uint ElemIndex, UInt32 clientIndex, String text, float fontScale, int font, Single X, Single Y, int fxLetterTime, int fxDecayStartTime, int fxDecayDuration, int r, int g, int b, int a, int r1, int b1, int g1, int a1)
{
string setText = text + "\0";
byte[] TextIndex = SetText(setText);
uint elem = Offsets.G_HudElems + ((ElemIndex) * 0xB4);
byte[] ClientID = ReverseBytes(BitConverter.GetBytes(clientIndex));
PS3.SetMemory(elem, new byte[0xB4]);
PS3.SetMemory(elem, new byte[] { 0x00, 0x00, 0x00, 0x00 });
PS3.SetMemory(elem + HElems.relativeOffset, new byte[] { 0x00, 0x00, 0x00, 0x00, 0x92, 0xFF, 0xFF, 0xFF, 0xFF });
PS3.SetMemory(elem + HElems.relativeOffset - 4, new byte[] { 0x00, 0x00, 0x00, 0x05 });
PS3.SetMemory(elem + HElems.fontOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(font))));
PS3.SetMemory(elem + HElems.alignOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(0))));
PS3.SetMemory(elem + HElems.textOffset + 4, ReverseBytes(BitConverter.GetBytes(0)));
PS3.SetMemory(elem + HElems.fontSizeOffset, ToHexFloat(fontScale));
PS3.SetMemory(elem + HElems.xOffset, ToHexFloat(X));
PS3.SetMemory(elem + HElems.yOffset, ToHexFloat(Y));
PS3.SetMemory(elem + HElems.colorOffset, RGBA(r, g, b, a));
PS3.SetMemory(elem + HElems.GlowColor, RGBA(r1, g1, b1, a1));
PS3.SetMemory(elem + HElems.clientOffset, ClientID);
PS3.SetMemory(elem + 0xA8, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(clientIndex))));
byte[] Type_ = BitConverter.GetBytes(1);
Array.Reverse(Type_);
PS3.SetMemory(elem, Type_);
//Typewriter
PS3.Extension.WriteInt32(elem + HElems.fxBirthTime, (Int32)GetLevelTime());
PS3.Extension.WriteInt32(elem + HElems.fxLetterTime, fxLetterTime);
PS3.Extension.WriteInt32(elem + HElems.fxDecayStartTime, fxDecayStartTime);
PS3.Extension.WriteInt32(elem + HElems.fxDecayDuration, fxDecayDuration);
PS3.SetMemory(elem + HElems.textOffset, SetText(text));
}
public static void doTypeWriterCustom(uint Index, ushort fxLetterTime, ushort fxDecayStartTime, ushort fxDecayDuration)
{
uint elem = Offsets.G_HudElems + ((Index) * 0xB4);
//TypeWriter
PS3.Extension.WriteInt32(elem + HElems.fxBirthTime, (Int32)GetLevelTime());
PS3.Extension.WriteInt32(elem + HElems.fxLetterTime, fxLetterTime);
PS3.Extension.WriteInt32(elem + HElems.fxDecayStartTime, fxDecayStartTime);
PS3.Extension.WriteInt32(elem + HElems.fxDecayDuration, fxDecayDuration);
}
public static uint GetLevelTime()
{
return PS3.Extension.ReadUInt32(Offsets.LevelTime);
}
public static void ChangeTextSub(int index, string txt)
{
string NewText = txt;
byte[] Textz = Hudelem.SetText(NewText);
uint elem = Offsets.G_HudElems + (((uint)index) * 0xB4);
PS3.SetMemory(elem + Hudelem.HElems.textOffset, Textz);
}
public static void ChangeText(int index, string txt)
{
string NewText = txt + "\0";
byte[] Textz = Hudelem.SetText(NewText);
uint elem = Offsets.G_HudElems + ((Convert.ToUInt32(index)) * 0xB4);
PS3.SetMemory(elem + Hudelem.HElems.textOffset, Textz);
}
public static void ChangeFont(int elemIndex, short font)
{
uint elem = Offsets.G_HudElems + ((Convert.ToUInt32(elemIndex)) * 0xB4);
PS3.Extension.WriteInt16(elem + Hudelem.HElems.fontOffset, font);
}
public static void ChangeFontScale(uint elemIndex, double fontScale)
{
uint elem = Offsets.G_HudElems + (elemIndex) * 0xB4;
PS3.Extension.WriteFloat(elem + Hudelem.HElems.fontSizeOffset, (float)fontScale);
}
// Store Icon
//public static void StoreIcon(uint elemIndex, decimal client, decimal shader, decimal width, decimal height, float x, float y, uint align, float sort, decimal r, decimal g, decimal b, decimal a)
// {
// uint elem = Offsets.G_HudElems + ((elemIndex) * 0xB4);
// byte[] ClientID = ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(client)));
// PS3.SetMemory(elem, new byte[0xB4]);
// PS3.SetMemory(elem, new byte[] { 0x00, 0x00, 0x00, 0x00 });
// PS3.SetMemory(elem + HElems.relativeOffset, new byte[] { 0x00, 0x00, 0x00, 0x01 });
// PS3.SetMemory(elem + HElems.relativeOffset - 4, new byte[] { 0x00, 0x00, 0x00, 0x00 });
// PS3.SetMemory(elem + HElems.shaderOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(shader))));
// PS3.SetMemory(elem + HElems.heightOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(height))));
// PS3.SetMemory(elem + HElems.widthOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(width))));
// PS3.SetMemory(elem + HElems.alignOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(align))));
// PS3.SetMemory(elem + HElems.textOffset + 4, ReverseBytes(BitConverter.GetBytes(sort)));
// PS3.SetMemory(elem + HElems.xOffset, ToHexFloat(x));
// PS3.SetMemory(elem + HElems.yOffset, ToHexFloat(y));
// PS3.SetMemory(elem + HElems.colorOffset, RGBA(r, g, b, a));
// PS3.SetMemory(elem + HElems.clientOffset, ClientID);
// PS3.SetMemory(elem + 0xA8, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(client))));
// byte[] Type_ = BitConverter.GetBytes(4);
// Array.Reverse(Type_);
// PS3.SetMemory(elem, Type_);
// }
public static void StoreIcon(uint elemIndex, decimal client, decimal shader, decimal width, decimal height, float x, float y, uint align, float sort, decimal r, decimal g, decimal b, decimal a, string Priority_)
{
byte[] PriorityB = new byte[0];
byte[] PriorityA = new byte[0];
if (Priority_ == "Back")
{
PriorityB = new byte[] { 5 };
PriorityA = new byte[] { 0 };
}
if (Priority_ == "Front")
{
PriorityB = new byte[] { 7 };
PriorityA = new byte[] { 69 };
}
uint elem = 0xF0E10C + ((elemIndex) * 0xB4);
byte[] ClientID = ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(client)));
PS3.SetMemory(elem, new byte[0xB4]);
PS3.SetMemory(elem, new byte[] { 0x00, 0x00, 0x00, 0x00 });
PS3.SetMemory(elem + HElems.relativeOffset, new byte[] { 0x00, 0x00, 0x00, 0x01 });
PS3.SetMemory(elem + HElems.relativeOffset - 4, new byte[] { 0x00, 0x00, 0x00, 0x00 });
PS3.SetMemory(elem + HElems.shaderOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(shader))));
PS3.SetMemory(elem + HElems.heightOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(height))));
PS3.SetMemory(elem + HElems.widthOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(width))));
PS3.SetMemory(elem + HElems.alignOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(align))));
PS3.SetMemory(elem + HElems.textOffset + 4, ReverseBytes(BitConverter.GetBytes(sort)));
PS3.SetMemory(elem + HElems.xOffset, ToHexFloat(x));
PS3.SetMemory(elem + 0x88, PriorityA);
PS3.SetMemory(elem + 0xa7, PriorityB);
PS3.SetMemory(elem + HElems.yOffset, ToHexFloat(y));
PS3.SetMemory(elem + HElems.colorOffset, RGBA(r, g, b, a));
PS3.SetMemory(elem + HElems.clientOffset, ClientID);
PS3.SetMemory(elem + 0x2b, new byte[] { 0x5 });
PS3.SetMemory(elem + 0xA8, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(client))));
byte[] Type_ = BitConverter.GetBytes(4);
Array.Reverse(Type_);
PS3.SetMemory(elem, Type_);
}
public static void ChangeWidth(int elemIndex, short width)
{
uint elem = Offsets.G_HudElems + ((Convert.ToUInt32(elemIndex)) * 0xB4);
PS3.Extension.WriteInt16(elem + HElems.widthOffset, width);
}
public static void ChangeText(uint index, string txt, int xAxis)
{
string NewText = txt + "\0";
byte[] Textz = Hudelem.SetText(NewText);
uint elem = Offsets.G_HudElems + ((index) * 0xB4);
byte[] newX = new byte[4];
newX = BitConverter.GetBytes(Convert.ToSingle(xAxis));
Array.Reverse(newX);
PS3.SetMemory(elem + HElems.xOffset, newX);
PS3.SetMemory(elem + HElems.textOffset, Textz);
}
public static void ChangeAlpha(int index, int r, int g, int b, int a)
{
uint elem = Offsets.G_HudElems + (((uint)index) * 0xB4);
PS3.SetMemory(elem + HElems.colorOffset, RGBA(r, g, b, a));
}
public static void ChangeTextSize(uint index, double fontScale_)
{
byte[] fontScale = new byte[4];
fontScale = BitConverter.GetBytes(Convert.ToSingle(fontScale_));
Array.Reverse(fontScale);
PS3.SetMemory(Offsets.G_HudElems + (index * 0xB4) + 20, fontScale);
}
public static void DestroyAll()
{
PS3.SetMemory(Offsets.G_HudElems, new byte[184320]);
}
public static void DestroyElem(int index)
{
uint elem = Offsets.G_HudElems + (((uint)index) * 0xB4);
PS3.SetMemory(elem, new byte[0xB4]);
}
public static void SetGlowText(uint elemIndex, int client, string Text, decimal font, float fontScale, float x, float y, uint align, float sort, decimal r, decimal g, decimal b, decimal a, decimal r1, decimal g1, decimal b1, decimal a1)
{
string setText = Text + "\0";
byte[] TextIndex = SetText(setText);
uint elem = Offsets.G_HudElems + ((elemIndex) * 0xB4);
byte[] ClientID = ReverseBytes(BitConverter.GetBytes(client));
PS3.SetMemory(elem, new byte[0xB4]);
PS3.SetMemory(elem, new byte[] { 0x00, 0x00, 0x00, 0x00 });
PS3.SetMemory(elem + HElems.relativeOffset, new byte[] { 0x00, 0x00, 0x00, 0x00, 0x92, 0xFF, 0xFF, 0xFF, 0xFF });
PS3.SetMemory(elem + HElems.relativeOffset - 4, new byte[] { 0x00, 0x00, 0x00, 0x05 });
PS3.SetMemory(elem + Hudelem.HElems.textOffset, TextIndex);
PS3.SetMemory(elem + HElems.fontOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(font))));
PS3.SetMemory(elem + HElems.alignOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(align))));
PS3.SetMemory(elem + HElems.textOffset + 4, ReverseBytes(BitConverter.GetBytes(sort)));
PS3.SetMemory(elem + HElems.fontSizeOffset, ToHexFloat(fontScale));
PS3.SetMemory(elem + HElems.xOffset, ToHexFloat(x));
PS3.SetMemory(elem + HElems.yOffset, ToHexFloat(y));
PS3.SetMemory(elem + HElems.colorOffset, RGBA(r, g, b, a));
PS3.SetMemory(elem + HElems.GlowColor, RGBA(r1, g1, b1, a1));
PS3.SetMemory(elem + HElems.clientOffset, ClientID);
PS3.SetMemory(elem + 0xA8, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(client))));
byte[] Type_ = BitConverter.GetBytes(1);
Array.Reverse(Type_);
PS3.SetMemory(elem, Type_);
}
public static void MoveShaderXY(uint index, float X, float Y)
{
PS3.Extension.WriteFloat(Offsets.G_HudElems + (index * 0xB4) + Hudelem.HElems.xOffset, X);
PS3.Extension.WriteFloat(Offsets.G_HudElems + (index * 0xB4) + Hudelem.HElems.yOffset, Y);
}
public static void MoveShaderY(uint index, float Y)
{
PS3.Extension.WriteFloat(Offsets.G_HudElems + (index * 0xB4) + Hudelem.HElems.yOffset, Y);
}
public static void StoreTextElem(uint elemIndex, int client, string Text, double font, double fontScale, float x, float y, uint align, float sort, decimal r, decimal g, decimal b, decimal a)
{
string setText = Text + "\0";
byte[] TextIndex = SetText(setText);
uint elem = Offsets.G_HudElems + ((elemIndex) * 0xB4);
byte[] ClientID = ReverseBytes(BitConverter.GetBytes(client));
PS3.SetMemory(elem, new byte[0xB4]);
PS3.SetMemory(elem, new byte[] { 0x00, 0x00, 0x00, 0x00 });
PS3.SetMemory(elem + HElems.relativeOffset, new byte[] { 0x00, 0x00, 0x00, 0x00, 0x92, 0xFF, 0xFF, 0xFF, 0xFF });
PS3.SetMemory(elem + HElems.relativeOffset - 4, new byte[] { 0x00, 0x00, 0x00, 0x05 });
PS3.SetMemory(elem + Hudelem.HElems.textOffset, TextIndex);
PS3.Extension.WriteFloat(elem + HElems.fontOffset, (float)font);
PS3.SetMemory(elem + HElems.alignOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(align))));
PS3.SetMemory(elem + HElems.textOffset + 4, ReverseBytes(BitConverter.GetBytes(sort)));
PS3.Extension.WriteFloat(elem + HElems.fontSizeOffset, (float)fontScale);
PS3.SetMemory(elem + HElems.xOffset, ToHexFloat(x));
PS3.SetMemory(elem + HElems.yOffset, ToHexFloat(y));
PS3.SetMemory(elem + HElems.colorOffset, RGBA(r, g, b, a));
PS3.SetMemory(elem + HElems.clientOffset, ClientID);
PS3.SetMemory(elem + 0xA8, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(client))));
byte[] Type_ = BitConverter.GetBytes(1);
Array.Reverse(Type_);
PS3.SetMemory(elem, Type_);
}
public static void SetGlow(uint elemIndex, decimal r1, decimal g1, decimal b1, decimal a1)
{
uint elem = Offsets.G_HudElems + ((elemIndex) * 0xB4);
PS3.SetMemory(elem + HElems.GlowColor, RGBA(r1, g1, b1, a1));
}
public static void ActivateIndex(Boolean State, int index, int type)
{
uint elem = Offsets.G_HudElems + ((uint)index * 0xB4);
byte[] Type_ = BitConverter.GetBytes(type);
Array.Reverse(Type_);
if (State == true)
{
PS3.SetMemory(elem, Type_);
}
else
{
PS3.SetMemory(elem, new byte[] { 0x00, 0x00, 0x00, 0x00 });
}
}
}
}
#endregion
//Anonymous
public static void Anonymous(int client)
{
Hudelem.doTypeWriter(600 + (32 * (uint)client), Hudelem.HElems.AllClient, "We are Anonymous!!!!!!", 2.2f, 2, 320, 340, 130, 1000, 8000, 255, 255, 255, 255, 0, 0, 0, 0);
Hudelem.StoreIcon(605 + (32 * (uint)client), Hudelem.HElems.AllClient, 1, 200, 200, 320, 180, 0, 0, 255, 255, 255, 255, "Back");//Background (white)
Hudelem.StoreIcon(606 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 66, 22, 253, 111, 0, 0, 32, 32, 32, 255, "Front");//eyebrau left (Black)
Hudelem.StoreIcon(607 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 66, 22, 387, 111, 0, 0, 32, 32, 32, 255, "Front");//eyebrau right (Black)
Hudelem.StoreIcon(608 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 46, 22, 275, 160, 0, 0, 32, 32, 32, 255, "Front");//Eye left (Black)
Hudelem.StoreIcon(609 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 46, 22, 367, 160, 0, 0, 32, 32, 32, 255, "Front");//Eye right (Black)
Hudelem.StoreIcon(610 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 46, 22, 320, 210, 0, 0, 32, 32, 32, 255, "Front");//mustache Center (Black)
Hudelem.StoreIcon(611 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 56, 22, 270, 231, 0, 0, 32, 32, 32, 255, "Front");//mustache Left (Black)
Hudelem.StoreIcon(612 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 56, 22, 371, 231, 0, 0, 32, 32, 32, 255, "Front");//mustache right (Black)
Hudelem.StoreIcon(613 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 22, 22, 231, 210, 0, 0, 32, 32, 32, 255, "Front");//mustache Left top(Black)
Hudelem.StoreIcon(614 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 22, 22, 409, 210, 0, 0, 32, 32, 32, 255, "Front");//mustache right top(Black)
Hudelem.StoreIcon(615 + (32 * (uint)client), Hudelem.HElems.AllClient, 1, 22, 22, 231, 188, 0, 0, 234, 142, 135, 255, "Front");//cheek left (pink)
Hudelem.StoreIcon(616 + (32 * (uint)client), Hudelem.HElems.AllClient, 1, 22, 22, 409, 188, 0, 0, 234, 142, 135, 255, "Front");//cheek right (pink)
Hudelem.StoreIcon(617 + (32 * (uint)client), Hudelem.HElems.AllClient, 1, 86, 22, 320, 253, 0, 0, 234, 142, 135, 255, "Front");//mouth (pink)
Hudelem.StoreIcon(618 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 22, 46, 320, 286, 0, 0, 32, 32, 32, 255, "Front");//goaty Center (Black)
Hudelem.StoreIcon(619 + (32 * (uint)client), Hudelem.HElems.AllClient, 1, 140, 22, 320, 290, 0, 0, 255, 255, 255, 255, "Back");//Background (white)
Hudelem.StoreIcon(620 + (32 * (uint)client), Hudelem.HElems.AllClient, 1, 100, 22, 320, 302, 0, 0, 255, 255, 255, 255, "Back");//Background (white)
System.Threading.Thread.Sleep(4000);
Hudelem.DestroyElem(605);
Hudelem.DestroyElem(606);
Hudelem.DestroyElem(607);
Hudelem.DestroyElem(60;
Hudelem.DestroyElem(609);
Hudelem.DestroyElem(610);
Hudelem.DestroyElem(611);
Hudelem.DestroyElem(612);
Hudelem.DestroyElem(613);
Hudelem.DestroyElem(614);
Hudelem.DestroyElem(615);
Hudelem.DestroyElem(616);
Hudelem.DestroyElem(617);
Hudelem.DestroyElem(61;
Hudelem.DestroyElem(619);
Hudelem.DestroyElem(620);
}
public static void Anonymousv2(int client)
{
Hudelem.doTypeWriter(800 + (32 * (uint)client), Hudelem.HElems.AllClient, "We are Anonymous!!!!!!", 2.2f, 2, 320, 340, 130, 1000, 8000, 255, 255, 255, 255, 0, 0, 0, 0);
Hudelem.StoreIcon(801 + (32 * (uint)client), Hudelem.HElems.AllClient, 1, 140, 22, 320, 290, 0, 0, 255, 255, 255, 255, "Back");//Background (white)
Hudelem.StoreIcon(802 + (32 * (uint)client), Hudelem.HElems.AllClient, 1, 100, 22, 320, 302, 0, 0, 255, 255, 255, 255, "Back");//Background (white)
Hudelem.StoreIcon(803 + (32 * (uint)client), Hudelem.HElems.AllClient, 1, 200, 200, 320, 180, 0, 0, 255, 255, 255, 255, "Back");//Background (white)
Hudelem.StoreIcon(804 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 66, 22, 253, 111, 0, 0, 32, 32, 32, 255, "Front");//eyebrau left (Black)
Hudelem.StoreIcon(805 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 22, 22, 286, 125, 0, 0, 32, 32, 32, 255, "Front");//eyebrau left2 (Black)
Hudelem.StoreIcon(806 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 66, 22, 387, 111, 0, 0, 32, 32, 32, 255, "Front");//eyebrau right (Black)
Hudelem.StoreIcon(807 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 22, 22, 356, 125, 0, 0, 32, 32, 32, 255, "Front");//eyebrau right2 (Black)
Hudelem.StoreIcon(808 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 46, 16, 275, 170, 0, 0, 32, 32, 32, 255, "Front");//Eye left (Black)
Hudelem.StoreIcon(809 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 46, 16, 367, 170, 0, 0, 32, 32, 32, 255, "Front");//Eye right (Black)
Hudelem.StoreIcon(810 + (32 * (uint)client), Hudelem.HElems.AllClient, 1, 32, 8, 320, 217, 0, 0, 104, 97, 96, 40, "Front");//Nose Center (Black)
Hudelem.StoreIcon(811 + (32 * (uint)client), Hudelem.HElems.AllClient, 1, 4, 65, 338, 185, 0, 0, 104, 97, 96, 40, "Front");//Nose Center (Black)
Hudelem.StoreIcon(812 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 56, 22, 270, 231, 0, 0, 32, 32, 32, 255, "Front");//mustache Left (Black)
Hudelem.StoreIcon(813 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 56, 22, 371, 231, 0, 0, 32, 32, 32, 255, "Front");//mustache right (Black)
Hudelem.StoreIcon(814 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 16, 22, 234, 220, 0, 0, 32, 32, 32, 255, "Front");//mustache Left middle(Black)
Hudelem.StoreIcon(815 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 16, 22, 406, 220, 0, 0, 32, 32, 32, 255, "Front");//mustache right middle(Black)
Hudelem.StoreIcon(816 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 16, 16, 306, 229, 0, 0, 32, 32, 32, 255, "Front");//mustache Center left(Black)
Hudelem.StoreIcon(817 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 16, 16, 336, 229, 0, 0, 32, 32, 32, 255, "Front");//mustache Center right(Black)
Hudelem.StoreIcon(818 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 120, 6, 320, 248, 0, 0, 234, 142, 135, 255, "Front");//mouth (black)
Hudelem.StoreIcon(819 + (32 * (uint)client), Hudelem.HElems.AllClient, 1, 45, 6, 320, 260, 0, 0, 104, 97, 96, 40, "Front");//mouth shadow(grey)
Hudelem.StoreIcon(820 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 18, 46, 320, 290, 0, 0, 32, 32, 32, 255, "Front");//goaty Center (Black)
Thread.Sleep(4000);
Hudelem.DestroyElem(800);
Hudelem.DestroyElem(801);
Hudelem.DestroyElem(802);
Hudelem.DestroyElem(803);
Hudelem.DestroyElem(804);
Hudelem.DestroyElem(805);
Hudelem.DestroyElem(806);
Hudelem.DestroyElem(807);
Hudelem.DestroyElem(80;
Hudelem.DestroyElem(809);
Hudelem.DestroyElem(810);
Hudelem.DestroyElem(811);
Hudelem.DestroyElem(812);
Hudelem.DestroyElem(813);
Hudelem.DestroyElem(814);
Hudelem.DestroyElem(815);
Hudelem.DestroyElem(816);
Hudelem.DestroyElem(817);
Hudelem.DestroyElem(81;
Hudelem.DestroyElem(819);
Hudelem.DestroyElem(820);
}
}
//Anonymous
public static void Anonymous(int client)
{
Hudelem.doTypeWriter(600 + (32 * (uint)client), Hudelem.HElems.AllClient, "We are Anonymous!!!!!!", 2.2f, 2, 320, 340, 130, 1000, 8000, 255, 255, 255, 255, 0, 0, 0, 0);
Hudelem.StoreIcon(605 + (32 * (uint)client), Hudelem.HElems.AllClient, 1, 200, 200, 320, 180, 0, 0, 255, 255, 255, 255, "Back");//Background (white)
Hudelem.StoreIcon(606 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 66, 22, 253, 111, 0, 0, 32, 32, 32, 255, "Front");//eyebrau left (Black)
Hudelem.StoreIcon(607 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 66, 22, 387, 111, 0, 0, 32, 32, 32, 255, "Front");//eyebrau right (Black)
Hudelem.StoreIcon(608 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 46, 22, 275, 160, 0, 0, 32, 32, 32, 255, "Front");//Eye left (Black)
Hudelem.StoreIcon(609 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 46, 22, 367, 160, 0, 0, 32, 32, 32, 255, "Front");//Eye right (Black)
Hudelem.StoreIcon(610 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 46, 22, 320, 210, 0, 0, 32, 32, 32, 255, "Front");//mustache Center (Black)
Hudelem.StoreIcon(611 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 56, 22, 270, 231, 0, 0, 32, 32, 32, 255, "Front");//mustache Left (Black)
Hudelem.StoreIcon(612 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 56, 22, 371, 231, 0, 0, 32, 32, 32, 255, "Front");//mustache right (Black)
Hudelem.StoreIcon(613 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 22, 22, 231, 210, 0, 0, 32, 32, 32, 255, "Front");//mustache Left top(Black)
Hudelem.StoreIcon(614 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 22, 22, 409, 210, 0, 0, 32, 32, 32, 255, "Front");//mustache right top(Black)
Hudelem.StoreIcon(615 + (32 * (uint)client), Hudelem.HElems.AllClient, 1, 22, 22, 231, 188, 0, 0, 234, 142, 135, 255, "Front");//cheek left (pink)
Hudelem.StoreIcon(616 + (32 * (uint)client), Hudelem.HElems.AllClient, 1, 22, 22, 409, 188, 0, 0, 234, 142, 135, 255, "Front");//cheek right (pink)
Hudelem.StoreIcon(617 + (32 * (uint)client), Hudelem.HElems.AllClient, 1, 86, 22, 320, 253, 0, 0, 234, 142, 135, 255, "Front");//mouth (pink)
Hudelem.StoreIcon(618 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 22, 46, 320, 286, 0, 0, 32, 32, 32, 255, "Front");//goaty Center (Black)
Hudelem.StoreIcon(619 + (32 * (uint)client), Hudelem.HElems.AllClient, 1, 140, 22, 320, 290, 0, 0, 255, 255, 255, 255, "Back");//Background (white)
Hudelem.StoreIcon(620 + (32 * (uint)client), Hudelem.HElems.AllClient, 1, 100, 22, 320, 302, 0, 0, 255, 255, 255, 255, "Back");//Background (white)
System.Threading.Thread.Sleep(4000);
Hudelem.DestroyElem(605);
Hudelem.DestroyElem(606);
Hudelem.DestroyElem(607);
Hudelem.DestroyElem(60;
Hudelem.DestroyElem(609);
Hudelem.DestroyElem(610);
Hudelem.DestroyElem(611);
Hudelem.DestroyElem(612);
Hudelem.DestroyElem(613);
Hudelem.DestroyElem(614);
Hudelem.DestroyElem(615);
Hudelem.DestroyElem(616);
Hudelem.DestroyElem(617);
Hudelem.DestroyElem(61;
Hudelem.DestroyElem(619);
Hudelem.DestroyElem(620);
//Vezah FPS RPC
class RPC
{
#region RPC
public static void EnableRPC()
{
PS3.SetMemory(0x523B10, new byte[2175]);
PS3.SetMemory(0x18BE6C, new byte[] { 0x60, 0x00, 0x00, 0x00 });
PS3.SetMemory(0x3BC9CC, new byte[] { 0x60, 0x00, 0x00, 0x00 });
PS3.SetMemory(0x18BE74, new byte[] { 0x48, 0x00, 0x00, 0x68 });
PS3.SetMemory(0x1DB1244, new byte[4]);
PS3.SetMemory(0x114AE64, new byte[4]);
PS3.SetMemory(0x3BC9E4, new byte[] { 0x41, 0x82, 0x02, 0x20, 0x3D, 0x00, 0x00, 0x52, 0x80, 0x68, 0x3B, 0x10, 0x80, 0x88, 0x3B, 0x14, 0x80, 0xA8, 0x3B, 0x18, 0x80, 0xC8, 0x3B, 0x1C, 0x80, 0xE8, 0x3B, 0x20, 0x39, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x1D, 0x3C, 0x80, 0x01, 0x15, 0x90, 0x64, 0xAE, 0x64, 0x38, 0x80, 0x00, 0x00, 0x3C, 0x60, 0x01, 0xDB, 0x90, 0x83, 0x12, 0x44, 0x48, 0x00, 0x01, 0xE8, 0x4E, 0x80, 0x00, 0x20, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00 });
}
public static uint str_pointer(string str)
{
uint addr = 0x523B30;
byte[] check = new byte[1];
uint i;
for (i = 0; i < 5; i++)
{
PS3.GetMemoryR(addr, ref check);
if (check[0] == 0x00)
break;
if (i == 4)
{
i = 0; break;
}
}
addr = (0x523B30 + (i * 0x6);
PS3.SetMemory(addr, new byte[0x68]);
PS3.SetMemory(addr, Encoding.UTF8.GetBytes(str));
return addr;
}
public static void CallFunc(uint func_addr, uint param1 = 0, uint param2 = 0, uint param3 = 0, uint param4 = 0, uint param5 = 0)
{
byte[] par1 = BitConverter.GetBytes(param1);
byte[] par2 = BitConverter.GetBytes(param2);
byte[] par3 = BitConverter.GetBytes(param3);
byte[] par4 = BitConverter.GetBytes(param4);
byte[] par5 = BitConverter.GetBytes(param5);
Array.Reverse(par1);
Array.Reverse(par2);
Array.Reverse(par3);
Array.Reverse(par4);
Array.Reverse(par5);
PS3.SetMemory(0x523B10, par1);
PS3.SetMemory(0x523B14, par2);
PS3.SetMemory(0x523B18, par3);
PS3.SetMemory(0x523B1C, par4);
PS3.SetMemory(0x523B20, par5);
PS3.SetMemory(0x3BCA04, MakeBl(0x3BCA04, func_addr));
PS3.SetMemory(0x1DB1244, new byte[] { 0x00, 0x00, 0x00, 0x01 });
}
public static uint GetFuncReturn()
{
byte[] ret = new byte[4];
PS3.GetMemoryR(0x114AE64, ref ret);
Array.Reverse(ret);
return BitConverter.ToUInt32(ret, 0);
}
public static byte[] MakeBl(uint callAddr, uint addrToBlTo)
{
byte[] instruction = new byte[4];
uint addr_t = (uint)(((int)addrToBlTo - (int)callAddr) + 1);
if ((int)addrToBlTo > (int)callAddr) instruction[3] = 0x48;
else
{
instruction[3] = 0x4B; addr_t = (uint)(0x1000000 - ((int)callAddr - (int)addrToBlTo) + 1);
}
byte[] addr = BitConverter.GetBytes(addr_t);
for (int i = 0; i < 3; i++)
{
instruction[i] = addr[i];
}
Array.Reverse(instruction);
return instruction;
}
public static void SV_GameSendServerCommand(uint client, string command)
{
CallFunc(0x228FA8, (uint)client, 0, str_pointer(command));
}
public static void iPrintln(int client, string Text)
{
SV_GameSendServerCommand((uint)client, "f \"" + Text + "\"");
Thread.Sleep(20);
}
public static void iPrintlnBold(uint client, string Text)
{
SV_GameSendServerCommand(client, "c \"" + Text + "\"");
Thread.Sleep(20);
}
public static void SetModel(uint client, string model)
{
CallFunc(0x1BEF5C, (uint)(0xFCA280 + (client * 0x280)), str_pointer(model));
}
public static void Visions(uint client, string VisionName)
{
SV_GameSendServerCommand((uint)client, "J \"" + VisionName + "\"");
}
public static void GiveWeapon(int client, int weaponIndex)
{
CallFunc(0x1C3034, (uint)(0x110A280 + (client * 0x3980)), (uint)weaponIndex, 0);
CallFunc(0x18A29C, (uint)(0xFCA280 + (client * 0x280)), (uint)weaponIndex, 0, 9999, 1);
}
#endregion
}
}
class Offsets
{
public static UInt32
G_HudElems = 0xF0E10C,
HudelemSize = 0xB8,
InGame = 0x7F072C,
LevelTime = 0xFC3DB0,
G_Client = 0x110A280,
G_ClientSize = 0x3980,
G_Entity = 0xFCA280,
G_EntitySize = 0x280,
ButtonMonitoring = 0xFCA280,
PlayerName = 0x1BBBC2C,
ClientName = G_Client + 0x338C,
FreezeClient = G_Client + 0x35FF;
}
}
class Hudelem
{
#region Huds
public static class HElems
{
public static uint
xOffset = 0x04,
yOffset = 0x08,
zOffset = 0xC,
textOffset = 0x84,
fontOffset = 0x24,
fontSizeOffset = 0x14,
colorOffset = 0x30,
relativeOffset = 0x2c,
widthOffset = 0x44,
heightOffset = 0x48,
shaderOffset = 0x4C,
GlowColor = 0x8C,
alignOffset = 0x2C,
clientOffset = 0xA8,
AllClient = 0x7FF;
public static uint duration = 0x7c;
public static uint fadeStartTime = 0x38;
public static uint fadeTime = 60;
public static uint flags = 0xa4;
public static uint fromAlignOrg = 0x68;
public static uint fromAlignScreen = 0x6c;
public static uint fromHeight = 0x54;
public static uint fromWidth = 80;
public static uint fromX = 0x60;
public static uint fromY = 0x64;
public static uint fxBirthTime = 0x90;
public static uint fxDecayDuration = 0x9c;
public static uint fxDecayStartTime = 0x98;
public static uint fxLetterTime = 0x94;
public static uint label = 0x40;
public static uint moveStartTime = 0x70;
public static uint moveTime = 0x74;
public static uint scaleStartTime = 0x58;
public static uint scaleTime = 0x5c;
public static uint sort = 0x88;
public static uint soundID = 160;
public static uint time = 120;
public static uint value = 0x80;
public static uint
type = 0x00,
targetEntNum = 0x10,
fontScale = 0x14,
fromFontScale = 0x18,
fontScaleStartTime = 0x1C,
fontScaleTime = 0x20,
font = 0x24,
alignOrg = 0x28,
alignScreen = 0x2C,
color = 0x30,
fromColor = 0x34,
width = 0x44,
height = 0x48,
materialIndex = 0x4C,
text = 0x84,
glowColor = 0x8C;
}
public static uint CreateText(string text)
{
RPC.CallFunc(1828556u, RPC.str_pointer(text));
System.Threading.Thread.Sleep(50);
return RPC.GetFuncReturn();
}
public static byte[] uintBytes(uint input) { byte[] data = BitConverter.GetBytes(input); Array.Reverse(data); return data; }
public static String[] centerString(String[] StringArray)
{
Int32 maxSize = 0;
Int32 trimSize = 0;
String tempStr = "";
for (Int32 i = 0; i < StringArray.Length; i++)
{
if (StringArray[i].Length > maxSize)
maxSize = StringArray[i].Length;
}
for (Int32 i = 0; i < StringArray.Length; i++)
{
tempStr = "";
if (StringArray[i].Length < maxSize)
{
trimSize = maxSize - StringArray[i].Length;
for (Int32 x = 0; x < trimSize; x++)
tempStr += " ";
}
tempStr += StringArray[i];
StringArray[i] = tempStr;
}
return StringArray;
}
public static String buildString(String[] StringArray)
{
String str = "";
for (Int32 i = 0; i < StringArray.Length; i++)
str += StringArray[i] + "\n";
return str;
}
public static byte[] SetText(string text)
{
byte[] Index = uintBytes(CreateText(text + "\0"));
return Index;
}
public static byte[] ReverseBytes(byte[] inArray) { Array.Reverse(inArray); return inArray; }
public static byte[] ToHexFloat(float Axis) { byte[] bytes = BitConverter.GetBytes(Axis); Array.Reverse(bytes); return bytes; }
public static byte[] RGBA(decimal R, decimal G, decimal B, decimal A) { byte[] RGBA = new byte[4]; byte[] RVal = BitConverter.GetBytes(Convert.ToInt32(R)); byte[] GVal = BitConverter.GetBytes(Convert.ToInt32(G)); byte[] BVal = BitConverter.GetBytes(Convert.ToInt32(B)); byte[] AVal = BitConverter.GetBytes(Convert.ToInt32(A)); RGBA[0] = RVal[0]; RGBA[1] = GVal[0]; RGBA[2] = BVal[0]; RGBA[3] = AVal[0]; return RGBA; }
public static void ChangeShaderColor(uint elemIndex, int r, int g, int b, int a)
{
uint elem = Offsets.G_HudElems + ((elemIndex) * 0xB4);
PS3.SetMemory(elem + HElems.colorOffset, RGBA(r, g, b, a));
}
public static void ChangeTextColor(uint elemIndex, int r, int g, int b, int a)
{
uint elem = Offsets.G_HudElems + ((elemIndex) * 0xB4);
PS3.SetMemory(elem + HElems.colorOffset, RGBA(r, g, b, a));
}
public static void ZigZagText(uint elemIndex, short Speed)
{
uint Elem = Offsets.G_HudElems + (elemIndex) * 0xB4;
float i = 0;
PS3.SetMemory(Elem + HElems.xOffset, ToHexFloat(-400));
for (; ; )
{
float X = PS3.Extension.ReadFloat(Elem + HElems.xOffset);
if (i == 480)
{
break;
}
if (X == (float)-400)
{
float y = i += 120;
float x = 800;
MoveOverTime(elemIndex, Speed, x, y);
}
if (X == (float)800)
{
float y = i += 120;
float x = -400;
MoveOverTime(elemIndex, Speed, x, y);
}
Thread.Sleep(Speed);
}
}
public static void SpinText(uint Index, int Radius, int X, int Y)
{
int cx = X;
int cy = Y;
int rad = Radius;
int i = 0;
for (; ; )
{
double xx = cx + Math.Sin(i) * rad;
double yy = cy + Math.Cos(i) * rad;
MoveShaderXY(Index, (int)xx, (int)yy);
Thread.Sleep(100);
i++;
}
}
public static void ChangeFontScaleOverTime(uint elemIndex, short Time, float OldFont, float NewFont)
{
uint Elem = Offsets.G_HudElems + (elemIndex) * 0xB4;
PS3.Extension.WriteFloat(Elem + HElems.fromFontScale, OldFont);//fromFontScale
PS3.Extension.WriteUInt32(Elem + HElems.fontScaleStartTime, GetLevelTime());//fontScaleStartTime
PS3.Extension.WriteInt32(Elem + HElems.fontScaleTime, Time);//fontScaleTime
PS3.Extension.WriteFloat(Elem + HElems.fontScale, NewFont);
}
public static void ScaleOverTime(uint elemIndex, short Time, decimal Width, decimal Height)
{
uint Elem = Offsets.G_HudElems + ((elemIndex) * 0xB4);
PS3.Extension.WriteFloat(Elem + HElems.fromHeight, PS3.Extension.ReadFloat(Elem + HElems.heightOffset));//From Height
PS3.Extension.WriteFloat(Elem + HElems.fromWidth, PS3.Extension.ReadFloat(Elem + HElems.widthOffset));//from Width
PS3.Extension.WriteInt32(Elem + HElems.scaleTime, Time);
PS3.Extension.WriteInt32(Elem + HElems.scaleStartTime, (Int32)GetLevelTime());//MoveStartTime
PS3.SetMemory(Elem + HElems.heightOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(Height))));
PS3.SetMemory(Elem + HElems.widthOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(Width))));
}
public static uint MoveOverTime(uint Elem, short Time, float X, float Y)
{
uint elem = Offsets.G_HudElems + ((uint)Elem) * 0xB4;
WriteFloat(elem + HElems.fromX, PS3.Extension.ReadFloat(elem + HElems.xOffset));
WriteFloat(elem + HElems.fromY, PS3.Extension.ReadFloat(elem + HElems.yOffset));
PS3.Extension.WriteInt32(elem + HElems.moveTime, Time);
PS3.Extension.WriteInt32(elem + HElems.moveStartTime, (Int32)GetLevelTime());
WriteFloat(elem + HElems.xOffset, X);
WriteFloat(elem + HElems.yOffset, Y);
return Elem;
}
public static void FadeOverTime(uint elem, short Time, int R, int G, int B, int A)
{
uint Elem = Offsets.G_HudElems + (elem) * 0xB4;
byte[] RVal = PS3.GetMemory(Elem + HElems.color, 1);//Gets Current RVal
byte[] GVal = PS3.GetMemory(Elem + HElems.color + 0x01, 1);//Gets Current GVal
byte[] BVal = PS3.GetMemory(Elem + HElems.color + 0x02, 1);//Gets Current BVal
byte[] AVal = PS3.GetMemory(Elem + HElems.color + 0x03, 1);//Gets Current AVal
PS3.SetMemory(Elem + HElems.fromColor, RVal);//Sets Current RVal
PS3.SetMemory(Elem + HElems.fromColor + 0x01, GVal);//Sets Current GVal
PS3.SetMemory(Elem + HElems.fromColor + 0x02, BVal);//Sets Current BVal
PS3.SetMemory(Elem + HElems.fromColor + 0x03, AVal);//Sets Current AVal
PS3.Extension.WriteUInt32(Elem + HElems.fadeStartTime, GetLevelTime());//Fade Start Time
PS3.Extension.WriteInt32(Elem + HElems.fadeTime, Time);//Fade Time
PS3.SetMemory(Elem + HElems.color, RGBA(R, G, B, A));//Set New Colors
}
public static void FadeAlphaOverTime(uint elem, short Time, int OldAlpha, int NewAlpha)
{
uint Elem = Offsets.G_HudElems + (elem) * 0xB4;
byte[] OldAVal = BitConverter.GetBytes(Convert.ToInt32(OldAlpha));//Convert Bytes To Int
PS3.SetMemory(Elem + 0x37, OldAVal);//Set Old Alpha
PS3.Extension.WriteUInt32(Elem + Hudelem.HElems.fadeStartTime, GetLevelTime());//Fade Start Time
PS3.Extension.WriteInt32(Elem + Hudelem.HElems.fadeTime, Time);//Fade Time
byte[] NewAVal = BitConverter.GetBytes(Convert.ToInt32(NewAlpha));//Convert Bytes To Int
PS3.SetMemory(Elem + 0x33, NewAVal);//Set New Alpha
}
public static void WriteFloat(UInt32 offset, Single input)
{
Byte[] single = new Byte[4];
BitConverter.GetBytes(input).CopyTo(single, 0);
Array.Reverse(single, 0, 4);
PS3.SetMemory(offset, single);
}
public static void doTypeWriter(uint ElemIndex, UInt32 clientIndex, String text, float fontScale, int font, Single X, Single Y, int fxLetterTime, int fxDecayStartTime, int fxDecayDuration, int r, int g, int b, int a, int r1, int b1, int g1, int a1)
{
string setText = text + "\0";
byte[] TextIndex = SetText(setText);
uint elem = Offsets.G_HudElems + ((ElemIndex) * 0xB4);
byte[] ClientID = ReverseBytes(BitConverter.GetBytes(clientIndex));
PS3.SetMemory(elem, new byte[0xB4]);
PS3.SetMemory(elem, new byte[] { 0x00, 0x00, 0x00, 0x00 });
PS3.SetMemory(elem + HElems.relativeOffset, new byte[] { 0x00, 0x00, 0x00, 0x00, 0x92, 0xFF, 0xFF, 0xFF, 0xFF });
PS3.SetMemory(elem + HElems.relativeOffset - 4, new byte[] { 0x00, 0x00, 0x00, 0x05 });
PS3.SetMemory(elem + HElems.fontOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(font))));
PS3.SetMemory(elem + HElems.alignOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(0))));
PS3.SetMemory(elem + HElems.textOffset + 4, ReverseBytes(BitConverter.GetBytes(0)));
PS3.SetMemory(elem + HElems.fontSizeOffset, ToHexFloat(fontScale));
PS3.SetMemory(elem + HElems.xOffset, ToHexFloat(X));
PS3.SetMemory(elem + HElems.yOffset, ToHexFloat(Y));
PS3.SetMemory(elem + HElems.colorOffset, RGBA(r, g, b, a));
PS3.SetMemory(elem + HElems.GlowColor, RGBA(r1, g1, b1, a1));
PS3.SetMemory(elem + HElems.clientOffset, ClientID);
PS3.SetMemory(elem + 0xA8, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(clientIndex))));
byte[] Type_ = BitConverter.GetBytes(1);
Array.Reverse(Type_);
PS3.SetMemory(elem, Type_);
//Typewriter
PS3.Extension.WriteInt32(elem + HElems.fxBirthTime, (Int32)GetLevelTime());
PS3.Extension.WriteInt32(elem + HElems.fxLetterTime, fxLetterTime);
PS3.Extension.WriteInt32(elem + HElems.fxDecayStartTime, fxDecayStartTime);
PS3.Extension.WriteInt32(elem + HElems.fxDecayDuration, fxDecayDuration);
PS3.SetMemory(elem + HElems.textOffset, SetText(text));
}
public static void doTypeWriterCustom(uint Index, ushort fxLetterTime, ushort fxDecayStartTime, ushort fxDecayDuration)
{
uint elem = Offsets.G_HudElems + ((Index) * 0xB4);
//TypeWriter
PS3.Extension.WriteInt32(elem + HElems.fxBirthTime, (Int32)GetLevelTime());
PS3.Extension.WriteInt32(elem + HElems.fxLetterTime, fxLetterTime);
PS3.Extension.WriteInt32(elem + HElems.fxDecayStartTime, fxDecayStartTime);
PS3.Extension.WriteInt32(elem + HElems.fxDecayDuration, fxDecayDuration);
}
public static uint GetLevelTime()
{
return PS3.Extension.ReadUInt32(Offsets.LevelTime);
}
public static void ChangeTextSub(int index, string txt)
{
string NewText = txt;
byte[] Textz = Hudelem.SetText(NewText);
uint elem = Offsets.G_HudElems + (((uint)index) * 0xB4);
PS3.SetMemory(elem + Hudelem.HElems.textOffset, Textz);
}
public static void ChangeText(int index, string txt)
{
string NewText = txt + "\0";
byte[] Textz = Hudelem.SetText(NewText);
uint elem = Offsets.G_HudElems + ((Convert.ToUInt32(index)) * 0xB4);
PS3.SetMemory(elem + Hudelem.HElems.textOffset, Textz);
}
public static void ChangeFont(int elemIndex, short font)
{
uint elem = Offsets.G_HudElems + ((Convert.ToUInt32(elemIndex)) * 0xB4);
PS3.Extension.WriteInt16(elem + Hudelem.HElems.fontOffset, font);
}
public static void ChangeFontScale(uint elemIndex, double fontScale)
{
uint elem = Offsets.G_HudElems + (elemIndex) * 0xB4;
PS3.Extension.WriteFloat(elem + Hudelem.HElems.fontSizeOffset, (float)fontScale);
}
// Store Icon
//public static void StoreIcon(uint elemIndex, decimal client, decimal shader, decimal width, decimal height, float x, float y, uint align, float sort, decimal r, decimal g, decimal b, decimal a)
// {
// uint elem = Offsets.G_HudElems + ((elemIndex) * 0xB4);
// byte[] ClientID = ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(client)));
// PS3.SetMemory(elem, new byte[0xB4]);
// PS3.SetMemory(elem, new byte[] { 0x00, 0x00, 0x00, 0x00 });
// PS3.SetMemory(elem + HElems.relativeOffset, new byte[] { 0x00, 0x00, 0x00, 0x01 });
// PS3.SetMemory(elem + HElems.relativeOffset - 4, new byte[] { 0x00, 0x00, 0x00, 0x00 });
// PS3.SetMemory(elem + HElems.shaderOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(shader))));
// PS3.SetMemory(elem + HElems.heightOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(height))));
// PS3.SetMemory(elem + HElems.widthOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(width))));
// PS3.SetMemory(elem + HElems.alignOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(align))));
// PS3.SetMemory(elem + HElems.textOffset + 4, ReverseBytes(BitConverter.GetBytes(sort)));
// PS3.SetMemory(elem + HElems.xOffset, ToHexFloat(x));
// PS3.SetMemory(elem + HElems.yOffset, ToHexFloat(y));
// PS3.SetMemory(elem + HElems.colorOffset, RGBA(r, g, b, a));
// PS3.SetMemory(elem + HElems.clientOffset, ClientID);
// PS3.SetMemory(elem + 0xA8, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(client))));
// byte[] Type_ = BitConverter.GetBytes(4);
// Array.Reverse(Type_);
// PS3.SetMemory(elem, Type_);
// }
public static void StoreIcon(uint elemIndex, decimal client, decimal shader, decimal width, decimal height, float x, float y, uint align, float sort, decimal r, decimal g, decimal b, decimal a, string Priority_)
{
byte[] PriorityB = new byte[0];
byte[] PriorityA = new byte[0];
if (Priority_ == "Back")
{
PriorityB = new byte[] { 5 };
PriorityA = new byte[] { 0 };
}
if (Priority_ == "Front")
{
PriorityB = new byte[] { 7 };
PriorityA = new byte[] { 69 };
}
uint elem = 0xF0E10C + ((elemIndex) * 0xB4);
byte[] ClientID = ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(client)));
PS3.SetMemory(elem, new byte[0xB4]);
PS3.SetMemory(elem, new byte[] { 0x00, 0x00, 0x00, 0x00 });
PS3.SetMemory(elem + HElems.relativeOffset, new byte[] { 0x00, 0x00, 0x00, 0x01 });
PS3.SetMemory(elem + HElems.relativeOffset - 4, new byte[] { 0x00, 0x00, 0x00, 0x00 });
PS3.SetMemory(elem + HElems.shaderOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(shader))));
PS3.SetMemory(elem + HElems.heightOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(height))));
PS3.SetMemory(elem + HElems.widthOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(width))));
PS3.SetMemory(elem + HElems.alignOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(align))));
PS3.SetMemory(elem + HElems.textOffset + 4, ReverseBytes(BitConverter.GetBytes(sort)));
PS3.SetMemory(elem + HElems.xOffset, ToHexFloat(x));
PS3.SetMemory(elem + 0x88, PriorityA);
PS3.SetMemory(elem + 0xa7, PriorityB);
PS3.SetMemory(elem + HElems.yOffset, ToHexFloat(y));
PS3.SetMemory(elem + HElems.colorOffset, RGBA(r, g, b, a));
PS3.SetMemory(elem + HElems.clientOffset, ClientID);
PS3.SetMemory(elem + 0x2b, new byte[] { 0x5 });
PS3.SetMemory(elem + 0xA8, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(client))));
byte[] Type_ = BitConverter.GetBytes(4);
Array.Reverse(Type_);
PS3.SetMemory(elem, Type_);
}
public static void ChangeWidth(int elemIndex, short width)
{
uint elem = Offsets.G_HudElems + ((Convert.ToUInt32(elemIndex)) * 0xB4);
PS3.Extension.WriteInt16(elem + HElems.widthOffset, width);
}
public static void ChangeText(uint index, string txt, int xAxis)
{
string NewText = txt + "\0";
byte[] Textz = Hudelem.SetText(NewText);
uint elem = Offsets.G_HudElems + ((index) * 0xB4);
byte[] newX = new byte[4];
newX = BitConverter.GetBytes(Convert.ToSingle(xAxis));
Array.Reverse(newX);
PS3.SetMemory(elem + HElems.xOffset, newX);
PS3.SetMemory(elem + HElems.textOffset, Textz);
}
public static void ChangeAlpha(int index, int r, int g, int b, int a)
{
uint elem = Offsets.G_HudElems + (((uint)index) * 0xB4);
PS3.SetMemory(elem + HElems.colorOffset, RGBA(r, g, b, a));
}
public static void ChangeTextSize(uint index, double fontScale_)
{
byte[] fontScale = new byte[4];
fontScale = BitConverter.GetBytes(Convert.ToSingle(fontScale_));
Array.Reverse(fontScale);
PS3.SetMemory(Offsets.G_HudElems + (index * 0xB4) + 20, fontScale);
}
public static void DestroyAll()
{
PS3.SetMemory(Offsets.G_HudElems, new byte[184320]);
}
public static void DestroyElem(int index)
{
uint elem = Offsets.G_HudElems + (((uint)index) * 0xB4);
PS3.SetMemory(elem, new byte[0xB4]);
}
public static void SetGlowText(uint elemIndex, int client, string Text, decimal font, float fontScale, float x, float y, uint align, float sort, decimal r, decimal g, decimal b, decimal a, decimal r1, decimal g1, decimal b1, decimal a1)
{
string setText = Text + "\0";
byte[] TextIndex = SetText(setText);
uint elem = Offsets.G_HudElems + ((elemIndex) * 0xB4);
byte[] ClientID = ReverseBytes(BitConverter.GetBytes(client));
PS3.SetMemory(elem, new byte[0xB4]);
PS3.SetMemory(elem, new byte[] { 0x00, 0x00, 0x00, 0x00 });
PS3.SetMemory(elem + HElems.relativeOffset, new byte[] { 0x00, 0x00, 0x00, 0x00, 0x92, 0xFF, 0xFF, 0xFF, 0xFF });
PS3.SetMemory(elem + HElems.relativeOffset - 4, new byte[] { 0x00, 0x00, 0x00, 0x05 });
PS3.SetMemory(elem + Hudelem.HElems.textOffset, TextIndex);
PS3.SetMemory(elem + HElems.fontOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(font))));
PS3.SetMemory(elem + HElems.alignOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(align))));
PS3.SetMemory(elem + HElems.textOffset + 4, ReverseBytes(BitConverter.GetBytes(sort)));
PS3.SetMemory(elem + HElems.fontSizeOffset, ToHexFloat(fontScale));
PS3.SetMemory(elem + HElems.xOffset, ToHexFloat(x));
PS3.SetMemory(elem + HElems.yOffset, ToHexFloat(y));
PS3.SetMemory(elem + HElems.colorOffset, RGBA(r, g, b, a));
PS3.SetMemory(elem + HElems.GlowColor, RGBA(r1, g1, b1, a1));
PS3.SetMemory(elem + HElems.clientOffset, ClientID);
PS3.SetMemory(elem + 0xA8, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(client))));
byte[] Type_ = BitConverter.GetBytes(1);
Array.Reverse(Type_);
PS3.SetMemory(elem, Type_);
}
public static void MoveShaderXY(uint index, float X, float Y)
{
PS3.Extension.WriteFloat(Offsets.G_HudElems + (index * 0xB4) + Hudelem.HElems.xOffset, X);
PS3.Extension.WriteFloat(Offsets.G_HudElems + (index * 0xB4) + Hudelem.HElems.yOffset, Y);
}
public static void MoveShaderY(uint index, float Y)
{
PS3.Extension.WriteFloat(Offsets.G_HudElems + (index * 0xB4) + Hudelem.HElems.yOffset, Y);
}
public static void StoreTextElem(uint elemIndex, int client, string Text, double font, double fontScale, float x, float y, uint align, float sort, decimal r, decimal g, decimal b, decimal a)
{
string setText = Text + "\0";
byte[] TextIndex = SetText(setText);
uint elem = Offsets.G_HudElems + ((elemIndex) * 0xB4);
byte[] ClientID = ReverseBytes(BitConverter.GetBytes(client));
PS3.SetMemory(elem, new byte[0xB4]);
PS3.SetMemory(elem, new byte[] { 0x00, 0x00, 0x00, 0x00 });
PS3.SetMemory(elem + HElems.relativeOffset, new byte[] { 0x00, 0x00, 0x00, 0x00, 0x92, 0xFF, 0xFF, 0xFF, 0xFF });
PS3.SetMemory(elem + HElems.relativeOffset - 4, new byte[] { 0x00, 0x00, 0x00, 0x05 });
PS3.SetMemory(elem + Hudelem.HElems.textOffset, TextIndex);
PS3.Extension.WriteFloat(elem + HElems.fontOffset, (float)font);
PS3.SetMemory(elem + HElems.alignOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(align))));
PS3.SetMemory(elem + HElems.textOffset + 4, ReverseBytes(BitConverter.GetBytes(sort)));
PS3.Extension.WriteFloat(elem + HElems.fontSizeOffset, (float)fontScale);
PS3.SetMemory(elem + HElems.xOffset, ToHexFloat(x));
PS3.SetMemory(elem + HElems.yOffset, ToHexFloat(y));
PS3.SetMemory(elem + HElems.colorOffset, RGBA(r, g, b, a));
PS3.SetMemory(elem + HElems.clientOffset, ClientID);
PS3.SetMemory(elem + 0xA8, ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(client))));
byte[] Type_ = BitConverter.GetBytes(1);
Array.Reverse(Type_);
PS3.SetMemory(elem, Type_);
}
public static void SetGlow(uint elemIndex, decimal r1, decimal g1, decimal b1, decimal a1)
{
uint elem = Offsets.G_HudElems + ((elemIndex) * 0xB4);
PS3.SetMemory(elem + HElems.GlowColor, RGBA(r1, g1, b1, a1));
}
public static void ActivateIndex(Boolean State, int index, int type)
{
uint elem = Offsets.G_HudElems + ((uint)index * 0xB4);
byte[] Type_ = BitConverter.GetBytes(type);
Array.Reverse(Type_);
if (State == true)
{
PS3.SetMemory(elem, Type_);
}
else
{
PS3.SetMemory(elem, new byte[] { 0x00, 0x00, 0x00, 0x00 });
}
}
}
}
#endregion
//Anonymous
public static void Anonymous(int client)
{
Hudelem.doTypeWriter(600 + (32 * (uint)client), Hudelem.HElems.AllClient, "We are Anonymous!!!!!!", 2.2f, 2, 320, 340, 130, 1000, 8000, 255, 255, 255, 255, 0, 0, 0, 0);
Hudelem.StoreIcon(605 + (32 * (uint)client), Hudelem.HElems.AllClient, 1, 200, 200, 320, 180, 0, 0, 255, 255, 255, 255, "Back");//Background (white)
Hudelem.StoreIcon(606 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 66, 22, 253, 111, 0, 0, 32, 32, 32, 255, "Front");//eyebrau left (Black)
Hudelem.StoreIcon(607 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 66, 22, 387, 111, 0, 0, 32, 32, 32, 255, "Front");//eyebrau right (Black)
Hudelem.StoreIcon(608 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 46, 22, 275, 160, 0, 0, 32, 32, 32, 255, "Front");//Eye left (Black)
Hudelem.StoreIcon(609 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 46, 22, 367, 160, 0, 0, 32, 32, 32, 255, "Front");//Eye right (Black)
Hudelem.StoreIcon(610 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 46, 22, 320, 210, 0, 0, 32, 32, 32, 255, "Front");//mustache Center (Black)
Hudelem.StoreIcon(611 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 56, 22, 270, 231, 0, 0, 32, 32, 32, 255, "Front");//mustache Left (Black)
Hudelem.StoreIcon(612 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 56, 22, 371, 231, 0, 0, 32, 32, 32, 255, "Front");//mustache right (Black)
Hudelem.StoreIcon(613 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 22, 22, 231, 210, 0, 0, 32, 32, 32, 255, "Front");//mustache Left top(Black)
Hudelem.StoreIcon(614 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 22, 22, 409, 210, 0, 0, 32, 32, 32, 255, "Front");//mustache right top(Black)
Hudelem.StoreIcon(615 + (32 * (uint)client), Hudelem.HElems.AllClient, 1, 22, 22, 231, 188, 0, 0, 234, 142, 135, 255, "Front");//cheek left (pink)
Hudelem.StoreIcon(616 + (32 * (uint)client), Hudelem.HElems.AllClient, 1, 22, 22, 409, 188, 0, 0, 234, 142, 135, 255, "Front");//cheek right (pink)
Hudelem.StoreIcon(617 + (32 * (uint)client), Hudelem.HElems.AllClient, 1, 86, 22, 320, 253, 0, 0, 234, 142, 135, 255, "Front");//mouth (pink)
Hudelem.StoreIcon(618 + (32 * (uint)client), Hudelem.HElems.AllClient, 2, 22, 46, 320, 286, 0, 0, 32, 32, 32, 255, "Front");//goaty Center (Black)
Hudelem.StoreIcon(619 + (32 * (uint)client), Hudelem.HElems.AllClient, 1, 140, 22, 320, 290, 0, 0, 255, 255, 255, 255, "Back");//Background (white)
Hudelem.StoreIcon(620 + (32 * (uint)client), Hudelem.HElems.AllClient, 1, 100, 22, 320, 302, 0, 0, 255, 255, 255, 255, "Back");//Background (white)
System.Threading.Thread.Sleep(4000);
Hudelem.DestroyElem(605);
Hudelem.DestroyElem(606);
Hudelem.DestroyElem(607);
Hudelem.DestroyElem(60;
Hudelem.DestroyElem(609);
Hudelem.DestroyElem(610);
Hudelem.DestroyElem(611);
Hudelem.DestroyElem(612);
Hudelem.DestroyElem(613);
Hudelem.DestroyElem(614);
Hudelem.DestroyElem(615);
Hudelem.DestroyElem(616);
Hudelem.DestroyElem(617);
Hudelem.DestroyElem(61;
Hudelem.DestroyElem(619);
Hudelem.DestroyElem(620);
}
Copyright © 2024, NextGenUpdate.
All Rights Reserved.