AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   I am idiot or Ham_Spawn fails (https://forums.alliedmods.net/showthread.php?t=93624)

xPaw 05-31-2009 06:58

I am idiot or Ham_Spawn fails
 
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


ConnorMcLeod 05-31-2009 07:30

Re: I am idiot or Ham_Spawn fails
 
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)
        
}
    }



xPaw 08-12-2009 10:35

Re: I am idiot or Ham_Spawn fails
 
If you register info_player_start spawn, it will hook info_target spawn too.... :/ sawce we need you.

AntiBots 08-12-2009 13:20

Re: I am idiot or Ham_Spawn fails
 
Yes, To me Also.

mmm.


All times are GMT -4. The time now is 13:49.

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