←  Problemy z pluginami

AMXX.pl: Support AMX Mod X i SourceMod

»

W pluginie nie działa efekt wybuchu HE

  • +
  • -
sweeper's Photo sweeper 07.12.2012

Stworzyłem zabawę pod silnik JB by Cypis, która polega na tym, że gracze rzucają się granatami. Dodatkowo chciałem zmienić efekt wybuchu HE na taki jak jest na serwerach Paintball, niestety ta modyfikacja nie działa i nie wiem w czym tkwi problem. W załączniku podaje pełne sma pluginu a tutaj macie wycinek, który nie działa. Proszę powiedzieć co jest nie tak, że ten efekt nie chce działać.



public fw_think(ent)
{
new model[25]; pev(ent, pev_model, model, 24);
if (!equali(model, "models/snowballs/w_snowball.mdl"))
return FMRES_IGNORED;
set_task(1.6, "act_explode", ent);
return FMRES_SUPERCEDE;
}
public act_explode(ent)
{
if (!is_valid_ent(ent)) return;
new attacker = entity_get_edict(ent, EV_ENT_owner);
new Float:fOrigin[3], colors[4];
entity_get_vector(ent, EV_VEC_origin, fOrigin);
if(get_user_team(attacker) == 1)
colors ={ 255, 255, 255, 255}
else if(get_user_team(attacker) == 2)
colors = { 255, 255, 255, 255}
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_BLOODSPRITE);
write_coord(iOrigin[0]);
write_coord(iOrigin[1]);
write_coord(iOrigin[2] + 30);
write_short(blood);
write_short(blood);
write_byte(colors[2]);
write_byte(40); message_end();
emit_sound(ent, CHAN_AUTO, "weapons/unchill.wav", 1.0, ATTN_NORM, 0, PITCH_NORM);
new entlist[33];
new numfound = find_sphere_class(ent, "player", 200.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; ExecuteHam(Ham_TakeDamage, pid, ent, attacker, 50.0, 0);
}
remove_entity(ent);
}

Attached Files

  • Attached File  asd.sma   4.65KB   16 downloads

Edited by sweeper, 07.12.2012 20:37.
Quote

  • +
  • -
sweeper's Photo sweeper 09.12.2012

Refresh
Quote