AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Removing env_snow (https://forums.alliedmods.net/showthread.php?t=101115)

VMAN 08-20-2009 22:30

Removing env_snow
 
I tried removing env_snow with fm_remove_entity, but the snow still stays.


Is it even possible to do this?

Exolent[jNr] 08-20-2009 22:44

Re: Removing env_snow
 
Try this

Code:
#include < amxmodx > #include < fakemeta > public plugin_precache( ) {     register_forward( FM_Spawn, "FwdSpawn" ); } public FwdSpawn( iEntity ) {     if( pev_valid( iEntity ) )     {         static szClassname[ 32 ];         pev( iEntity, pev_classname, szClassname, 31 );                 if( equal( szClassname, "env_snow" ) )         {             engfunc( EngFunc_RemoveEntity, iEntity );             return FMRES_SUPERCEDE;         }     }         return FMRES_IGNORED; }

Bad_Bud 08-20-2009 22:46

Re: Removing env_snow
 
If Exolent's method doesn't work, I think your best bet is to modify a bunch of pev data on it, piece by piece, and see if you can get any change, or even going as far as to messing with pdata. I know I've gotten some strange results on entities by modifying this stuff.

In fact, a func_door will turn invisible (but will still be solid and make noise) when you set pev_iuser4 to anything other than zero. Try that one first.

VMAN 08-20-2009 22:58

Re: Removing env_snow
 
Exolent's method worked perfectly.


Thank you both

xPaw 08-21-2009 04:15

Re: Removing env_snow
 
If you dont want to hook spawn, you can use

remove_entity_name( "env_snow" );
in plugin_init

KadiR 08-21-2009 09:40

Re: Removing env_snow
 
PHP Code:

#include <amxmodx>
#include <engine>

public plugin_init()
{
    
register_plugin"""""" );
    
    new 
Entity = -1;
    
    while ( ( 
Entity find_ent_by_classEntity"env_snow" ) ) )
    {
        
remove_entityEntity );
    }


by arkshine.


All times are GMT -4. The time now is 15:10.

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