Thread: m_hViewModel
View Single Post
Entity
Member
Join Date: May 2016
Old 05-18-2019 , 15:21   Re: m_hViewModel
Reply With Quote #3

Quote:
Originally Posted by TheDS1337 View Post
Try hooking EffectDispatch temp ent using AddTempEntHook and block it if m_iEffectName == 3 (CS_MuzzleFlash index)

PS: here's a dump of EffectDispatch table:
Code:
Dumping table EffectDispatch indexed 12 out of 19, has 15 strings [1024 MAX]

	error indexed 0 out of 15
	gunshotsplash indexed 1 out of 15
	KnifeSlash indexed 2 out of 15
	CS_MuzzleFlash indexed 3 out of 15
	csblood indexed 4 out of 15
	ParticleEffect indexed 5 out of 15
	ParticleEffectStop indexed 6 out of 15
	GlassImpact indexed 7 out of 15
	Impact indexed 8 out of 15
	RagdollImpact indexed 9 out of 15
	TracerSound indexed 10 out of 15
	Tracer indexed 11 out of 15
	watersplash indexed 12 out of 15
	waterripple indexed 13 out of 15
	bloodimpact indexed 14 out of 15
PS 2: I am not sure if it removes the first person muzzle, perhaps the third person one, if it didn't work you'll have too check the info_particle_system parented to that weapon and remove it
PHP Code:
public OnPluginStart()
{
    
AddTempEntHook("EffectDispatch"EffectDispatch);
}

public 
ActionEffectDispatch(const String:te_name[], const Players[], numClientsFloat:delay

    if (
TE_ReadNum("m_iEffectName") == 3)
    {
        
PrintToChatAll("block");
        return 
Plugin_Handled;
    }
    
    return 
Plugin_Continue;

This does not work.
P.S. Message in chat does not display, strangely...

Last edited by Entity; 05-18-2019 at 15:21.
Entity is offline