AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   m_hViewModel (https://forums.alliedmods.net/showthread.php?t=316301)

Entity 05-16-2019 06:18

m_hViewModel
 
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?

https://b.radikal.ru/b24/1905/11/78ec0b43aec5.png

TheDS1337 05-16-2019 16:31

Re: m_hViewModel
 
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

Entity 05-18-2019 15:21

Re: m_hViewModel
 
Quote:

Originally Posted by TheDS1337 (Post 2651919)
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...

Entity 05-18-2019 15:24

Re: m_hViewModel
 
Quote:

Originally Posted by TheDS1337 (Post 2651919)
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 06-01-2019 05:12

Re: m_hViewModel
 
Is there any way to teleport the view model? This will solve the problem.
P.S. TeleportEntity not work :(


All times are GMT -4. The time now is 16:15.

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