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

[REQ] Change Weapons Sound


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 03-24-2020 , 05:08   [REQ] Change Weapons Sound
Reply With Quote #1

Hi, I want a plugin so I can change the sound of the guns

Code:
weapons/ak47-1.wav change to weapons/new/ak47-1.wav
weapons/ak47_boltpull.wav change to weapons/new/ak47_boltpull.wav
weapons/ak47_clipin.wav change to weapons/new/ak47_clipin.wav
weapons/ak47_clipout.wav change to weapons/new/ak47_clipout.wav
alferd is offline
allame61
Member
Join Date: Feb 2017
Location: Turkey
Old 03-24-2020 , 07:47   Re: [REQ] Change Weapons Sound
Reply With Quote #2

https://www.mediafire.com/file/n3efx...sleri.zip/file


you can edit sounds in .sma file

upload files to sound/weapons

Last edited by allame61; 03-24-2020 at 07:47.
allame61 is offline
Nutu_
AlliedModders Donor
Join Date: Mar 2016
Location: Germany
Old 03-24-2020 , 15:47   Re: [REQ] Change Weapons Sound
Reply With Quote #3

you can use this -> https://forums.alliedmods.net/showth...=43979?t=43979
__________________
a simple act of caring creates an endless ripple.
Nutu_ is offline
tarsisd2
Veteran Member
Join Date: Feb 2016
Location: brazil
Old 03-24-2020 , 16:42   Re: [REQ] Change Weapons Sound
Reply With Quote #4

Quote:
Originally Posted by Nutu_ View Post
Wont work, he said he wants to change ak47 sounds, the link you provide can only change sounds from knive and grenades
tarsisd2 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-24-2020 , 17:06   Re: [REQ] Change Weapons Sound
Reply With Quote #5

You can't change weapon sounds (or at least not that easily), you can only add new ones over the existing.
__________________

Last edited by OciXCrom; 03-24-2020 at 17:06.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 03-25-2020 , 04:16   Re: [REQ] Change Weapons Sound
Reply With Quote #6

Quote:
Originally Posted by OciXCrom View Post
You can't change weapon sounds (or at least not that easily), you can only add new ones over the existing.
I've heard that with editing the plugin it does work
Can this plugin be edited?

I want to change the sound of this weapon
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <fun>
#include <hamsandwich>
#include <cstrike>
#include <amxmisc>


#define is_valid_player(%1) (1 <= %1 <= 32)

new AK_V_MODEL[64] = "models/v_golden_ak47.mdl"
new AK_P_MODEL[64] = "models/p_golden_ak47.mdl"

/* Pcvars */
new cvar_dmgmultipliercvar_goldbullets,  cvar_custommodelcvar_uclipcvar_cost

new bool:g_HasAk[33]

new 
g_hasZoom33 ]
new 
bullets33 ]

// Sprite
new m_spriteTexture

const Wep_ak47 = ((1<<CSW_AK47))

public 
plugin_init()
{
    
    
/* CVARS */
    
cvar_dmgmultiplier register_cvar("goldenak_dmg_multiplier""5")
    
cvar_custommodel register_cvar("goldenak_custom_model""1")
    
cvar_goldbullets register_cvar("goldenak_gold_bullets""1")
    
cvar_uclip register_cvar("goldenak_unlimited_clip""1")
    
cvar_cost register_cvar("goldenak_cost""0")
    
    
// Register The Buy Cmd
    
register_clcmd("say /drdfgghrreg""CmdBuyAk")
    
register_clcmd("say_team /drdfgghrreg""CmdBuyAk")
    
register_concmd("amx_goldenak""CmdGiveAk"ADMIN_BAN"<name>")
    
    
// Register The Plugin
    
register_plugin("Golden Ak 47""1.0""AlejandroSk")
    
// Death Msg
    
register_event("DeathMsg""Death""a")
    
// Weapon Pick Up
    
register_event("WeapPickup","checkModel","b","1=19")
    
// Current Weapon Event
    
register_event("CurWeapon","checkWeapon","be","1=1")
    
register_event("CurWeapon""make_tracer""be""1=1""3>0")
    
// Ham TakeDamage
    
RegisterHam(Ham_TakeDamage"player""fw_TakeDamage")
    
register_forwardFM_CmdStart"fw_CmdStart" )
    
RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1)
    
}

public 
client_connect(id)
{
    
g_HasAk[id] = false
}

public 
client_disconnect(id)
{
    
g_HasAk[id] = false
}

public 
Death()
{
    
g_HasAk[read_data(2)] = false
}

public 
fwHamPlayerSpawnPost(id)
{
    
g_HasAk[id] = false
}

public 
plugin_precache()
{
    
precache_model(AK_V_MODEL)
    
precache_model(AK_P_MODEL)
    
m_spriteTexture precache_model("sprites/dot.spr")
    
precache_sound("weapons/zoom.wav")
}

public 
checkModel(id)
{
    if ( !
g_HasAk[id] )
        return 
PLUGIN_HANDLED
    
    
new szWeapID read_data(2)
    
    if ( 
szWeapID == CSW_AK47 && g_HasAk[id] == true && get_pcvar_num(cvar_custommodel) )
    {
        
set_pev(idpev_viewmodel2AK_V_MODEL)
        
set_pev(idpev_weaponmodel2AK_P_MODEL)
    }
    return 
PLUGIN_HANDLED
}

public 
checkWeapon(id)
{
    new 
plrClipplrAmmoplrWeap[32]
    new 
plrWeapId
    
    plrWeapId 
get_user_weapon(idplrClip plrAmmo)
    
    if (
plrWeapId == CSW_AK47 && g_HasAk[id])
    {
        
checkModel(id)
    }
    else 
    {
        return 
PLUGIN_CONTINUE
    
}
    
    if (
plrClip == && get_pcvar_num(cvar_uclip))
    {
        
// If the user is out of ammo..
        
get_weaponname(plrWeapIdplrWeap31)
        
// Get the name of their weapon
        
give_item(idplrWeap)
        
engclient_cmd(idplrWeap
        
engclient_cmd(idplrWeap)
        
engclient_cmd(idplrWeap)
    }
    return 
PLUGIN_HANDLED
}



public 
fw_TakeDamage(victiminflictorattackerFloat:damage)
{
    if ( 
is_valid_playerattacker ) && get_user_weapon(attacker) == CSW_AK47 && g_HasAk[attacker] )
    {
        
SetHamParamFloat(4damage get_pcvar_floatcvar_dmgmultiplier ) )
    }
}

public 
fw_CmdStartiduc_handleseed )
{
    if( !
is_user_aliveid ) ) 
        return 
PLUGIN_HANDLED
    
    
if( ( get_ucuc_handleUC_Buttons ) & IN_ATTACK2 ) && !( pevidpev_oldbuttons ) & IN_ATTACK2 ) )
    {
        new 
szClipszAmmo
        
new szWeapID get_user_weaponidszClipszAmmo )
        
        if( 
szWeapID == CSW_AK47 && g_HasAk[id] == true && !g_hasZoom[id] == true)
        {
            
g_hasZoom[id] = true
            cs_set_user_zoom
idCS_SET_AUGSG552_ZOOM)
            
emit_soundidCHAN_ITEM"weapons/zoom.wav"0.202.400100 )
        }
        
        else if ( 
szWeapID == CSW_AK47 && g_HasAk[id] == true && g_hasZoom[id])
        {
            
g_hasZoomid ] = false
            cs_set_user_zoom
idCS_RESET_ZOOM)
            
        }
        
    }
    return 
PLUGIN_HANDLED
}


