Post: C# Spawn Solid Models & Stairs to Heaven
07-08-2014, 03:54 PM #1
GMTPS3
Do a barrel roll!
(adsbygoogle = window.adsbygoogle || []).push({}); This Community is realy fucked but i make my Release for People like: Mango_Knife, Seb, Bass_Haxor, xJoren Smile
Have Fun using this Smile

Big Thanks to Seb5594 Smile <3





    public static class Spawner
{
#region Read + Write

private static float[] ReadFloatLength(uint Offset, int Length)
{
byte[] buffer = new byte[Length * 4];
PS3.GetMemory(Offset, buffer);
ReverseBytes(buffer);
float[] Array = new float[Length];
for (int i = 0; i < Length; i++)
{
Array[i] = BitConverter.ToSingle(buffer, (Length - 1 - i) * 4);
}
return Array;
}

private static void WriteByte(uint Offset, byte Byte)
{
byte[] buffer = new byte[1];
buffer[0] = Byte;
PS3.SetMemory(Offset, buffer);
}

private static void WriteFloatArray(uint Offset, float[] Array)
{
byte[] buffer = new byte[Array.Length * 4];
for (int Lenght = 0; Lenght < Array.Length; Lenght++)
{
ReverseBytes(BitConverter.GetBytes(Array[Lenght])).CopyTo(buffer, Lenght * 4);
}
PS3.SetMemory(Offset, buffer);
}

private static void WriteInt(uint Offset, int Value)
{
PS3.SetMemory(Offset, ReverseBytes(BitConverter.GetBytes(Value)));
}

private static byte[] ReverseBytes(byte[] inArray)
{
Array.Reverse(inArray);
return inArray;
}

#endregion

public enum Bush : uint//I will seach for these and Release them Smile
{
CarePackage = 2,//com_plasticcase_friendly
Bomb = 3,//com_bomb_objective
Barrel = 11,//com_barrel_benzin
}

public static uint SolidModel(float[] Origin, float[] Angles, string Model = "com_plasticcase_friendly", Bush Index = Bush.CarePackage)
{
uint Entity = (uint)RPC.Call(0x01C058C);//G_Spawn
WriteFloatArray(Entity + 0x138, Origin);//Position
WriteFloatArray(Entity + 0x144, Angles);//Orientation
RPC.Call(0x01BEF5C, Entity, Model);//G_SetModel
RPC.Call(0x01B6F68, Entity); //SP_script_model
RPC.Call(0x002377B8, Entity);//SV_UnlinkEntity
WriteByte(Entity + 0x101, 4);
WriteInt(Entity + 0x8C, (int)Index);
RPC.Call(0x0022925C, Entity);//SV_SetBrushModel
RPC.Call(0x00237848, Entity);//SV_LinkEntity
return Entity;
}

public static float[] GetOrigin(uint Client)
{
return ReadFloatLength(0x110a29c + (Client * 0x3980), 3);
}

public static float[] GetAngles(uint Client)
{
return ReadFloatLength(0x110a3d8 + (Client * 0x3980), 3);
}

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 };
}

private static uint[] STHIndexes;
public static void StairsToHeaven(uint Client, uint Stairs = 41, int Time = 200)//When you use STH you can Freeze dont make it to Fast 200 is Good time and dont to Much Staris 41 Stairs = 2 Rounds Smile
{
uint[] Index = new uint[Stairs];
float[] Origin = GetOrigin(Client);
float[] Angles = new float[3];
for (uint i = 0; i < Stairs; )
{
Index[i] = SolidModel(AnglesToForward(Origin, Angles, 60), Angles);
Angles[1] += 18;
Origin[2] += 10;
i++;
Thread.Sleep(Time);
}
STHIndexes = Index;
}

public static void RemoveSTH()
{
for (uint i = 0; i < STHIndexes.Length; i++)
PS3.SetMemory(STHIndexes[i] + 0xF, new byte[]{ 0x2});
}
}


Spawn a Create:
    
