jest zbugowana, nie da się zmienić w niej DMG
Da się.
public touchedpredator(ent, id)
{
if(!is_valid_ent(ent))
return PLUGIN_CONTINUE;
new owner = entity_get_edict(ent, EV_ENT_owner);
bombs_explode(ent);
attach_view(owner, owner);
user_controllsem[owner] = 0;
return PLUGIN_CONTINUE;
}
bombs_explode(ent)
{
if(!is_valid_ent(ent))
return;
new attacker = entity_get_edict(ent, EV_ENT_owner);
new Float:entOrigin[3], Float:Origin[3];
entity_get_vector(ent, EV_VEC_origin, entOrigin);
entOrigin[2] += 1.0;
new entlist[33];
new numfound = find_sphere_class(ent, "player", 220.0, entlist, 32);
for(new i=0; i < numfound; i++)
{
new victim = entlist[i];
if(!is_user_alive(victim) || get_user_team(attacker) == get_user_team(victim))
continue;
entity_get_vector(victim, EV_VEC_origin, Origin);
ExecuteHam(Ham_TakeDamage, victim, ent, attacker, 50+cod_get_user_intelligence(attacker)/1.1, DMG_BULLET);
}
message_begin(MSG_BROADCAST,SVC_TEMPENTITY);
write_byte(TE_EXPLOSION);
write_coord(floatround(entOrigin[0]));
write_coord(floatround(entOrigin[1]));
write_coord(floatround(entOrigin[2]));
write_short(sprite_blast);
write_byte(32);
write_byte(20);
write_byte(0);
message_end();
remove_entity(ent);
}
I usun ten stock:
stock Float:estimate_take_hurt(Float:fPoint[3], ent)