Raised This Month: $ Target: $400
 0% 

How to change the sound of new weapon?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Joker.
Member
Join Date: Mar 2011
Old 06-22-2011 , 00:54   How to change the sound of new weapon?
Reply With Quote #1

I have create a weapon . I have change the shoot sound but i don't know how to change the reload insert and draw sound. How to change it?
Anyone can help me?
Attached Files
File Type: sma Get Plugin or Get Source (p90d.sma - 614 views - 16.5 KB)

Last edited by Joker.; 06-22-2011 at 06:22. Reason: Upload new file
Joker. is offline
Joker.
Member
Join Date: Mar 2011
Old 06-22-2011 , 22:00   Re: How to change the sound of new weapon?
Reply With Quote #2

What code should i add to change the reload , insert and draw sound of the new weapon?
Joker. is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 06-23-2011 , 02:56   Re: How to change the sound of new weapon?
Reply With Quote #3

Those sounds are client side, they're specified in the model's qc script at the sequences.

So you need to decompile and recompile models/v_p90d.mdl.
__________________
Hunter-Digital is offline
Dolph_Ziggler
BANNED
Join Date: Jun 2011
Old 06-23-2011 , 06:50   Re: How to change the sound of new weapon?
Reply With Quote #4

Quote:
Originally Posted by Joker. View Post
What code should i add to change the reload , insert and draw sound of the new weapon?
decompile your model, open qc file and edit :
Code:
// 6 animation sequence(s)
$sequence "idle" "idle" fps 30 
$sequence "reload" "reload" fps 30 {
  { event 5004 1 "weapons/ak47_clipout.wav" } 
  { event 5004 17 "weapons/ak47_clipin.wav" } 
  { event 5004 37 "weapons/ak47_boltpull.wav" } 
 }
$sequence "draw" "draw" fps 23 { event 5004 5 "weapons/ak47_draw.wav" } 
$sequence "fire1" "fire1" fps 30 { event 5001 0 "32" } 
$sequence "fire2" "fire2" fps 30 { event 5001 0 "32" } 
$sequence "fire3" "fire3" fps 30 { event 5001 0 "32" }
her is it but i dont know how to replace gun shoot
Dolph_Ziggler is offline
Send a message via MSN to Dolph_Ziggler
Joker.
Member
Join Date: Mar 2011
Old 06-23-2011 , 05:02   Re: How to change the sound of new weapon?
Reply With Quote #5

I can't change that by the code??
Joker. is offline
Joker.
Member
Join Date: Mar 2011
Old 06-23-2011 , 07:16   Re: How to change the sound of new weapon?
Reply With Quote #6

I have decompiled my model .
The qc file of the model

Code:
/*
==============================================================================
QC script generated by Half-Life MDL Decompiler 1.2 
2003, Kratisto. Based on code from Valve's HL SDK.
v_p90.mdl
Original internal name:
"v_p90.mdl"
==============================================================================
*/
$modelname "v_p90.mdl"
$cd ".\"
$cdtexture ".\"
$scale 1.0
$cliptotextures
 
$bbox 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
$cbox 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
$eyeposition 0.000000 0.000000 0.000000
 
//reference mesh(es)
$body "hands" "v_hands"
$body "studio" "v_reference_hp_f90-d"
$body "studio" "v_reference_hp_f90-d_sight"
$texrendermode "v_reference_hp_f90-d_sight.bmp" "additive" 
// 2 attachment(s)
$attachment 0 "p90_body" 9.800000 1.250000 0.000000
$attachment 1 "p90_body" -1.500000 -1.000000 0.000000
// 6 hit box(es)
$hbox 0 "base" -1.613417 -63.200001 -6.783877 12.420000 0.000000 7.580000
$hbox 0 "Bone L hand" -3.980000 -1.800000 -6.900000 5.500000 1.830000 1.540000
$hbox 0 "Bone R hand" -2.660000 -0.890000 -1.500000 0.000000 1.190000 1.480000
$hbox 0 "R wrist rotate" -2.280000 -1.810000 -1.080000 5.970000 1.350000 1.540000
$hbox 0 "p90_body" -6.190000 -2.230000 -1.220000 9.870000 4.910000 1.170000
$hbox 0 "p90_mag" -4.100000 -0.690000 -1.070000 5.090000 0.670000 0.970000
// 6 animation sequence(s)
$sequence "idle" "idle" fps 30 
$sequence "reload" "reload" fps 40 {
  { event 5004 13 "weapons/f90d_unlock.wav" } 
  { event 5004 30 "weapons/f90d_magout.wav" } 
  { event 5004 56 "weapons/f90d_magin.wav" } 
  { event 5004 95 "weapons/f90d_cock.wav" } 
 }
