LightbulbDanger zone

Posts 12 of 2 · Page 1 of 1
Danger zone
So when making ESP for the Danger Zone Content you iterate as always through the entitylist.
You can check for certain clientclasses before looking more specifically to save some resources.

I currently check:
Code:
return (GetClientClass()->m_ClassID == ClassId_CPhysPropAmmoBox ||
GetClientClass()->m_ClassID == ClassId_CPhysPropLootCrate ||
GetClientClass()->m_ClassID == ClassId_CPhysPropRadarJammer ||
GetClientClass()->m_ClassID == ClassId_CPhysPropWeaponUpgrade);
ClassIDs can be found here:
https://hastebin.com/watimisoso.nginx

You could straight paste this, so have fun.
If I am missing some items please post a fitting string and the clientclass below this post.

Code:
if (itemstr.find("case_pistol") != std::string::npos)
itemstr = "Pistol Case";
else if (itemstr.find("case_light_weapon") != std::string::npos) // Reinforced!
itemstr = "Light Case";
else if (itemstr.find("case_heavy_weapon") != std::string::npos)
itemstr = "Heavy Case";
else if (itemstr.find("case_explosive") != std::string::npos)
itemstr = "Explosive Case";
else if (itemstr.find("case_tools") != std::string::npos)
itemstr = "Tools Case";
else if (itemstr.find("random") != std::string::npos)
itemstr = "Airdrop";
else if (itemstr.find("dz_armor_helmet") != std::string::npos)
itemstr = "Full Armor";
else if (itemstr.find("dz_helmet") != std::string::npos)
itemstr = "Helmet";
else if (itemstr.find("dz_armor") != std::string::npos)
itemstr = "Armor";
else if (itemstr.find("upgrade_tablet") != std::string::npos)
itemstr = "Tablet Upgrade";
else if (itemstr.find("briefcase") != std::string::npos)
itemstr = "Briefcase";
else if (itemstr.find("parachutepack") != std::string::npos)
itemstr = "Parachute";
else if (itemstr.find("dufflebag") != std::string::npos)
itemstr = "Cash Dufflebag";
else if (itemstr.find("ammobox") != std::string::npos)
itemstr = "Ammobox";


Maybe it helps mentioning that these are the names of the models
Code:
std::string itemstr = "Undefined";

const model_t * itemModel = ent->GetModel();

if (!itemModel)
return;

studiohdr_t * hdr = g_MdlInfo->GetStudiomodel(itemModel);

if (!hdr)
return;

itemstr = hdr->szName;

It can be done way more efficiently using itemdefinitionindex and clientclasses to check first for references.
There are obviously many more, but I am too lazy to list them all. These should be enough for the beginning, pm me if you need anything.
Posts 12 of 2 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?