Raised This Month: $ Target: $400
 0% 

I am idiot or Ham_Spawn fails


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 05-31-2009 , 06:58   I am idiot or Ham_Spawn fails
Reply With Quote #1

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( ) {
    
RegisterHamHam_Spawn"func_water""fwdHamSpawn_Water");
    
RegisterHamHam_Spawn"func_door""fwdHamSpawn_Door");
}

public 
fwdHamSpawn_WateriEntity ) {
    new 
szClassname32 ];
    
peviEntitypev_classnameszClassname31 );
    
    
log_amx"fwdHamSpawn_Water() :: %i :: %s"iEntityszClassname );
    
// looked entity numbers though shptools its doors -_-"
}

public 
fwdHamSpawn_DooriEntity ) {
    new 
szClassname32 ];
    
peviEntitypev_classnameszClassname31 );
    
    
log_amx"fwdHamSpawn_Door() :: %i :: %s"iEntityszClassname );
    
    static const 
szNull[] = "common/null.wav";
    if( 
peviEntitypev_dmg ) ) {
        
set_peviEntitypev_noise1szNull );
        
set_peviEntitypev_noise2szNull );
        
set_peviEntitypev_noise3szNull );
    }

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
__________________

Last edited by xPaw; 05-31-2009 at 07:26.
xPaw is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-31-2009 , 07:30   Re: I am idiot or Ham_Spawn fails
Reply With Quote #2

Same here :

Code:
L 05/31/2009 - 13:30:07: -------- Mapchange to cs_assault --------
-------- SHP Tools Loaded --------
L 05/31/2009 - 13:30:07: [comp_zspawn.amxx] fwdHamSpawn_Water() :: 156 :: func_door
L 05/31/2009 - 13:30:07: [comp_zspawn.amxx] fwdHamSpawn_Door() :: 156 :: func_door
L 05/31/2009 - 13:30:07: [comp_zspawn.amxx] fwdHamSpawn_Water() :: 157 :: func_door
L 05/31/2009 - 13:30:07: [comp_zspawn.amxx] fwdHamSpawn_Door() :: 157 :: func

You want to detect water ?
PHP Code:
Find_Water_Ents()
{

    new 
iEnt

    
new const func_water[] = "func_water"
    
new const func_illusionary[] = "func_illusionary"
    
new const func_conveyor[] = "func_conveyor"

    
iEnt FM_NULLENT
    
while( (iEnt find_ent_by_class(iEntfunc_water)) )
    {
        
// iEnt is a water ent
    
}

    
iEnt FM_NULLENT // should already be 0
    
while( (iEnt find_ent_by_class(iEntfunc_illusionary)) )
    {
        if( 
entity_get_int(iEntEV_INT_skin) == CONTENTS_WATER )
        {
            
// iEnt is a water ent
        
}
    }

    
iEnt FM_NULLENT // should already be 0
    
while( (iEnt find_ent_by_class(iEntfunc_conveyor)) )
    {
        if( 
entity_get_int(iEntEV_INT_spawnflags) == )
        {
            
// iEnt SHOULD BE a water ent (falling water)
        
}
    }

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 05-31-2009 at 07:38.
ConnorMcLeod is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 08-12-2009 , 10:35   Re: I am idiot or Ham_Spawn fails
Reply With Quote #3

If you register info_player_start spawn, it will hook info_target spawn too.... :/ sawce we need you.
__________________
xPaw is offline
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 08-12-2009 , 13:20   Re: I am idiot or Ham_Spawn fails
Reply With Quote #4

Yes, To me Also.

mmm.
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
Reply


Thread Tools
Display Modes

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 13:49.


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