Гайд Weapon Class (get weapon id)

Эксперт
Статус
Оффлайн
Регистрация
9 Апр 2020
Сообщения
1,442
Реакции[?]
671
Поинты[?]
30K
C++:
#pragma once


#define WEAPON_KNIFE 1;
#define WEAPON_PISTOL 2;
#define WEAPON_SHOTGUN 3;
#define WEAPON_SUBMACHINE 4;
#define WEAPON_RIFELS 5;
#define WEAPON_SNIPER 6;
#define WEAPON_MACHINE 7;
#define WEAPON_GRENADE 8;
#define WEAPON_BOMB 9;
#define WEAPON_REVOLVER 10;
#define WEAPON_CZ75A 11;
#define WEAPON_TASER 12;
#define WEAPON_AUTOSNIPER 13;



namespace Weapon {
    int Category(int WeaponID) {
        switch (WeaponID)
        {
            case 42: return WEAPON_KNIFE;
            case 41: return WEAPON_KNIFE;
            case 59: return WEAPON_KNIFE;
            case 80: return WEAPON_KNIFE;
            case 500: return WEAPON_KNIFE;
            case 505: return WEAPON_KNIFE;
            case 506: return WEAPON_KNIFE;
            case 507: return WEAPON_KNIFE;
            case 508: return WEAPON_KNIFE;
            case 509: return WEAPON_KNIFE;
            case 512: return WEAPON_KNIFE;
            case 514: return WEAPON_KNIFE;
            case 515: return WEAPON_KNIFE;
            case 516: return WEAPON_KNIFE;
            case 519: return WEAPON_KNIFE;
            case 520: return WEAPON_KNIFE;
            case 522: return WEAPON_KNIFE;
            case 523: return WEAPON_KNIFE;

            case 1: return WEAPON_PISTOL;
            case 2: return WEAPON_PISTOL;
            case 3: return WEAPON_PISTOL;
            case 4: return WEAPON_PISTOL;
            case 30: return WEAPON_PISTOL;
            case 32: return WEAPON_PISTOL;
            case 36: return WEAPON_PISTOL;
            case 61: return WEAPON_PISTOL;
            case 63: return WEAPON_CZ75A;
            case 64: return WEAPON_REVOLVER;

            case 25: return WEAPON_SHOTGUN;
            case 27: return WEAPON_SHOTGUN;
            case 29: return WEAPON_SHOTGUN;
            case 35: return WEAPON_SHOTGUN;

            case 17: return WEAPON_SUBMACHINE;
            case 19: return WEAPON_SUBMACHINE;
            case 23: return WEAPON_SUBMACHINE;
            case 24: return WEAPON_SUBMACHINE;
            case 26: return WEAPON_SUBMACHINE;
            case 33: return WEAPON_SUBMACHINE;
            case 34: return WEAPON_SUBMACHINE;

            case 7: return WEAPON_RIFELS;
            case 8: return WEAPON_RIFELS;
            case 10: return WEAPON_RIFELS;
            case 13: return WEAPON_RIFELS;
            case 16: return WEAPON_RIFELS;
            case 39: return WEAPON_RIFELS;
            case 60: return WEAPON_RIFELS;


            case 9: return WEAPON_SNIPER;
            case 40: return WEAPON_SNIPER;

            case 11: return WEAPON_AUTOSNIPER;
            case 38: return WEAPON_AUTOSNIPER;

            case 14: return WEAPON_MACHINE;
            case 28: return WEAPON_MACHINE;

            case 43: return WEAPON_GRENADE;
            case 44: return WEAPON_GRENADE;
            case 45: return WEAPON_GRENADE;
            case 46: return WEAPON_GRENADE;
            case 47: return WEAPON_GRENADE;
            case 48: return WEAPON_GRENADE;
            
            case 49: return WEAPON_BOMB;

            case 31: return WEAPON_TASER;

            default: return -1;
        }
    }


    string Name(int WeaponID, bool Scoped) {
        switch (WeaponID)
        {
            case 42: return "Knife";
            case 41: return "Knife Gold";
            case 59: return "Knife";
            case 80: return "Knife Ghost";
            case 500: return "Knife Bayonet";
            case 505: return "Knife Flip";
            case 506: return "Knife Gut";
            case 507: return "Knife Karambit";
            case 508: return "Knife M9";
            case 509: return "Knife Tactica";
            case 512: return "Knife Falchion";
            case 514: return "Knife Survival Bowie";
            case 515: return "Knife Butterfly";
            case 516: return "Knife Rush";
            case 519: return "Knife Ursus";
            case 520: return "Knife Gypsy Jackknife";
            case 522: return "Knife Stiletto";
            case 523: return "Knife Widowmaker";

            case 1: return "Deagle";
            case 2: return "Elite";
            case 3: return "Five-Seven";
            case 4: return "Glock";
            case 30: return "Tec-9";
            case 32: return "P2000";
            case 36: return "P250";
            case 61: return "USP-S";
            case 63: return "CZ75A";
            case 64: return "Revolver";

            case 25: return "XM1014";
            case 27: return "MAG7";
            case 29: return "SAWEDOFF";
            case 35: return "Nova";

            case 17: return "MAC-10";
            case 19: return "P90";
            case 23: return "MP5-SD";
            case 24: return "UMP-45";
            case 26: return "Bizon";
            case 33: return "MP7";
            case 34: return "MP9";

            case 7: return "AK-47";
            case 8: return Scoped ? "AUG (Scoped)" : "AUG";
            case 10: return "Famas";
            case 13: return "Galil AR";
            case 16: return "M4A4";
            case 39: return Scoped ? "SG556 (Scoped)" : "SG556";
            case 60: return "M4A1-S";


            case 9: return Scoped ? "AWP (Scoped)" : "AWP";
            case 40: return Scoped ? "SSG08 (Scoped)" : "SSG08";

            case 11: return Scoped ? "G3SG1 (Scoped)" : "G3SG1";
            case 38: return Scoped ? "SCAR-20 (Scoped)" : "SCAR-20";

            case 14: return "M249";
            case 28: return "Negev";

            case 43: return "(g) Flashbang";
            case 44: return "(g) Hegrenade";
            case 45: return "(g) Smoke";
            case 46: return "(g) Molotov";
            case 47: return "(g) Decoy";
            case 48: return "(g) Incgrenage";

            case 49: return "C4";

            case 31: return "Taser";

            default: return "Unknown";
        }
    }
}
C++:
// m_pClippingWeapon = 4848
// m_iItemDefinitionIndex = 442
// m_Item = 80
// m_AttributeManager = 4240

int WeaponId() {
            uint64_t C_CSWeaponBase = Memory::Read<uint64_t>(Entity + NetVar::m_pClippingWeapon);
            return Memory::Read<short>(C_CSWeaponBase + NetVar::m_iItemDefinitionIndex + NetVar::m_Item + NetVar::m_AttributeManager);
        }
 
Сверху Снизу