About explosion, you can use register_touch like this:
PHP Code:
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_touch("fxm_profectile", "player", "fwd_Touch")
register_touch("fxm_profectile", "worldspawn", "fwd_Touch")
// Add your code here...
}
public fwd_Touch(ent, id)
{
new szClassname[33]
entity_get_string(ent, EV_SZ_classname, szClassname)
if (equal(szClassname, "fxm_profectile")
{
new Float:iOrigin[3], fOrigin[3]
entity_get_vector(id, EV_VEC_origin, iOrigin)
FVecIVec(iOrigin, fOrigin)
message_begin(MSG_BROADCAST, SVC_TEMPENTITY, fOrigin)
write_byte(TE_EXPLOSION)
write_coord(fOrigin[0])
write_coord(fOrigin[1])
write_coord(fOrigin[2])
write_short(explode)
write_byte(30)
write_byte(15)
write_byte(0)
message_end()
}
}
__________________