Post: WeaponDef Editing (C#)
05-06-2014, 10:22 PM #1
seb5594
Proud Former Admin
(adsbygoogle = window.adsbygoogle || []).push({}); Hey NGU,

Most of the releases here about WeaponDef are really not good explained and bad used in my opinion.
Back in 1.12 i created this WeaponDef Class for my Mod Menu 'xRevolution v1'.
I want to thank iMaes from Se7ensins for the WeaponDef Researchs!

Go get your current Weapon just call the Function BG_GetViewWeaponIndex (not sure if its the correct name) or just read the WeaponIndex from G_Client how i did it ^^

    public class WeapDef
{
public static class WeapDefStruct
{
public static UInt32
BG_GetWeaponDef = 0x607088,
weapType_t = 0x1C,
weapClass_t = 0x20,
penetrateType = 0x24,
ImpactType = 0x28,
weapInventoryType_t = 0x2C,
weapFireType_t = 0x30,
OffhandClass = 0x34,
weapStance_t = 0x38,
start_ammo = 0x3C8,
max_ammo = 0x3CC,
shot_count = 0x3D0,
name = 0xA4D,
sprint_loop_time = 0x4DC,
player_speed = 0x588;
}
public enum ImpactType : int
{
Impact_None = 0,
Bullet_Small = 1,
Bullet_Large = 2,
Bullet_AP = 3,
Bullet_Xtreme = 4,
Shotgun = 5,
Grenade_Bounce = 6,
Grenade_Explode = 7,
Rifle_Gernade = 8,
Rocket_Explode = 9,
Rocket_Explode_Xtreme = 10,
Projectile_dud = 11,
Mortar_Shell = 12,
Tank_Shell = 13,
Bolt = 15,
Blade = 16,
Grenade = 17,
Rocket = 18,
FlashBang = 19
}
public enum FireType : int
{
Full_Auto = 0,
Single_Shot = 1,
Round_Burst2 = 2,
Round_Burst3 = 3,
Round_Burst4 = 4,
Round_Burst5 = 5,
StackedFire = 6,
Minigk_gun = 7,
Jetgun = 8
}
public enum PSpeed : int
{
Default = 1,
Super_Speed = 5
}
public static void IncredibleDamage()
{
iPrintln(HostNumber, "Incredible Damage Set for your Primary Weapon");
Int32 WeaponDef = Get_WeaponDef_Offset();
PS3.Extension.WriteInt32(WeaponDef + 0x3E4, 9999);
PS3.Extension.WriteInt32(WeaponDef + 0x3E8, 9999);
PS3.Extension.WriteInt32(WeaponDef + 0x3EC, 9999);
PS3.Extension.WriteInt32(WeaponDef + 0x3F0, 9999);
PS3.Extension.WriteInt32(WeaponDef + 0x3F4, 9999);
PS3.Extension.WriteInt32(WeaponDef + 0x3F8, 9999);
PS3.Extension.WriteInt32(WeaponDef + 0x3FC, 9999);
PS3.Extension.WriteInt32(WeaponDef + 0x400, 9999);
PS3.Extension.WriteInt32(WeaponDef + 0x404, 9999);
PS3.Extension.WriteInt32(WeaponDef + 0x408, 9999);
PS3.Extension.WriteInt32(WeaponDef + 0x40C, 9999);
PS3.Extension.WriteInt32(WeaponDef + WeapDefStruct.ImpactType, (Int32)ImpactType.Rocket_Explode);
}
public static void SprintLoopTime()
{
if (PS3.Extension.ReadInt32(Get_WeaponDef_Offset() + WeapDefStruct.sprint_loop_time) == 660)
{
iPrintln(HostNumber, "Sprint Loop Time: ^2Slow");
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.sprint_loop_time, 2000);
}
else if (PS3.Extension.ReadInt32(Get_WeaponDef_Offset() + WeapDefStruct.sprint_loop_time) == 2000)
{
iPrintln(HostNumber, "Sprint Loop Time: ^2Fast");
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.sprint_loop_time, 125);
}
else
{
iPrintln(HostNumber, "Sprint Loop Time: ^1Default");
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.sprint_loop_time, 660);
}
}
public static void Crosshair()
{
if (PS3.Extension.ReadByte(Get_WeaponDef_Offset() + 0x5B0) != 0x00)
{
PS3.Extension.WriteBytes(Get_WeaponDef_Offset() + 0x5AD, new Byte[25]);
iPrintln(HostNumber, "Small Crosshair ^2Enabled");
}
else
{
PS3.Extension.WriteBytes(Get_WeaponDef_Offset() + 0x5AD, new Byte[] { 0x00, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x3F, 0xE0, 0x00, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x40, 0xC0, 0x00, 0x00, 0x40, 0xA0, 0x00, 0x00, 0x40, 0x80 });
iPrintln(HostNumber, "Small Crosshair ^1Disabled");
}
}
public static void ToggleFireType()
{
Int32 MoDe = PS3.Extension.ReadInt32(Get_WeaponDef_Offset() + WeapDefStruct.weapFireType_t);
switch (MoDe)
{
case 0:
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.weapFireType_t, 1);
iPrintlnBold(HostNumber, "Fire Type: ^3Single Shot");
break;
case 1:
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.weapFireType_t, 2);
iPrintlnBold(HostNumber, "Fire Type: ^32er Burst");
break;
case 2:
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.weapFireType_t, 3);
iPrintlnBold(HostNumber, "Fire Type: ^33er Burst");
break;
case 3:
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.weapFireType_t, 4);
iPrintlnBold(HostNumber, "Fire Type: ^34er Burst");
break;
case 4:
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.weapFireType_t, 5);
iPrintlnBold(HostNumber, "Fire Type: ^35er Burst");
break;
case 5:
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.weapFireType_t, 6);
iPrintlnBold(HostNumber, "Fire Type: ^3Stacked Fire");
break;
case 6:
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.weapFireType_t, 7);
iPrintlnBold(HostNumber, "Fire Type: ^3Minigun");
break;
case 7:
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.weapFireType_t, Cool Man (aka Tustin);
iPrintlnBold(HostNumber, "Fire Type: ^3JetGun");
break;
case 8:
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.weapFireType_t, 0);
iPrintlnBold(HostNumber, "Fire Type: ^3Full Auto");
break;
}
}
public static void NoRecoil()
{
PS3.Extension.WriteBytes(Get_WeaponDef_Offset() + 0x7B5, new Byte[20]);
iPrintln(HostNumber, "No Recoil ^2Enabled");
}
public static void Player_Speed()
{
if (PS3.Extension.ReadFloat(Get_WeaponDef_Offset() + WeapDefStruct.player_speed) < 5)
{
PS3.Extension.WriteFloat(Get_WeaponDef_Offset() + WeapDefStruct.player_speed, 5);
iPrintln(HostNumber, "Super Speed has been activated (only with your Weapon)");
}
else
{
PS3.Extension.WriteFloat(Get_WeaponDef_Offset() + WeapDefStruct.player_speed, 1);
iPrintln(HostNumber, "Super Speed has been disabled (only with your Weapon)");
}
}
public static void SetFireType(FireType lol)
{
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.weapFireType_t, (Int32)lol);
}
public static void SetImpactType(ImpactType lol)
{
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.ImpactType, (Int32)lol);
}
public static void RenameWeap(String name)
{
PS3Lib.PS3Lib.WriteString(ReturnRenameOffset(), name);
iPrintln(HostNumber, "Weapon renamed to " + name);
}
public static UInt32 ReturnRenameOffset()
{
Byte[] GetBytes = PS3.Extension.GetBytes(Get_WeaponDef_Offset() + WeapDefStruct.name, 200);
for (UInt32 i = 0; i < 200; i++)
{
if ((GetBytes[i] == 0x57) && (GetBytes[i + 1] == 0x45) && (GetBytes[i + 2] == 0x41) && (GetBytes[i + 3] == 0x50) && (GetBytes[i + 4] == 0x4F) && (GetBytes[i + 5] == 0x4E))
return i + Get_WeaponDef_Offset() + WeapDefStruct.name;
}
return Get_WeaponDef_Offset() + WeapDefStruct.name;
}
public static UInt32 Get_WeaponDef_Offset()
{
return (UInt32)RPC.Call(WeapDefStruct.BG_GetWeaponDef, PS3.Extension.GetBytes(0x01780F28 + 0x2D7, 1)[0]);
}
}



