Просто убери глоу на курочекРешил добавить глоу и добавил код робочий но глоу просто не ресуеться что делать??
Пс код на игроков работает а бомба дефуза и курочки нет что делат
Без кода мы тут собственно нихуя не поймем получ...
#include "glow.hpp"
#include "../valve_sdk/csgostructs.hpp"
#include "../options.hpp"
Glow::Glow()
{
}
Glow::~Glow()
{
// We cannot call shutdown here unfortunately.
// Reason is not very straightforward but anyways:
// - This destructor will be called when the dll unloads
// but it cannot distinguish between manual unload
// (pressing the Unload button or calling FreeLibrary)
// or unload due to game exit.
// What that means is that this destructor will be called
// when the game exits.
// - When the game is exiting, other dlls might already
// have been unloaded before us, so it is not safe to
// access intermodular variables or functions.
//
// Trying to call Shutdown here will crash CSGO when it is
// exiting (because we try to access g_GlowObjManager).
//
}
void Glow::Shutdown()
{
// Remove glow from all entities
for (auto i = 0; i < g_GlowObjManager->m_GlowObjectDefinitions.Count(); i++) {
auto& glowObject = g_GlowObjManager->m_GlowObjectDefinitions[i];
auto entity = reinterpret_cast<C_BasePlayer*>(glowObject.m_pEntity);
if (glowObject.IsUnused())
continue;
if (!entity || entity->IsDormant())
continue;
glowObject.m_flAlpha = 0.0f;
}
}
void Glow::Run()
{
for (auto i = 0; i < g_GlowObjManager->m_GlowObjectDefinitions.Count(); i++) {
auto& glowObject = g_GlowObjManager->m_GlowObjectDefinitions[i];
auto entity = reinterpret_cast<C_BasePlayer*>(glowObject.m_pEntity);
if (glowObject.IsUnused())
continue;
if (!entity || entity->IsDormant())
continue;
auto class_id = entity->GetClientClass()->m_ClassID;
if (class_id == ClassId_CCSPlayer)
{
auto is_enemy = entity->m_iTeamNum() != g_LocalPlayer->m_iTeamNum();
if (!g_Options.glow_enabled || !entity->IsAlive())
continue;
if (!is_enemy)
continue;
if (!g_LocalPlayer->CanSeePlayer(entity, HITBOX_CHEST) && g_Options.glow_enemiesOC) {
glowObject.m_flRed = g_Options.color_glow_enemyOC[0] / 255.0f;
glowObject.m_flGreen = g_Options.color_glow_enemyOC[1] / 255.0f;
glowObject.m_flBlue = g_Options.color_glow_enemyOC[2] / 255.0f;
glowObject.m_flAlpha = g_Options.color_glow_enemyOC[3] / 255.0f;
}
if (g_LocalPlayer->CanSeePlayer(entity, HITBOX_CHEST)) {
glowObject.m_flRed = g_Options.color_glow_enemy[0] / 255.0f;
glowObject.m_flGreen = g_Options.color_glow_enemy[1] / 255.0f;
glowObject.m_flBlue = g_Options.color_glow_enemy[2] / 255.0f;
glowObject.m_flAlpha = g_Options.color_glow_enemy[3] / 255.0f;
glowObject.m_nGlowStyle = g_Options.glow_enemies_type;
}
}
else {
glowObject.m_flRed = 0.0f;
glowObject.m_flGreen = 0.0f;
glowObject.m_flBlue = 0.0f;
glowObject.m_flAlpha = 0.0f;
}
glowObject.m_bRenderWhenOccluded = true;
glowObject.m_bRenderWhenUnoccluded = false;
}
}
я код скинулКак ты entity получаешь?
я код скинулC++:#include "glow.hpp" #include "../valve_sdk/csgostructs.hpp" #include "../options.hpp" Glow::Glow() { } Glow::~Glow() { // We cannot call shutdown here unfortunately. // Reason is not very straightforward but anyways: // - This destructor will be called when the dll unloads // but it cannot distinguish between manual unload // (pressing the Unload button or calling FreeLibrary) // or unload due to game exit. // What that means is that this destructor will be called // when the game exits. // - When the game is exiting, other dlls might already // have been unloaded before us, so it is not safe to // access intermodular variables or functions. // // Trying to call Shutdown here will crash CSGO when it is // exiting (because we try to access g_GlowObjManager). // } void Glow::Shutdown() { // Remove glow from all entities for (auto i = 0; i < g_GlowObjManager->m_GlowObjectDefinitions.Count(); i++) { auto& glowObject = g_GlowObjManager->m_GlowObjectDefinitions[i]; auto entity = reinterpret_cast<C_BasePlayer*>(glowObject.m_pEntity); if (glowObject.IsUnused()) continue; if (!entity || entity->IsDormant()) continue; glowObject.m_flAlpha = 0.0f; } } void Glow::Run() { for (auto i = 0; i < g_GlowObjManager->m_GlowObjectDefinitions.Count(); i++) { auto& glowObject = g_GlowObjManager->m_GlowObjectDefinitions[i]; auto entity = reinterpret_cast<C_BasePlayer*>(glowObject.m_pEntity); if (glowObject.IsUnused()) continue; if (!entity || entity->IsDormant()) continue; auto class_id = entity->GetClientClass()->m_ClassID; if (class_id == ClassId_CCSPlayer) { auto is_enemy = entity->m_iTeamNum() != g_LocalPlayer->m_iTeamNum(); if (!g_Options.glow_enabled || !entity->IsAlive()) continue; if (!is_enemy) continue; if (!g_LocalPlayer->CanSeePlayer(entity, HITBOX_CHEST) && g_Options.glow_enemiesOC) { glowObject.m_flRed = g_Options.color_glow_enemyOC[0] / 255.0f; glowObject.m_flGreen = g_Options.color_glow_enemyOC[1] / 255.0f; glowObject.m_flBlue = g_Options.color_glow_enemyOC[2] / 255.0f; glowObject.m_flAlpha = g_Options.color_glow_enemyOC[3] / 255.0f; } if (g_LocalPlayer->CanSeePlayer(entity, HITBOX_CHEST)) { glowObject.m_flRed = g_Options.color_glow_enemy[0] / 255.0f; glowObject.m_flGreen = g_Options.color_glow_enemy[1] / 255.0f; glowObject.m_flBlue = g_Options.color_glow_enemy[2] / 255.0f; glowObject.m_flAlpha = g_Options.color_glow_enemy[3] / 255.0f; glowObject.m_nGlowStyle = g_Options.glow_enemies_type; } } else { glowObject.m_flRed = 0.0f; glowObject.m_flGreen = 0.0f; glowObject.m_flBlue = 0.0f; glowObject.m_flAlpha = 0.0f; } glowObject.m_bRenderWhenOccluded = true; glowObject.m_bRenderWhenUnoccluded = false; } }
Так другг..Пс код на игроков работает а бомба дефуза и курочки нет что делат
это из за того что я тупонул не тот код дал вот правильныйТак другг..
У тебя проверка на classid == CCSPlayer ....
#include "glow.hpp"
#include "../valve_sdk/csgostructs.hpp"
#include "../options.hpp"
Glow::Glow()
{
}
Glow::~Glow()
{
// We cannot call shutdown here unfortunately.
// Reason is not very straightforward but anyways:
// - This destructor will be called when the dll unloads
// but it cannot distinguish between manual unload
// (pressing the Unload button or calling FreeLibrary)
// or unload due to game exit.
// What that means is that this destructor will be called
// when the game exits.
// - When the game is exiting, other dlls might already
// have been unloaded before us, so it is not safe to
// access intermodular variables or functions.
//
// Trying to call Shutdown here will crash CSGO when it is
// exiting (because we try to access g_GlowObjManager).
//
}
void Glow::Shutdown()
{
// Remove glow from all entities
for(auto i = 0; i < g_GlowObjManager->m_GlowObjectDefinitions.Count(); i++) {
auto& glowObject = g_GlowObjManager->m_GlowObjectDefinitions[i];
auto entity = reinterpret_cast<C_BasePlayer*>(glowObject.m_pEntity);
if(glowObject.IsUnused())
continue;
if(!entity || entity->IsDormant())
continue;
glowObject.m_flAlpha = 0.0f;
}
}
void Glow::Run()
{
for(auto i = 0; i < g_GlowObjManager->m_GlowObjectDefinitions.Count(); i++)
{
auto& glowObject = g_GlowObjManager->m_GlowObjectDefinitions[i];
auto entity = reinterpret_cast<C_BasePlayer*>(glowObject.m_pEntity);
auto color = Color{};
if(glowObject.IsUnused())
continue;
if(!entity || entity->IsDormant())
continue;
if (entity->IsWeapon())
{
if (!g_Options.glow_weapons) continue;
Color(g_Options.color_glow_weapons);
}
auto class_id = entity->GetClientClass()->m_ClassID;
if (class_id== ClassId_CCSPlayer)
{
auto is_enemy = entity->m_iTeamNum() != g_LocalPlayer->m_iTeamNum();
if(!g_Options.glow_enabled || !entity->IsAlive())
continue;
if(!is_enemy)
continue;
glowObject.m_flRed = g_Options.color_glow_enemy[0] / 255.0f;
glowObject.m_flGreen = g_Options.color_glow_enemy[1] / 255.0f;
glowObject.m_flBlue = g_Options.color_glow_enemy[2] / 255.0f;
glowObject.m_flAlpha = g_Options.color_glow_enemy[3] / 255.0f;
}
else {
glowObject.m_flRed = 0.0f;
glowObject.m_flGreen = 0.0f;
glowObject.m_flBlue = 0.0f;
glowObject.m_flAlpha = 0.0f;
}
switch (class_id)
{
case ClassId_CChicken:
if (!g_Options.glow_chickens)
continue;
entity->m_bShouldGlow() = true;
color = g_Options.color_glow_chickens;
break;
case ClassId_CBaseAnimating:
if (!g_Options.glow_defuse_kits)
continue;
color = g_Options.color_glow_defuse;
break;
case ClassId_CPlantedC4:
if (!g_Options.glow_planted_c4)
continue;
color = g_Options.color_glow_planted_c4;
break;
default:
{
if (entity->IsWeapon()) {
if (!g_Options.glow_weapons)
continue;
color = g_Options.color_glow_weapons;
}
}
}
glowObject.m_bRenderWhenOccluded = true;
glowObject.m_bRenderWhenUnoccluded = false;
}
}
Ты все равно на плеера проверяешь мээээнн.....это из за того что я тупонул не тот код дал вот правильный
C++:#include "glow.hpp" #include "../valve_sdk/csgostructs.hpp" #include "../options.hpp" Glow::Glow() { } Glow::~Glow() { // We cannot call shutdown here unfortunately. // Reason is not very straightforward but anyways: // - This destructor will be called when the dll unloads // but it cannot distinguish between manual unload // (pressing the Unload button or calling FreeLibrary) // or unload due to game exit. // What that means is that this destructor will be called // when the game exits. // - When the game is exiting, other dlls might already // have been unloaded before us, so it is not safe to // access intermodular variables or functions. // // Trying to call Shutdown here will crash CSGO when it is // exiting (because we try to access g_GlowObjManager). // } void Glow::Shutdown() { // Remove glow from all entities for(auto i = 0; i < g_GlowObjManager->m_GlowObjectDefinitions.Count(); i++) { auto& glowObject = g_GlowObjManager->m_GlowObjectDefinitions[i]; auto entity = reinterpret_cast<C_BasePlayer*>(glowObject.m_pEntity); if(glowObject.IsUnused()) continue; if(!entity || entity->IsDormant()) continue; glowObject.m_flAlpha = 0.0f; } } void Glow::Run() { for(auto i = 0; i < g_GlowObjManager->m_GlowObjectDefinitions.Count(); i++) { auto& glowObject = g_GlowObjManager->m_GlowObjectDefinitions[i]; auto entity = reinterpret_cast<C_BasePlayer*>(glowObject.m_pEntity); auto color = Color{}; if(glowObject.IsUnused()) continue; if(!entity || entity->IsDormant()) continue; if (entity->IsWeapon()) { if (!g_Options.glow_weapons) continue; Color(g_Options.color_glow_weapons); } auto class_id = entity->GetClientClass()->m_ClassID; if (class_id== ClassId_CCSPlayer) { auto is_enemy = entity->m_iTeamNum() != g_LocalPlayer->m_iTeamNum(); if(!g_Options.glow_enabled || !entity->IsAlive()) continue; if(!is_enemy) continue; glowObject.m_flRed = g_Options.color_glow_enemy[0] / 255.0f; glowObject.m_flGreen = g_Options.color_glow_enemy[1] / 255.0f; glowObject.m_flBlue = g_Options.color_glow_enemy[2] / 255.0f; glowObject.m_flAlpha = g_Options.color_glow_enemy[3] / 255.0f; } else { glowObject.m_flRed = 0.0f; glowObject.m_flGreen = 0.0f; glowObject.m_flBlue = 0.0f; glowObject.m_flAlpha = 0.0f; } switch (class_id) { case ClassId_CChicken: if (!g_Options.glow_chickens) continue; entity->m_bShouldGlow() = true; color = g_Options.color_glow_chickens; break; case ClassId_CBaseAnimating: if (!g_Options.glow_defuse_kits) continue; color = g_Options.color_glow_defuse; break; case ClassId_CPlantedC4: if (!g_Options.glow_planted_c4) continue; color = g_Options.color_glow_planted_c4; break; default: { if (entity->IsWeapon()) { if (!g_Options.glow_weapons) continue; color = g_Options.color_glow_weapons; } } } glowObject.m_bRenderWhenOccluded = true; glowObject.m_bRenderWhenUnoccluded = false; } }
void Glow::Run(){
for (auto i = 0; i < g_GlowObjManager->m_GlowObjectDefinitions.Count(); i++){
auto& glowObject = g_GlowObjManager->m_GlowObjectDefinitions[i];
auto entity = reinterpret_cast<C_BasePlayer*>(glowObject.m_pEntity);
auto color = Color{0.0f, 0.0f, 0.0f, 0.0f};
if (glowObject.IsUnused())
continue;
if (!entity || entity->IsDormant())
continue;
auto class_id = entity->GetClientClass()->m_ClassID;
switch (class_id){
case ClassId_CCSPlayer:
if (!g_Options.glow_enabled || !entity->IsAlive())
continue;
auto is_enemy = entity->m_iTeamNum() != g_LocalPlayer->m_iTeamNum();
if (!is_enemy)
continue;
color = g_Options.color_glow_enemy;
break;
case ClassId_CChicken:
if (!g_Options.glow_chickens)
continue;
color = g_Options.color_glow_chickens;
break;
case ClassId_CBaseAnimating:
if (!g_Options.glow_defuse_kits)
continue;
color = g_Options.color_glow_defuse;
break;
case ClassId_CPlantedC4:
if (!g_Options.glow_planted_c4)
continue;
color = g_Options.color_glow_planted_c4;
break;
default:
if (entity->IsWeapon()) {
if (!g_Options.glow_weapons)
continue;
color = g_Options.color_glow_weapons;
}
break;
}
glowObject.m_flRed = color[0] / 255.0f;
glowObject.m_flGreen = color[1] / 255.0f;
glowObject.m_flBlue = color[2] / 255.0f;
glowObject.m_flAlpha = color[3] / 255.0f;
glowObject.m_bRenderWhenOccluded = true;
glowObject.m_bRenderWhenUnoccluded = false;
}
}
Проект предоставляет различный материал, относящийся к сфере киберспорта, программирования, ПО для игр, а также позволяет его участникам общаться на многие другие темы. Почта для жалоб: admin@yougame.biz