Because you cant create an entity with a custom classname, so the ent is not created.
Create a info_target, and then alter the classname.
Actually you pass Ent == 0 == world.
If you need this at different places in your plugin and with different classes you can use this stock :
PHP Code:
create_custom_entity(const weaponDescription[])
{
new iEnt = create_entity("info_target")
if( iEnt > 0 )
{
set_pev(iEnt, pev_classname, weaponDescription)
}
return iEnt
}
Then :
new Ent = create_custom_entity(weaponDescription);
__________________