AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Invisible Weapon Only (https://forums.alliedmods.net/showthread.php?t=316822)

Saint Sinner 06-11-2019 20:05

Invisible Weapon Only
 
I want to make weapon invisible but i dont know if is possible

Code:

#include <amxmodx>
#include <fakemeta>

new const g_model[] = "models/v_knife.mdl"

public plugin_init()
{
   
    register_forward( FM_AddToFullPack, "fwdAddToFullPack_Post", 1 );
}

public fwdAddToFullPack_Post( es_handle, e, ent, host, hostflags, player, pset )
{
    static string[32]

    if (is_user_alive(player))
    {
        pev(player, pev_classname, string, sizeof string - 1)

        if (equali(string, g_model))
        {
            set_es( es_handle, ES_RenderMode, kRenderTransAlpha );
            set_es( es_handle, ES_RenderAmt, 0 );
            set_es( es_handle, ES_Effects, EF_NODRAW );
        }
    }
}


thEsp 06-12-2019 01:53

Re: Invisible Weapon Only
 
Invisible when you drop it?

Saint Sinner 06-12-2019 02:54

Re: Invisible Weapon Only
 
In the hands..Maybe is not possible..If is possible please write a code

HamletEagle 06-12-2019 10:57

Re: Invisible Weapon Only
 
Set the viewmodel to nothing.

Saint Sinner 06-12-2019 12:15

Re: Invisible Weapon Only
 
Quote:

Originally Posted by HamletEagle (Post 2655332)
Set the viewmodel to nothing.

this is your answer? I want to know if is possible or not to make weapon invisible

<VeCo> 06-12-2019 12:30

Re: Invisible Weapon Only
 
Viewmodel rendering is handled client-side, you can't change it.

OciXCrom 06-12-2019 12:34

Re: Invisible Weapon Only
 
Quote:

Originally Posted by Saint Sinner (Post 2655341)
this is your answer? I want to know if is possible or not to make weapon invisible

What's the difference between making it invisible and making it nothing? There is no visible difference, right?

HamletEagle 06-12-2019 14:01

Re: Invisible Weapon Only
 
Quote:

Originally Posted by Saint Sinner (Post 2655341)
this is your answer? I want to know if is possible or not to make weapon invisible

Sorry for daring to try to help you. Won't happen again.

Saint Sinner 06-12-2019 16:01

Re: Invisible Weapon Only
 
Quote:

Originally Posted by OciXCrom (Post 2655346)
What's the difference between making it invisible and making it nothing? There is no visible difference, right?

becouse can stop many hacks..if p model is solid not

edon1337 06-12-2019 16:02

Re: Invisible Weapon Only
 
Quote:

Originally Posted by Saint Sinner (Post 2655361)
becouse can stop many hacks..if p model is solid not

But, how?


All times are GMT -4. The time now is 17:31.

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