Raised This Month: $12 Target: $400
 3% 

m_hViewModel


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Entity
Member
Join Date: May 2016
Old 05-16-2019 , 06:18   m_hViewModel
Reply With Quote #1

Hello, friends. Everyone knows that m_hViewModel can be hidden with m_fEffects, but the effect of the shot visible (muzzle flash). Is there any way to hide it, too?


Last edited by Entity; 05-16-2019 at 06:19.
Entity is offline
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 05-16-2019 , 16:31   Re: m_hViewModel
Reply With Quote #2

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

Last edited by TheDS1337; 05-16-2019 at 16:36.
TheDS1337 is offline
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
Entity
Member
Join Date: May 2016
Old 05-18-2019 , 15:24   Re: m_hViewModel
Reply With Quote #4

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
It seems that muzzle flash is not info_particle_system, but a sprite.
Entity is offline
Entity
Member
Join Date: May 2016
Old 06-01-2019 , 05:12   Re: m_hViewModel
Reply With Quote #5

Is there any way to teleport the view model? This will solve the problem.
P.S. TeleportEntity not work
Entity is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:58.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode