Advertisement
Guest User

Untitled

a guest
Dec 16th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.10 KB | None | 0 0
  1. void __fastcall HookedSceneEnd(void* ecx, void* edx)
  2. {
  3. original_scene_end(ecx);
  4.  
  5. static SDK::IMaterial* ignorez = chams->CreateMaterial(true, true, false);
  6. static SDK::IMaterial* notignorez = chams->CreateMaterial(false, true, false);
  7. static SDK::IMaterial* local = chams->CreateMaterial(false, true, false);
  8.  
  9. static SDK::IMaterial* angles = chams->CreateMaterial(false, true, false);
  10.  
  11. static SDK::IMaterial* ignorezf = chams->CreateMaterial(true, false, false);
  12. static SDK::IMaterial* notignorezf = chams->CreateMaterial(false, false, false);
  13.  
  14. if (INTERFACES::Engine->IsConnected() && INTERFACES::Engine->IsInGame()) {
  15. auto local_player = INTERFACES::ClientEntityList->GetClientEntity(INTERFACES::Engine->GetLocalPlayer());
  16. for (int i = 1; i < 65; i++) {
  17. auto entity = INTERFACES::ClientEntityList->GetClientEntity(i);
  18.  
  19.  
  20. if (!entity)
  21. continue;
  22.  
  23. if (!local_player)
  24. continue;
  25.  
  26. bool is_local_player = entity == local_player;
  27. bool is_teammate = local_player->GetTeam() == entity->GetTeam() && !is_local_player;
  28.  
  29. if (is_teammate)
  30. continue;
  31.  
  32. if (local_player && SETTINGS::settings.localchams) {
  33. local->ColorModulate(CColor(255, 255, 255, 255));
  34. INTERFACES::RenderView->SetColorModulation(CColor(77, 137, 197)); //255, 255, 255, 255
  35. INTERFACES::ModelRender->ForcedMaterialOverride(local);
  36. local_player->DrawModel(0x1, 255);
  37. INTERFACES::ModelRender->ForcedMaterialOverride(nullptr);
  38. }
  39.  
  40. if (local_player && SETTINGS::settings.aa_bool) {
  41. /* vec3_t OrigAng;
  42. OrigAng = local_player->get_eye_ang( );
  43. local_player->set_angles( vec3_t( 0, fakeangles.y, 0 ) );
  44. angles->AlphaModulate( 0 );
  45. ctx::model_render->ForcedMaterialOverride( angles );
  46. local_player->DrawModel( 0x1, 255 );
  47. ctx::model_render->ForcedMaterialOverride( nullptr );*/
  48. }
  49.  
  50. if (is_local_player)
  51. continue;
  52.  
  53. //--- Colored Models ---//
  54.  
  55. if (entity && SETTINGS::settings.chams_type == 2) {
  56.  
  57.  
  58. INTERFACES::ModelRender->ForcedMaterialOverride(ignorez);
  59. ignorez->ColorModulate(CColor(255, 255, 255, 255)); //0, 125, 255
  60. INTERFACES::RenderView->SetColorModulation(CColor(SETTINGS::settings.vmodel_col)); //255, 40, 200
  61. entity->DrawModel(0x1, 255);
  62.  
  63. INTERFACES::ModelRender->ForcedMaterialOverride(notignorez);
  64. notignorez->ColorModulate(CColor(255, 255, 255, 255)); //0, 125, 255
  65. INTERFACES::RenderView->SetColorModulation(CColor(SETTINGS::settings.imodel_col)); //0, 125, 255
  66. entity->DrawModel(0x1, 255);
  67. INTERFACES::ModelRender->ForcedMaterialOverride(nullptr);
  68. }
  69. else if (entity && SETTINGS::settings.chams_type == 1) {
  70. INTERFACES::ModelRender->ForcedMaterialOverride(notignorez);
  71. notignorez->ColorModulate(CColor(255, 255, 255, 255)); //0, 125, 255
  72. INTERFACES::RenderView->SetColorModulation(CColor(SETTINGS::settings.vmodel_col)); //255, 40, 200
  73. entity->DrawModel(0x1, 255);
  74. INTERFACES::ModelRender->ForcedMaterialOverride(nullptr);
  75. }
  76. else if (entity && SETTINGS::settings.chams_type == 3) {
  77. INTERFACES::ModelRender->ForcedMaterialOverride(ignorez);
  78. ignorez->ColorModulate(CColor(255, 255, 255, 255)); //0, 125, 255
  79. INTERFACES::RenderView->SetColorModulation(CColor(SETTINGS::settings.imodel_col)); //255, 40, 200
  80. entity->DrawModel(0x1, 255);
  81. INTERFACES::ModelRender->ForcedMaterialOverride(nullptr);
  82. }
  83. else if (entity && SETTINGS::settings.chams_type == 4) {
  84. INTERFACES::ModelRender->ForcedMaterialOverride(ignorez);
  85. ignorez->ColorModulate(CColor(255, 255, 255, 255)); //0, 125, 255
  86. INTERFACES::RenderView->SetColorModulation(CColor(SETTINGS::settings.vmodel_col)); //255, 40, 200
  87. entity->DrawModel(0x1, 255);
  88.  
  89. INTERFACES::ModelRender->ForcedMaterialOverride(ignorez);
  90. ignorez->ColorModulate(CColor(255, 255, 255, 255)); //0, 125, 255
  91. INTERFACES::RenderView->SetColorModulation(CColor(SETTINGS::settings.imodel_col)); //0, 125, 255
  92. entity->DrawModel(0x1, 255);
  93. INTERFACES::ModelRender->ForcedMaterialOverride(nullptr);
  94. }
  95. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement