AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   knife sound (https://forums.alliedmods.net/showthread.php?t=26231)

blacam00 03-29-2006 03:46

knife sound
 
I've tried a few plugins that are supposed to enable me to change knife sounds. Such as the knife deploy sound, knife stab, knife slash, etc...but they dont seem to work properly. I found an unaproved plugin by Cheap Suit that worked except the deploy and stab sound did not work. I've also tried the port of krot@ls change model plugin and it doesn't work either. Can someone provide me the proper code to change the knife sounds. Thanks :)

v3x 03-29-2006 04:04

Here's what I did for the knife sounds on the GHW server:
Code:
#include <amxmodx> #include <fakemeta> #define MAX_KNIFE_SNDS 9 public plugin_init() {     register_plugin("Custom knife sounds" , "0.1" , "v3x");     register_forward(FM_EmitSound , "EmitSound"); } // Original knife sounds new knife_sounds_o[MAX_KNIFE_SNDS][] = {     "weapons/knife_deploy1.wav",     "weapons/knife_hit1.wav",     "weapons/knife_hit2.wav",     "weapons/knife_hit3.wav",     "weapons/knife_hit4.wav",     "weapons/knife_hitwall1.wav",     "weapons/knife_slash1.wav",     "weapons/knife_slash2.wav",     "weapons/knife_stab.wav" } // Replacement knife sounds ( edit these!! ) new knife_sounds_r[MAX_KNIFE_SNDS][] = {     "GHW/weapons/knife_deploy1.wav",     "GHW/weapons/knife_hit1.wav",     "GHW/weapons/knife_hit2.wav",     "GHW/weapons/knife_hit3.wav",     "GHW/weapons/knife_hit4.wav",     "GHW/weapons/knife_hitwall1.wav",     "GHW/weapons/knife_slash1.wav",     "GHW/weapons/knife_slash2.wav",     "GHW/weapons/knife_stab.wav" } public plugin_precache() {     for(new i = 0; i < MAX_KNIFE_SNDS; i++)         precache_sound(knife_sounds_r[i]); } public EmitSound(entity, channel, const sound[]) {     if(pev_valid(entity) && is_user_alive(entity))     {         for(new i = 0; i < MAX_KNIFE_SNDS; i++)         {             if(equal(sound , knife_sounds_o[i]))             {                 emit_sound(entity, channel, knife_sounds_r[i], 1.0, ATTN_NORM, 0, PITCH_NORM);                 return FMRES_SUPERCEDE;             }         }     }     return FMRES_IGNORED; }

blacam00 03-29-2006 04:36

Thank you very much. It works perfect :)

gggggg 04-01-2006 06:26

its saying "bad load" . plug wont work on my cz server. whats wrong?
compiles ok but wont load
?????????????/

v3x 04-01-2006 06:56

Quote:

Originally Posted by gggggg
its saying "bad load" . plug wont work on my cz server. whats wrong?
compiles ok but wont load
?????????????/

1) STOP USING SO MANY DAMN QUESTION MARKS!
2) It requires the Fakemeta module in order to run.
3) You need to edit the file paths ( knife_sounds_r ).

gggggg 04-01-2006 08:30

sry for the ?? marks . didnt know it was such a big deal
i have everything right (i think ) and am still getting bad load

all modules are running
i made this folder and put sounds in

"GHW/weapons/customknife_deploy1.wav",
"GHW/weapons/customknife_hit1.wav",
"GHW/weapons/customknife_hit2.wav",
"GHW/weapons/customknife_hit3.wav",
"GHW/weapons/customknife_hit4.wav",
"GHW/weapons/customknife_hitwall1.wav",
"GHW/weapons/customknife_slash1.wav",
"GHW/weapons/customknife_slash2.wav",
"GHW/weapons/customknife_stab.wav"

still says bad load

