Tengo un problema con el siguiente codigo:
Code:
new const ent_class[] = "entidad"
public pfn_touch(toucher, touched)
{
if(is_valid_ent(toucher))
{
static class[32]
entity_get_string(toucher, EV_SZ_classname, class, charsmax(class))
if(equal(class, ent_class))
{
static Float:EndOrigin[3]
entity_get_vector(toucher, EV_VEC_origin, EndOrigin)
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, EndOrigin, 0)
write_byte(TE_IMPLOSION) // TE id
engfunc(EngFunc_WriteCoord, EndOrigin[0]) // x
engfunc(EngFunc_WriteCoord, EndOrigin[1]) // y
engfunc(EngFunc_WriteCoord, EndOrigin[2]) // z
write_byte(128) // radius
write_byte(20) // count
write_byte(3) // duration
message_end()
static classname[32]
entity_get_string(touched, EV_SZ_classname, classname, charsmax(classname))
if(is_valid_ent(touched))
{
if(equal(classname, "player"))
{
static owner
owner = pev(toucher, pev_owner)
KillPlayer(touched, owner)
}
else if(equal(classname, "func_breakable"))
{
force_use(toucher, touched)
}
}
remove_entity(toucher)
}
}
}
Problema: En el mapa de_dust2, cuando la entidad toca las cajas verdes donde se planta la C4, explotan las cajas pero se me pone la pantalla en blanco como si me flasheara -.-
Alguno tiene la solucion?
Gracias de antemano
__________________