uint Client = Put Client Number here!;
float[] Origin = Spawner.AnglesToForward(Spawner.GetOrigin(Client), Spawner.GetAngles(Client),80);
Origin[2] += 40;//
Spawner.SolidModel(Origin, new float[] { 0, 0, 0 });


Spawn the Stairs to Heaven:
    
Spawner.StairsToHeaven(Put Client Number here!);


Remove the STH:
    Spawner.RemoveSTH();
(adsbygoogle = window.adsbygoogle || []).push({});

The following 24 users say thank you to GMTPS3 for this useful post:

-JM-, ▶DaOriginal209◀, Akaipwn, BaSs_HaXoR, FusionIsDaName, iifire, Joren, jwm614, kiwi_modz, LaRip8, Mango_Knife, moxl, nay1995, noobRus, RaGE_LoLo69, RTE, seanhellen, Swaqq, Laser, Fatality, xHostModer, xPAQz, xSyntheticPatch
07-10-2014, 03:41 PM #11
-JM-
Space Ninja
Originally posted by GMTPS3 View Post
This Community is realy fucked but i make my Release for People like: Mango_Knife, Seb, Bass_Haxor, xJoren Smile
Have Fun using this Smile

Big Thanks to Seb5594 Smile <3





    public static class Spawner
{
#region Read + Write

private static float[] ReadFloatLength(uint Offset, int Length)
{
byte[] buffer = new byte[Length * 4];
PS3.GetMemory(Offset, buffer);
ReverseBytes(buffer);
float[] Array = new float[Length];
for (int i = 0; i < Length; i++)
{
Array[i] = BitConverter.ToSingle(buffer, (Length - 1 - i) * 4);
}
return Array;
}

private static void WriteByte(uint Offset, byte Byte)
{
byte[] buffer = new byte[1];
buffer[0] = Byte;
PS3.SetMemory(Offset, buffer);
}

private static void WriteFloatArray(uint Offset, float[] Array)
{
byte[] buffer = new byte[Array.Length * 4];
for (int Lenght = 0; Lenght < Array.Length; Lenght++)
{
ReverseBytes(BitConverter.GetBytes(Array[Lenght])).CopyTo(buffer, Lenght * 4);
}
PS3.SetMemory(Offset, buffer);
}

private static void WriteInt(uint Offset, int Value)
{
PS3.SetMemory(Offset, ReverseBytes(BitConverter.GetBytes(Value)));
}

private static byte[] ReverseBytes(byte[] inArray)
{
Array.Reverse(inArray);
return inArray;
}

#endregion

public enum Bush : uint//I will seach for these and Release them Smile
{
CarePackage = 2,//com_plasticcase_friendly
Bomb = 3,//com_bomb_objective
Barrel = 11,//com_barrel_benzin
}

public static uint SolidModel(float[] Origin, float[] Angles, string Model = "com_plasticcase_friendly", Bush Index = Bush.CarePackage)
{
uint Entity = (uint)RPC.Call(0x01C058C);//G_Spawn
WriteFloatArray(Entity + 0x138, Origin);//Position
WriteFloatArray(Entity + 0x144, Angles);//Orientation
RPC.Call(0x01BEF5C, Entity, Model);//G_SetModel
RPC.Call(0x01B6F68, Entity); //SP_script_model
RPC.Call(0x002377B8, Entity);//SV_UnlinkEntity
WriteByte(Entity + 0x101, 4);
WriteInt(Entity + 0x8C, (int)Index);
RPC.Call(0x0022925C, Entity);//SV_SetBrushModel
RPC.Call(0x00237848, Entity);//SV_LinkEntity
return Entity;
}

public static float[] GetOrigin(uint Client)
{
return ReadFloatLength(0x110a29c + (Client * 0x3980), 3);
}

public static float[] GetAngles(uint Client)
{
return ReadFloatLength(0x110a3d8 + (Client * 0x3980), 3);
}

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 };
}

