AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help for weapon sound replacement (https://forums.alliedmods.net/showthread.php?t=132837)

4554 07-19-2010 10:41

Help for weapon sound replacement
 
PHP Code:

public Event_ShotFired(id)
{
if(
g_hasgun[id])
{
new 
crap
new weapon get_user_weapon(idcrapcrap)
if(
weapon == CSW_DEAGLE)
{
new 
weaponID read_data
new 
wAmmo read_data
if( 
g_nCurWeapon[id-1][0] != weaponID )

g_nCurWeapon[id-1][0] = weaponID 
g_nCurWeapon
[id-1][1] = wAmmo 
return PLUGIN_CONTINUE 

if( 
g_nCurWeapon[id-1][1] < wAmmo )

g_nCurWeapon[id-1][1] = wAmmo 
return PLUGIN_CONTINUE 
}
if( 
g_nCurWeapon[id-1][1] == wAmmo )
return 
PLUGIN_CONTINUE 
g_nCurWeapon
[id-1][1] = wAmmo 
g_nCurWeapon
[id-1][0] = weaponID 
engfunc
(EngFunc_EmitSound,id,CHAN_WEAPON,FIRE_SOUND,1.0,ATTN_NORM,0,PITCH_NORM)
}
}
return 
PLUGIN_CONTINUE


1. Why the first fire don't have new fire sound? (second have)
2. It don't have new fire sound when i zooming (Sniper) (I have change to CSW_AWP or something)

GXLZPGX 07-19-2010 10:43

Re: Help for weapon sound replacement
 
What is with you guys.. get acquainted with the php button.. copy the code again, edit your post, paste it, select it, hit the php button.

http://forums.alliedmods.net/showthread.php?t=26363

4554 07-19-2010 10:44

Re: Help for weapon sound replacement
 
Quote:

Originally Posted by GXLZPGX (Post 1244444)
What is with you guys.. get acquainted with the php button.. copy the code again, edit your post, paste it, select it, hit the php button.

http://forums.alliedmods.net/showthread.php?t=26363

Okay, sorry.

GXLZPGX 07-19-2010 12:30

Re: Help for weapon sound replacement
 
Quote:

Originally Posted by 4554 (Post 1244446)
Okay, sorry.

Now it doesn't have the indentations. Do you have the original code with the correct indentations?


All times are GMT -4. The time now is 07:04.

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