google-site-verification: googlebaca44933768a824.html Fast AutoPistol - Old Royal Hack Forum

Announcement

Collapse
No announcement yet.

Fast AutoPistol

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Fast AutoPistol

    Hello ,I share my solution here.

    Code:
        
            int iBulletsToFire = 0;    float demifireRate = 0.1f;
        while ( m_flNextPrimaryAttack <= g_pGlobals->curtime + 0.1f )
        {
            m_flNextPrimaryAttack = m_flNextPrimaryAttack + demifireRate;
            iBulletsToFire++;
        }
            if ( iBulletsToFire > m_iClip1 )
            iBulletsToFire = m_iClip1;
            m_iClip1 -= iBulletsToFire;
    
    if(iBulletsToFire)//whops forget something here :D.
    {
    //put your blahblah here.
    
    }
    credits : SDK.





    #2
    Re: Fast AutoPistol

    wrong and u miss some credits

    Comment


      #3
      Re: Fast AutoPistol

      Originally posted by sshare View Post
      wrong and u miss some credits
      wrong k maybe, but i miss some credits no.
      If you have a better solution share it.
      edit :

      maybe some credits for the idea with m_flNextPrimaryAttack




      Comment


        #4
        Re: Fast AutoPistol

        good job

        Comment


          #5
          Re: Fast AutoPistol

          Originally posted by [CE]_.Kamay View Post
          wrong k maybe, but i miss some credits no.
          If you have a better solution share it.
          edit :

          maybe some credits for the idea with m_flNextPrimaryAttack
          id like to care to spoon feed codes directly in your throat.
          anyway if you feel no credits are needed, just tell me who gaved you the initial code with m_flNextPrimaryAttack which you completely started off.

          Comment


            #6
            Re: Fast AutoPistol

            Originally posted by sshare View Post
            id like to care to spoon feed codes directly in your throat.
            anyway if you feel no credits are needed, just tell me who gaved you the initial code with m_flNextPrimaryAttack which you completely started off.
            like i said its in the sdk :


            // To make the firing framerate independent, we may have to fire more than one bullet here on low-framerate systems,
            // especially if the weapon we're firing has a really fast rate of fire.
            int iBulletsToFire = 0;
            float fireRate = GetFireRate();


            // MUST call sound before removing a round from the clip of a CHLMachineGun
            while ( m_flNextPrimaryAttack <= gpGlobals->curtime )
            {
            WeaponSound(SINGLE, m_flNextPrimaryAttack);
            m_flNextPrimaryAttack = m_flNextPrimaryAttack + fireRate;
            iBulletsToFire++;
            }


            // Make sure we don't fire more than the amount in the clip, if this weapon uses clips
            if ( UsesClipsForAmmo1() )
            {
            if ( iBulletsToFire > m_iClip1 )
            iBulletsToFire = m_iClip1;
            m_iClip1 -= iBulletsToFire;
            }



            look in basehlcombatweapon.cpp if you dont believe me. Next shitty arguents of you i close the thread sadly.
            peace
            Last edited by [CE]_.Kamay; 09-09-2012, 08:43 AM.




            Comment


              #7
              Re: Fast AutoPistol

              you probably didnt read my previous post

              Comment


                #8
                Re: Fast AutoPistol

                Originally posted by sshare View Post
                you probably didnt read my previous post
                i did .(yes you gave me the first code of m_flnext but i searched totaly a different way after in the sdk...) omg its all.
                Last edited by [CE]_.Kamay; 09-09-2012, 09:17 AM.




                Comment


                  #9
                  Re: Fast AutoPistol

                  enuff said for today

                  Comment

                  Working...
                  X