private static uint[] STHIndexes;
public static void StairsToHeaven(uint Client, uint Stairs = 41, int Time = 200)//When you use STH you can Freeze dont make it to Fast 200 is Good time and dont to Much Staris 41 Stairs = 2 Rounds Smile
{
uint[] Index = new uint[Stairs];
float[] Origin = GetOrigin(Client);
float[] Angles = new float[3];
for (uint i = 0; i < Stairs; )
{
Index[i] = SolidModel(AnglesToForward(Origin, Angles, 60), Angles);
Angles[1] += 18;
Origin[2] += 10;
i++;
Thread.Sleep(Time);
}
STHIndexes = Index;
}

public static void RemoveSTH()
{
for (uint i = 0; i < STHIndexes.Length; i++)
PS3.SetMemory(STHIndexes[i], new byte[0x280]);
}
}


Spawn a Create:
    
uint Client = Put Client Number here!;
float[] Origin = Spawner.AnglesToForward(Spawner.GetOrigin(Client), Spawner.GetAngles(Client),80);
Origin[2] += 40;//
Spawner.SolidModel(Origin, new float[] { 0, 0, 0 });


Spawn the Stairs to Heaven:
    
Spawner.StairsToHeaven(Put Client Number here!);


Remove the STH:
    Spawner.RemoveSTH();

Kudos this is awesome wow

The following user thanked -JM- for this useful post:

GMTPS3
07-10-2014, 10:49 PM #12
kiwi_modz
I defeated!
Originally posted by GMTPS3 View Post
You mean the Model ? Happy xD


Haha yeah this would really be the funniest thing putting a fucking table on someone's head haha

The following user thanked kiwi_modz for this useful post:

GMTPS3
07-11-2014, 12:12 AM #13
GMTPS3
Do a barrel roll!
Originally posted by ResistTheKiwi View Post
Haha yeah this would really be the funniest thing putting a fucking table on someone's head haha

Yes its to Funny when you put a Chair or a Chicken on someone hahah
i changed the Model of the RiotShield Happy

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

FusionIsDaName, kiwi_modz
07-11-2014, 06:25 AM #14
kiwi_modz
I defeated!
Originally posted by GMTPS3 View Post
Yes its to Funny when you put a Chair or a Chicken on someone hahah
i changed the Model of the RiotShield Happy


Hahaha I like the sound of that bro Smile well I hope to see it on NGU some day otherwise I still have some researching to do haha thanks again for this release any how.

The following user thanked kiwi_modz for this useful post:

GMTPS3
07-11-2014, 07:16 AM #15
makeabce
I defeated!
Originally posted by GMTPS3 View Post
This Community is realy fucked but i make my Release for People like: Mango_Knife, Seb, Bass_Haxor, xJoren Smile
Have Fun using this Smile

Big Thanks to Seb5594 Smile <3





    public static class Spawner
{
#region Read + Write

private static float[] ReadFloatLength(uint Offset, int Length)
{
byte[] buffer = new byte[Length * 4];
PS3.GetMemory(Offset, buffer);
ReverseBytes(buffer);
float[] Array = new float[Length];
for (int i = 0; i < Length; i++)
{
Array[i] = BitConverter.ToSingle(buffer, (Length - 1 - i) * 4);
}
return Array;
}

private static void WriteByte(uint Offset, byte Byte)
{
byte[] buffer = new byte[1];
buffer[0] = Byte;
PS3.SetMemory(Offset, buffer);
}

private static void WriteFloatArray(uint Offset, float[] Array)
{
byte[] buffer = new byte[Array.Length * 4];
for (int Lenght = 0; Lenght < Array.Length; Lenght++)
{
ReverseBytes(BitConverter.GetBytes(Array[Lenght])).CopyTo(buffer, Lenght * 4);
}
PS3.SetMemory(Offset, buffer);
}

private static void WriteInt(uint Offset, int Value)
{
PS3.SetMemory(Offset, ReverseBytes(BitConverter.GetBytes(Value)));
}

private static byte[] ReverseBytes(byte[] inArray)
{
Array.Reverse(inArray);
return inArray;
}

#endregion

public enum Bush : uint//I will seach for these and Release them Smile
{
CarePackage = 2,//com_plasticcase_friendly
Bomb = 3,//com_bomb_objective
Barrel = 11,//com_barrel_benzin
}

public static uint SolidModel(float[] Origin, float[] Angles, string Model = "com_plasticcase_friendly", Bush Index = Bush.CarePackage)
{
uint Entity = (uint)RPC.Call(0x01C058C);//G_Spawn
WriteFloatArray(Entity + 0x138, Origin);//Position
WriteFloatArray(Entity + 0x144, Angles);//Orientation
RPC.Call(0x01BEF5C, Entity, Model);//G_SetModel
RPC.Call(0x01B6F68, Entity); //SP_script_model
RPC.Call(0x002377B8, Entity);//SV_UnlinkEntity
WriteByte(Entity + 0x101, 4);
WriteInt(Entity + 0x8C, (int)Index);
RPC.Call(0x0022925C, Entity);//SV_SetBrushModel
RPC.Call(0x00237848, Entity);//SV_LinkEntity
return Entity;
}

public static float[] GetOrigin(uint Client)
{
return ReadFloatLength(0x110a29c + (Client * 0x3980), 3);
}

public static float[] GetAngles(uint Client)
{
return ReadFloatLength(0x110a3d8 + (Client * 0x3980), 3);
}

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 };
}