08:38:50 Currently loaded plugins:
name version author file status
Admin Base 1.60 AMXX Dev Team admin.amxx running
Admin Commands 1.60 AMXX Dev Team admincmd.amxx running
Admin Help 1.60 AMXX Dev Team adminhelp.amxx running
Multi-Lingual Sys 1.60 AMXX Dev Team multilingual.am running
Menus Front-End 1.60 AMXX Dev Team menufront.amxx running
Commands Menu 1.60 AMXX Dev Team cmdmenu.amxx running
Players Menu 1.60 AMXX Dev Team plmenu.amxx running
Maps Menu 1.60 AMXX Dev Team mapsmenu.amxx running
Admin Chat 1.60 AMXX Dev Team adminchat.amxx running
Anti Flood 1.60 AMXX Dev Team antiflood.amxx running
Scrolling Message 1.60 AMXX Dev Team scrollmsg.amxx running
Info. Messages 1.60 AMXX Dev Team imessage.amxx running
Admin Votes 1.60 AMXX Dev Team adminvote.amxx running
NextMap 1.60 AMXX Dev Team nextmap.amxx running
Nextmap Chooser 1.60 AMXX Dev Team mapchooser.amxx running
TimeLeft 1.60 AMXX Dev Team timeleft.amxx running
Pause Plugins 1.60 AMXX Dev Team pausecfg.amxx running
08:38:50 Stats Configurati 1.60 AMXX Dev Team statscfg.amxx running
Restrict Weapons 1.60 AMXX Dev Team restmenu.amxx running
StatsX 1.60 AMXX Dev Team statsx.amxx running
CS Misc. Stats 1.60 AMXX Dev Team miscstats.amxx running
CS Stats Logging 1.60 AMXX Dev Team stats_logging.a running
Sank Sounds Plugi 1.4.2b White Panther, L sank_sounds.amx running
Join/Leave Messag 1.2 BigBaller join_leave.amxx running
AMXX Piss 2.0 KRoTaL amxx_piss_cs_cz running
TakeADookie 2.0 PaintLancer amx_dookie.amxx running
Last man bets 0.9.3 JGHG lastmanbets.amx running
AMX Admin Model 1.1.1 whitemike amx_adminmodel. running
AMX Bank 1.6 twistedeuphoria amx_bank.amxx running
loot 2.0 Rick O`Shae looting.amxx running
Weapons Models 0.1 KRoTaL weapons_models. running
Weapon Arena 1.9.7 JGHG weaponarena.amx running
HE Arena X 0.3 JGHG he_arena.amxx running
HL Media Player 0.7b 008DEADinHK HittEmUp_Radio2 running
unknown unknown unknown sss.amxx bad load
35 plugins, 34 running


i just named the sma sss.sma and compiled it

'it compiles ok but it wont run .. what am i doing wrong?

gggggg 04-01-2006 16:42

hello?

[ --<-@ ] Black Rose 04-01-2006 21:16

hello.






Is fakemeta module enabled? that is the only thing ( I think ) that may cause this. did you change the script?

gggggg 04-02-2006 06:35

hi
no. i didnt change anything. and yes all modules are enabled.. you think its a plugin confliction? (i have model plugs and others ) scroll up and look at my plugs i have ruinning..i am using the weapon model port plug from amx but the w_mdls and all knife snds wont work....i was hoping to use this plug to at least get the knife sounds to work...lol i found a guitar knife skin and made some kool lil waves for the snds but the plug wont run..any ideas?

19:26:53 Currently loaded modules:
name version author
Fun 1.60 AMX Mod X Dev Team
Engine 1.60 AMX Mod X Dev Team
FakeMeta 1.60 AMX Mod X Dev Team
CStrike 1.60 AMX Mod X Dev Team
CSX 1.60 AMX Mod X Dev Team
5 modules

wth is up w/ my KARMA? :oops: :oops: :oops: :oops:

gggggg 04-02-2006 20:58

1 Attachment(s)
hi
check this out. i am using this plugin for changing weapon skins. its suppossed to change the knife sounds too but it doesnt .
im thinking thats why this knife sound plug wont run. i am very new to coding. can someone look at the 2 sma's and see if theres a way to cut out the knife sound code from the weapon plug and add the code from this kinfe sound plug? iunno if it will work.or if not can anyone fig out how to get the knife sounds to work?

heres the model plug w/ knife sound replacement code (doesnt work..only changes p_ and v_ mdls )

is there some way to get the knife sounds to work? maybe my removing the bad code and replacing it w/ the code( or w/e ) from this plug?


All times are GMT -4. The time now is 16:41.

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