Raised This Month: $ Target: $400
 0% 

wcft 3 item help!!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
whosyourdaddy
Senior Member
Join Date: Apr 2008
Old 12-31-2008 , 02:35   Re: wcft 3 item help!!
Reply With Quote #3

is this how it works

Code:
// This should be called on weapon change, on new round, when the user selects a new skill, and after an item is purchased
 
ForwardAddToFullPack(ES,e,Ent,Host,HostFlags,Player,pSet)
{
   // Do not want to set them as invisible if the player is currently rendering
   if ( !p_data_b[ent][PB_CAN_RENDER] || !p_data_b[ent][PB_ISCONNECTED] )
   {
      return;
   }
 
   new iInvisLevel = 0;
 
   static iSkillLevel;
   iSkillLevel = SM_GetSkillLevel( ent, SKILL_INVISIBILITY );
 
   // If they are Human Alliance with Invisibility lets set the level
   if ( iSkillLevel > 0 )
   {
      iInvisLevel = p_invisibility[iSkillLevel-1];
   }
 
   // User has a Cloak of Invisibility
   if ( ITEM_Has( ent, ITEM_CLOAK ) > ITEM_NONE )
   {
      // Then we are already a little invis, lets give them a little bonus for purchasing the item
      if ( iInvisLevel > 0 )
      {
         iInvisLevel = floatround( float( iInvisLevel ) / INVIS_CLOAK_DIVISOR );
      }
      else
      {
         iInvisLevel = get_pcvar_num( CVAR_wc3_cloak );
      }
   }
 
   // If the player is holding a knife they should be more invisible
   if ( SHARED_IsHoldingKnife( ent ) )
   {
      iInvisLevel /= 2;
   }
 
   if ( iInvisLevel )
   {
      if(p_data_b[ent][PB_INVIS] && ITEM_Has(player,ITEM_GOGGLES) == ITEM_NONE)
{
        set_es(ES,ES_Solid,SOLID_NOT)
        set_es(ES,ES_RenderMode,kRenderTransAlpha)
        set_es(ES,ES_RenderAmt,iInvisLevel)
}
 
      p_data_b[ent][PB_INVIS] = true;
   }
 
   // User should not be invisible
   else
   {
      set_user_rendering( ent );
 
      p_data_b[ent][PB_INVIS] = false;
   }
 
   return;
}
think you can tell me what

ES
e
Ent
Host
HostFlags
Player
pSet

are

Last edited by whosyourdaddy; 12-31-2008 at 02:37.
whosyourdaddy is offline
 



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 09:16.


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