AlliedModders

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

DoPe^ 09-25-2014 06:17

Invis viewmodel?
 
Hey guys, is it possible to make a players viewmodel (gun/knife etc.) invisible?
Just like it is with the worldmodel "SetWeaponColor(client,255,255,255,0)"?

Thanks :)

h3bus 09-25-2014 08:04

Re: Invis viewmodel?
 
Never tried but there are some interesting props you might want to mess with:
- On players: m_bDrawViewmodel
- On viewmodel (retrived by m_hViewModel on player): m_nRenderFX/m_nRenderMode and Inputs: InputAlpha/InputDisableDraw

MasterOfTheXP 09-25-2014 09:38

Re: Invis viewmodel?
 
In TF2, adding 32 to a viewmodel's m_fEffects works to make it invisible.

DoPe^ 09-25-2014 11:30

Re: Invis viewmodel?
 
Quote:

Originally Posted by MasterOfTheXP (Post 2203478)
In TF2, adding 32 to a viewmodel's m_fEffects works to make it invisible.

Thanks! that did the tricks :P

Entity 11-09-2018 19:55

Re: Invis viewmodel?
 
Quote:

Originally Posted by DoPe^ (Post 2203520)
Thanks! that did the tricks :P

How have u done this? I couldn't do that :(

PHP Code:

new entity GetEntPropEnt(clientProp_Send"m_hViewModel");
    
if (
IsValidEntity(entity))
{
    
SetEntProp(entityProp_Send"m_fEffects"GetEntProp(entityProp_Send"m_fEffects") & ~32);
    
SetEntityRenderMode(entityRENDER_TRANSCOLOR);
    
SetEntityRenderColor(entity25525525525);



Dragokas 11-13-2018 19:00

Re: Invis viewmodel?
 
Quote:

Originally Posted by MasterOfTheXP (Post 2203478)
In TF2, adding 32 to a viewmodel's m_fEffects works to make it invisible.

Entity, isn't that should be
Code:

| 32
?


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

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