public 
make_tracer(id)
{
    if (
get_pcvar_num(cvar_goldbullets))
    {
        new 
clip,ammo
        
new wpnid get_user_weapon(id,clip,ammo)
        new 
pteam[16]
        
        
get_user_team(idpteam15)
        
        if ((
bullets[id] > clip) && (wpnid == CSW_AK47) && g_HasAk[id]) 
        {
            new 
vec1[3], vec2[3]
            
get_user_origin(idvec11// origin; your camera point.
            
get_user_origin(idvec24// termina; where your bullet goes (4 is cs-only)
            
            
            //BEAMENTPOINTS
            
message_beginMSG_BROADCAST,SVC_TEMPENTITY)
            
write_byte (0)     //TE_BEAMENTPOINTS 0
            
write_coord(vec1[0])
            
write_coord(vec1[1])
            
write_coord(vec1[2])
            
write_coord(vec2[0])
            
write_coord(vec2[1])
            
write_coord(vec2[2])
            
write_shortm_spriteTexture )
            
write_byte(1// framestart
            
write_byte(5// framerate
            
write_byte(2// life
            
write_byte(10// width
            
write_byte(0// noise
            
write_byte255 )     // r, g, b
            
write_byte215 )       // r, g, b
            
write_byte)       // r, g, b
            
write_byte(200// brightness
            
write_byte(150// speed
            
message_end()
        }
        
        
bullets[id] = clip
    
}
    
}

public 
CmdBuyAk(id)
{
    if ( !
is_user_alive(id) )
    {
        
client_print(id,print_chat"[AMXX] To buy golden Ak 47 You need to be alive!")
        return 
PLUGIN_HANDLED
    
}
    
    new 
money cs_get_user_money(id)
    
    if (
money >= get_pcvar_num(cvar_cost))
    {
        
cs_set_user_money(idmoney get_pcvar_num(cvar_cost))
        
give_item(id"weapon_ak47")
        
g_HasAk[id] = true
    
}
    
    else
    {
        
client_print(idprint_chat"[AMXX] You dont hav enough money to buy Golden Ak 47. Cost $%d "get_pcvar_num(cvar_cost))
    }
    return 
PLUGIN_HANDLED
}

public 
CmdGiveAk(id,level,cid)
{
    if (!
cmd_access(id,level,cid,2))
        return 
PLUGIN_HANDLED;
    new 
arg[32];
    
read_argv(1,arg,31);
    
    new 
player cmd_target(id,arg,7);
    if (!
player
        return 
PLUGIN_HANDLED;
    
    new 
name[32];
    
get_user_name(player,name,31);
    
    
give_item(player"weapon_ak47")
    
g_HasAk[player] = true
    
    
return PLUGIN_HANDLED
}

stock drop_prim(id
{
    new 
weapons[32], num
    get_user_weapons
(idweaponsnum)
    for (new 
0numi++) {
        if (
Wep_ak47 & (1<<weapons[i])) 
        {
            static 
wname[32]
            
get_weaponname(weapons[i], wnamesizeof wname 1)
            
engclient_cmd(id"drop"wname)
        }
    }

alferd is offline
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 03-25-2020 , 04:17   Re: [REQ] Change Weapons Sound
Reply With Quote #7

Quote:
Originally Posted by tarsisd2 View Post
Wont work,
Yes it doesn't work
alferd is offline
allame61
Member
Join Date: Feb 2017
Location: Turkey
Old 03-25-2020 , 08:05   Re: [REQ] Change Weapons Sound
Reply With Quote #8

that plugin i give, it works well , try it
allame61 is offline
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 03-25-2020 , 08:23   Re: [REQ] Change Weapons Sound
Reply With Quote #9

Quote:
Originally Posted by allame61 View Post
that plugin i give, it works well , try it
This plugin can change the sound of the firing

I want to change some other sounds as well:
Code:
weapons/ak47_boltpull.wav change to weapons/new/ak47_boltpull.wav
weapons/ak47_clipin.wav change to weapons/new/ak47_clipin.wav
weapons/ak47_clipout.wav change to weapons/new/ak47_clipout.wav
alferd is offline
allame61
Member
Join Date: Feb 2017
Location: Turkey
Old 03-25-2020 , 08:40   Re: [REQ] Change Weapons Sound
Reply With Quote #10

open model
decompile it,
open .qc file,
look to sound files where are they belong
and just precache their sounds with one plugin
and upload plugin into your server, also model
it will work
allame61 is offline
Reply



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 23:23.


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