| closedChanging/Adding sounds? (DoD TK Revenge) |
| Started by blobby on 07-21-2007, 10:56 AM |
Threads: 47
Joined: Apr 2007
Ok this plugin rocks but i really need to change the sound it plays when the menu is displayed so if you could just point out where on the sma file i can find this i would be very great fullrnrnRegardsrnrnBlobbyrnrnp.S. is there any way to add a sound to the forgive part of this so when it slaps them it says like how stupid do you feel know or something??
Threads: 15
Joined: Jun 2007
Ok this plugin rocks but i really need to change the sound it plays when the menu is displayed so if you could just point out where on the sma file i can find this i would be very great fullrnrnRegardsrnrnBlobbyrnrnp.S. is there any way to add a sound to the forgive part of this so when it slaps them it says like how stupid do you feel know or something??rnrn1. you can change/remove the sound with those lines:rn
client_cmd(param[0],"spk Gman/Gman_Choose1")rnandrnclient_cmd(param[0],"spk Gman/Gman_Choose2")rnrn2. that would be possible for sure, look for this code:rnclient_print(0,print_chat, "[DoD TK Revenge] %L",LANG_PLAYER,"SLAPANDFORGIVE",victimname,killername)rnuser_slap(teamkiller[id],0)rnrnand add a line after user_slap(teamkiller[id],0) containing:rnemit_sound(teamkiller[id], CHAN_AUTO, "YOURSOUNDHERE.WAV", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)rnrnhope that helps a bit :cool:rnrnrnWell well, looking through the code i realized that i used a big bunch of duplicate code,rnso i'll optimize that for a new version.Threads: 47
Joined: Apr 2007
Ok so where do i need to locate my sounds on my server?? So say i had this client_cmd(param[0],"spk Gman/how stupid.wav") **I did think this was wrong myself** nnbut if you could help me be able to use my own custom sounds i would be very great fullnnRegardsnnBlobby
Threads: 15
Joined: Jun 2007
Ok so where do i need to locate my sounds on my server?? So say i had this client_cmd(param[0],"spk Gman/how stupid.wav") **I did think this was wrong myself** rnrnbut if you could help me be able to use my own custom sounds i would be very great fullrnrnRegardsrnrnBlobbyrnrnyes, that is wrong indeed, place your soundfiles in "/dod/sound/misc/"rnrnan example would be "howstupid.wav", so upload that sound into thernabove folder.rnrn- the sound has to be precached so clients will download it, to do sornadd to the sma:rn
public plugin_precache()rn{rn if(file_exists("sound/misc/howstupid.wav"))rn {rn precache_sound("misc/howstupid.wav")rn }rn}rnrn- now the sound has to be played in game:rnclient_cmd(param[0],"spk misc/howstupid")rnrnNOTE: that example is formated to replace the sound that is played whenrnthe menu pops up!Threads: 47
Joined: Apr 2007
So does it matter where on the sma i add thisnnpublic plugin_precache()n{n if(file_exists("sound/misc/howstupid.wav"))n {n precache_sound("misc/howstupid.wav")n }n}nnAnd also lol where about could i change where is says forgive on the menu to bitch slap and fogive so that it shows up in the menu as bitch slap and forgive because i have a sound that says bitch slap so i thought i would put that in there tonnRegardsnnBlobbynnP.s I only keep asking loads of questions because i don't want to get it wrong and mess up my server lol
Threads: 15
Joined: Jun 2007
the precache function already exists, you will just have to change it from:rn
public plugin_precache()rn{ rn killerburn = precache_model("sprites/explode1.spr") rn}rnrntornrnpublic plugin_precache()rn{ rn killerburn = precache_model("sprites/explode1.spr")rn precache_sound("misc/howstupid.wav")rn}rnrnrnYou can change what the menu says in the language file, just changernMENUFORGIVE = Forgive! in dod_tkrevenge.txtrnto for example:rnMENUFORGIVE = Bitchslap!Threads: 47
Joined: Apr 2007
Ok so every where in the code i saw thisnnclient_print(0,print_chat, "[DoD TK Revenge] %L",LANG_PLAYER,"SLAPANDFORGIVE",victimname,killername)nuser_slap(teamkiller[id],0)nemit_sound(teamkiller[id], CHAN_AUTO, "bitchslap.WAV", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)nni added the sound line below every line like that is that correctnnand the sound dl i did thisnnpublic plugin_precache()n{ n killerburn = precache_model("sprites/explode1.spr")n precache_sound("misc/bitchslap.wav")nnIs that correct lol im starting to seem like a noob i aint to good at code but i would love to be able to do let me know if this is correctnnRegardsnnBlobbynnP.S Thankyou m8 for all the time you have given me for help with this
Threads: 15
Joined: Jun 2007
almost correct, just a little correction:rnrn
emit_sound(teamkiller[id], CHAN_AUTO, "misc/bitchslap.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)rnrnthe misc/ is important, other than that it's correct.Threads: 47
Joined: Apr 2007
Wiked cheers buddy wow you have no idea how much your help is appreciated thanks so much buddynnRegardsnnBlobby

