Code:
public DetonateLasermine(id)
{
new EntityName[32];
new Float:origin[3]
pev(id,pev_origin,origin);
new ent = -1
ColorChat(id, RED, "^4[SkazzY LaserMine] ^1Plugin is ^3WORKING")
while((ent = find_ent_in_sphere(id,origin,512.0)) != 0)
{
pev(ent, pev_classname, EntityName, 31)
if(equali(EntityName, ENT_CLASS_NAME))
{
if(pev(ent, LASERMINE_OWNER) == id)
{
PlaySound(ent, STOP_SOUND)
CreateExplosion(ent)
CreateDamage(ent, get_pcvar_float(g_LRDMG), get_pcvar_float(g_LRADIUS))
RemoveEntity(ent)
ColorChat(id, RED, "^4[SkazzY LaserMine] ^1You have succesfully ^3DETONATED ^1your lasermine")
ent = -99;
break
}
}
}
if(ent != -99)
{
ColorChat(id, RED, "^4[SkazzY LaserMine] ^1You don't have any lasermines in ^3RADIUS ^1of ^3512 ^1units")
}
return PLUGIN_HANDLED
}
__________________