Quantcast
Channel: NextGenUpdate
Viewing all articles
Browse latest Browse all 27691

[C#] Spawn Solid Models (1.06)

$
0
0
Hey NGU,

Since some ppl figured out how spawning Model's work and how to make them solid, i show you how to make it for your own Tool / Project using PS3Lib v4 by iMCSx.

Requirements:
[RELEASE] PS3Lib v4.2 - DEX/CEX
RPC DLL for all updates - Source code included!
Brain :needa:

Add this to your Project/Class:

Code:


        public static Int32 G_Spawn()
        {
            return RPC.Call(0x288710);
        }
        public static Int32 SpawnCrate(String MapName, Single X, Single Y, Single Z, Single Forward = 0, Single Yaw = 0, Single Pitch = 0)
        {
            return SpawnModel(MapName, "carepackage_friendly_iw6", X, Y, Z, Forward, Yaw, Pitch);
        }
        public static Int32 SpawnModel(String MapName, String ModelName, Single X, Single Y, Single Z, Single Forward = 0, Single Yaw = 0, Single Pitch = 0)
        {
            Int32 Ent = G_Spawn();
            Byte[] buffer = new Byte[24];
            ArrayBuilder Build = new ArrayBuilder(buffer);
            Build.Write.SetFloat(0, X);
            Build.Write.SetFloat(4, Y);
            Build.Write.SetFloat(8, Z);
            Build.Write.SetFloat(12, Forward);
            Build.Write.SetFloat(16, Yaw);
            Build.Write.SetFloat(20, Pitch);
            PS3.Extensions.WriteBytes((UInt32)Ent + 0x138, buffer);
            RPC.Call(0x00287304, Ent, ModelName);
            RPC.Call(0x0027E040, Ent);
            MakeSolid(Ent, MapName);
            return Ent;
        }
        private static void MakeSolid(Int32 Entity, String Mapname)
        {
            RPC.Call(0x00321950, Entity);
            PS3.Extensions.WriteByte((UInt32)Entity + 0x101, 4);
            UInt32 Brush = 0;
            switch (Mapname)
            {
                case "mp_prisonbreak":
                    Brush = G_Entity(0x38);
                    break;
                case "mp_dart":
                    Brush = G_Entity(0x6B);
                    break;
                case "mp_lonestar":
                    Brush = G_Entity(0x6A);
                    break;
                case "mp_frag":
                    Brush = G_Entity(0x55);
                    break;
                case "mp_snow":
                    Brush = G_Entity(0x56);
                    break;
                case "mp_fahrenheit":
                    Brush = G_Entity(0xA8);
                    break;
                case "mp_hasima":
                    Brush = G_Entity(0x63);
                    break;
                case "mp_warhawk":
                    Brush = G_Entity(0x45);
                    break;
                case "mp_sovereign":
                    Brush = G_Entity(0x72);
                    break;
                case "mp_zebra":
                    Brush = G_Entity(0x44);
                    break;
                case "mp_skeleton":
                    Brush = G_Entity(0x3A);
                    break;
                case "mp_chasm":
                    Brush = G_Entity(0x49);
                    break;
                case "mp_flooded":
                    Brush = G_Entity(0x57);
                    break;
                case "mp_strikezone":
                    Brush = G_Entity(0x57);
                    break;
            }
            PS3.Extensions.WriteUInt32((UInt32)Entity + 0x8C, PS3.Extensions.ReadUInt32(Brush + 0x8C));
            RPC.Call(0x005AA2A4, Entity);
            Or_Int32((UInt32)Entity + 0x11C, PS3.Extensions.ReadInt32((UInt32)Entity + 0x11C));
            RPC.Call(0x003219D0, Entity);
        }
        public static UInt32 G_Entity(Int32 clientIndex)
        {
            return 0x00DD2C80 + ((UInt32)clientIndex * 0x280);
        }
        public static void Or_Int32(UInt32 address, Int32 input)
        {
            Int32 or = PS3.Extensions.ReadInt32(address);
            or |= input;
            PS3.Extensions.WriteInt32(address, or);
        }

I have created a example code on how to use it (thx to iMCSx for his nice Array Builder)
(it should spawn a Carepackage on your position)

Code:

                public static void TestSpawn()
                {
                        Byte[] MyOrigin = PS3.Extension.ReadBytes(G_Entity(0) + 0x138, 12);
                        ArrayBuilder build = new ArrayBuilder(MyOrigin);
                        Single[] origin = new Single[3];
                        for(int i = 0; i < 3; i++)
                                origin[i] = build.GetFloat(i * 4);
                        SpawnCrate("mp_prisonbreak", origin[0], origin[1], origin[2]);
                }

Have fun with creating bunker's and other fun stuff for your Tool/Modmenu

Credits:
Therifboy and seb5594 - Original PS3 Founders of this
Hacksource from Se7ensins - Brush Offsets for some Maps
iMCSx - PS3Lib
Activision - for their shitty game :plank:

Viewing all articles
Browse latest Browse all 27691

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>