Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Tutorial] Add weapon stats in inventory

Joined
Sep 3, 2013
Messages
903
Reaction score
227
4canzfa - [Tutorial] Add weapon stats in inventory - RaGEZONE Forums

5Km8Vhf - [Tutorial] Add weapon stats in inventory - RaGEZONE Forums



Search :

Code:
const char* getAdditionalDescForItem(uint32_t itemID, int Var1, int Var2, int Var3)

Replace all function by :

Code:
if(wc && wc->category != storecat_UsableItem && wc->category != storecat_GRENADE && wc->category!=storecat_MELEE) // weapon
    {
        const WeaponAttachmentConfig* clip = g_pWeaponArmory->getAttachmentConfig(Var2<0?(wc->FPSDefaultID[WPN_ATTM_CLIP]):(Var2));
        if(clip)
        {
                //Oosmar02:: Recupere les dommages
                int Damage;
                Damage = int(wc->m_AmmoDamage);

                //Oosmar02:: Test
                /*char Spread[16];
                sprintf(Spread, "%.1f", (int)wc->m_spread);
                char Recoil[16];
                sprintf(Recoil, "%.1f", int(m_pConfig->m_recoil));*/

                //Oosmar02:: Recupere le spread et le recul
                int Spread;
                Spread = int(wc->m_spread);
                int Recoil;
                Recoil = int(wc->m_recoil);


            int ammoLeft = Var1<0?clip->m_Clipsize:Var1;
            if(Var1<0)
                sprintf(first_string, gLangMngr.getString("WeaponInfoString_BrandNew"), Damage, Spread, Recoil); //Oosmar02:: ICI
            else if(ammoLeft > 0)
            {
                if(ammoLeft == 1)
                    sprintf(first_string, gLangMngr.getString("WeaponInfoString_Singular"), clip->m_StoreName, ammoLeft, Damage, Spread, Recoil);
                else
                    sprintf(first_string, gLangMngr.getString("WeaponInfoString_Regular"), clip->m_StoreName, ammoLeft, Damage, Spread, Recoil);
            }
            else
                sprintf(first_string, gLangMngr.getString("WeaponInfoString_NoAmmo"), Damage, Spread, Recoil);
        }
    }

Go LangueData :

Search :
Code:
WeaponInfoString_Singular=

Replace :
Code:
WeaponInfoString_Singular=
WeaponInfoString_Regular=
WeaponInfoString_NoAmmo=
WeaponInfoString_BrandNew=

by :
Code:
WeaponInfoString_Singular=%s: %d bullet left | DMG: %d | SPR: %d | REC: %d
WeaponInfoString_Regular=%s: %d bullets left | DMG: %d | SPR: %d | REC: %d
WeaponInfoString_NoAmmo=NO AMMO | DMG: %d | SPR: %d | REC: %d
WeaponInfoString_BrandNew=BRAND NEW | DMG: %d | SPR: %d | REC: %d

(Small probleme for recoil and spread need change (0.00) %f , need your for fix )

Like :)
 

Attachments

You must be registered for see attachments list
Last edited:
Back
Top