Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • Need help?

    Create a topic in the appropriate section
    Don't write everything in the chat!
  • Take a look at the marketplace

    There you can buy
    everything related to game servers
  • Don't want a ban?

    Please read our rules
    Don't disturb the order!
  • Sell or buy?

    Use services of the guarantor
    We will make your deal safe
  • 0
Sign in to follow this  
ArxVit

Стак ТестаКрови

Всем доброго времени суток.

    Хочу сделать тестер крови что бы использовать  5 раз.

сделал следующее

 1. создал config.cpp для тестера

 

enum {
    DESTRUCTENGINE = 2,
    DESTRUCTDEFAULT = 6,
    DESTRUCTWRECK = 7,
    DESTRUCTTREE = 3,
    DESTRUCTTENT = 4,
    DESTRUCTNO = 0,
    DESTRUCTMAN = 5,
    DESTRUCTBUILDING = 1,
};


class CfgVehicles {
    class Switchable_Base;    // External class reference
    class Edible_Base;    // External class reference
    class Bottle_Base;    // External class reference
    class Inventory_Base;    // External class reference
    
    
    class BloodTestKit : Inventory_Base {
        scope = 2;
        displayName = "$STR_CfgVehicles_BloodTestKit0";
        descriptionShort = "$STR_CfgVehicles_BloodTestKit1";
        model = "\dz\gear\medical\BloodTest_Kit.p3d";
        rotationFlags = 17;
        canBeSplit=1;
        varQuantityInit=1;
        varQuantityMin=0;
        varQuantityMax=5;
        varQuantityDestroyOnMin = 1;
        varStackMax=5;
        itemSize[] = {1, 1};
        weight = 130;
        
        class AnimEvents {
            class SoundWeapon {
                class BloodBag_start {
                    soundSet = "BloodBag_start_SoundSet";
                    id = 201;
                };
                
                class BloodBag_spear {
                    soundSet = "BloodBag_spear_SoundSet";
                    id = 202;
                };
                
                class BloodBag_loop {
                    soundSet = "BloodBag_loop_SoundSet";
                    id = 203;
                };
                
                class BloodBag_loop2 {
                    soundSet = "BloodBag_loop_SoundSet";
                    id = 204;
                };
                
                class BloodBag_end {
                    soundSet = "BloodBag_end_SoundSet";
                    id = 205;
                };
                
                class pickUpItem {
                    soundSet = "pickUpBloodBag_SoundSet";
                    id = 797;
                };
                
                class drop {
                    soundset = "bloodbag_drop_SoundSet";
                    id = 898;
                };
            };
        };
    };
};

class CfgPatches
{
    class hardcore_settings
    {
        units[]={};
        weapons[]={};
        requiredVersion=0.1;
        requiredAddons[]=
        {
            "DZ_Data"    
        };
    };
};


class CfgMods
{
    class hardcore_settings
    {
        dir = "";
        picture = "";
        action = "";
        hideName = 0;
        hidePicture = 1;
        name = "";
        credits = "";
        author = "";
        authorID = "0";
        version = "1.0";
        extra = 0;
        type = "mod";
        
        dependencies[] = {"Game", "World"};
        
            class gameScriptModule
            {
                value = "";
                files[] = {"hardcore_settings/scripts/3_Game"};
            };
            class worldScriptModule {
                value = "";
                files[] = {"MedicalAttention/scripts/4_World"};
            };
        };
    };
};

2. замодил ActionTestBloodSelf.с  (ниже все строки что там указаны больше ничего нету)
 

   

modded class ActionTestBloodSelf : ActionContinuousBase
{

    override void OnFinishProgressServer( ActionData action_data )
    {    
        PluginLifespan module_lifespan = PluginLifespan.Cast( GetPlugin( PluginLifespan ) );
        int blood_type = action_data.m_Player.GetStatBloodType().Get();
        
        module_lifespan.UpdateBloodType( action_data.m_Player, blood_type );
        module_lifespan.UpdateBloodTypeVisibility( action_data.m_Player, true );

        action_data.m_MainItem.AddQuantity(-1,true);
        action_data.m_Player.GetSoftSkillsManager().AddSpecialty( m_SpecialtyWeight );
    }
};

3. запаковал это все в мод и подключил как клиентский.

 

На сервере спавнятся тестеры все гут, объединить и разделить могу все как и хотел, но вот если пользоваться полным стаком то пропадает все, а не только один как задумывалось.

Буду очень благодарен если подскажите что сделал не правильно.

Всем заранее спасибо. Строго не судите ток начал пробовать разбираться в этом.

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you automaticly agree to our Guidelines and Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.