$sequence "draw" "draw" fps 30 { event 5004 1 "weapons/p90d_ready.wav" } 
$sequence "shoot1" "shoot1" fps 20 { event 5001 0 "21" } 
$sequence "shoot2" "shoot2" fps 20 { event 5001 0 "21" } 
$sequence "shoot3" "shoot3" fps 20 { event 5001 0 "21" } 
// End of QC script.
When I compiled then i open server to test it. It have just change the shoot sound. When I reload there not any sound. Is that any things wrong of the qc file?

Last edited by Joker.; 06-23-2011 at 07:44. Reason: correction
Joker. is offline
Dolph_Ziggler
BANNED
Join Date: Jun 2011
Old 06-24-2011 , 06:46   Re: How to change the sound of new weapon?
Reply With Quote #7

Quote:
Originally Posted by Joker. View Post
I have decompiled my model .
The qc file of the model

Code:
/*
==============================================================================
QC script generated by Half-Life MDL Decompiler 1.2 
2003, Kratisto. Based on code from Valve's HL SDK.
v_p90.mdl
Original internal name:
"v_p90.mdl"
==============================================================================
*/
$modelname "v_p90.mdl"
$cd ".\"
$cdtexture ".\"
$scale 1.0
$cliptotextures
 
$bbox 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
$cbox 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
$eyeposition 0.000000 0.000000 0.000000
 
//reference mesh(es)
$body "hands" "v_hands"
$body "studio" "v_reference_hp_f90-d"
$body "studio" "v_reference_hp_f90-d_sight"
$texrendermode "v_reference_hp_f90-d_sight.bmp" "additive" 
// 2 attachment(s)
$attachment 0 "p90_body" 9.800000 1.250000 0.000000
$attachment 1 "p90_body" -1.500000 -1.000000 0.000000
// 6 hit box(es)
$hbox 0 "base" -1.613417 -63.200001 -6.783877 12.420000 0.000000 7.580000
$hbox 0 "Bone L hand" -3.980000 -1.800000 -6.900000 5.500000 1.830000 1.540000
$hbox 0 "Bone R hand" -2.660000 -0.890000 -1.500000 0.000000 1.190000 1.480000
$hbox 0 "R wrist rotate" -2.280000 -1.810000 -1.080000 5.970000 1.350000 1.540000
$hbox 0 "p90_body" -6.190000 -2.230000 -1.220000 9.870000 4.910000 1.170000
$hbox 0 "p90_mag" -4.100000 -0.690000 -1.070000 5.090000 0.670000 0.970000
// 6 animation sequence(s)
$sequence "idle" "idle" fps 30 
$sequence "reload" "reload" fps 40 {
  { event 5004 13 "weapons/f90d_unlock.wav" } 
  { event 5004 30 "weapons/f90d_magout.wav" } 
  { event 5004 56 "weapons/f90d_magin.wav" } 
  { event 5004 95 "weapons/f90d_cock.wav" } 
 }
$sequence "draw" "draw" fps 30 { event 5004 1 "weapons/p90d_ready.wav" } 
$sequence "shoot1" "shoot1" fps 20 { event 5001 0 "21" } 
$sequence "shoot2" "shoot2" fps 20 { event 5001 0 "21" } 
$sequence "shoot3" "shoot3" fps 20 { event 5001 0 "21" } 
// End of QC script.
When I compiled then i open server to test it. It have just change the shoot sound. When I reload there not any sound. Is that any things wrong of the qc file?
if you remplaced your sound , did you compiled the .qc file ??
Dolph_Ziggler is offline
Send a message via MSN to Dolph_Ziggler
Joker.
Member
Join Date: Mar 2011
Old 06-23-2011 , 09:27   Re: How to change the sound of new weapon?
Reply With Quote #8

Is that any problem of my qc file or my plugin make the sound not work???

Last edited by Joker.; 06-23-2011 at 09:48. Reason: rewrite
Joker. is offline
Joker.
Member
Join Date: Mar 2011
Old 06-24-2011 , 01:52   Re: How to change the sound of new weapon?
Reply With Quote #9

I have changed the qc file but it's still not work.
Can I change the sound by the plugin?????
Joker. is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 06-24-2011 , 04:23   Re: How to change the sound of new weapon?
Reply With Quote #10

The reload sounds start with "f90"... are you sure that those are your sounds and you actually have them ?

And I already told you they're client side, you can't change them using a plugin.
__________________
Hunter-Digital 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:28.


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