Post: [C#] Spawn Solid Models (1.07)
01-09-2014, 02:33 AM #1
seb5594
Proud Former Admin
(adsbygoogle = window.adsbygoogle || []).push({});
Originally posted by another user
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:
You must login or register to view this content.
You must login or register to view this content. (Fixed RPC, thanks to Shark for posting it)
Brain Needa

Add this to your Project/Class:

    

public static Int32 G_Spawn()
{
return RPC.Call(0x0028A170);
}
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(0x00288D64, Ent, ModelName);
RPC.Call(0x0027FA28, Ent);
MakeSolid(Ent, MapName);
return Ent;
}
private static void MakeSolid(Int32 Entity, String Mapname)
{
RPC.Call(0x00323A68, Entity);
PS3.Extensions.WriteByte((UInt32)Entity + 0x101, 4);
UInt32 Brush = 0;
switch (Mapname)
{
case "mp_prisonbreak":
Brush = G_Entity(0x3Cool Man (aka Tustin);
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(0xACool Man (aka Tustin);
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(0x00500010, Entity);
Or_Int32((UInt32)Entity + 0x11C, PS3.Extensions.ReadInt32((UInt32)Entity + 0x11C));
RPC.Call(0x00323AE8, Entity);
}
public static UInt32 G_Entity(Int32 clientIndex)
{
return 0xDE1C00+ ((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)

    		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 & help with the ArrayBuilder Smile
Activision - for their shitty game :plank:

Little list of working models by iBullet1
Originally posted by another user
prop_suitcase_bomb
prop_flag_neutral
prop_ballistic_vest_iw6
prop_ballistic_vest_iw6_bombsquad
prop_mp_max_ammo_pickup
mp_satcom_obj
mp_satcom_obj_red
mp_satcom_bombsquad
com_metal_briefcase_intel
mp_weapon_crate_bombsquad
mp_trophy_system_iw6_bombsquad
mp_trophy_system_iw6
mp_body_juggernaut_light_black
head_juggernaut_light_black
mp_body_infected_a
head_mp_infected
mp_body_us_rangers_assault_a_arctic
mp_body_us_rangers_assault_a_desert
mp_body_us_rangers_assault_a_elite
mp_body_us_rangers_assault_a_urban
mp_body_us_rangers_assault_a_woodland
viewhands_us_rangers_arctic
viewhands_us_rangers_desert
viewhands_us_rangers_elite
viewhands_us_rangers_urban
viewhands_us_rangers_woodland
Last edited by seb5594 ; 02-14-2014 at 01:56 AM. Reason: Updated for 1.07

The following 23 users say thank you to seb5594 for this useful post:

{H} | Exception, $ticky, AlexNGU, Bucko, clark1226, ErasedDev, EdiTzZ, Harry, iMoDz-Baptiste, ImPiffHD, ItsLollo1000, Mango_Knife, micha112, milky4444, MODZ4FUN420, MoTmrD-, MrShark, John, SnaY, Source Code, WeJailbreakYou, Winter, Fatality
02-14-2014, 01:57 AM #20
seb5594
Proud Former Admin
Originally posted by RatchetBooty View Post
Ok, I have to agree with you on some of the stuff that he releases doesn't work. His get server information works but all the offsets in his entity code are wrong...
But he shouldn't be spoon feeding the community, so it's already enough that he's given us the code. Offsets aren't hard to find.

EDIT: nvm only his g_entity offset is wrong


thanks for telling me it with gentity not noticed. i have update my code Winky Winky
Thanks again RatchetBooty!

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

RatchetBooty, Winter
02-14-2014, 02:39 AM #21
SC58
Former Staff
You must login or register to view this content.

Maybe some one should use these :p
02-14-2014, 03:23 AM #22
RatchetBooty
Former Staff
Originally posted by SC58 View Post
You must login or register to view this content.

Maybe some one should use these :p


wow thanks SC58 Winky Winky I'll try something out with that!
02-14-2014, 11:20 AM #23
Hey

Seb5549 Please Make RPC BO1 thx
02-14-2014, 07:41 PM #24
Mango_Knife
In my man cave
Originally posted by SC58 View Post
You must login or register to view this content.

Maybe some one should use these :p


Amm why not?
02-14-2014, 08:55 PM #25
SC58
Former Staff
Originally posted by MoTmrD
Hey

Seb5549 Please Make RPC BO1 thx


You must login or register to view this content.

The following 3 users say thank you to SC58 for this useful post:

MoTmrD-, TreyarchTragedy
02-15-2014, 06:37 AM #26
Mango_Knife
In my man cave
Originally posted by SC58 View Post
You must login or register to view this content.


mm
Will defenetly use this, thanks Awesome face
04-02-2014, 04:19 PM #27
TreyarchTragedy
Can’t trickshot me!
Originally posted by SC58 View Post
You must login or register to view this content.


I keep getting freezes when trying to call a function using this RPC, could you please give me an example function so I can see where I went wrong?

Help is much appreciated :yes:


EDIT: Tested a simple function (Sv_FastRestart_f) and it worked fine.. This means I got the parameters wrong. A few examples of other functions would be great! Thanks.
Last edited by TreyarchTragedy ; 04-02-2014 at 04:35 PM.
06-01-2014, 03:38 PM #28
hello seb5594 could you help me with the offsets i need them but for the pc version and yes i know how to call the functions please help me,

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo