Been searching for this all over the place, and think I even remember seeing it somewhere a few months ago, yet I can't find it.
For some sort of kill streak system I'm trying to have the players earn kill streaks, and toss a smoke grenade at a spot, where the kill streak reward (eg a mortar strike or the likes, or Peace Maker's Ion Cannon
) shall be executed.
Basically what I'm after is:
- Is there an event for when the smoke grenade ignites?
Edit: Thank you databomb!
PHP Code:
HookEvent("smokegrenade_detonate",smokegrenade_detonate);
PHP Code:
public smokegrenade_detonate(Handle:event,const String:name[],bool:dontBroadcast)
{
}
- Can I get which client has thrown the smoke from that, and the location of the smoke?
Edit: Thanks again databomb!
PHP Code:
new Float:Origin[3];
Origin[0] = GetEventFloat(event,"x");
Origin[1] = GetEventFloat(event,"y");
Origin[2] = GetEventFloat(event,"z");
PHP Code:
new client = GetClientOfUserId(GetEventInt(event, "userid"));
And as a bonus question
:
- Is there any way to change the smoke so that it aint a big ball of smoke like it usually is, but rather a small green (or whatever color) marker like smoke column?
Hope anyone can help me, am happy with the smallest hints! ;)