Okay i am hooking func_water spawn though hamsandwich and was wondering why the f*ck it detects water too?! i have hooking door spawns too but its 2nd forward and other callback =\
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
public plugin_init( ) {
register_plugin( "Water + Door = wtf?", "1.0", "Bitch" );
}
public plugin_precache( ) {
RegisterHam( Ham_Spawn, "func_water", "fwdHamSpawn_Water", 1 );
RegisterHam( Ham_Spawn, "func_door", "fwdHamSpawn_Door", 1 );
}
public fwdHamSpawn_Water( iEntity ) {
new szClassname[ 32 ];
pev( iEntity, pev_classname, szClassname, 31 );
log_amx( "fwdHamSpawn_Water() :: %i :: %s", iEntity, szClassname );
// looked entity numbers though shptools its doors -_-"
}
public fwdHamSpawn_Door( iEntity ) {
new szClassname[ 32 ];
pev( iEntity, pev_classname, szClassname, 31 );
log_amx( "fwdHamSpawn_Door() :: %i :: %s", iEntity, szClassname );
static const szNull[] = "common/null.wav";
if( pev( iEntity, pev_dmg ) ) {
set_pev( iEntity, pev_noise1, szNull );
set_pev( iEntity, pev_noise2, szNull );
set_pev( iEntity, pev_noise3, szNull );
}
}
Code:
L 05/31/2009 - 14:21:39: -------- Mapchange to cs_assault --------
L 05/31/2009 - 14:21:41: [1.amxx] fwdHamSpawn_Water() :: 130 :: func_door
L 05/31/2009 - 14:21:41: [1.amxx] fwdHamSpawn_Door() :: 130 :: func_door
L 05/31/2009 - 14:21:41: [1.amxx] fwdHamSpawn_Water() :: 131 :: func_door
L 05/31/2009 - 14:21:41: [1.amxx] fwdHamSpawn_Door() :: 131 :: func_door
__________________