⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 aimvec creator tutorial .txt

📁 * first open client.cpp and search for that USER_MSG_INTERCEPT(TeamInfo) over it u add this
💻 TXT
字号:
Code: 
code to draw the dots / vec# (call from HUD_Redraw) 


code:-------------------------------------------------------------------------------- 
cl_entity_s vecDummy; 

void DrawAimVecMaker() 
{ 
   vec3_t aim_location, target_origin; 
   vec3_t up, right, forward, playerAngles; 

   vector::iterator pos, end; 
   if(vecDummy.curstate.usehull == 0) 
   { 
      pos = gAimbot.AimVecsS.begin(); 
      end = gAimbot.AimVecsS.end(); 
   } 
   else 
   { 
      pos = gAimbot.AimVecsD.begin(); 
      end = gAimbot.AimVecsD.end(); 
   } 

   // calculate aiming vectors 
   playerAngles[0]=0; 
   playerAngles[1]=vecDummy.angles[1]; 
   playerAngles[2]=0; 
   gEngfuncs.pfnAngleVectors (playerAngles, forward, right, up); 
   forward[2] = -forward[2]; 

   register DWORD color = 0xFF1111FF; 
   float vecScreen[2]; 
   int num = 0; 
   for (;pos!=end;++pos) 
   { 
      aim_location[0] = cvarx.vecmaker_x; 
      aim_location[1] = cvarx.vecmaker_y; 
      aim_location[2] = cvarx.vecmaker_z; 

      aim_location = aim_location + forward * pos->f; 
      aim_location = aim_location + up * pos->h; 
      aim_location = aim_location + right * pos->r; 
       
      gDrawFilledBoxAtLocation(aim_location,color,1); 
      float r = ((color&0xFF000000)>>24)/255.0; 
      float g = ((color&0x00FF0000)>>16)/255.0; 
      float b = ((color&0x0000FF00)>>8 )/255.0; 
      gEngfuncs.pfnDrawSetTextColor(r,g,b); 
      if( CalcScreen(aim_location,vecScreen) ) 
      { 
         char buf[3]; 
         sprintf(buf,"%d",++num); 
         gEngfuncs. pfnDrawConsoleString(vecScreen[0],vecScreen[1]+3,b 
uf ); 
      } 

      color = 0xFFFFFFFF; 
   } 
} 
-------------------------------------------------------------------------------- 


code to draw the model itself (goes inside HUD_TempEnt..) 

code:-------------------------------------------------------------------------------- 
if( cvarx.vecmaker ) 
{ 
   //BAD, model is based on clients model so ducking/model is overidden 
   memcpy( &vecDummy, me.ent, sizeof(cl_entity_s) ); 
   vecDummy.curstate.sequence = cvarx.vecmaker_seq; 
   vecDummy.curstate.usehull = cvarx.vecmaker_duck; 
   vecDummy.origin[0] = cvarx.vecmaker_x; 
   vecDummy.origin[1] = cvarx.vecmaker_y; 
   vecDummy.origin[2] = cvarx.vecmaker_z; 
   VectorCopy( vecDummy.origin, vecDummy.curstate.origin ); 
   vecDummy.angles[0] = cvarx.vecmaker_pitch; 
   vecDummy.angles[1] = cvarx.vecmaker_yaw; 

   gEngfuncs.CL_CreateVisibleEntity(ET_NORMAL,&vecDummy); 
}-------------------------------------------------------------------------------- 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -