sound of shot

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Аватар
USA_CA
Извън линия
Foreigner
Foreigner
Мнения: 106
Регистриран на: 19 Юли 2020, 18:02

sound of shot

Мнение от USA_CA » 14 Сеп 2020, 17:54

looking for a plugin that replaces the sound of a gunshot on the server
for example a shot with awp

Аватар
atmax
Извън линия
Потребител
Потребител
Мнения: 492
Регистриран на: 22 Мар 2018, 15:06
Се отблагодари: 37 пъти
Получена благодарност: 43 пъти

sound of shot

Мнение от atmax » 14 Сеп 2020, 19:35

Код за потвърждение: Избери целия код

#include <amxmodx>
#include <fakemeta>

new g_hFMPrecacheSound;

public plugin_init()
{
    register_plugin("Null precache", "1.0", "Crazy");

    unregister_forward(FM_PrecacheSound, g_hFMPrecacheSound);
}

public plugin_precache()
{
    g_hFMPrecacheSound = register_forward(FM_PrecacheSound, "pfnPrecacheSound");   
}

public pfnPrecacheSound(const szSound[])
{
    if (!equali(szSound, "weapon/ak47-1.wav") && !equali(szSound, "weapon/ak47-2.wav"))
        return FMRES_IGNORED;

    forward_return(FMV_CELL, precache_sound("common/null.wav"));
    //forward_return(FMV_STRING, "common/null.wav");
    return FMRES_SUPERCEDE;
}
I found this for ak47 replace common/null.wav with your sound path and try
Rest in peace my friend I always will remember you! 🖤👊

Аватар
USA_CA
Извън линия
Foreigner
Foreigner
Мнения: 106
Регистриран на: 19 Юли 2020, 18:02

sound of shot

Мнение от USA_CA » 14 Сеп 2020, 20:16

atmax написа: 14 Сеп 2020, 19:35

Код за потвърждение: Избери целия код

#include <amxmodx>
#include <fakemeta>

new g_hFMPrecacheSound;

public plugin_init()
{
    register_plugin("Null precache", "1.0", "Crazy");

    unregister_forward(FM_PrecacheSound, g_hFMPrecacheSound);
}

public plugin_precache()
{
    g_hFMPrecacheSound = register_forward(FM_PrecacheSound, "pfnPrecacheSound");   
}

public pfnPrecacheSound(const szSound[])
{
    if (!equali(szSound, "weapon/ak47-1.wav") && !equali(szSound, "weapon/ak47-2.wav"))
        return FMRES_IGNORED;

    forward_return(FMV_CELL, precache_sound("common/null.wav"));
    //forward_return(FMV_STRING, "common/null.wav");
    return FMRES_SUPERCEDE;
}
I found this for ak47 replace common/null.wav with your sound path and try
does everyone on the server hear the sound, or is it just me?

Аватар
atmax
Извън линия
Потребител
Потребител
Мнения: 492
Регистриран на: 22 Мар 2018, 15:06
Се отблагодари: 37 пъти
Получена благодарност: 43 пъти

sound of shot

Мнение от atmax » 14 Сеп 2020, 20:41

If that works than it will be for everyone.
Also check out this plugin:
https://forums.alliedmods.net/showthrea ... 46?t=93746
Rest in peace my friend I always will remember you! 🖤👊

Аватар
USA_CA
Извън линия
Foreigner
Foreigner
Мнения: 106
Регистриран на: 19 Юли 2020, 18:02

sound of shot

Мнение от USA_CA » 14 Сеп 2020, 20:52

atmax написа: 14 Сеп 2020, 20:41 If that works than it will be for everyone.
Also check out this plugin:
https://forums.alliedmods.net/showthrea ... 46?t=93746
did so and error

Код за потвърждение: Избери целия код

[AMXX] Run time error 10 (plugin "sound_weapon.amxx") (native "precache_sound") - debug not enabled!
[AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).

Код за потвърждение: Избери целия код

public pfnPrecacheSound(const szSound[])
{
    if (!equali(szSound, "weapons/awp1.wav") && !equali(szSound, "weapons/awp1.wav"))  //old sound
        return FMRES_IGNORED;

    forward_return(FMV_CELL, precache_sound("weapons/csgoawp/awp1.wav")); //new sound
    //forward_return(FMV_STRING, "common/null.wav");
    return FMRES_SUPERCEDE;
}
Sound replacements changes only the sound of the knife, no other weapons

Аватар
atmax
Извън линия
Потребител
Потребител
Мнения: 492
Регистриран на: 22 Мар 2018, 15:06
Се отблагодари: 37 пъти
Получена благодарност: 43 пъти

sound of shot

Мнение от atmax » 15 Сеп 2020, 11:18

I'm not sure, but i think you can't change weapon fire sound..

Код за потвърждение: Избери целия код

#include <amxmodx>
#include <fakemeta>

#define NEWSOUND "mysoundhere.wav"

public plugin_init() {
register_forward(FM_EmitSound,"fw_emitsound");
}

public plugin_precache() {
precache_sound(NEWSOUND);
}

// catch sounds
public fw_emitsoundound(entity,channel,sample[],Float:volume,Float:attenuation,fFlags,pitch) {

// if it is our awp firing sound
if(equali(sample,"weapons/awp1.wav")) {
emit_sound(entity,channel,NEWSOUND,volume,att enuation,fFlags,pitch); // play our own
return FMRES_SUPERCEDE; // stop this one from playing
}

return FMRES_IGNORED;
}
Try this. If this not work then.. yeah.. you can't change this sound.
Rest in peace my friend I always will remember you! 🖤👊

Аватар
JackEyedJones
Извън линия
Потребител
Потребител
Мнения: 399
Регистриран на: 10 Сеп 2018, 17:26
Местоположение: Plovdiv, Bulgaria, Europe, Entire World
Се отблагодари: 4 пъти
Получена благодарност: 69 пъти
Обратна връзка:

sound of shot

Мнение от JackEyedJones » 15 Сеп 2020, 14:13

Shot sounds of weapons other than knife cannot be changed.
As i remember i've read it in a post of Ocix long time ago.

Публикувай отговор
  • Подобни теми
    Отговори
    Преглеждания
     Последно мнение

Обратно към “Заявки за плъгини”

Кой е на линия

Потребители разглеждащи този форум: Bing [Bot] и 22 госта