AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to change the sound of new weapon? (https://forums.alliedmods.net/showthread.php?t=159818)

Joker. 06-22-2011 00:54

How to change the sound of new weapon?
 
1 Attachment(s)
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?

Joker. 06-22-2011 22:00

Re: How to change the sound of new weapon?
 
What code should i add to change the reload , insert and draw sound of the new weapon?

Hunter-Digital 06-23-2011 02:56

Re: How to change the sound of new weapon?
 
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.

Joker. 06-23-2011 05:02

Re: How to change the sound of new weapon?
 
I can't change that by the code??

Dolph_Ziggler 06-23-2011 06:50

Re: How to change the sound of new weapon?
 
Quote:

Originally Posted by Joker. (Post 1493897)
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

Joker. 06-23-2011 07:16

Re: How to change the sound of new weapon?
 
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?

Joker. 06-23-2011 09:27

Re: How to change the sound of new weapon?
 
Is that any problem of my qc file or my plugin make the sound not work???

Joker. 06-24-2011 01:52

Re: How to change the sound of new weapon?
 
I have changed the qc file but it's still not work.
Can I change the sound by the plugin?????

Hunter-Digital 06-24-2011 04:23

Re: How to change the sound of new weapon?
 
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.

Joker. 06-24-2011 04:55

Re: How to change the sound of new weapon?
 
Quote:

Originally Posted by Hunter-Digital (Post 1494871)
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.

OK. I will check that.


All times are GMT -4. The time now is 23:28.

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