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

[CSGO] cannot make weapon invisible since 1.31.3.0


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
senecas
Senior Member
Join Date: Jun 2006
Old 11-22-2013 , 01:03   [CSGO] cannot make weapon invisible since 1.31.3.0
Reply With Quote #1

I have used this code to hide zombie's knife (yes, ZR mod)

PHP Code:
public OnGameFrame()
{
    for(new 
i=1;i<=MaxClients;i++)
    {
        if(!
IsClientInGame(i) || !IsPlayerAlive(i))
                continue;

        new 
ent GetEntPropEnt(iProp_Data"m_hActiveWeapon");

        if(
ent > -)
        {
            
decl String:wpn_name[32];
            
GetEntityClassname(entwpn_namesizeof(wpn_name));
            if(
StrContains(wpn_name"knife"false) != -1)
            {
                switch(
ZR_IsClientZombie(i))
                {
                    case 
true:
                    {
                        
SetEntityRenderMode(entRENDER_NONE);
                    }
                    case 
false:
                    {
                         
SetEntityRenderMode(entRENDER_NORMAL);
                    }
                }
            }
        }
    }

I spent a lot of time to fix this problem....
hum...
Only When the weapons's owner is set RENDER_NONE, It is affected by RenderMode (RENDER_NONE or RENDER_TRASNALPHA etc...)

Why....they do that ... ?
senecas is offline
MasterOfTheXP
Veteran Member
Join Date: Aug 2011
Location: Cloudbank
Old 11-22-2013 , 02:36   Re: [CSGO] cannot make weapon invisible since 1.31.3.0
Reply With Quote #2

Quote:
Originally Posted by senecas View Post
Why....they do that ... ?
CS:GO isn't exactly geared towards modding, unlike most other Source engine games.

You probably don't need to set render mode on every frame...but I haven't ever done that, and I haven't tinkered with CS:GO much, so I wouldn't know. Either way, try setting the knife's netprop m_fEffects to 32 to make it invisible, and 129 otherwise.
__________________
Plugins / My Steam / TF2 Sandbox (plugin beta testing!)
MasterOfTheXP is offline
senecas
Senior Member
Join Date: Jun 2006
Old 11-22-2013 , 04:06   Re: [CSGO] cannot make weapon invisible since 1.31.3.0
Reply With Quote #3

m_fEffects works

I appreciate you
senecas is offline
Reply



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 15:58.


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