|
Author
|
Message
|
|
Senior Member
Join Date: Feb 2008
Location: in space...
|

05-09-2010
, 11:55
Re: HeadShot Sounds
|
#1
|
Quote:
Originally Posted by master4life
http://wiki.amxmodx.org/Half-Life_1_...vents#DeathMsg
read_data( 1 ) is Killer and read_data( 2 ) is Victim
but if you want try this,
PHP Code:
#include < amxmodx >
new const g_szSounds[ ][ ] = { "cyr4x/bezdech.wav", "cyr4x/cyr4x_001.wav", "cyr4x/cyr4x_006.wav", "cyr4x/mk.wav", "cyr4x/zobacz.wav" }
public plugin_init() register_event( "DeathMsg", "EventDeathMsg", "a", "3=1" );
public plugin_precache( ) for( new i = 0; i < sizeof g_szSounds; i++ ) precache_sound( g_szSounds[ i ] );
public EventDeathMsg( ) { new iKiller = read_data( 1 ), iVictim = read_data( 2 );
client_cmd( iKiller, "stopsound" ); client_cmd( iVictim, "stopsound" ); client_cmd( iKiller, "spk %s", g_szSound[ random( sizeof g_szSound ) ] ); client_cmd( iVictim, "spk %s", g_szSound[ random( sizeof g_szSound ) ] ); }
|
Code:
Your plugin failed to compile! Read the errors below:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team
/groups/amxmodx/tmp3/textuDThRy.sma(22) : error 017: undefined symbol "g_szSound"
/groups/amxmodx/tmp3/textuDThRy.sma(22) : error 072: "sizeof" operator is invalid on "function" symbols
/groups/amxmodx/tmp3/textuDThRy.sma(22) : error 029: invalid expression, assumed zero
/groups/amxmodx/tmp3/textuDThRy.sma(22) : fatal error 107: too many error messages on one line
Compilation aborted.
4 Errors.
__________________
Only God can judge me...
|
|
|
|