Quote:
Originally Posted by EasSidezz
check and make sure it's not a mistake, it is a wiki after all
|
In csgo modevents.res
Code:
"grenade_bounce"
{
"userid" "short"
}
You can use tricks to find it.
*edit
Seems not work well, example smokegrenades and decoys stay a while and player can throw new grenades after.
PHP Code:
#include <sdktools>
public void OnPluginStart()
{
HookEventEx("grenade_bounce", grenade_bounce);
}
public void grenade_bounce(Event event, const char[] name, bool dontBroadcast)
{
int client = GetClientOfUserId(event.GetInt("userid"));
if(client != 0)
{
int ent = -1;
char buffer[30];
while( (ent = FindEntityByClassname(ent, "*")) != -1 )
{
GetEntityClassname(ent, buffer, sizeof(buffer));
if(StrContains(buffer, "_projectile", false) != -1 && GetEntProp(ent, Prop_Send, "m_fFlags") == 0 && GetEntPropEnt(ent, Prop_Data, "m_hThrower") == client)
{
PrintToServer("%s %i %i", buffer, ent, client);
}
}
}
}
*edit
You can hook grenade bounce sounds...
__________________