-
Hi, first of all thanks for this fantastic library. I have found a problem ( i think ), the event called "grenade_thrown" is never called, so there is no way of catching the position the nade/flash/smoke/etc was thrown from, right? Is there any other event that can be used for that effect? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
I have the same problem, only works this events: hegrenade_detonate, flashbang_detonate and smokegrenade_detonate |
Beta Was this translation helpful? Give feedback.
-
Try some code like this: demoFile.entities.on("create", e => {
if (!("DT_BaseCSGrenadeProjectile" in e.entity.props)) return;
const projectileEntity = (e.entity as unknown) as BaseEntity<
CBaseCSGrenadeProjectile
>;
const thrower = projectileEntity.owner as Player;
console.log(
"%s threw %s at:",
thrower ? thrower.name : "(someone)",
projectileEntity.modelName,
projectileEntity.position
);
}); |
Beta Was this translation helpful? Give feedback.
-
@saul Is it possible to get |
Beta Was this translation helpful? Give feedback.
-
Grenade projectiles aren't weapons, so unfortunately not. That is projectiles (e.g. |
Beta Was this translation helpful? Give feedback.
Try some code like this: