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

Problem making a player Invisible


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Elitcky
AlliedModders Donor
Join Date: Jun 2016
Location: Antofagasta, Chile
Old 10-10-2017 , 19:19   Problem making a player Invisible
Reply With Quote #1

I searched all google.
And there are a lot of methods to make a player invisible, i finally got one working well and not crashing the csgo game, but it doesn't work as it need to be :/

PHP Code:
//Define Invis stuff
#define INVIS                    {255,255,255,20}
#define NORMAL                    {255,255,255,255} 
PHP Code:
public void Colorize(int clientint color[4])
{
    
int maxents GetMaxEntities();
    
// Colorize player and weapons
    
int m_hMyWeapons FindSendPropInfo("CBasePlayer""m_hMyWeapons");
    
//int m_hMyWeapons = HasEntProp("CBasePlayer", "m_hMyWeapons");    
    
    
for (int i 0weapon47+= 4)
    {
        
weapon GetEntDataEnt2(clientm_hMyWeapons i);
        
        if (
weapon > -1)
        {
            
char strClassname[250];
            
GetEdictClassname(weaponstrClassnamesizeof(strClassname));
            
//PrintToChatAll("strClassname is: %s", strClassname);
            
            
SetEntityRenderMode(weaponRENDER_TRANSCOLOR);
            
SetEntityRenderColor(weaponcolor[0], color[1], color[2], color[3]);
        }
    }
    
    
SetEntityRenderMode(clientRENDER_TRANSCOLOR);
    
SetEntityRenderColor(clientcolor[0], color[1], color[2], color[3]);
    
    
// Colorize any wearable items
    
for (int i MaxClients 1<= maxentsi++)
    {
        if (!
IsValidEntity(i))continue;
        
        
char netclass[32];
        
GetEntityNetClass(inetclasssizeof(netclass));
        
        if (
strcmp(netclass"CTFWearableItem") == 0)
        {
            if (
GetEntDataEnt2(ig_wearableOffset) == client)
            {
                
SetEntityRenderMode(iRENDER_TRANSCOLOR);
                
SetEntityRenderColor(icolor[0], color[1], color[2], color[3]);
            }
        } else if (
strcmp(netclass"CTFWearableItemDemoShield") == 0)
        {
            if (
GetEntDataEnt2(ig_shieldOffset) == client)
            {
                
SetEntityRenderMode(iRENDER_TRANSCOLOR);
                
SetEntityRenderColor(icolor[0], color[1], color[2], color[3]);
            }
        }
    }
    return;

This way i make just the player invisible but not the "defuse kit, grenades, weapon, knife"
What is wrong with this to make the player invisible ? :/

for make invisible
PHP Code:
Colorize(clientINVIS); 
and for make it visible im just setting
PHP Code:
Colorize(clientNORMAL); 
halp crabs for u guys
__________________
Elitcky is offline
milutinke
AlliedModders Donor
Join Date: Jun 2012
Location: Serbia
Old 10-11-2017 , 08:22   Re: Problem making a player Invisible
Reply With Quote #2

For weapons:
https://forums.alliedmods.net/showthread.php?p=2527960

For defuse, grenades, etc..
https://forums.alliedmods.net/showthread.php?p=2450473

Last edited by milutinke; 10-11-2017 at 08:23.
milutinke is offline
Send a message via Skype™ to milutinke
Elitcky
AlliedModders Donor
Join Date: Jun 2016
Location: Antofagasta, Chile
Old 10-13-2017 , 12:18   Re: Problem making a player Invisible
Reply With Quote #3

didn't get it bro :c tried to set it up but the sv crashes when i active the command :v
__________________
Elitcky 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 10:45.


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