Raised This Month: $ Target: $400
 0% 

[Help] Change Map Entity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 06-04-2013 , 10:07   Re: [Help] Change Map Entity
Reply With Quote #1

I really don't know, but maybe you can delete it, and make new entity have the same origin, size ... of it
Code:
#include < amxmodx >
#include < amxmisc >
#include < fakemeta >

public plugin_init( ) 
	register_forward( FM_Spawn, "OnEntitySpawn" );
	
public OnEntitySpawn( Entity )
{
	if( pev_valid( Entity ) ) // Not a NULL Entity
	{
		static ClassName[ 32 ];
		pev( Entity, pev_classname, ClassName, charsmax( ClassName ) );
		if( equal( ClassName, "trigger_once" ) )
		{			
			static NewEntity;
			NewEntity = engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, "trigger_multiple" ) );
			
			set_pev( NewEntity, pev_origin, pev( Entity, pev_origin ) );			
			engfunc( EngFunc_SetSize, NewEntity, pev( Entity, pev_mins ), pev( Entity, pev_maxs ) );
			engfunc( EngFunc_RemoveEntity, Entity );
                        return FMRES_SUPERCEDE;
		}
	}
        return FMRES_IGNORED;
}

Last edited by TheDS1337; 06-04-2013 at 10:08.
TheDS1337 is offline
Reply



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 16:19.


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