Подведи собственные итоги года совместно с YOUGAME и забери ценные призы! Перейти

Время след выстрела оружия

  • Автор темы Автор темы ratinov
  • Дата начала Дата начала
B.O.M.J
Эксперт
Эксперт
Статус
Оффлайн
Регистрация
19 Май 2017
Сообщения
2,400
Реакции
896
Собсна как его получить?, конечно есть ахуенный вариант как в антарио aka самому в флоате прописывать время но может есть цивилизованный метод?
Чем это чудо блять
C++:
Expand Collapse Copy
    if (WeaponName == "weapon_glock")
        return 0.15f;
    else if (WeaponName == "weapon_hkp2000")
        return 0.169f;
    else if (WeaponName == "weapon_p250")//the cz and p250 have the same name idky same with other guns
        return 0.15f;
    else if (WeaponName == "weapon_tec9")
        return 0.12f;
    else if (WeaponName == "weapon_elite")
        return 0.12f;
    else if (WeaponName == "weapon_fiveseven")
        return 0.15f;
    else if (WeaponName == "weapon_deagle")
        return 0.224f;
    else if (WeaponName == "weapon_nova")
        return 0.882f;
    else if (WeaponName == "weapon_sawedoff")
        return 0.845f;
    else if (WeaponName == "weapon_mag7")
        return 0.845f;
    else if (WeaponName == "weapon_xm1014")
        return 0.35f;
    else if (WeaponName == "weapon_mac10")
        return 0.075f;
    else if (WeaponName == "weapon_ump45")
        return 0.089f;
    else if (WeaponName == "weapon_mp9")
        return 0.070f;
    else if (WeaponName == "weapon_bizon")
        return 0.08f;
    else if (WeaponName == "weapon_mp7")
        return 0.08f;
    else if (WeaponName == "weapon_p90")
        return 0.070f;
    else if (WeaponName == "weapon_galilar")
        return 0.089f;
    else if (WeaponName == "weapon_ak47")
        return 0.1f;
    else if (WeaponName == "weapon_sg556")
        return 0.089f;
    else if (WeaponName == "weapon_m4a1")
        return 0.089f;
    else if (WeaponName == "weapon_aug")
        return 0.089f;
    else if (WeaponName == "weapon_m249")
        return 0.08f;
    else if (WeaponName == "weapon_negev")
        return 0.0008f;
    else if (WeaponName == "weapon_ssg08")
        return 1.25f;
    else if (WeaponName == "weapon_awp")
        return 1.463f;
    else if (WeaponName == "weapon_g3sg1")
        return 0.25f;
    else if (WeaponName == "weapon_scar20")
        return 0.25f;
 
next primary attack как вариант

возвращает время через которое будет доступно сделать следующий выстрел. Привязано к куртайму, сравнивать надо с ним же.

то бишь curtime > weapon->flNextPrimaryAttack()
 
ne nu esli u tebya vdrug net cycle time v weapon data
to vot derzi
C++:
Expand Collapse Copy
class CCSWeaponData {
public:
    char pad0[4];
    char* consoleName;
    char pad1[12];
    int iMaxClip1;
    int iMaxClip2;
    int iDefaultClip1;
    int iDefaultClip2;
    int iPrimaryReserveAmmoMax;
    int iSecondaryReserveAmmoMax;
    char* szWorldModel;
    char* szViewModel;
    char* szDroppedModel;
    char pad2[80];
    char* szHudName;
    char* szWeaponName;
    char pad3[2];
    bool bIsMeleeWeapon;
    char pad4[9];
    float flWeaponWeight;
    char pad5[40];
    int iWeaponType;
    char pad6[4];
    int iWeaponPrice;
    int iKillAward;
    char pad7[4];
    float flCycleTime;
    float flCycleTimeAlt;
    char pad8[8];
    bool bFullAuto;
    char pad9[3];
    int iDamage;
    float flArmorRatio;
    int iBullets;
    float flPenetration;
    char pad10[8];
    float flRange;
    float flRangeModifier;
    float flThrowVelocity;
    char pad11[12];
    bool bHasSilencer;
    char pad12[11];
    char* szBulletType;
    float flMaxSpeed;
    float flMaxSpeedAlt;
    char pad13[76];
    int iRecoilSeed;
    char pad14[32];
};
specialno dlya tebya tolko 4to sdelal
vrode vse pravilno
 
ne nu esli u tebya vdrug net cycle time v weapon data
to vot derzi
C++:
Expand Collapse Copy
class CCSWeaponData {
public:
    char pad0[4];
    char* consoleName;
    char pad1[12];
    int iMaxClip1;
    int iMaxClip2;
    int iDefaultClip1;
    int iDefaultClip2;
    int iPrimaryReserveAmmoMax;
    int iSecondaryReserveAmmoMax;
    char* szWorldModel;
    char* szViewModel;
    char* szDroppedModel;
    char pad2[80];
    char* szHudName;
    char* szWeaponName;
    char pad3[2];
    bool bIsMeleeWeapon;
    char pad4[9];
    float flWeaponWeight;
    char pad5[40];
    int iWeaponType;
    char pad6[4];
    int iWeaponPrice;
    int iKillAward;
    char pad7[4];
    float flCycleTime;
    float flCycleTimeAlt;
    char pad8[8];
    bool bFullAuto;
    char pad9[3];
    int iDamage;
    float flArmorRatio;
    int iBullets;
    float flPenetration;
    char pad10[8];
    float flRange;
    float flRangeModifier;
    float flThrowVelocity;
    char pad11[12];
    bool bHasSilencer;
    char pad12[11];
    char* szBulletType;
    float flMaxSpeed;
    float flMaxSpeedAlt;
    char pad13[76];
    int iRecoilSeed;
    char pad14[32];
};
specialno dlya tebya tolko 4to sdelal
vrode vse pravilno
Есть у меня такое
 
Назад
Сверху Снизу