View Single Post
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 10-16-2017 , 11:58   Re: grenade_bounce
Reply With Quote #4

Quote:
Originally Posted by EasSidezz View Post
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[] namebool dontBroadcast)
{

    
int client GetClientOfUserId(event.GetInt("userid"));

    if(
client != 0)
    {
        
int ent = -1;
        
char buffer[30];

        while( (
ent FindEntityByClassname(ent"*")) != -)
        {
            
GetEntityClassname(entbuffersizeof(buffer));

            if(
StrContains(buffer"_projectile"false) != -&& GetEntProp(entProp_Send"m_fFlags") == && GetEntPropEnt(entProp_Data"m_hThrower") == client)
            {
                
PrintToServer("%s %i %i"bufferentclient);
            }
        }
    }


*edit
You can hook grenade bounce sounds...
__________________
Do not Private Message @me

Last edited by Bacardi; 10-16-2017 at 12:34.
Bacardi is offline