private static uint[] STHIndexes;
public static void StairsToHeaven(uint Client, uint Stairs = 41, int Time = 200)//When you use STH you can Freeze dont make it to Fast 200 is Good time and dont to Much Staris 41 Stairs = 2 Rounds Smile
{
uint[] Index = new uint[Stairs];
float[] Origin = GetOrigin(Client);
float[] Angles = new float[3];
for (uint i = 0; i < Stairs; )
{
Index[i] = SolidModel(AnglesToForward(Origin, Angles, 60), Angles);
Angles[1] += 18;
Origin[2] += 10;
i++;
Thread.Sleep(Time);
}
STHIndexes = Index;
}

public static void RemoveSTH()
{
for (uint i = 0; i < STHIndexes.Length; i++)
PS3.SetMemory(STHIndexes[i], new byte[0x280]);
}
}


Spawn a Create:
    
uint Client = Put Client Number here!;
float[] Origin = Spawner.AnglesToForward(Spawner.GetOrigin(Client), Spawner.GetAngles(Client),80);
Origin[2] += 40;//
Spawner.SolidModel(Origin, new float[] { 0, 0, 0 });


Spawn the Stairs to Heaven:
    
Spawner.StairsToHeaven(Put Client Number here!);


Remove the STH:
    Spawner.RemoveSTH();


Awesome...now, create way to save the buildings. Like in mw2 infected strongholds etc.
Would be awesome for mw3 infected!
07-11-2014, 02:04 PM #16
GMTPS3
Do a barrel roll!
Originally posted by ResistTheKiwi View Post
Hahaha I like the sound of that bro Smile well I hope to see it on NGU some day otherwise I still have some researching to do haha thanks again for this release any how.


Yes you will see it in Some days but i first want to make an Hide 'n' Seek because i can change all Player Models to None but on an other way its nice and work without Heads and Guns they floating arround :P

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

Sabotage, kiwi_modz
07-11-2014, 02:19 PM #17
kiwi_modz
I defeated!
Originally posted by GMTPS3 View Post
Yes you will see it in Some days but i first want to make an Hide 'n' Seek because i can change all Player Models to None but on an other way its nice and work without Heads and Guns they floating arround :P


love the direction your heading bro Smile can't wait :p and by the way, you can spawn "400" of

SolidModel(AnglesToForward(Origin, Angles, 60), Angles, "com_plasticcase_beige_big", 2);

on dome =3

The following user thanked kiwi_modz for this useful post:

GMTPS3
07-13-2014, 10:03 AM #18
xPAQz
Bounty hunter
alter, nice <3

The following user thanked xPAQz for this useful post:

GMTPS3
07-13-2014, 03:52 PM #19
Is it possible to replace bullet models with this method? I was thinking How About replacing model from c4 with à chicken, explosive chickens Happy

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo