AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Are these all of the available ammo types? (https://forums.alliedmods.net/showthread.php?t=325143)

Vieni 06-09-2020 17:38

Are these all of the available ammo types?
 
Tried to look for the ammot types and found this:
HTML Code:

    CS_AMMO_BUCKSHOT  = 0,
    CS_AMMO_9MM        = 1,
    CS_AMMO_556NATO    = 2,
    CS_AMMO_556NATOBOX = 3,
    CS_AMMO_762NATO    = 4,
    CS_AMMO_45ACP      = 5,
    CS_AMMO_50AE      = 6,
    CS_AMMO_338MAGNUM  = 7,
    CS_AMMO_57MM      = 8,
    CS_AMMO_357SIG    = 9

But here's no "ARgrenades"(and I don't know if there are more) in this list. So I'm kinda interested if the ARgrenades ammo type is useable somehow in counter-strike.

Even here the AIDs are not the same:
https://wiki.alliedmods.net/CS_Weapons_Information

Could someone explain me why?

condoriano90 06-10-2020 05:36

Re: Are these all of the available ammo types?
 
ammo_ARgrenades are for Half-Life and not CS

Vieni 06-10-2020 17:15

Re: Are these all of the available ammo types?
 
Quote:

Originally Posted by condoriano90 (Post 2704919)
ammo_ARgrenades are for Half-Life and not CS

Aight, but isn't there any way to use it? I mean some stuff which officially was not made for 1.6 is usable with it, so it kinda interests me

And does someone know the answer for this? :oops:
Quote:

HTML Code:

    CS_AMMO_BUCKSHOT  = 0,
    CS_AMMO_9MM        = 1,
    CS_AMMO_556NATO    = 2,
    CS_AMMO_556NATOBOX = 3,
    CS_AMMO_762NATO    = 4,
    CS_AMMO_45ACP      = 5,
    CS_AMMO_50AE      = 6,
    CS_AMMO_338MAGNUM  = 7,
    CS_AMMO_57MM      = 8,
    CS_AMMO_357SIG    = 9

here the AIDs are not the same:
https://wiki.alliedmods.net/CS_Weapons_Information

Could someone explain me why?

gabuch2 06-11-2020 19:48

Re: Are these all of the available ammo types?
 
Quote:

Originally Posted by Vieni (Post 2705024)
isn't there any way to use it?

Seems you are misunderstanding how ammo types work. It's not like the ammo is actually programmed into the game to be usable, ammo types are just a number to identify themselves, it is the weapon itself that does all the stuff.

Code:

void CMP5::SecondaryAttack( void )
{
        // don't fire underwater
        if (m_pPlayer->pev->waterlevel == 3)
        {
                PlayEmptySound( );
                m_flNextPrimaryAttack = 0.15;
                return;
        }

        if (m_pPlayer->m_rgAmmo[m_iSecondaryAmmoType] == 0)
        {
                PlayEmptySound( );
                return;
        }

        m_pPlayer->m_iWeaponVolume = NORMAL_GUN_VOLUME;
        m_pPlayer->m_iWeaponFlash = BRIGHT_GUN_FLASH;

        m_pPlayer->m_iExtraSoundTypes = bits_SOUND_DANGER;
        m_pPlayer->m_flStopExtraSoundTime = UTIL_WeaponTimeBase() + 0.2;
                       
        m_pPlayer->m_rgAmmo[m_iSecondaryAmmoType]--;

        // player "shoot" animation
        m_pPlayer->SetAnimation( PLAYER_ATTACK1 );

        UTIL_MakeVectors( m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle );

        // we don't add in player velocity anymore.
        CGrenade::ShootContact( m_pPlayer->pev,
                                                        m_pPlayer->pev->origin + m_pPlayer->pev->view_ofs + gpGlobals->v_forward * 16,
                                                        gpGlobals->v_forward * 800 );

        int flags;
#if defined( CLIENT_WEAPONS )
        flags = FEV_NOTHOST;
#else
        flags = 0;
#endif

        PLAYBACK_EVENT( flags, m_pPlayer->edict(), m_usMP52 );
       
        m_flNextPrimaryAttack = GetNextAttackDelay(1);
        m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 1;
        m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 5;// idle pretty soon after shooting.

        if (!m_pPlayer->m_rgAmmo[m_iSecondaryAmmoType])
                // HEV suit - indicate out of ammo condition
                m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
}

This piece of code from Half-Life's MP5 uses the ARGrenade ammo and creates a grenade.

You could change its ammo type to buckshot and the effect would be the same.


All times are GMT -4. The time now is 16:53.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.