abdobiskra писал(а):
rtxa писал(а):
but with weapons doesn't work. Any ideas?
Some thing like this :
Код:
public plugin_init()
register_touch(Your_Weapon_List[],"worldspawn","Next_Think")
public Next_Think(weapon)
set_pev(weapon,pev_nextthink,get_gametime() + 5.0)) return weapon //5sec to respawn
Thank for answering, but isn't what I'm looking for, because that only work when you touch the weapon, i need to respawn it at any moment.
Lev писал(а):
rtxaThat is because game dll deal differently with weapons as you think. When player pickups a weapon, that exactly weapon entity is attached to a player and another weapon is created and laid down on the floor invisible. So, when you wish to do an instant respawn, you should at that time enumerate all entities, find weapons that are invisible and don't follow players
Код:
(pev->effects & EF_NODRAW) != 0 && pev->movetype != MOVETYPE_FOLLOW
and reset their think time
Код:
set_pev(i, pev_nextthink, get_gametime());
Ok Lev, but that is just a filter, setting pev_nexthink to get_gametime() to all entities should make them respawn but it doesn't.