Haven't tested this though. Could be, that the client is in m_hOwnerEntity instead of m_hThrower. I'm sure blodia knows, if there is something wrong;)
PHP Code:
#include <sourcemod>
#include <sdktools>
#include <sdkhooks>
public OnEntityCreated(entity, const String:classname[])
{
if(StrEqual(classname, "smokegrenade_projectile", false))
{
SetEntProp(entity, Prop_Send, "m_nNextThinkTick", -1);
SDKHook(entity, SDKHook_ThinkPost, Hook_OnThinkPost);
}
}
public Hook_OnThinkPost(entity)
{
new Float:fVelocity[3];
GetEntPropVector(entity, Prop_Send, "m_vecVelocity", fVelocity);
if(fVelocity[0] == 0.0 && fVelocity[1] == 0.0 && fVelocity[2] == 0.0)
{
new client = GetEntPropEnt(entity, Prop_Send, "m_hThrower");
new Float:fOrigin[3];
GetEntPropVector(entity, Prop_Send, "m_vecOrigin", fOrigin);
AcceptEntityInput(entity, "Kill");
// Blast ioncannon at fOrigin!
}
}
__________________