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
01-09-2014, 11:21 PM #11
{H} | Exception
Error… Cat invasion!
Originally posted by iBullet1 View Post
Oi Seb, MATE, you got a list to props and shit? Carepackage, some flags and a dog aren't cool enough to make an entire base out of, I wanna add freaking helichoppers and shit and make it all special as fuark mate, rrrriiight?


You must login or register to view this content. Just use dis for the string :]
01-10-2014, 12:19 AM #12
iBullet1
Treasure hunter
Originally posted by H
You must login or register to view this content. Just use dis for the string :]

Fuck yeah, thanks mate.

How would I spawn in vehicles?

I've tried replacing: 'entity(com_plasticcase_green_big_us_dirt, -1462.992, 812.3537, 1285, 0, 90, 0);'
with 'entity(veh_apache_bodypiece02_1s, -1462.992, 812.3537, 1285, 0, 90, 0);'

but nothing spawns, assuming because it's not an entity, is it possible to spawn these objects though?


Also, found ones that seem to work
    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 iBullet1 ; 01-10-2014 at 01:37 AM.

The following user thanked iBullet1 for this useful post:

01-29-2014, 12:24 AM #13
seb5594
Proud Former Admin
Originally posted by iBullet1 View Post
Fuck yeah, thanks mate.

How would I spawn in vehicles?

I've tried replacing: 'entity(com_plasticcase_green_big_us_dirt, -1462.992, 812.3537, 1285, 0, 90, 0);'
with 'entity(veh_apache_bodypiece02_1s, -1462.992, 812.3537, 1285, 0, 90, 0);'

but nothing spawns, assuming because it's not an entity, is it possible to spawn these objects though?


Also, found ones that seem to work
    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


Added the Models to the thread, thank's for them Winky Winky

Updated for 1.07!
01-29-2014, 12:28 AM #14
ByteSource
League Champion
Originally posted by seb5594 View Post
Added the Models to the thread, thank's for them Winky Winky

Updated for 1.07!


sebi can you help me with something? small
01-29-2014, 09:19 AM #15
Mango_Knife
In my man cave
Originally posted by seb5594 View Post
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 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)

    		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


I Added some models to my thread if you want to add this to yours feel free to do it Smile
You must login or register to view this content.
02-13-2014, 05:20 AM #16
Winter
Purple God
seb how come everything you release doesn't work unless it's paid Drack
02-13-2014, 07:36 PM #17
seb5594
Proud Former Admin
Originally posted by Winter View Post
seb how come everything you release doesn't work unless it's paid Drack


I guess other ppl have it in their tool because it doesn't work Awesome face
02-13-2014, 08:49 PM #18
Winter
Purple God
Originally posted by seb5594 View Post
I guess other ppl have it in their tool because it doesn't work Awesome face


Go update your GSD Drack
02-14-2014, 01:46 AM #19
RatchetBooty
Former Staff
Originally posted by Winter View Post
Go update your GSD Drack

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
Last edited by RatchetBooty ; 02-14-2014 at 01:56 AM.

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo