POST. I tested and it works..
Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <hamsandwich>
#include <engine>
#define PLUGIN "Satchels"
#define VERSION "1.0"
#define AUTHOR "Phant"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Spawn, "monster_satchel", "fw_SatchelSpawnPost", 1)
}
public fw_SatchelSpawnPost(ent)
{
if(pev_valid(ent))
{
new s_Model[32]
pev(ent, pev_model, s_Model, 31)
client_print(0, print_chat, "SATHCEL MODEL: %s", s_Model)
}
}
PHP Code:
void CSatchelCharge :: Spawn( void )
{
Precache( );
// motor
pev->movetype = MOVETYPE_BOUNCE;
pev->solid = SOLID_BBOX;
SET_MODEL(ENT(pev), "models/w_satchel.mdl");
//UTIL_SetSize(pev, Vector( -16, -16, -4), Vector(16, 16, 32)); // Old box -- size of headcrab monsters/players get blocked by this
UTIL_SetSize(pev, Vector( -4, -4, -4), Vector(4, 4, 4)); // Uses point-sized, and can be stepped over
UTIL_SetOrigin( pev, pev->origin );
SetTouch( &CSatchelCharge::SatchelSlide );
SetUse( &CSatchelCharge::DetonateUse );
SetThink( &CSatchelCharge::SatchelThink );
pev->nextthink = gpGlobals->time + 0.1;
pev->gravity = 0.5;
pev->friction = 0.8;
pev->dmg = gSkillData.plrDmgSatchel;
// ResetSequenceInfo( );
pev->sequence = 1;
}
__________________