W jaki sposób da się wywołać dmg z rakiety zamiast
cod_inflict_damage(attacker, pid, 20.0, 0.9, ent, (1<<24));
to w inny sposób, by nie trzeba było używac biblioteki
#include <codmod>
gdyż nie chcę tych rakiet na serwer cod mod, a na inny mod
Propozycje?
public DotykRakiety(ent)
{
if (!is_valid_ent(ent))
return;
new attacker = entity_get_edict(ent, EV_ENT_owner);
new Float:fOrigin[3];
entity_get_vector(ent, EV_VEC_origin, fOrigin);
new iOrigin[3];
for(new i=0;i<3;i++)
iOrigin[i] = floatround(fOrigin[i]);
message_begin(MSG_BROADCAST,SVC_TEMPENTITY, iOrigin);
write_byte(TE_EXPLOSION);
write_coord(iOrigin[0]);
write_coord(iOrigin[1]);
write_coord(iOrigin[2]);
write_short(sprite_blast);
write_byte(32);
write_byte(20);
write_byte(0);
message_end();
new entlist[33];
new numfound = find_sphere_class(ent, "player", 190.0, entlist, 32);
for (new i=0; i < numfound; i++)
{
new pid = entlist[i];
if (!is_user_alive(pid) || get_user_team(attacker) == get_user_team(pid))
continue;
cod_inflict_damage(attacker, pid, 20.0, 0.9, ent, (1<<24));
}
remove_entity(ent);
}


Dodatki SourceMod



Temat jest zamknięty









