Mam taki kod:
public ded_he(id)
{
new Float:pOrigin[3]
entity_get_vector(id,EV_VEC_origin, pOrigin)
heid[id] = create_entity("info_target")
entity_set_model(heid[id],"models/w_hegrenade.mdl")//v i w
entity_set_origin(heid[id],pOrigin)
entity_set_string(heid[id],EV_SZ_classname,"fakehe")
entity_set_edict(heid[id],EV_ENT_owner,id)
entity_set_int(heid[id],EV_INT_movetype,6)
new Float:aOrigin[3]
entity_get_vector(heid[id],EV_VEC_origin, aOrigin)
hebombc[id][0] = floatround(aOrigin[0])
hebombc[id][1] = floatround(aOrigin[1])
hebombc[id][2] = floatround(aOrigin[2])
set_pev(heid[id],pev_ltime, halflife_time() + 15 + 0.1)
engfunc(EngFunc_SetModel, heid[id], "models/w_hegrenade.mdl")
engfunc(EngFunc_DropToFloor,heid[id])
set_pev(heid[id],pev_nextthink, halflife_time() + 0.1)
return PLUGIN_CONTINUE
}
public Effect_Zamroz_Totem_Thinkx(ent)
{
new id = pev(ent,pev_owner)
ent = heid[id]
//We have emitted beam. Apply effect (this is delayed)
if (pev(ent,pev_euser2) == 1)
{
new Float:forigin[3], origin[3]
pev(ent,pev_origin,forigin)
FVecIVec(forigin,origin)
new Float:originx[3]
pev(id,pev_origin,originx)
//Find people near and damage them
new entlist[513]
new numfound = UTIL_FindNearestOpponent(ent,300)
for (new i=0; i < numfound; i++)
{
new pid = entlist[i]
if (get_user_team(pid) != get_user_team(id))
continue
if (is_user_alive(pid)){
UTIL_Damage(id,pid,25.0+inteligencja[id],(1<<24),0,"hegrenade")
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(3)
write_coord(floatround(originx[0]))
write_coord(floatround(originx[1]))
write_coord(floatround(originx[2]))
write_short(sprite_boom)
write_byte(50)
write_byte(15)
write_byte(0)
message_end()
remove_entity(ent)
return PLUGIN_CONTINUE
}
}
set_pev(ent,pev_euser2,0)
set_pev(ent,pev_nextthink, halflife_time() + 1.5)
return PLUGIN_CONTINUE
}
//Entity should be destroyed because livetime is over
if (pev(ent,pev_ltime) < halflife_time() || !is_user_alive(id))
{
remove_entity(ent)
return PLUGIN_CONTINUE
}
set_pev(ent,pev_euser2,1)
set_pev(ent,pev_nextthink, halflife_time() + 0.5)
return PLUGIN_CONTINUE
}
HE sie tworzy ale nie wybucha
Ma ktos pomysł ? Think zarejestrowany