Jump to content

İs it possible to make weapons silenced in SA ?


Recommended Posts

Douglas DC-3

Basically thing i want is making MP5 silenced TECHNİCALLY but i failed to find a flag for it in weapon.dat

How i can make MP5 silenced or even its possible or not ?

EDİT:İ Dont have any modding experience except editing .dat and .cfg files with notepad and using img tool

Edited by Troll Sniper
Link to comment
https://gtaforums.com/topic/878980-is-it-possible-to-make-weapons-silenced-in-sa/
Share on other sites

 

 

void __thiscall CAEWeaponAudioEntity::WeaponFire(CAEPedWeaponAudioEntity *this, eWeaponType weaponType, CPhysical *entity, int audioEventId){  CAEPedWeaponAudioEntity *v4; // esi@1  int v5; // [sp-10h] [bp-14h]@12  signed int v6; // [sp-8h] [bp-Ch]@12  signed int v7; // [sp-4h] [bp-8h]@12  v4 = this;  if ( entity )  {    switch ( weaponType )    {      case WEAPON_PISTOL:        CAEWeaponAudioEntity::PlayGunSounds(this, entity, 52, 53, 6, 7, 8, audioEventId, 0.0, 1.41421, 1.0);        break;      case WEAPON_DESERT_EAGLE:        CAEWeaponAudioEntity::PlayGunSounds(this, entity, 52, 53, 6, 7, 8, audioEventId, 0.0, 0.94387001, 1.0);        break;      case WEAPON_PISTOL_SILENCED:        CAEWeaponAudioEntity::PlayGunSounds(this, entity, 76, 77, 24, 24, -1, audioEventId, -7.0, 1.0, 1.0);        break;      case WEAPON_AK47:      case WEAPON_M4:        CAEWeaponAudioEntity::PlayGunSounds(this, entity, 33, 53, 3, 4, 5, audioEventId, 0.0, 1.0, 1.0);        break;      case WEAPON_MICRO_UZI:        CAEWeaponAudioEntity::PlayGunSounds(this, entity, 29, 30, 0, 1, 2, audioEventId, 0.0, 1.0, 1.0);        break;      case WEAPON_TEC9:        CAEWeaponAudioEntity::PlayGunSounds(this, entity, 29, 30, 0, 1, 2, audioEventId, 0.0, 1.25992, 1.0);        break;      case WEAPON_MP5:        CAEWeaponAudioEntity::PlayGunSounds(this, entity, 29, 30, 17, 18, 2, audioEventId, 0.0, 1.0, 1.0);        break;      case WEAPON_SNIPERRIFLE:        CAEWeaponAudioEntity::PlayGunSounds(this, entity, 52, 53, 26, 27, 23, audioEventId, 0.0, 1.0, 1.0);        break;      case WEAPON_COUNTRYRIFLE:        CAEWeaponAudioEntity::PlayGunSounds(this, entity, 52, 53, 26, 27, 23, audioEventId, 0.0, 0.88999999, 1.0);        break;      case WEAPON_SHOTGUN:      case WEAPON_SPAS12:        v7 = 0x3F800000;        v6 = 0x3F800000;        v5 = audioEventId;        goto LABEL_14;      case WEAPON_SAWNOFF:        v7 = 0x3F6E147B;        v6 = 0x3F4B2FEC;        v5 = audioEventId;LABEL_14:        CAEWeaponAudioEntity::PlayGunSounds(this, entity, 73, 74, 21, 22, 23, v5, 0.0, *(float *)&v6, *(float *)&v7);        break;      case WEAPON_FTHROWER:        if ( !this->m_dwFlameThrowerLastPlayedTime )          CAEWeaponAudioEntity::PlayFlameThrowerSounds(this, entity, 83, 26, audioEventId, -14.0, 1.0);        v4->m_dwFlameThrowerLastPlayedTime = CTimer::m_snTimeInMilliseconds;        break;      case WEAPON_SPRAYCAN:        if ( !this->m_dwSpraycanLastPlayedTime )          CAEWeaponAudioEntity::PlayWeaponLoopSound(this, entity, 28, audioEventId, -20.0, 1.0, 3u);        v4->m_dwSpraycanLastPlayedTime = CTimer::m_snTimeInMilliseconds;        break;      case WEAPON_EXTINGUISHER:        if ( !this->m_dwExtinguisherLastPlayedTime )          CAEWeaponAudioEntity::PlayWeaponLoopSound(this, entity, 9, audioEventId, -20.0, 0.79369998, 4u);        v4->m_dwExtinguisherLastPlayedTime = CTimer::m_snTimeInMilliseconds;        break;      case WEAPON_CAMERA:        CAEWeaponAudioEntity::PlayCameraSound(this, entity, audioEventId, -14.0);        break;      case WEAPON_DETONATOR:        CAEWeaponAudioEntity::PlayGunSounds(this, entity, 49, -1, -1, -1, -1, audioEventId, -14.0, 1.0, 1.0);        break;      case WEAPON_MINIGUN:        CAEWeaponAudioEntity::PlayMiniGunFireSounds(this, entity, audioEventId);        break;      case WEAPON_NIGHTVISION:      case WEAPON_INFRARED:        CAEWeaponAudioEntity::PlayGoggleSound(this, 64, audioEventId);        break;      default:        return;    }  }}



0A8C: write_memory 0x505248 size 4 value 0x504FF4 virtual_protect 0     //    case WEAPON_PISTOL_SILENCED0A8C: write_memory 0x505260 size 4 value 0x505093 virtual_protect 0     //  case WEAPON_MP5
  • Like 1
Douglas DC-3

 

 

 

void __thiscall CAEWeaponAudioEntity::WeaponFire(CAEPedWeaponAudioEntity *this, eWeaponType weaponType, CPhysical *entity, int audioEventId){  CAEPedWeaponAudioEntity *v4; // esi@1  int v5; // [sp-10h] [bp-14h]@12  signed int v6; // [sp-8h] [bp-Ch]@12  signed int v7; // [sp-4h] [bp-8h]@12  v4 = this;  if ( entity )  {    switch ( weaponType )    {      case WEAPON_PISTOL:        CAEWeaponAudioEntity::PlayGunSounds(this, entity, 52, 53, 6, 7, 8, audioEventId, 0.0, 1.41421, 1.0);        break;      case WEAPON_DESERT_EAGLE:        CAEWeaponAudioEntity::PlayGunSounds(this, entity, 52, 53, 6, 7, 8, audioEventId, 0.0, 0.94387001, 1.0);        break;      case WEAPON_PISTOL_SILENCED:        CAEWeaponAudioEntity::PlayGunSounds(this, entity, 76, 77, 24, 24, -1, audioEventId, -7.0, 1.0, 1.0);        break;      case WEAPON_AK47:      case WEAPON_M4:        CAEWeaponAudioEntity::PlayGunSounds(this, entity, 33, 53, 3, 4, 5, audioEventId, 0.0, 1.0, 1.0);        break;      case WEAPON_MICRO_UZI:        CAEWeaponAudioEntity::PlayGunSounds(this, entity, 29, 30, 0, 1, 2, audioEventId, 0.0, 1.0, 1.0);        break;      case WEAPON_TEC9:        CAEWeaponAudioEntity::PlayGunSounds(this, entity, 29, 30, 0, 1, 2, audioEventId, 0.0, 1.25992, 1.0);        break;      case WEAPON_MP5:        CAEWeaponAudioEntity::PlayGunSounds(this, entity, 29, 30, 17, 18, 2, audioEventId, 0.0, 1.0, 1.0);        break;      case WEAPON_SNIPERRIFLE:        CAEWeaponAudioEntity::PlayGunSounds(this, entity, 52, 53, 26, 27, 23, audioEventId, 0.0, 1.0, 1.0);        break;      case WEAPON_COUNTRYRIFLE:        CAEWeaponAudioEntity::PlayGunSounds(this, entity, 52, 53, 26, 27, 23, audioEventId, 0.0, 0.88999999, 1.0);        break;      case WEAPON_SHOTGUN:      case WEAPON_SPAS12:        v7 = 0x3F800000;        v6 = 0x3F800000;        v5 = audioEventId;        goto LABEL_14;      case WEAPON_SAWNOFF:        v7 = 0x3F6E147B;        v6 = 0x3F4B2FEC;        v5 = audioEventId;LABEL_14:        CAEWeaponAudioEntity::PlayGunSounds(this, entity, 73, 74, 21, 22, 23, v5, 0.0, *(float *)&v6, *(float *)&v7);        break;      case WEAPON_FTHROWER:        if ( !this->m_dwFlameThrowerLastPlayedTime )          CAEWeaponAudioEntity::PlayFlameThrowerSounds(this, entity, 83, 26, audioEventId, -14.0, 1.0);        v4->m_dwFlameThrowerLastPlayedTime = CTimer::m_snTimeInMilliseconds;        break;      case WEAPON_SPRAYCAN:        if ( !this->m_dwSpraycanLastPlayedTime )          CAEWeaponAudioEntity::PlayWeaponLoopSound(this, entity, 28, audioEventId, -20.0, 1.0, 3u);        v4->m_dwSpraycanLastPlayedTime = CTimer::m_snTimeInMilliseconds;        break;      case WEAPON_EXTINGUISHER:        if ( !this->m_dwExtinguisherLastPlayedTime )          CAEWeaponAudioEntity::PlayWeaponLoopSound(this, entity, 9, audioEventId, -20.0, 0.79369998, 4u);        v4->m_dwExtinguisherLastPlayedTime = CTimer::m_snTimeInMilliseconds;        break;      case WEAPON_CAMERA:        CAEWeaponAudioEntity::PlayCameraSound(this, entity, audioEventId, -14.0);        break;      case WEAPON_DETONATOR:        CAEWeaponAudioEntity::PlayGunSounds(this, entity, 49, -1, -1, -1, -1, audioEventId, -14.0, 1.0, 1.0);        break;      case WEAPON_MINIGUN:        CAEWeaponAudioEntity::PlayMiniGunFireSounds(this, entity, audioEventId);        break;      case WEAPON_NIGHTVISION:      case WEAPON_INFRARED:        CAEWeaponAudioEntity::PlayGoggleSound(this, 64, audioEventId);        break;      default:        return;    }  }}

 

 

 

0A8C: write_memory 0x505248 size 4 value 0x504FF4 virtual_protect 0     //    case WEAPON_PISTOL_SILENCED0A8C: write_memory 0x505260 size 4 value 0x505093 virtual_protect 0     //  case WEAPON_MP5

Well i dont even know c so i need a very basic way of doing it........ but dont take it wrong i have some very basic skills (only using img and editing dat files with txt...) (i need mods and such)

Edited by Troll Sniper
crashoverride93

 

 

 

 

void __thiscall CAEWeaponAudioEntity::WeaponFire(CAEPedWeaponAudioEntity *this, eWeaponType weaponType, CPhysical *entity, int audioEventId){  CAEPedWeaponAudioEntity *v4; // esi@1  int v5; // [sp-10h] [bp-14h]@12  signed int v6; // [sp-8h] [bp-Ch]@12  signed int v7; // [sp-4h] [bp-8h]@12  v4 = this;  if ( entity )  {    switch ( weaponType )    {      case WEAPON_PISTOL:        CAEWeaponAudioEntity::PlayGunSounds(this, entity, 52, 53, 6, 7, 8, audioEventId, 0.0, 1.41421, 1.0);        break;      case WEAPON_DESERT_EAGLE:        CAEWeaponAudioEntity::PlayGunSounds(this, entity, 52, 53, 6, 7, 8, audioEventId, 0.0, 0.94387001, 1.0);        break;      case WEAPON_PISTOL_SILENCED:        CAEWeaponAudioEntity::PlayGunSounds(this, entity, 76, 77, 24, 24, -1, audioEventId, -7.0, 1.0, 1.0);        break;      case WEAPON_AK47:      case WEAPON_M4:        CAEWeaponAudioEntity::PlayGunSounds(this, entity, 33, 53, 3, 4, 5, audioEventId, 0.0, 1.0, 1.0);        break;      case WEAPON_MICRO_UZI:        CAEWeaponAudioEntity::PlayGunSounds(this, entity, 29, 30, 0, 1, 2, audioEventId, 0.0, 1.0, 1.0);        break;      case WEAPON_TEC9:        CAEWeaponAudioEntity::PlayGunSounds(this, entity, 29, 30, 0, 1, 2, audioEventId, 0.0, 1.25992, 1.0);        break;      case WEAPON_MP5:        CAEWeaponAudioEntity::PlayGunSounds(this, entity, 29, 30, 17, 18, 2, audioEventId, 0.0, 1.0, 1.0);        break;      case WEAPON_SNIPERRIFLE:        CAEWeaponAudioEntity::PlayGunSounds(this, entity, 52, 53, 26, 27, 23, audioEventId, 0.0, 1.0, 1.0);        break;      case WEAPON_COUNTRYRIFLE:        CAEWeaponAudioEntity::PlayGunSounds(this, entity, 52, 53, 26, 27, 23, audioEventId, 0.0, 0.88999999, 1.0);        break;      case WEAPON_SHOTGUN:      case WEAPON_SPAS12:        v7 = 0x3F800000;        v6 = 0x3F800000;        v5 = audioEventId;        goto LABEL_14;      case WEAPON_SAWNOFF:        v7 = 0x3F6E147B;        v6 = 0x3F4B2FEC;        v5 = audioEventId;LABEL_14:        CAEWeaponAudioEntity::PlayGunSounds(this, entity, 73, 74, 21, 22, 23, v5, 0.0, *(float *)&v6, *(float *)&v7);        break;      case WEAPON_FTHROWER:        if ( !this->m_dwFlameThrowerLastPlayedTime )          CAEWeaponAudioEntity::PlayFlameThrowerSounds(this, entity, 83, 26, audioEventId, -14.0, 1.0);        v4->m_dwFlameThrowerLastPlayedTime = CTimer::m_snTimeInMilliseconds;        break;      case WEAPON_SPRAYCAN:        if ( !this->m_dwSpraycanLastPlayedTime )          CAEWeaponAudioEntity::PlayWeaponLoopSound(this, entity, 28, audioEventId, -20.0, 1.0, 3u);        v4->m_dwSpraycanLastPlayedTime = CTimer::m_snTimeInMilliseconds;        break;      case WEAPON_EXTINGUISHER:        if ( !this->m_dwExtinguisherLastPlayedTime )          CAEWeaponAudioEntity::PlayWeaponLoopSound(this, entity, 9, audioEventId, -20.0, 0.79369998, 4u);        v4->m_dwExtinguisherLastPlayedTime = CTimer::m_snTimeInMilliseconds;        break;      case WEAPON_CAMERA:        CAEWeaponAudioEntity::PlayCameraSound(this, entity, audioEventId, -14.0);        break;      case WEAPON_DETONATOR:        CAEWeaponAudioEntity::PlayGunSounds(this, entity, 49, -1, -1, -1, -1, audioEventId, -14.0, 1.0, 1.0);        break;      case WEAPON_MINIGUN:        CAEWeaponAudioEntity::PlayMiniGunFireSounds(this, entity, audioEventId);        break;      case WEAPON_NIGHTVISION:      case WEAPON_INFRARED:        CAEWeaponAudioEntity::PlayGoggleSound(this, 64, audioEventId);        break;      default:        return;    }  }}

 

 

 

0A8C: write_memory 0x505248 size 4 value 0x504FF4 virtual_protect 0     //    case WEAPON_PISTOL_SILENCED0A8C: write_memory 0x505260 size 4 value 0x505093 virtual_protect 0     //  case WEAPON_MP5
Well i dont even know c so i need a very basic way of doing it........ but dont take it wrong i have some very basic skills (only using img and editing dat files with txt...) (i need mods and such) . This is a Cleo script he wrote for you just paste in in sannybuilder and compile it as a .cs file
JanyaGalactic

if he didn't know what code it was then probably someone else should compile it for him, he might mess up in sannybuilder

EDIT: this script will crash the game when only those 2 lines are compiled

Edited by ACM-Jan

I guess not such all-in-one mod for that.

But all i know is you should change your own weapon sound in "Audio" folder.

You need to request a modeler too, for making a silenced weapon for you.

Or just he\she add a simple silencer model top of one of Game's guns.

I guess not such all-in-one mod for that.

But all i know is you should change your own weapon sound in "Audio" folder.

You need to request a modeler too, for making a silenced weapon for you.

Or just he\she add a simple silencer model top of one of Game's guns.

İ Meant technically

JanyaGalactic

There's nothing wrong with those 2 lines.

but simple compiling into cs and loading game with it will crash it, how about that, prove on the video it is working actually or is there something you not telling, maybe you are using some line in front and end of those lines, until you prove otherwise you are full of BS

THOSE 2 LINES ALONE combined with {$CLEO .cs} (which will make those 2 lines cs file accepted by sanny builder) will not let the game load up when used in cleo, there must be some lines more!

Edited by ACM-Jan
JanyaGalactic

only problem is the newbie was suggested to compile only those 2 lines i was trying to prove this is impossible, i was aware of the thread thing but i do not know yet can this thread be called just 'weapon_MP5'

crashoverride93

only problem is the newbie was suggested to compile only those 2 lines i was trying to prove this is impossible, i was aware of the thread thing but i do not know yet can this thread be called just 'weapon_MP5'

Yes you did need to make a thread the entire argument was my fault sorry

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.