public enum Brush : uint
{
CarePackage = 2,
Bomb = 3,
Barrel = 11
}
public static uint SpawnModel(float[] Origin, float[] Angles, string Model = "com_plasticcase_friendly", Brush Index = Brush.CarePackage)
{
uint Entity = (uint)RPC.Call(0x01C058C);
PS3.Write.Float(Entity + 0x138, Origin);
PS3.Write.Float(Entity + 0x144, Angles);
RPC.Call(0x01BEF5C, Entity, Model);
RPC.Call(0x01B6F68, Entity);
RPC.Call(0x002377B8, Entity);
PS3.Write.Byte(Entity + 0x101, new byte[] { 0x4 });
PS3.Write.Byte(Entity + 0x8C, new byte[] { (byte)Index });
RPC.Call(0x0022925C, Entity);
RPC.Call(0x00237848, Entity);
return Entity;
}
public static float[] AnglesToForward(float[] Origin, float[] Angles, uint diff)
{
float num = ((float)Math.Sin((Angles[0] * Math.PI) / 180)) * diff;
float num1 = (float)Math.Sqrt(((diff * diff) - (num * num)));
float num2 = ((float)Math.Sin((Angles[1] * Math.PI) / 180)) * num1;
float num3 = ((float)Math.Cos((Angles[1] * Math.PI) / 180)) * num1;
return new float[] { Origin[0] + num3, Origin[1] + num2, Origin[2] - num };
}
public static void SpawnSkyText(int Client, int height)
{
float[] myOrigin = PS3.Read.Float(0x110a29c + ((uint)Client * 0x3980), 3);
float[] myAngles = PS3.Read.Float(0x110a3d8 + ((uint)Client * 0x3980), 3);
foreach (Vertex vert in BMP.vertices)
{
int NewX = vert.X * 30;
int NewY = vert.Y * 30;
SpawnModel(new float[] { myOrigin[0] + NewX, myOrigin[1] + NewY, height }, AnglesToForward(myOrigin, myAngles, 60));
}
System.Threading.Thread.Sleep(250);
}
public class Vertex
{
public Vertex(int i, int j)
{
this.X = i;
this.Y = j;
}
public int X { get; set; }
public int Y { get; set; }
}
private const double BW_THRESHOLD = 0.5;
private static Color colorBlack = Color.FromArgb(255, 0, 0, 0);
private static Color colorWhite = Color.FromArgb(255, 255, 255, 255);
private static Bitmap originalImage;
public static List<Entity.Vertex> vertices = new List<Entity.Vertex>();
public static OpenFileDialog openFileDialog1 = new OpenFileDialog();
public static void LoadBMP()
{
openFileDialog1.Filter = "24-bit BMP|*.bmp";
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
originalImage = new Bitmap(openFileDialog1.FileName.ToString());
Bitmap imgSrc = new Bitmap(originalImage);
Bitmap imgOut = new Bitmap(imgSrc.Width, imgSrc.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
imgOut = Img2BW(imgSrc);
}
}
private static Bitmap Img2BW(Bitmap imgSrc)
{
int width = imgSrc.Width;
int height = imgSrc.Height;
Color pixel;
Bitmap imgOut = new Bitmap(imgSrc);
for (int row = 0; row < height - 1; row++)
{
for (int col = 0; col < width - 1; col++)
{
pixel = imgSrc.GetPixel(col, row);
if (pixel == colorBlack)
{
vertices.Add(new Entity.Vertex(col, row));
imgOut.SetPixel(col, row, colorBlack);
}
else
{
imgOut.SetPixel(col, row, colorWhite);
}
}
}
return imgOut;
}
class Entity
{
public enum Brush : uint
{
CarePackage = 2,
Bomb = 3,
Barrel = 11
}
public static uint SpawnModel(float[] Origin, float[] Angles, string Model = "com_plasticcase_friendly", Brush Index = Brush.CarePackage)
{
uint Entity = (uint)RPC.Call(0x01C058C);
PS3.Write.Float(Entity + 0x138, Origin);
PS3.Write.Float(Entity + 0x144, Angles);
RPC.Call(0x01BEF5C, Entity, Model);
RPC.Call(0x01B6F68, Entity);
RPC.Call(0x002377B8, Entity);
PS3.Write.Byte(Entity + 0x101, new byte[] { 0x4 });
PS3.Write.Byte(Entity + 0x8C, new byte[] { (byte)Index });
RPC.Call(0x0022925C, Entity);
RPC.Call(0x00237848, Entity);
return Entity;
}
public static float[] AnglesToForward(float[] Origin, float[] Angles, uint diff)
{
float num = ((float)Math.Sin((Angles[0] * Math.PI) / 180)) * diff;
float num1 = (float)Math.Sqrt(((diff * diff) - (num * num)));
float num2 = ((float)Math.Sin((Angles[1] * Math.PI) / 180)) * num1;
float num3 = ((float)Math.Cos((Angles[1] * Math.PI) / 180)) * num1;
return new float[] { Origin[0] + num3, Origin[1] + num2, Origin[2] - num };
}
public static void SpawnSkyText(int Client, int height)
{
float[] myOrigin = PS3.Read.Float(0x110a29c + ((uint)Client * 0x3980), 3);
float[] myAngles = PS3.Read.Float(0x110a3d8 + ((uint)Client * 0x3980), 3);
foreach (Vertex vert in BMP.vertices)
{
int NewX = vert.X * 30;
int NewY = vert.Y * 30;
SpawnModel(new float[] { myOrigin[0] + NewX, myOrigin[1] + NewY, height }, AnglesToForward(myOrigin, myAngles, 60));
}
System.Threading.Thread.Sleep(250);
}
public class Vertex
{
public Vertex(int i, int j)
{
this.X = i;
this.Y = j;
}
public int X { get; set; }
public int Y { get; set; }
}
}
public enum Brush : uint
{
CarePackage = 2,
Bomb = 3,
Barrel = 11
}
public static uint SpawnModel(float[] Origin, float[] Angles, string Model = "com_plasticcase_friendly", Brush Index = Brush.CarePackage)
{
uint Entity = (uint)RPC.Call(0x01C058C);
PS3.Write.Float(Entity + 0x138, Origin);
PS3.Write.Float(Entity + 0x144, Angles);
RPC.Call(0x01BEF5C, Entity, Model);
RPC.Call(0x01B6F68, Entity);
RPC.Call(0x002377B8, Entity);
PS3.Write.Byte(Entity + 0x101, new byte[] { 0x4 });
PS3.Write.Byte(Entity + 0x8C, new byte[] { (byte)Index });
RPC.Call(0x0022925C, Entity);
RPC.Call(0x00237848, Entity);
return Entity;
}
public static float[] AnglesToForward(float[] Origin, float[] Angles, uint diff)
{
float num = ((float)Math.Sin((Angles[0] * Math.PI) / 180)) * diff;
float num1 = (float)Math.Sqrt(((diff * diff) - (num * num)));
float num2 = ((float)Math.Sin((Angles[1] * Math.PI) / 180)) * num1;
float num3 = ((float)Math.Cos((Angles[1] * Math.PI) / 180)) * num1;
return new float[] { Origin[0] + num3, Origin[1] + num2, Origin[2] - num };
}
public static void SpawnSkyText(int Client, int height)
{
float[] myOrigin = PS3.Read.Float(0x110a29c + ((uint)Client * 0x3980), 3);
float[] myAngles = PS3.Read.Float(0x110a3d8 + ((uint)Client * 0x3980), 3);
foreach (Vertex vert in BMP.vertices)
{
int NewX = vert.X * 30;
int NewY = vert.Y * 30;
SpawnModel(new float[] { myOrigin[0] + NewX, myOrigin[1] + NewY, height }, AnglesToForward(myOrigin, myAngles, 60));
}
System.Threading.Thread.Sleep(250);
}
public class Vertex
{
public Vertex(int i, int j)
{
this.X = i;
this.Y = j;
}
public int X { get; set; }
public int Y { get; set; }
}
private const double BW_THRESHOLD = 0.5;
private static Color colorBlack = Color.FromArgb(255, 0, 0, 0);
private static Color colorWhite = Color.FromArgb(255, 255, 255, 255);
private static Bitmap originalImage;
public static List vertices = new List();
public static OpenFileDialog openFileDialog1 = new OpenFileDialog();
public static void LoadBMP()
{
openFileDialog1.Filter = "24-bit BMP|*.bmp";
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
originalImage = new Bitmap(openFileDialog1.FileName.ToString());
Bitmap imgSrc = new Bitmap(originalImage);
Bitmap imgOut = new Bitmap(imgSrc.Width, imgSrc.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
imgOut = Img2BW(imgSrc);
}
}
private static Bitmap Img2BW(Bitmap imgSrc)
{
int width = imgSrc.Width;
int height = imgSrc.Height;
Color pixel;
Bitmap imgOut = new Bitmap(imgSrc);
for (int row = 0; row < height - 1; row++)
{
for (int col = 0; col < width - 1; col++)
{
pixel = imgSrc.GetPixel(col, row);
if (pixel == colorBlack)
{
vertices.Add(new Entity.Vertex(col, row));
imgOut.SetPixel(col, row, colorBlack);
}
else
{
imgOut.SetPixel(col, row, colorWhite);
}
}
}
return imgOut;
}
Copyright © 2024, NextGenUpdate.
All Rights Reserved.