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

[Not Solved anymore][CS:GO] Knife it's still visible


Post New Thread Reply   
 
Thread Tools Display Modes
Totenfluch
AlliedModders Donor
Join Date: Jan 2012
Location: Germany
Old 01-12-2016 , 07:54   Re: [Solved][CS:GO] Knife it's still visible
Reply With Quote #11

https://forums.alliedmods.net/showpo...1&postcount=17

This has been working well for me~
Totenfluch is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 01-12-2016 , 10:20   Re: [Solved][CS:GO] Knife it's still visible
Reply With Quote #12

Quote:
Originally Posted by Totenfluch View Post
There are some questionable statements in that code. like
ServerCommand("ent_fire env_cascade_light kill");
You do know this does nothing without sv_cheats on right?

EDIT: ah https://forums.alliedmods.net/showpo...1&postcount=15
nice find i needed something to remove shadows, but try looping the entities and killing them naturally instead of using a cheat command.

Also this seems to be the thing that makes world models invisible:
Code:
    new entity = MaxClients+1;
    
    while( (entity = FindEntityByClassname(entity, "weaponworldmodel")) != -1 )
    {
        SetEntProp(entity, Prop_Send, "m_nModelIndex", 0);
    }
does weaponworldmodel have an owner property?

Last edited by Mitchell; 01-12-2016 at 10:23.
Mitchell is offline
valio_skull
Senior Member
Join Date: Jan 2013
Location: at home
Old 07-21-2016 , 11:19   Re: [Solved][CS:GO] Knife it's still visible
Reply With Quote #13

Ok, so I quited CS and scripting for a while and now I tryed to install my addons on a server, but that code didn't work anymore. So I tried this:
PHP Code:
    //////////////////////// Invisible ////////////////////////
    
char wepname[32];
    
GetClientWeapon(clientwepnamesizeof(wepname));
    
int flags GetEntityFlags(client);
    
bool CanBePlayerInvisible IsPlayerNotMoving(buttons) && !IsPlayerInAir(flagsclient) && StrEqual(wepname"weapon_knife");
    if (
CanBePlayerInvisible)
    {
        if (
GetClientTeam(client) == CS_TEAM_T)
        {
            if(!
IsPlayerInvisible[client])
            {
//                FadeClient(client, 75,0,130,35);
                
if(!IsPlayerComingToInvisible[client])
                {
                    
PlayerInvisTime[client] = GetGameTime();
                    
IsPlayerComingToInvisible[client] = true;
                }
                else if(
IsPlayerComingToInvisible[client])
                {
                    if(
IsValidClient(clienttrue) && GetClientTeam(client) == CS_TEAM_T && !IsPlayerInvisible[client])
                    {
                        
int color[MAXPLAYERS+1][4];
                        
Entity_GetRenderColor(client,color[client]);
                        
float time 0.01;
                        
float timeleft[MAXPLAYERS+1];
                        
timeleft[client] = PlayerInvisTime[client] - GetGameTime() + time;
                        if(
timeleft[client] < 0.01 && (color[client][3] - 26) <= )
                        {
                            
IsPlayerInvisible[client] = true;
                        }
                        else if(
timeleft[client] < 0.01 && color[client][3] > 1)
                        {
                            
SDKHookEx(clientSDKHook_PostThinkPostOnPostThinkPost);
                            
SetEntProp(clientProp_Send"m_nRenderFX"RENDERFX_NONE);
                            
SetEntProp(clientProp_Send"m_nRenderMode"RENDER_NONE);
                            
Entity_SetRenderColor(client,-1,-1,-1,color[client][3]-26);
                            
SetClientWeaponsVisibility(client,color[client][3]-26);
                            
PlayerInvisTime[client] = GetGameTime();
                        }
                    }
                }
            }
        }
    }
    else
    {
        if(
GetClientTeam(client) == CS_TEAM_T)
        {
            
SetClientWeaponsVisibility(clientfalse);
            
FadeClient(client75,0,130,35);
        }
        
SetEntityRenderMode(clientRENDER_TRANSCOLOR);
        
SetEntityRenderColor(client255255255255); 
        
IsPlayerComingToInvisible[client] = false;
        
IsPlayerInvisible[client] = false;
    } 
Now I have the same problem as I had at the beginning. The weapon is visible...
http://image.prntscr.com/image/5f5e8...ce2d45b530.png
Sorry for bumping this old thread. Also I am a noob at coding.
__________________
valio_skull is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 07-21-2016 , 11:35   Re: [Not Solved anymore][CS:GO] Knife it's still visible
Reply With Quote #14

It's been answered a few times since this thread was alive.
In fact the answer is right above your post...
Mitchell is offline
valio_skull
Senior Member
Join Date: Jan 2013
Location: at home
Old 07-21-2016 , 13:32   Re: [Not Solved anymore][CS:GO] Knife it's still visible
Reply With Quote #15

Quote:
Originally Posted by Mitchell View Post
It's been answered a few times since this thread was alive.
In fact the answer is right above your post...
Well, fuck. I did not pay attention to that. Sorry, I will try it. Thanks
__________________
valio_skull is offline
ESK0
BANNED
Join Date: May 2014
Location: Czech Republic
Old 07-25-2016 , 20:44   Re: [Not Solved anymore][CS:GO] Knife it's still visible
Reply With Quote #16

Hey , Nice to see using someone my code anyway its better to use sdkhooks settransmit instead of changing worldmodel index... ) Just handle it when IsPlayerInvisible[client] = true
ESK0 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 12:37.


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