Lol .. Making weapon think, engine removes it self
PHP Code:
#include <amxmodx>
#include <fakemeta>
#define REMOVE_TIME 20.0
public plugin_init( ) {
register_forward( FM_SetModel, "FwdSetModel", 1 );
}
public FwdSetModel( iEntity ) {
if( !pev_valid( iEntity ) )
return;
static const szWeaponbox[] = "weaponbox";
static szClassname[ 10 ]; // weaponbox
pev( iEntity, pev_classname, szClassname, charsmax( szClassname ) );
if( equal( szClassname, szWeaponbox ) )
set_pev( iEntity, pev_nextthink, get_gametime( ) + REMOVE_TIME );
}
__________________