Raised This Month: $32 Target: $400
 8% 

CSGO What's the plugin for hs bell sound?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Comlog
Junior Member
Join Date: May 2023
Old 05-15-2023 , 08:05   CSGO What's the plugin for hs bell sound?
Reply With Quote #1

Hey im looking for the plugin hs bell/ding sound when you shoot someone in the head a bell/ding sound plays

Last edited by Comlog; 05-15-2023 at 08:13.
Comlog is offline
oqyh
Senior Member
Join Date: May 2019
Location: United Arab Emirates
Old 05-15-2023 , 15:24   Re: CSGO What's the plugin for hs bell sound?
Reply With Quote #2

Quote:
Originally Posted by Comlog View Post
Hey im looking for the plugin hs bell/ding sound when you shoot someone in the head a bell/ding sound plays
https://github.com/oqyh/Plugins-Made...ound%20(1.0.3)
__________________
.:[ >> My Plugins << ]:.

My discord : oqyh

Last edited by oqyh; 05-26-2023 at 12:28.
oqyh is offline
asdfxD
Veteran Member
Join Date: Apr 2011
Old 05-16-2023 , 08:49   Re: CSGO What's the plugin for hs bell sound?
Reply With Quote #3

doesnt play anything.
asdfxD is offline
oqyh
Senior Member
Join Date: May 2019
Location: United Arab Emirates
Old 05-16-2023 , 19:12   Re: CSGO What's the plugin for hs bell sound?
Reply With Quote #4

Quote:
Originally Posted by asdfxD View Post
doesnt play anything.
increase volume
hs_sound_volume 1.00
__________________
.:[ >> My Plugins << ]:.

My discord : oqyh
oqyh is offline
oqyh
Senior Member
Join Date: May 2019
Location: United Arab Emirates
Old 05-21-2023 , 01:14   Re: CSGO What's the plugin for hs bell sound?
Reply With Quote #5

Quote:
Originally Posted by asdfxD View Post
doesnt play anything.
fixed
https://github.com/oqyh/Plugins-Made...ound%20(1.0.3)
__________________
.:[ >> My Plugins << ]:.

My discord : oqyh

Last edited by oqyh; 05-26-2023 at 12:28.
oqyh is offline
Comlog
Junior Member
Join Date: May 2023
Old 05-22-2023 , 07:48   Re: CSGO What's the plugin for hs bell sound?
Reply With Quote #6

Quote:
Originally Posted by oqyh View Post
How can i make it play the sound for the attacker only in every hs, not only after kill
Comlog is offline
oqyh
Senior Member
Join Date: May 2019
Location: United Arab Emirates
Old 05-22-2023 , 08:28   Re: CSGO What's the plugin for hs bell sound?
Reply With Quote #7

Quote:
Originally Posted by Comlog View Post
How can i make it play the sound for the attacker only in every hs, not only after kill
change hs_sound_enable to 2

not tested

PHP Code:

#pragma semicolon 1
#pragma newdecls required

#include <sourcemod>
#include <sdktools>

#define PLUGIN_VERSION    "1.0.2"

ConVar Sound;
ConVar Soundvolume;

int bSound 0;
float bSoundvolume 0.00;

Handle SoundPath        INVALID_HANDLE;

public 
Plugin myinfo 
{
    
name "[ANY] Headshot Sound",
    
author "Gold KingZ",
    
description "Headshot Kill Sound",
    
version     PLUGIN_VERSION,
    
url "https://github.com/oqyh"
}

public 
void OnPluginStart()
{
    
CreateConVar("hs_sound_version"PLUGIN_VERSION"[ANY] Headshot Sound Plugin Version"FCVAR_NOTIFY|FCVAR_DONTRECORD);
    
    
Sound        =    CreateConVar"hs_sound_enable",     "1",    "Enable HeadShot Sound? || 2= Yes After Every Headshot || 1= Yes After Kill || 0= No"_true0.0true2.0);
    
Soundvolume        =    CreateConVar"hs_sound_volume",     "0.30",    "Volume of the Sound From 0.00 To 1.00 || 1.00 is the hightest"_true0.00true1.00);
    
SoundPath    =    CreateConVar"hs_sound_file",    "training/bell_normal.wav","if hs_sound_enable 1 or 2 Where is Sound Location Without Sound/ beginning" );
    
    
HookEvent("player_death"Event_PlayerDeath_PreEventHookMode_Pre);
    
