Raised This Month: $32 Target: $400
 8% 

Invisible Problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
leandro442
Member
Join Date: Sep 2013
Location: Portugal
Old 01-09-2021 , 15:31   Invisible Problem
Reply With Quote #1

Hello guys, I've been trying to compose this problem for several hours, which is the objective is that the furiens are invisible when they are stopped, and so far I've only managed to make it happen sometimes, 3 in 3 rounds they are invisible or something which wasn’t supposed to happen, but I always wanted to. could someone help me? thanks !
PHP Code:
 if(cVb_Invisible == true)
        {
          
char wepname[32];
          
GetClientWeapon(clientwepnamesizeof(wepname));
          
bool b_CanBeInvisible IsClientNotMoving(buttons) && !IsClientInAir(clientcFlags) && StrEqual(wepname"weapon_knife") && b_ClientMovedAfterSpawn[client] == true;
          if(
b_CanBeInvisible == true)
          {
            if(
b_IsClientInvisible[client] == false)
            {
              if(
b_IsClientInvisiblePre[client] == false)
              {
                
f_ClientInvisible[client] = GetGameTime();
                
b_IsClientInvisiblePre[client] = true;
              }
              else if(
b_IsClientInvisiblePre[client] && b_IsClientInvisible[client] == false)
              {
                
int i_ClientRenderColor[MAXPLAYERS+1][4];

                
F_GetEntityRenderColor(clienti_ClientRenderColor[client]);
                
float f_InvisTimeLeft[MAXPLAYERS+1];
                
f_InvisTimeLeft[client] = f_ClientInvisible[client] - GetGameTime() + f_gInvisibleDelay[client];
                if(
f_InvisTimeLeft[client] < 0.01 && (i_ClientRenderColor[client][3]-cVi_Invisible_Alpha_Reduce) <= 0)
                {
                  
SetEntityRenderColor(client,255,255,255,0);
                  
FadeClient(client35,0,130,30);
                  
b_IsClientInvisible[client] = true;

                }
                else if(
f_InvisTimeLeft[client] < 0.01 && i_ClientRenderColor[client][3] > 1)
                {
                  
SetEntityRenderColor(client,255,255,255,i_ClientRenderColor[client][3]-cVi_Invisible_Alpha_Reduce);
                  
f_ClientInvisible[client] = GetGameTime();
                }
              }
            }
          }
          else
          {
            
//SetEntityRenderColor(client);
            
b_IsClientInvisiblePre[client] = false;
            
b_IsClientInvisible[client] = false;
            
FadeClient(client);
          }
        } 
leandro442 is offline
Reply


Thread Tools
Display Modes

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 03:41.


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