What's new

Tutorial Mw3 Playsound [RELEASE]

  • Thread starter swegmor
  • Start date
  • Views 1,945
swegmor

swegmor

Enthusiast
Messages
53
Reaction score
11
Points
90
Sin$
0
Since Modding is kinda Dead, i want to release some good things.
This can be used for playing some sounds.
Like xNET does. btw c++ :tongue:.

Code:
First this: typedef void(*playsound)(int client, const char*, int); playsound PlaySnd = (playsound)0x824E1908;

all mw3 sounds:
Killstreaks
- NUKE (aka MOAB) (lazy lazy IW)
nuke_incoming
nuke_wave
ui_mp_nukebomb_timer
- REMOTE MORTAR
reaper_fire
reaper_damaged
- REMOTE TANK
talon_reload_plr
talon_missile_fire_plr
talon_rocket_reload_plr
talon_destroyed
talon_damaged
talon_reload
talon_rocket_reload
talon_missile_fire
bmp_fire
- REMOTE UAV
recondrone_lockon
recondrone_tag
recondrone_destroyed
- HARRIER
harrier_fly_away
harrier_jet_crash
- PREDATOR MISSILE (i guess, not sure)
remotemissile_explode (also mentioned in 'explosions' category)

Equipment
- Scrambler
scrambler_beep
- Sentry
sentry_gun_beep
sentry_explode (also mentioned in 'explosions' category)
sentry_gun_plant
sentry_explode_smoke
- Claymore
claymore_activated
- Betty
mine_betty_click
mine_betty_spin
- IMS
ims_destroyed
ims_fire
ims_plant
ims_trigger
ims_launch

Voices
mp_war_objective_lost
mp_war_objective_taken
mp_enemy_obj_captured
mp_obj_captured
mp_war_objective_taken
mp_war_objective_lost
fasten_seatbelts
missile_incoming

Explosions'n'****
sentry_explode
exp_suitcase_bomb_main
grenade_explode_metal
cobra_helicopter_crash
exp_airstrike_bomb
veh_mig29_sonic_boom (no idea what sonic boom is, guess it's a explosion)
veh_b2_sonic_boom
exp_stinger_armor_destroy
explo_mine
remotemissile_explode

SD
mp_bomb_plant
mp_bomb_defuse
mp_suitcase_pickup
ui_mp_suitcasebomb_timer

Health
breathing_better
breathing_hurt
player_hit_while_ads_hurt

oma.png

foly_onemanarmy_bag3_plr
foly_onemanarmy_bag6_plr

Weapons
- JAVELIN
javelin_clu_lock (BEEEEEEEEEEEEEEEEEEEP BEEPBEEPBEEPBEEP)
- STINGER
missile_locking
exp_stinger_armor_destroy (also mentioned in 'explosions' category)

Death sounds
generic_death_russian_1
generic_death_russian_2
generic_death_russian_3
generic_death_russian_4
generic_death_russian_5
generic_death_russian_6
generic_death_russian_7
generic_death_russian_8
generic_death_american_1
generic_death_american_2
generic_death_american_3
generic_death_american_4
generic_death_american_5
generic_death_american_6
generic_death_american_7
generic_death_american_8

Elevator (idk, gsc said they were MP)
elev_door_open
elev_door_close
elev_run_start
elev_door_interupt
elev_run_end
elev_bell_ding

Kill confirmed
mp_killconfirm_tags_deny
mp_killconfirm_tags_pickup

AC130
veh_ac130_ext_dist_fade (???)
ac130_flare_burst
veh_ac130_sonic_boom

Random **** (please help to categorise these...)
fast_artillery_round
WEAP_SHOTGUNATTACH_FIRE_NPC
item_blast_shield_on
juggernaut_breathing_sound
mp_killstreak_radar
ammo_crate_use
scavenger_pack_pickup
mp_suitcase_pickup
bullet_impact_headshot_2
MP_hit_alert
scavenger_pack_pickup

Now you may ask where to place?
As an example i use Zone´s Mw3 base, credits to him--

https://gyazo.com/cf56d7dd53952ffda872d8e67550829d

PlaySnd(0, "scavenger_pack_pickup" ,0);

there ya go.

 
Last edited by a moderator:
ImOx

ImOx

(^._.^)ノ
Retired
Programmer MotM Platinum Record
Messages
9,961
Reaction score
2,963
Points
2,180
Sin$
0
Use [code][/code] for long lists like this please.
 
DeathRGH

DeathRGH

¯\_(ツ)_/¯
Messages
1,161
Reaction score
363
Points
210
Sin$
7
Since Modding is kinda Dead, i want to release some good things.
This can be used for playing some sounds.
Like xNET does. btw c++ :tongue:.

Code:
First this: typedef void(*playsound)(int client, const char*, int); playsound PlaySnd = (playsound)0x824E1908;

all mw3 sounds:
Killstreaks
- NUKE (aka MOAB) (lazy lazy IW)
nuke_incoming
nuke_wave
ui_mp_nukebomb_timer
- REMOTE MORTAR
reaper_fire
reaper_damaged
- REMOTE TANK
talon_reload_plr
talon_missile_fire_plr
talon_rocket_reload_plr
talon_destroyed
talon_damaged
talon_reload
talon_rocket_reload
talon_missile_fire
bmp_fire
- REMOTE UAV
recondrone_lockon
recondrone_tag
recondrone_destroyed
- HARRIER
harrier_fly_away
harrier_jet_crash
- PREDATOR MISSILE (i guess, not sure)
remotemissile_explode (also mentioned in 'explosions' category)

Equipment
- Scrambler
scrambler_beep
- Sentry
sentry_gun_beep
sentry_explode (also mentioned in 'explosions' category)
sentry_gun_plant
sentry_explode_smoke
- Claymore
claymore_activated
- Betty
mine_betty_click
mine_betty_spin
- IMS
ims_destroyed
ims_fire
ims_plant
ims_trigger
ims_launch

Voices
mp_war_objective_lost
mp_war_objective_taken
mp_enemy_obj_captured
mp_obj_captured
mp_war_objective_taken
mp_war_objective_lost
fasten_seatbelts
missile_incoming

Explosions'n'****
sentry_explode
exp_suitcase_bomb_main
grenade_explode_metal
cobra_helicopter_crash
exp_airstrike_bomb
veh_mig29_sonic_boom (no idea what sonic boom is, guess it's a explosion)
veh_b2_sonic_boom
exp_stinger_armor_destroy
explo_mine
remotemissile_explode

SD
mp_bomb_plant
mp_bomb_defuse
mp_suitcase_pickup
ui_mp_suitcasebomb_timer

Health
breathing_better
breathing_hurt
player_hit_while_ads_hurt

oma.png

foly_onemanarmy_bag3_plr
foly_onemanarmy_bag6_plr

Weapons
- JAVELIN
javelin_clu_lock (BEEEEEEEEEEEEEEEEEEEP BEEPBEEPBEEPBEEP)
- STINGER
missile_locking
exp_stinger_armor_destroy (also mentioned in 'explosions' category)

Death sounds
generic_death_russian_1
generic_death_russian_2
generic_death_russian_3
generic_death_russian_4
generic_death_russian_5
generic_death_russian_6
generic_death_russian_7
generic_death_russian_8
generic_death_american_1
generic_death_american_2
generic_death_american_3
generic_death_american_4
generic_death_american_5
generic_death_american_6
generic_death_american_7
generic_death_american_8

Elevator (idk, gsc said they were MP)
elev_door_open
elev_door_close
elev_run_start
elev_door_interupt
elev_run_end
elev_bell_ding

Kill confirmed
mp_killconfirm_tags_deny
mp_killconfirm_tags_pickup

AC130
veh_ac130_ext_dist_fade (???)
ac130_flare_burst
veh_ac130_sonic_boom

Random **** (please help to categorise these...)
fast_artillery_round
WEAP_SHOTGUNATTACH_FIRE_NPC
item_blast_shield_on
juggernaut_breathing_sound
mp_killstreak_radar
ammo_crate_use
scavenger_pack_pickup
mp_suitcase_pickup
bullet_impact_headshot_2
MP_hit_alert
scavenger_pack_pickup

Now you may ask where to place?
As an example i use Zone´s Mw3 base, credits to him--

https://gyazo.com/cf56d7dd53952ffda872d8e67550829d

PlaySnd(0, "scavenger_pack_pickup" ,0);

there ya go.
Do you have a stub for this? I wanted to hook it to replace sounds.
 
DeathRGH

DeathRGH

¯\_(ツ)_/¯
Messages
1,161
Reaction score
363
Points
210
Sin$
7
not yet but it could be. Like when you kill 5 people, you can place a sound with: Rampage. I hope so
I was actually able to figure this out with a little bit of help.
The code below will play a hitmarker sound whenever you click on something in the menu.

Code:
    int PlaySoundHook(int r3, const char* r4, int r5)
    {
        if (r4 == 0)
            return -1;

        if (strstr(r4, "mouse_click"))
        {
            r4 = "mp_hit_alert";
        }

        int soundAlias = ((int(*)(...))0x8231E938)(r4); // snd_alias_t *__cdecl Com_PickSoundAliasFromList(snd_alias_list_t *aliasList)

        if (soundAlias == 0)
            return -1;

        return ((int(*)(...))0x824E1820)(r3, soundAlias, r5); // int SND_PlayLocalSoundAlias(int localClientNum, snd_alias_t *alias, snd_alias_system_t system)
    }

Code:
0x824E1908  -  PlaySoundHook //SND_PlayLocalSoundAliasFromList



In case you are wondering how the function works:
Code:
//Pseudo Code:
SND_PlayLocalSoundAliasFromList(...)
{
    *(DWORD*)(var_8 + r1) = (DWORD)r12;
    *(uint64_t*)(var_18 + r1) = (uint64_t)r30;
    *(uint64_t*)(var_10 + r1) = (uint64_t)r31;
    *(DWORD*)(-0x70 + r1) = (DWORD)r1;
    r31 = r3;
    r30 = r5;
    r3 = r4;
    sub_8231E938(...);
    r4 = r3;
    r5 = r30;
    r3 = r31;
    sub_824E1820(...);
    goto loc_824E1954;

loc_824E1950:
    r3 = -1;

loc_824E1954:
    r1 += 0x70;
    r12 = *(DWORD*)(var_8 + r1);
    r30 = *(uint64_t*)(var_18 + r1);
    r31 = *(uint64_t*)(var_10 + r1);
    return;
}
 
Last edited:
Top Bottom
Login
Register