HookEvent("player_hurt"Event_PlayerHurt_PreEventHookMode_Pre);
    
    
HookConVarChange(SoundOnSettingsChanged);
    
HookConVarChange(SoundvolumeOnSettingsChanged);
    
    
AutoExecConfig(true"Headshot_Sound");
}

public 
void OnConfigsExecuted()
{
    
bSound GetConVarInt(Sound);
    
bSoundvolume GetConVarFloat(Soundvolume);
    
    if(
GetConVarInt(Sound) == || GetConVarInt(Sound) == 2)
    {
        
char iFileSound[PLATFORM_MAX_PATH];
        
GetConVarString(SoundPathiFileSoundsizeof(iFileSound));
        if(!
StrEqual(iFileSound""))
        {
            
char download[PLATFORM_MAX_PATH];
            
Format(downloadsizeof(download), "sound/%s"iFileSound);
            
AddFileToDownloadsTable(download);
            
PrecacheSound(iFileSound);
        }
    }
    
}

public 
int OnSettingsChanged(Handle convar, const char[] oldValue, const char[] newValue)
{
    if(
convar == Sound)
    {
        
bSound Sound.IntValue;
    }
    
    if(
convar == Soundvolume)
    {
        
bSoundvolume Soundvolume.FloatValue;
    }
    
    return 
0;
}

public 
Action Event_PlayerDeath_Pre(Event event, const char[] namebool dontBroadcast)
{
    if(
bSound != 1)return Plugin_Continue;
    
    
int attacker GetClientOfUserId(event.GetInt("attacker"));
    
bool headshot GetEventBool(event"headshot");
    
    
char iFileSound[PLATFORM_MAX_PATH];
    
GetConVarString(SoundPathiFileSoundsizeof(iFileSound));
    
    if(
IsValidClient(attacker))
    {
        if(
headshot)
        {
            
EmitSoundToClient(attackeriFileSound____bSoundvolume);
        }
    }
    return 
Plugin_Continue;
}

public 
Action Event_PlayerHurt_Pre(Event event, const char[] namebool dontBroadcast)
{
    if(
bSound != 2)return Plugin_Continue;
    
    
int attacker GetClientOfUserId(event.GetInt("attacker"));
    
bool headshot GetEventBool(event"headshot");
    
    
char iFileSound[PLATFORM_MAX_PATH];
    
GetConVarString(SoundPathiFileSoundsizeof(iFileSound));
    
    if(
IsValidClient(attacker))
    {
        if(
headshot)
        {
            
EmitSoundToClient(attackeriFileSound____bSoundvolume);
        }
    }
    return 
Plugin_Continue;
}

stock bool IsValidClient(int iClient)
{
    return (
<= iClient <= MaxClients && IsClientInGame(iClient)) ? true false;

__________________
.:[ >> My Plugins << ]:.

My discord : oqyh
oqyh is offline
Comlog
Junior Member
Join Date: May 2023
Old 05-22-2023 , 10:11   Re: CSGO What's the plugin for hs bell sound?
Reply With Quote #8

[QUOTE=oqyh;2804818]change hs_sound_enable to 2

not tested

it didnt work. Can you help me play the sound in every hs?
Comlog is offline
oqyh
Senior Member
Join Date: May 2019
Location: United Arab Emirates
Old 05-23-2023 , 06:36   Re: CSGO What's the plugin for hs bell sound?
Reply With Quote #9

[QUOTE=Comlog;2804821]
Quote:
Originally Posted by oqyh View Post
change hs_sound_enable to 2

not tested

it didnt work. Can you help me play the sound in every hs?
check last update

https://github.com/oqyh/Plugins-Made...ound%20(1.0.3)
__________________
.:[ >> My Plugins << ]:.

My discord : oqyh

Last edited by oqyh; 05-26-2023 at 12:28.
oqyh is offline
Comlog
Junior Member
Join Date: May 2023
Old 05-25-2023 , 10:32   Re: CSGO What's the plugin for hs bell sound?
Reply With Quote #10

[QUOTE=oqyh;2804861]
Quote:
Originally Posted by Comlog View Post

Its still not working, Sound plays after hs only. i changed "hs_sound_enable", "2" but not working
Comlog is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:37.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode