Quote:
Originally Posted by Rolnaaba
How can I catch where an he-gernade explodes, and the origin of the explosion.
|
Here's a way to get the grenade origin and the owner:
Code:
#include <amxmodx>
#include <fakemeta>
public plugin_init()
{
register_forward(FM_EmitSound, "EmitSound");
}
public EmitSound(entity, channel, const sound[])
{
if(!pev_valid(entity))
return FMRES_IGNORED;
if(!contain(sound, "hegrenade-"))
{
new Float:origin[3], owner;
pev(entity, pev_origin, origin);
pev(entity, pev_owner, owner);
client_print(owner, 3, "Grenade origin: %f %f %f", origin[0], origin[1], origin[2]);
}
return FMRES_IGNORED;
}
That should work.
__________________