Not everything out of this class has been released so i'll hope you guys will enjoy, this can be used for Mod Menus or Tools.
(adsbygoogle = window.adsbygoogle || []).push({});

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

ALI ALHILFI, B777x, D3skm, JLM, milky4444, John, Notorious, SnaY, Sticky, Swiss, ThePaaqoHD
05-06-2014, 10:25 PM #2
Sticky
Mary J Wannnnna
Originally posted by seb5594 View Post
Hey NGU,

Most of the releases here about WeaponDef are really not good explained and bad used in my opinion.
Back in 1.12 i created this WeaponDef Class for my Mod Menu 'xRevolution v1'.
I want to thank iMaes from Se7ensins for the WeaponDef Researchs!

Go get your current Weapon just call the Function BG_GetViewWeaponIndex (not sure if its the correct name) or just read the WeaponIndex from G_Client how i did it ^^

    public class WeapDef
{
public static class WeapDefStruct
{
public static UInt32
BG_GetWeaponDef = 0x607088,
weapType_t = 0x1C,
weapClass_t = 0x20,
penetrateType = 0x24,
ImpactType = 0x28,
weapInventoryType_t = 0x2C,
weapFireType_t = 0x30,
OffhandClass = 0x34,
weapStance_t = 0x38,
start_ammo = 0x3C8,
max_ammo = 0x3CC,
shot_count = 0x3D0,
name = 0xA4D,
sprint_loop_time = 0x4DC,
player_speed = 0x588;
}
public enum ImpactType : int
{
Impact_None = 0,
Bullet_Small = 1,
Bullet_Large = 2,
Bullet_AP = 3,
Bullet_Xtreme = 4,
Shotgun = 5,
Grenade_Bounce = 6,
Grenade_Explode = 7,
Rifle_Gernade = 8,
Rocket_Explode = 9,
Rocket_Explode_Xtreme = 10,
Projectile_dud = 11,
Mortar_Shell = 12,
Tank_Shell = 13,
Bolt = 15,
Blade = 16,
Grenade = 17,
Rocket = 18,
FlashBang = 19
}
public enum FireType : int
{
Full_Auto = 0,
Single_Shot = 1,
Round_Burst2 = 2,
Round_Burst3 = 3,
Round_Burst4 = 4,
Round_Burst5 = 5,
StackedFire = 6,
Minigk_gun = 7,
Jetgun = 8
}
public enum PSpeed : int
{
Default = 1,
Super_Speed = 5
}
public static void IncredibleDamage()
{
iPrintln(HostNumber, "Incredible Damage Set for your Primary Weapon");
Int32 WeaponDef = Get_WeaponDef_Offset();
PS3.Extension.WriteInt32(WeaponDef + 0x3E4, 9999);
PS3.Extension.WriteInt32(WeaponDef + 0x3E8, 9999);
PS3.Extension.WriteInt32(WeaponDef + 0x3EC, 9999);
PS3.Extension.WriteInt32(WeaponDef + 0x3F0, 9999);
PS3.Extension.WriteInt32(WeaponDef + 0x3F4, 9999);
PS3.Extension.WriteInt32(WeaponDef + 0x3F8, 9999);
PS3.Extension.WriteInt32(WeaponDef + 0x3FC, 9999);
PS3.Extension.WriteInt32(WeaponDef + 0x400, 9999);
PS3.Extension.WriteInt32(WeaponDef + 0x404, 9999);
PS3.Extension.WriteInt32(WeaponDef + 0x408, 9999);
PS3.Extension.WriteInt32(WeaponDef + 0x40C, 9999);
PS3.Extension.WriteInt32(WeaponDef + WeapDefStruct.ImpactType, (Int32)ImpactType.Rocket_Explode);
}
public static void SprintLoopTime()
{
if (PS3.Extension.ReadInt32(Get_WeaponDef_Offset() + WeapDefStruct.sprint_loop_time) == 660)
{
iPrintln(HostNumber, "Sprint Loop Time: ^2Slow");
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.sprint_loop_time, 2000);
}
else if (PS3.Extension.ReadInt32(Get_WeaponDef_Offset() + WeapDefStruct.sprint_loop_time) == 2000)
{
iPrintln(HostNumber, "Sprint Loop Time: ^2Fast");
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.sprint_loop_time, 125);
}
else
{
iPrintln(HostNumber, "Sprint Loop Time: ^1Default");
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.sprint_loop_time, 660);
}
}
public static void Crosshair()
{
if (PS3.Extension.ReadByte(Get_WeaponDef_Offset() + 0x5B0) != 0x00)
{
PS3.Extension.WriteBytes(Get_WeaponDef_Offset() + 0x5AD, new Byte[25]);
iPrintln(HostNumber, "Small Crosshair ^2Enabled");
}
else
{
PS3.Extension.WriteBytes(Get_WeaponDef_Offset() + 0x5AD, new Byte[] { 0x00, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x3F, 0xE0, 0x00, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x40, 0xC0, 0x00, 0x00, 0x40, 0xA0, 0x00, 0x00, 0x40, 0x80 });
iPrintln(HostNumber, "Small Crosshair ^1Disabled");
}
}
public static void ToggleFireType()
{
Int32 MoDe = PS3.Extension.ReadInt32(Get_WeaponDef_Offset() + WeapDefStruct.weapFireType_t);
switch (MoDe)
{
case 0:
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.weapFireType_t, 1);
iPrintlnBold(HostNumber, "Fire Type: ^3Single Shot");
break;
case 1:
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.weapFireType_t, 2);
iPrintlnBold(HostNumber, "Fire Type: ^32er Burst");
break;
case 2:
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.weapFireType_t, 3);
iPrintlnBold(HostNumber, "Fire Type: ^33er Burst");
break;
case 3:
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.weapFireType_t, 4);
iPrintlnBold(HostNumber, "Fire Type: ^34er Burst");
break;
case 4:
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.weapFireType_t, 5);
iPrintlnBold(HostNumber, "Fire Type: ^35er Burst");
break;
case 5:
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.weapFireType_t, 6);
iPrintlnBold(HostNumber, "Fire Type: ^3Stacked Fire");
break;
case 6:
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.weapFireType_t, 7);
iPrintlnBold(HostNumber, "Fire Type: ^3Minigun");
break;
case 7:
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.weapFireType_t, Cool Man (aka Tustin);
iPrintlnBold(HostNumber, "Fire Type: ^3JetGun");
break;
case 8:
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.weapFireType_t, 0);
iPrintlnBold(HostNumber, "Fire Type: ^3Full Auto");
break;
}
}
public static void NoRecoil()
{
PS3.Extension.WriteBytes(Get_WeaponDef_Offset() + 0x7B5, new Byte[20]);
iPrintln(HostNumber, "No Recoil ^2Enabled");
}
public static void Player_Speed()
{
if (PS3.Extension.ReadFloat(Get_WeaponDef_Offset() + WeapDefStruct.player_speed) < 5)
{
PS3.Extension.WriteFloat(Get_WeaponDef_Offset() + WeapDefStruct.player_speed, 5);
iPrintln(HostNumber, "Super Speed has been activated (only with your Weapon)");
}
else
{
PS3.Extension.WriteFloat(Get_WeaponDef_Offset() + WeapDefStruct.player_speed, 1);
iPrintln(HostNumber, "Super Speed has been disabled (only with your Weapon)");
}
}
public static void SetFireType(FireType lol)
{
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.weapFireType_t, (Int32)lol);
}
public static void SetImpactType(ImpactType lol)
{
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.ImpactType, (Int32)lol);
}
public static void RenameWeap(String name)
{
PS3Lib.PS3Lib.WriteString(ReturnRenameOffset(), name);
iPrintln(HostNumber, "Weapon renamed to " + name);
}
public static UInt32 ReturnRenameOffset()
{
Byte[] GetBytes = PS3.Extension.GetBytes(Get_WeaponDef_Offset() + WeapDefStruct.name, 200);
for (UInt32 i = 0; i < 200; i++)
{
if ((GetBytes[i] == 0x57) && (GetBytes[i + 1] == 0x45) && (GetBytes[i + 2] == 0x41) && (GetBytes[i + 3] == 0x50) && (GetBytes[i + 4] == 0x4F) && (GetBytes[i + 5] == 0x4E))
return i + Get_WeaponDef_Offset() + WeapDefStruct.name;
}
return Get_WeaponDef_Offset() + WeapDefStruct.name;
}
public static UInt32 Get_WeaponDef_Offset()
{
return (UInt32)RPC.Call(WeapDefStruct.BG_GetWeaponDef, PS3.Extension.GetBytes(0x01780F28 + 0x2D7, 1)[0]);
}
}



Not everything out of this class has been released so i'll hope you guys will enjoy, this can be used for Mod Menus or Tools.


I just figured out how to do this last night after you told me Smile
05-06-2014, 10:31 PM #3
seb5594
Proud Former Admin
Originally posted by Sticky View Post
I just figured out how to do this last night after you told me Smile


Mind sharing your script with getviewweaponindex? I would add it to the post for the others Smile
05-06-2014, 10:38 PM #4
Sticky
Mary J Wannnnna
Originally posted by seb5594 View Post
Mind sharing your script with getviewweaponindex? I would add it to the post for the others Smile


I do it the same way you do with reading G_Client cause I couldnt be fucked to find the func addr
05-07-2014, 05:10 AM #5
Originally posted by seb5594 View Post
Mind sharing your script with getviewweaponindex? I would add it to the post for the others Smile


getViewWeaponIndex? wat? Do you by any chance mean getViewModelWeaponIndex? But then if so what's to release tbh, aslong as you can port the function, it'll take 3 seconds to reverse this XD. But if it's getViewModel only, that's in gclient_s, well actually in clienSession_t but that's pointed within gclient_s
05-07-2014, 06:30 AM #6
Mango_Knife
In my man cave
Originally posted by seb5594 View Post
Hey NGU,

Most of the releases here about WeaponDef are really not good explained and bad used in my opinion.
Back in 1.12 i created this WeaponDef Class for my Mod Menu 'xRevolution v1'.
I want to thank iMaes from Se7ensins for the WeaponDef Researchs!

Go get your current Weapon just call the Function BG_GetViewWeaponIndex (not sure if its the correct name) or just read the WeaponIndex from G_Client how i did it ^^

    public class WeapDef
{
public static class WeapDefStruct
{
public static UInt32
BG_GetWeaponDef = 0x607088,
weapType_t = 0x1C,
weapClass_t = 0x20,
penetrateType = 0x24,
ImpactType = 0x28,
weapInventoryType_t = 0x2C,
weapFireType_t = 0x30,
OffhandClass = 0x34,
weapStance_t = 0x38,
start_ammo = 0x3C8,
max_ammo = 0x3CC,
shot_count = 0x3D0,
name = 0xA4D,
sprint_loop_time = 0x4DC,
player_speed = 0x588;
}
public enum ImpactType : int
{
Impact_None = 0,
Bullet_Small = 1,
Bullet_Large = 2,
Bullet_AP = 3,
Bullet_Xtreme = 4,
Shotgun = 5,
Grenade_Bounce = 6,
Grenade_Explode = 7,
Rifle_Gernade = 8,
Rocket_Explode = 9,
Rocket_Explode_Xtreme = 10,
Projectile_dud = 11,
Mortar_Shell = 12,
Tank_Shell = 13,
Bolt = 15,
Blade = 16,
Grenade = 17,
Rocket = 18,
FlashBang = 19
}
public enum FireType : int
{
Full_Auto = 0,
Single_Shot = 1,
Round_Burst2 = 2,
Round_Burst3 = 3,
Round_Burst4 = 4,
Round_Burst5 = 5,
StackedFire = 6,
Minigk_gun = 7,
Jetgun = 8
}
public enum PSpeed : int
{
Default = 1,
Super_Speed = 5
}
public static void IncredibleDamage()
{
iPrintln(HostNumber, "Incredible Damage Set for your Primary Weapon");
Int32 WeaponDef = Get_WeaponDef_Offset();
PS3.Extension.WriteInt32(WeaponDef + 0x3E4, 9999);
PS3.Extension.WriteInt32(WeaponDef + 0x3E8, 9999);
PS3.Extension.WriteInt32(WeaponDef + 0x3EC, 9999);
PS3.Extension.WriteInt32(WeaponDef + 0x3F0, 9999);
PS3.Extension.WriteInt32(WeaponDef + 0x3F4, 9999);
PS3.Extension.WriteInt32(WeaponDef + 0x3F8, 9999);
PS3.Extension.WriteInt32(WeaponDef + 0x3FC, 9999);
PS3.Extension.WriteInt32(WeaponDef + 0x400, 9999);
PS3.Extension.WriteInt32(WeaponDef + 0x404, 9999);
PS3.Extension.WriteInt32(WeaponDef + 0x408, 9999);
PS3.Extension.WriteInt32(WeaponDef + 0x40C, 9999);
PS3.Extension.WriteInt32(WeaponDef + WeapDefStruct.ImpactType, (Int32)ImpactType.Rocket_Explode);
}
public static void SprintLoopTime()
{
if (PS3.Extension.ReadInt32(Get_WeaponDef_Offset() + WeapDefStruct.sprint_loop_time) == 660)
{
iPrintln(HostNumber, "Sprint Loop Time: ^2Slow");
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.sprint_loop_time, 2000);
}
else if (PS3.Extension.ReadInt32(Get_WeaponDef_Offset() + WeapDefStruct.sprint_loop_time) == 2000)
{
iPrintln(HostNumber, "Sprint Loop Time: ^2Fast");
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.sprint_loop_time, 125);
}
else
{
iPrintln(HostNumber, "Sprint Loop Time: ^1Default");
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.sprint_loop_time, 660);
}
}
public static void Crosshair()
{
if (PS3.Extension.ReadByte(Get_WeaponDef_Offset() + 0x5B0) != 0x00)
{
PS3.Extension.WriteBytes(Get_WeaponDef_Offset() + 0x5AD, new Byte[25]);
iPrintln(HostNumber, "Small Crosshair ^2Enabled");
}
else
{
PS3.Extension.WriteBytes(Get_WeaponDef_Offset() + 0x5AD, new Byte[] { 0x00, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x3F, 0xE0, 0x00, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x40, 0xC0, 0x00, 0x00, 0x40, 0xA0, 0x00, 0x00, 0x40, 0x80 });
iPrintln(HostNumber, "Small Crosshair ^1Disabled");
}
}
public static void ToggleFireType()
{
Int32 MoDe = PS3.Extension.ReadInt32(Get_WeaponDef_Offset() + WeapDefStruct.weapFireType_t);
switch (MoDe)
{
case 0:
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.weapFireType_t, 1);
iPrintlnBold(HostNumber, "Fire Type: ^3Single Shot");
break;
case 1:
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.weapFireType_t, 2);
iPrintlnBold(HostNumber, "Fire Type: ^32er Burst");
break;
case 2:
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.weapFireType_t, 3);
iPrintlnBold(HostNumber, "Fire Type: ^33er Burst");
break;
case 3:
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.weapFireType_t, 4);
iPrintlnBold(HostNumber, "Fire Type: ^34er Burst");
break;
case 4:
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.weapFireType_t, 5);
iPrintlnBold(HostNumber, "Fire Type: ^35er Burst");
break;
case 5:
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.weapFireType_t, 6);
iPrintlnBold(HostNumber, "Fire Type: ^3Stacked Fire");
break;
case 6:
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.weapFireType_t, 7);
iPrintlnBold(HostNumber, "Fire Type: ^3Minigun");
break;
case 7:
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.weapFireType_t, Cool Man (aka Tustin);
iPrintlnBold(HostNumber, "Fire Type: ^3JetGun");
break;
case 8:
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.weapFireType_t, 0);
iPrintlnBold(HostNumber, "Fire Type: ^3Full Auto");
break;
}
}
public static void NoRecoil()
{
PS3.Extension.WriteBytes(Get_WeaponDef_Offset() + 0x7B5, new Byte[20]);
iPrintln(HostNumber, "No Recoil ^2Enabled");
}
public static void Player_Speed()
{
if (PS3.Extension.ReadFloat(Get_WeaponDef_Offset() + WeapDefStruct.player_speed) < 5)
{
PS3.Extension.WriteFloat(Get_WeaponDef_Offset() + WeapDefStruct.player_speed, 5);
iPrintln(HostNumber, "Super Speed has been activated (only with your Weapon)");
}
else
{
PS3.Extension.WriteFloat(Get_WeaponDef_Offset() + WeapDefStruct.player_speed, 1);
iPrintln(HostNumber, "Super Speed has been disabled (only with your Weapon)");
}
}
public static void SetFireType(FireType lol)
{
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.weapFireType_t, (Int32)lol);
}
public static void SetImpactType(ImpactType lol)
{
PS3.Extension.WriteInt32(Get_WeaponDef_Offset() + WeapDefStruct.ImpactType, (Int32)lol);
}
public static void RenameWeap(String name)
{
PS3Lib.PS3Lib.WriteString(ReturnRenameOffset(), name);
iPrintln(HostNumber, "Weapon renamed to " + name);
}
public static UInt32 ReturnRenameOffset()
{
Byte[] GetBytes = PS3.Extension.GetBytes(Get_WeaponDef_Offset() + WeapDefStruct.name, 200);
for (UInt32 i = 0; i < 200; i++)
{
if ((GetBytes[i] == 0x57) && (GetBytes[i + 1] == 0x45) && (GetBytes[i + 2] == 0x41) && (GetBytes[i + 3] == 0x50) && (GetBytes[i + 4] == 0x4F) && (GetBytes[i + 5] == 0x4E))
return i + Get_WeaponDef_Offset() + WeapDefStruct.name;
}
return Get_WeaponDef_Offset() + WeapDefStruct.name;
}
public static UInt32 Get_WeaponDef_Offset()
{
return (UInt32)RPC.Call(WeapDefStruct.BG_GetWeaponDef, PS3.Extension.GetBytes(0x01780F28 + 0x2D7, 1)[0]);
}
}



Not everything out of this class has been released so i'll hope you guys will enjoy, this can be used for Mod Menus or Tools.


Cool.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo