Post: C# How to spawn a advanced turret with Laser
10-11-2017, 01:56 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Hi all,
MW3 1.24 How to make Turrets great again "G_SpawnTurret".
Credits to my buddy xCSBKx*

Main G_SpawnTurret Function:
Code:

    
public static uint G_SpawnTurret(float[] Origin, float[] Angles, string Model = "weapon_minigun", string Type = "sentry_minigun_mp", bool Operable = true, bool Lazer = true)
{
uint Entity = (uint)RPC.Call(0x01C058C);//G_Spawn
RPC.Call(0x001C0B14, Entity, Origin);//G_SetOrigin
RPC.Call(0x001C0D74, Entity, Angles);//G_SetAngles
RPC.Call(0x01BEF5C, Entity, Model);//G_SetModel
RPC.Call(0x01CF0E8, Entity, Type);//G_SpawnTurret
PS3.Extension.WriteByte((uint)Entity + 9, (byte)(Lazer ? 0x01 : 0x00));//lazer
Turret_CanOperate(Entity, Operable);
return Entity;
}

Additional G_SpawnTurret Function "Turret_CanOperate":
Turn On or OFF the possibility to use Turret. (usefull for a flyable vehicle).
Code:
    
public static void Turret_CanOperate(uint Turret, bool State = true)
{
Turret = PS3.Extension.ReadUInt32(Turret + 0x15C);
PS3.Extension.WriteByte(Turret + 7, (byte)(State ? 0 : Cool Man (aka Tustin));
}

Additional G_SpawnTurret Function "Turret_Shoot":
With this function you can remote shoot a turret.
Code:
    
public static uint Turret_Shoot(uint Turret)
{//0x001CA780 - Turret_Shoot(gentity_s *self)
return (uint)RPC.Call(0x001CA780, Turret);
}


You must login or register to view this content.

Have Fun!

The following 4 users say thank you to mrdarkblue for this useful post:

01cedricv2, FP-Da-Real-One, lucasaf01, S63
10-11-2017, 02:47 PM #2
01cedricv2
NGU Elite Lifetime Mermber
Originally posted by mrdarkblue View Post
Hi all,
MW3 1.24 How to make Turrets great again "G_SpawnTurret".
Credits to my buddy xCSBKx*

Main G_SpawnTurret Function:
Code:

    
public static uint G_SpawnTurret(float[] Origin, float[] Angles, string Model = "weapon_minigun", string Type = "sentry_minigun_mp", bool Operable = true, bool Lazer = true)
{
uint Entity = (uint)RPC.Call(0x01C058C);//G_Spawn
RPC.Call(0x001C0B14, Entity, Origin);//G_SetOrigin
RPC.Call(0x001C0D74, Entity, Angles);//G_SetAngles
RPC.Call(0x01BEF5C, Entity, Model);//G_SetModel
RPC.Call(0x01CF0E8, Entity, Type);//G_SpawnTurret
PS3.Extension.WriteByte((uint)Entity + 9, (byte)(Lazer ? 0x01 : 0x00));//lazer
Turret_CanOperate(Entity, Operable);
return Entity;
}

Additional G_SpawnTurret Function "Turret_CanOperate":
Turn On or OFF the possibility to use Turret. (usefull for a flyable vehicle).
Code:
    
public static void Turret_CanOperate(uint Turret, bool State = true)
{
Turret = PS3.Extension.ReadUInt32(Turret + 0x15C);
PS3.Extension.WriteByte(Turret + 7, (byte)(State ? 0 : Cool Man (aka Tustin));
}

Additional G_SpawnTurret Function "Turret_Shoot":
With this function you can remote shoot a turret.
Code:
    
public static uint Turret_Shoot(uint Turret)
{//0x001CA780 - Turret_Shoot(gentity_s *self)
return (uint)RPC.Call(0x001CA780, Turret);
}


You must login or register to view this content.

Have Fun!


you... are... on....FIREEEEEEEEEEEE! Great release Enzo

The following user thanked 01cedricv2 for this useful post:

mrdarkblue
10-12-2017, 07:41 PM #3
S63
Space Ninja
Originally posted by mrdarkblue View Post
Hi all,
MW3 1.24 How to make Turrets great again "G_SpawnTurret".
Credits to my buddy xCSBKx*

Main G_SpawnTurret Function:
Code:

    
public static uint G_SpawnTurret(float[] Origin, float[] Angles, string Model = "weapon_minigun", string Type = "sentry_minigun_mp", bool Operable = true, bool Lazer = true)
{
uint Entity = (uint)RPC.Call(0x01C058C);//G_Spawn
RPC.Call(0x001C0B14, Entity, Origin);//G_SetOrigin
RPC.Call(0x001C0D74, Entity, Angles);//G_SetAngles
RPC.Call(0x01BEF5C, Entity, Model);//G_SetModel
RPC.Call(0x01CF0E8, Entity, Type);//G_SpawnTurret
PS3.Extension.WriteByte((uint)Entity + 9, (byte)(Lazer ? 0x01 : 0x00));//lazer
Turret_CanOperate(Entity, Operable);
return Entity;
}

Additional G_SpawnTurret Function "Turret_CanOperate":
Turn On or OFF the possibility to use Turret. (usefull for a flyable vehicle).
Code:
    
public static void Turret_CanOperate(uint Turret, bool State = true)
{
Turret = PS3.Extension.ReadUInt32(Turret + 0x15C);
PS3.Extension.WriteByte(Turret + 7, (byte)(State ? 0 : Cool Man (aka Tustin));
}

Additional G_SpawnTurret Function "Turret_Shoot":
With this function you can remote shoot a turret.
Code:
    
public static uint Turret_Shoot(uint Turret)
{//0x001CA780 - Turret_Shoot(gentity_s *self)
return (uint)RPC.Call(0x001CA780, Turret);
}


You must login or register to view this content.

Have Fun!


Loving these dank hax Happy

The following user thanked S63 for this useful post:

mrdarkblue
10-12-2017, 07:42 PM #4
S63
Space Ninja
Originally posted by 01cedricv2 View Post
you... are... on....FIREEEEEEEEEEEE! Great release Enzo


Sal

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo