Post: [C#/Release] Spawning Entities
11-14-2014, 09:09 PM #1
xReaperv3
Bounty hunter
(adsbygoogle = window.adsbygoogle || []).push({}); NOTE: If you freeze, connect via CCAPI! I currently have no idea what happens, i will look over it l8er Smile
*Thanks to FFM | iMoDz + GsRClans for telling me

[UPDATESad Awesome Some people asked me for this :P]

Hi NGU, i only see the same tools over and over - so i want to bring you guys something new, like Shark did with his usable Turrets.

Once i'd like to say thanks to Shark, i took EntOrigin + EntAngles from his Thread and Aerosoul for his Asset Dump, where i used some Models to test it!

*If you dont know how to find Models, browse in this section and you will find Aerosoul's Thread, download it and view the "xmodels.txt" Smile

I dont want to say more, you guys should know the rest...

Here's a picture of what you can do:

You must login or register to view this content.

And here's the code:
*If you dont have Read&WriteSingle, its simply Read&WriteFloat, you guys should be smart anought! Smile
    
public static uint spawnEntity(string ModelName, float[] Origin, float[] Angles)
{
uint Entity = (uint)RPC.Call(0x3669B0);
RPC.WriteSingle(Entity + 0x138, Origin);
RPC.WriteSingle(Entity + 0x148, Angles);
RPC.Call(0x365738, Entity, ModelName);
RPC.Call(0x35B6C4, Entity);
return Entity;
}


if you still don't have any idea on how to use it, ill made some quick functions for you! Smile
    
public static uint G_Client(int clientIndex, uint Mod = 0x00)
{
return (0x1950880 + (0x4180 * (uint)clientIndex) + Mod);
}

public static float[] getPlayerOrigin(int clientIndex)
{
return RPC.ReadSingle(G_Client(clientIndex, 0x7Cool Man (aka Tustin), 3);
}

public static float[] getPlayerAngles(int clientIndex)
{
return RPC.ReadSingle(G_Client(clientIndex, 0x1B4), 3);
}


Use it like this:

    
spawnEntity(<string>,<float>,<float>Winky Winky;
spawnentity("modelName", getPlayerOrigin(0), getPlayerAngles(0)); <- this will spawn an Entity at Client 0's origin!
if you dont want to use Angles, simply go on like this:
spawnEntity("modelname", getPlayerOrigin(0), new float[] { 0, 0, 0 });


Here's something cool that TheModedHacker made:
*what it does: it should spawn an entity infront of you, with a distance of 6 meters! Smile <- needs to be tested!

    
public void EntityAnglesToForward(int client, string Model, int Distance = 6)
{
float diff = Distance * 40;
float [] Angles = Lib.ReadSingle(G_Client(client, 0x7Cool Man (aka Tustin), 3);
float [] Position = Lib.ReadSingle(G_Client(client, 0x1B4), 3);

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;

float[] forward = new float[] { Position[0] + num3, Position[1] + num2, Position[2] - num };
spawnEntity(Model, forward, Angles);

}


Maybe someone will use it, maybe not. But i'm sure it's something cool to mess with Smile

Credits are ontop but yea,

Me - Making the Functions + Finding Addresses
Shark - EntityOrigin + EntityAngles
Aerosoul - Asset Dump
TheModedHacker - EntityAnglesToForward (Extra Function he posted below)

Have a greate day! Smile
Last edited by xReaperv3 ; 11-25-2014 at 10:51 PM. Reason: Updated to 1.04

The following 13 users say thank you to xReaperv3 for this useful post:

Arrow_Modz, Boliberrys, br0wniiez, EnVatoHD, FusionIsDaName, GermanModdingPS, HiddenHour, LBK, RGaming, SaberNGU, Swaqq, TheModedHacker, zAlbanianModder
11-14-2014, 09:12 PM #2
Yeah , Very Nice <3

The following user thanked gsrclans for this useful post:

xReaperv3
11-14-2014, 09:12 PM #3
LBK
Little One
Originally posted by xReaperv3 View Post
Hi NGU, i only see the same tools over and over - so i want to bring you guys something new, like Shark did with his usable Turrets.

Once i'd like to say thanks to Shark, i took EntOrigin + EntAngles from his Thread and Aerosoul for his Asset Dump, where i used some Models to test it!

*If you dont know how to find Models, browse in this section and you will find Aerosoul's Thread, download it and view the "xmodels.txt" Smile

I dont want to say more, you guys should know the rest...

Here's a picture of what you can do:

You must login or register to view this content.

And here's the code:
*If you dont have Read&WriteSingle, its simply Rea&WriteFloat, you guys should be smart anought! Smile
    
public static uint spawnEntity(string ModelName, float[] Origin, float[] Angles)
{
uint Entity = (uint)RPC.Call(0x36366Cool Man (aka Tustin);
RPC.WriteSingle(Entity + 0x138, Origin);
RPC.WriteSingle(Entity + 0x148, Angles);
RPC.Call(0x36241C, Entity, ModelName);
RPC.Call(0x3584EC, Entity);
return Entity;
}


if you still don't have any idea on how to use it, ill made some quick functions for you! Smile
    
public static uint G_Client(int clientIndex, uint Mod = 0x00)
{
return (0x1905900 + (0x4180 * (uint)clientIndex) + Mod);
}

public static float[] getPlayerOrigin(int clientIndex)
{
return RPC.ReadSingle(G_Client(clientIndex, 0x7Cool Man (aka Tustin), 3);
}

public static float[] getPlayerAngles(int clientIndex)
{
return RPC.ReadSingle(G_Client(clientIndex, 0x1B4), 3);
}


Use it like this:

    
spawnEntity(<string>,<float>,<float>Winky Winky;
spawnentity("modelName", getPlayerOrigin(0), getPlayerAngles(0)); <- this will spawn an Entity at Client 0's origin!
if you dont want to use Angles, simply go on like this:
spawnEntity("modelname", getPlayerOrigin(0), new float[] { 0, 0, 0 });


Maybe someone will use it, maybe not. But i'm sure it's something cool to mess with Smile

Credits are ontop but yea,

Me - Making the Functions + Finding Addresses
Shark - EntityOrigin + EntityAngles
Aerosoul - Asset Dump

Have a greate day! Smile


Yeahhhh !! Big thanks !! Very good Job my friends <3 !

The following user thanked LBK for this useful post:

xReaperv3
11-14-2014, 09:13 PM #4
Boliberrys
^^ Sexy ^^
THANKS!! Nice release!
Originally posted by xReaperv3 View Post
Hi NGU, i only see the same tools over and over - so i want to bring you guys something new, like Shark did with his usable Turrets.

Once i'd like to say thanks to Shark, i took EntOrigin + EntAngles from his Thread and Aerosoul for his Asset Dump, where i used some Models to test it!

*If you dont know how to find Models, browse in this section and you will find Aerosoul's Thread, download it and view the "xmodels.txt" Smile

I dont want to say more, you guys should know the rest...

Here's a picture of what you can do:

You must login or register to view this content.

And here's the code:
*If you dont have Read&WriteSingle, its simply Rea&WriteFloat, you guys should be smart anought! Smile
    
public static uint spawnEntity(string ModelName, float[] Origin, float[] Angles)
{
uint Entity = (uint)RPC.Call(0x36366Cool Man (aka Tustin);
RPC.WriteSingle(Entity + 0x138, Origin);
RPC.WriteSingle(Entity + 0x148, Angles);
RPC.Call(0x36241C, Entity, ModelName);
RPC.Call(0x3584EC, Entity);
return Entity;
}


if you still don't have any idea on how to use it, ill made some quick functions for you! Smile
    
public static uint G_Client(int clientIndex, uint Mod = 0x00)
{
return (0x1905900 + (0x4180 * (uint)clientIndex) + Mod);
}

public static float[] getPlayerOrigin(int clientIndex)
{
return RPC.ReadSingle(G_Client(clientIndex, 0x7Cool Man (aka Tustin), 3);
}

public static float[] getPlayerAngles(int clientIndex)
{
return RPC.ReadSingle(G_Client(clientIndex, 0x1B4), 3);
}


Use it like this:

    
spawnEntity(<string>,<float>,<float>Winky Winky;
spawnentity("modelName", getPlayerOrigin(0), getPlayerAngles(0)); <- this will spawn an Entity at Client 0's origin!
if you dont want to use Angles, simply go on like this:
spawnEntity("modelname", getPlayerOrigin(0), new float[] { 0, 0, 0 });


Maybe someone will use it, maybe not. But i'm sure it's something cool to mess with Smile

Credits are ontop but yea,

Me - Making the Functions + Finding Addresses
Shark - EntityOrigin + EntityAngles
Aerosoul - Asset Dump

Have a greate day! Smile

The following user thanked Boliberrys for this useful post:

xReaperv3
11-14-2014, 09:29 PM #5
TheModedHacker
Do a barrel roll!
Nice fgt. You can also post some cool funcs like spawning entities on anglesToForward Winky Winky or whatever ...

The following user thanked TheModedHacker for this useful post:

xReaperv3
11-14-2014, 09:30 PM #6
xReaperv3
Bounty hunter
Originally posted by TheModedHacker View Post
Nice fgt. You can also post some cool funcs like spawning entities on anglesToForward Winky Winky or whatever ...


Umm, ill maybe add something more later, i will work on some other stuff for now :P

The following user thanked xReaperv3 for this useful post:

TheModedHacker
11-14-2014, 09:46 PM #7
Arrow_Modz
Can’t trickshot me!
fgt!!
11-14-2014, 09:49 PM #8
xReaperv3
Bounty hunter
Originally posted by Modz View Post
fgt!!


hmm kay betch

The following user thanked xReaperv3 for this useful post:

Arrow_Modz
11-14-2014, 10:19 PM #9
TheModedHacker
Do a barrel roll!
I made this function to spawn it on AnglesToForward. idk if its fully working.

Credits to xCBSKx for his MW3 func
    
public void EntityAnglesToForward(int client, string Model, int Distance = 6)
{
float diff = Distance * 40;
float [] Angles = Lib.ReadSingle(G_Client(client, 0x7Cool Man (aka Tustin), 3);
float [] Position = Lib.ReadSingle(G_Client(client, 0x1B4), 3);

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;

float[] forward = new float[] { Position[0] + num3, Position[1] + num2, Position[2] - num };
spawnEntity(Model, forward, Angles);

}
Last edited by TheModedHacker ; 11-14-2014 at 10:38 PM.

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

xCSBKx, xReaperv3
11-14-2014, 10:24 PM #10
xReaperv3
Bounty hunter
Originally posted by TheModedHacker View Post
I made this function to spawn it on AnglesToForward. idk if its fully working.

    
public void EntityAnglesToForward(int client, string Model, int Distance = 6)
{
float diff = Distance * 40;
float [] Angles = Lib.ReadSingle(G_Client(client, 0x7Cool Man (aka Tustin), 3);
float [] Position = Lib.ReadSingle(G_Client(client, 0x1B4), 3);

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;

float[] forward = new float[] { Position[0] + num3, Position[1] + num2, Position[2] - num };
spawnEntity(Model, forward, Angles);

}


Added Winky Winky

The following user thanked xReaperv3 for this useful post:

TheModedHacker

Copyright © 2025, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo