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
Yamato71

кастомные сеты при спавне

Здравствуйте, скачала фикс на присеты при спавне (мод 123new). Настраивала init_mod, где прописала строчку #include

"$CurrentDir:mpmissions\dayzOffline.chernarusplus\CustomSpawnPlayerConfig\init_mod.c". Затем в строчках изменила значение на true 
    private bool enabled_loading_custom_spawnpoints = true;
    private bool enabled_loading_custom_sets = true; 
    private bool enabled_loading_custom_skins = true; 

Потом создала текстовый документ в папке профайл с нужным названием
прописала 76561198141889253|SurvivorM_Oliver|0|0 (меняла стим ид на свой)
файл sets не трогала, чтобы посмотреть заспавниться на мне одежда, которая изначально прописана. Следовала строго инструкции, ничего не помогло


class StartSetsPlayersConfig

{  

    void StartSetsPlayer(PlayerBase player,int use_set_id)

    {

        EntityAI itemCreated = NULL;

        EntityAI itemCreated1 = NULL;

        ItemBase itemCasted = NULL;

        EntityAI itemClothing;

        EntityAI itemEnt;

        EntityAI itemBs;

        float rand;

       

        switch( use_set_id ) //������� ��� (����� ������������ �������� �� 1 � ����, ������ �� 0 � �� -1)

        {

            case 1: //Set with number 1 (��� � ������� 1)

            {

                RemoveAllItems(player);                                                 // ����� ������� � ��������� ��� ��������� ����������� ��������� ������ ����������������� ������

                itemCreated = player.GetInventory().CreateInInventory("TCP_CoyoteBagUmbrella_Admin");           // ������ ������ � ���������� � ���������� itemCreated

                if (itemCreated)                                                                        

                    {

                        itemCreated.GetInventory().CreateInInventory("SledgeHammer");

                        itemCreated1 = itemCreated.GetInventory().CreateInInventory("FirefighterAxe");

                        if (itemCreated1)

                        {

                            player.SetQuickBarEntityShortcut(itemCreated1, 4);

                        }



                    }

                itemCreated = NULL;

                itemCreated1 = NULL;                



                    itemCreated = player.GetInventory().CreateInInventory("Mich2001Helmet");                        // ������ ������ �������� ����

                if (itemCreated)

                {

                    itemCreated1 = itemCreated.GetInventory().CreateAttachment("NVGoggles");

                    if (itemCreated1)

                    {                      

                        itemCreated1.GetInventory().CreateInInventory( "Battery9V" );

                    }

                    itemCreated1 = itemCreated.GetInventory().CreateAttachment("UniversalLight");

                    if (itemCreated1)

                    {                      

                        itemCreated1.GetInventory().CreateInInventory( "Battery9V" );

                    }                  

                }

                itemCreated = NULL;

                itemCreated1 = NULL;

               

                itemCreated = player.GetInventory().CreateInInventory("BalaclavaMask_Blackskull");                  // ������ ������ �����

                itemCreated = player.GetInventory().CreateInInventory("TCP_UmbrellaGloves_Admin");              // ������ ������ ��������

                itemCreated = player.GetInventory().CreateInInventory("TCP_UmbrellaPants_Admin");           // ������ ������ �����

                itemCreated = player.GetInventory().CreateInInventory("TCP_UmbrellaBoots_Admin");               // ������ ������ �����

                itemCreated = player.GetInventory().CreateInInventory("TCP_UmbrellaJacket_Admin");          // ������ ������ ������            

                itemCreated = NULL;

                itemCreated = player.GetInventory().CreateInInventory("TCP_UmbrellaPlateCarrier_Admin");                // ������ �����

                if (itemCreated)                                                                        // ���������, ��������� �� �����. ���� �� ��������, ���������� itemCreated ����� �� ����� � �������� �������

                {                                                                                      

                    itemCreated.GetInventory().CreateAttachment( "TCP_UmbrellaPlateCarrierHolster_Admin" );                 // ������ ������ � ������

                    itemCreated.GetInventory().CreateAttachment( "TCP_UmbrellaPouches_Admin" );                 // ������ ������� � ������

                   

                }

                itemCreated = NULL;

                itemCreated = player.GetInventory().CreateInInventory("MilitaryBelt");                  // ������ ������

                if (itemCreated)                                                                        // ���������, �������� �� ������. ���� �� ��������, ���������� itemCreated ����� �� ����� � �������� �������

                {  

                    itemCreated.GetInventory().CreateAttachment( "TCP_UmbrellaPlateCarrierHolster_Admin" );                 // ������ ������ � ������                                                          

                    if (itemCreated)

                    {

                        itemCreated1 = itemCreated.GetInventory().CreateInInventory ("MKII");

                        if (itemCreated1)

                        {

                            player.SetQuickBarEntityShortcut(itemCreated1, 3);

                        }

                    }

                    itemCreated.GetInventory().CreateAttachment( "NylonKnifeSheath" );                  // ������ ����� � ������

                    if (itemCreated)

                    {

                        itemCreated1 = itemCreated.GetInventory().CreateInInventory ("CombatKnife");

                        if (itemCreated1)

                        {

                            player.SetQuickBarEntityShortcut(itemCreated1, 8);

                        }

                    }

                }

                itemCreated = NULL;

                itemCreated1 = NULL;

                //itemCasted = ItemBase.Cast(itemCreated);                                              // ������ �� �����, ���������������. ������������ ��� ��������� ������ EntityAI � ItemBase (����� ������ �������� ���� ��������)



                itemCreated = player.GetInventory().CreateInInventory("TacticalGoggles");               // ������ ������ �������� � MKII

                itemCreated = player.GetInventory().CreateInInventory("Mag_MKII_10Rnd");                // ������ ������ �������� � MKII

                itemCreated = player.GetInventory().CreateInInventory("Mag_MKII_10Rnd");                // ������ ������ �������� � MKII

                itemCreated = player.GetInventory().CreateInInventory("Mag_MKII_10Rnd");                // ������ ������ �������� � MKII

                itemCreated = player.GetInventory().CreateInInventory("Mag_MKII_10Rnd");                // ������ ������ �������� � MKII

                itemCreated = player.GetInventory().CreateInInventory("Mag_MKII_10Rnd");                // ������ ������ �������� � MKII

                itemCreated = player.GetInventory().CreateInInventory("Mag_AKM_Drum75Rnd");                 // ������ ������ �������� � AKM � ����� ��������� ���� � ���������

                itemCreated = player.GetInventory().CreateInInventory("Mag_AKM_Drum75Rnd");                 // ������ ������ �������� � AKM � ����� ��������� ���� � ���������

                itemCreated = player.GetInventory().CreateInInventory("Mag_AKM_Drum75Rnd");                 // ������ ������ �������� � AKM � ����� ��������� ���� � ���������

                itemCreated = player.GetInventory().CreateInInventory("Mag_SVD_10Rnd");                 // ������ ������ �������� � AKM � ����� ��������� ���� � ���������

                itemCreated = player.GetInventory().CreateInInventory("Mag_SVD_10Rnd");                 // ������ ������ �������� � AKM � ����� ��������� ���� � ���������

                itemCreated = player.GetInventory().CreateInInventory("Mag_SVD_10Rnd");                 // ������ ������ �������� � AKM � ����� ��������� ���� � ���������

                itemCreated = player.GetInventory().CreateInInventory("Mag_SVD_10Rnd");

                itemCreated = player.GetInventory().CreateInInventory("Mag_Vikhr_30Rnd");

                itemCreated = player.GetInventory().CreateInInventory("Mag_Vikhr_30Rnd");

                itemCreated = player.GetInventory().CreateInInventory("Mag_Vikhr_30Rnd");

                itemCreated = player.GetInventory().CreateInInventory("Mag_Vikhr_30Rnd");

                itemCreated = player.GetInventory().CreateInInventory("Mag_Vikhr_30Rnd");

                itemCreated = player.GetInventory().CreateInInventory("AmmoBox_9x39AP_20Rnd");

                itemCreated = player.GetInventory().CreateInInventory("AmmoBox_9x39AP_20Rnd");

                itemCreated = player.GetInventory().CreateInInventory("AmmoBox_9x39AP_20Rnd");

                itemCreated = player.GetInventory().CreateInInventory("AmmoBox_9x39AP_20Rnd");

                itemCreated = player.GetInventory().CreateInInventory("AmmoBox_9x39AP_20Rnd");

                itemCreated = player.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd");

                itemCreated = player.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd");

                itemCreated = player.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd");

                itemCreated = player.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd");

                itemCreated = player.GetInventory().CreateInInventory("AmmoBox_762x39_20Rnd");

                itemCreated = player.GetInventory().CreateInInventory("AmmoBox_762x39_20Rnd");

                itemCreated = player.GetInventory().CreateInInventory("AmmoBox_762x39_20Rnd");

                itemCreated = player.GetInventory().CreateInInventory("AmmoBox_762x39_20Rnd");

                itemCreated = player.GetInventory().CreateInInventory("AmmoBox_762x39_20Rnd");

                itemCreated = player.GetInventory().CreateInInventory("AmmoBox_22_50Rnd");

                itemCreated = player.GetInventory().CreateInInventory("AmmoBox_22_50Rnd");

                itemCreated = player.GetInventory().CreateInInventory("AmmoBox_22_50Rnd");

                itemCreated = player.GetInventory().CreateInInventory("AmmoBox_22_50Rnd");

                itemCreated = player.GetInventory().CreateInInventory("AmmoBox_22_50Rnd");

                itemCreated = player.GetInventory().CreateInInventory("AK_Suppressor");

                itemCreated = player.GetInventory().CreateInInventory("AK_Suppressor");

                itemCreated = player.GetInventory().CreateInInventory("AK_Suppressor");

                itemCreated = player.GetInventory().CreateInInventory("AK_Suppressor");

               

                itemCreated = player.GetInventory().CreateInInventory("PersonalRadio");

                if (itemCreated)

                {

                    player.SetQuickBarEntityShortcut(itemCreated, 6);

                    itemCreated.GetInventory().CreateInInventory( "Battery9V" );

                }

                itemCreated = NULL;

               

                itemCreated = player.GetInventory().CreateInInventory("FieldShovel");

                if (itemCreated)

                {

                    player.SetQuickBarEntityShortcut(itemCreated, 5);

                }

                itemCreated = NULL;



                itemCreated = player.GetInventory().CreateInInventory("SVD");

                if (itemCreated)

                {

                    player.SetQuickBarEntityShortcut(itemCreated, 1);

                    itemCreated.GetInventory().CreateAttachment( "AK_Suppressor" );

                    itemCreated.GetInventory().CreateAttachment( "PSO1Optic" );

                    if (itemCreated)

                    {                      

                        itemCreated.GetInventory().CreateInInventory( "Battery9V" );

                    }                      

                }

                           

                itemCreated = NULL;

                itemCreated = player.GetInventory().CreateInInventory("VSS");

                if (itemCreated)

                {

                    player.SetQuickBarEntityShortcut(itemCreated, 2);

                    itemCreated.GetInventory().CreateAttachment( "PSO11Optic" );

                    if (itemCreated)

                    {                      

                        itemCreated.GetInventory().CreateInInventory( "Battery9V" );

                    }                      

                }

                           

                itemCreated = NULL;                                                                     // �������� �������� ���������� ����� ������ � ���, ����� ���� �� ����� ������������ �� �����

                itemCreated = player.GetHumanInventory().CreateInHands("akm");                          // ������ ������ AKM � ����

                if (itemCreated)                                                                        // ���������, �������� �� ���

                {                                                                                      

                    player.SetQuickBarEntityShortcut(itemCreated, 0);

                    itemCreated.GetInventory().CreateAttachment( "AK_FoldingBttstck" );                     // ������ ������ �� AKM �����, ������� � ���������, � ������

                    itemCreated.GetInventory().CreateAttachment( "AK_RailHndgrd" );                     // ������ ������ �� AKM �����, ������� � ���������, � ������

                    itemCreated.GetInventory().CreateAttachment( "AK_Suppressor" );

                    itemCreated1 = itemCreated.GetInventory().CreateAttachment("UniversalLight");

                    if (itemCreated1)

                    {                      

                        itemCreated1.GetInventory().CreateInInventory( "Battery9V" );

                    }  

                    itemCreated.GetInventory().CreateAttachment( "PSO11Optic" );

                    if (itemCreated)                                                                      

                    {                      

                        itemCreated.GetInventory().CreateInInventory( "Battery9V" );

                    }

                }  

                itemCreated = NULL;

                itemCreated1 = NULL;

                player.GetStatWater().Set(5000);

                player.GetStatEnergy().Set(19000);



                   

                break;

            }

           

            case 2: //Set with number 2 (��� � ������� 2)

            {

                RemoveAllItems(player);                                                 // ����� ������� � ��������� ��� ��������� ����������� ��������� ������ ����������������� ������

                itemCreated = player.GetInventory().CreateInInventory("AssaultBag_Ttsko");          // ������ ������ � ���������� � ���������� itemCreated

                itemCreated = NULL;

                itemCreated1 = NULL;                



                itemCreated = player.GetInventory().CreateInInventory("Mich2001Helmet");                        // ������ ������ �������� ����

                if (itemCreated)

                {

                    itemCreated1 = itemCreated.GetInventory().CreateAttachment("NVGoggles");

                    if (itemCreated1)

                    {                      

                        itemCreated1.GetInventory().CreateInInventory( "Battery9V" );

                    }

                    itemCreated1 = itemCreated.GetInventory().CreateAttachment("UniversalLight");

                    if (itemCreated1)

                    {                      

                        itemCreated1.GetInventory().CreateInInventory( "Battery9V" );

                    }                  

                }

                itemCreated = NULL;

                itemCreated1 = NULL;

               

                itemCreated = player.GetInventory().CreateInInventory("BalaclavaMask_Blackskull");                  // ������ ������ �����

                itemCreated = player.GetInventory().CreateInInventory("TacticalGloves_Green");              // ������ ������ ��������

                itemCreated = player.GetInventory().CreateInInventory("BDUPants");          // ������ ������ �����

                itemCreated = player.GetInventory().CreateInInventory("MilitaryBoots_Black");               // ������ ������ �����

                itemCreated = player.GetInventory().CreateInInventory("BDUJacket");         // ������ ������ ������                        

                itemCreated = NULL;

               

                itemCreated = player.GetInventory().CreateInInventory("PlateCarrierVest_Camo");                 // ������ �����

                if (itemCreated)                                                                        // ���������, ��������� �� �����. ���� �� ��������, ���������� itemCreated ����� �� ����� � �������� �������

                {                                                                                      

                    itemCreated.GetInventory().CreateAttachment( "PlateCarrierHolster_Camo" );              // ������ ������ � ������

                    itemCreated.GetInventory().CreateAttachment( "PlateCarrierPouches_Camo" );              // ������ ������� � ������

                    itemCreated.GetInventory().CreateAttachment( "RGD5Grenade" );               // ������ ������� � ������

                    itemCreated.GetInventory().CreateAttachment( "RGD5Grenade" );               // ������ ������� � ������

                    itemCreated.GetInventory().CreateAttachment( "RGD5Grenade" );               // ������ ������� � ������

                    itemCreated.GetInventory().CreateAttachment( "RGD5Grenade" );               // ������ ������� � ������

                   

                }

                itemCreated = NULL;

                itemCreated = player.GetInventory().CreateInInventory("MilitaryBelt");                  // ������ ������

                if (itemCreated)                                                                        // ���������, �������� �� ������. ���� �� ��������, ���������� itemCreated ����� �� ����� � �������� �������

                {  

                    itemCreated.GetInventory().CreateAttachment( "PlateCarrierHolster_Camo" );              // ������ ������ � ������

                    if (itemCreated)

                    {

                        itemCreated1 = itemCreated.GetInventory().CreateInInventory ("MKII");

                        if (itemCreated1)

                        {

                            player.SetQuickBarEntityShortcut(itemCreated1, 2);

                        }

                    }

                    itemCreated.GetInventory().CreateAttachment( "NylonKnifeSheath" );                  // ������ ����� � ������

                    if (itemCreated)

                    {

                        itemCreated1 = itemCreated.GetInventory().CreateInInventory ("CombatKnife");

                        if (itemCreated1)

                        {

                            player.SetQuickBarEntityShortcut(itemCreated1, 3);

                        }

                    }

                }

                itemCreated = NULL;

                itemCreated1 = NULL;

                //itemCasted = ItemBase.Cast(itemCreated);                                              // ������ �� �����, ���������������. ������������ ��� ��������� ������ EntityAI � ItemBase (����� ������ �������� ���� ��������)

                itemCreated = player.GetInventory().CreateInInventory("TacticalGoggles");               // ������ ������ �������� � MKII

                itemCreated = player.GetInventory().CreateInInventory("Mag_MKII_10Rnd");                // ������ ������ �������� � MKII

                itemCreated = player.GetInventory().CreateInInventory("Mag_MKII_10Rnd");

                itemCreated = player.GetInventory().CreateInInventory("Mag_MKII_10Rnd");                // ������ ������ �������� � MKII

                itemCreated = player.GetInventory().CreateInInventory("Mag_SVD_10Rnd");                 // ������ ������ �������� � AKM � ����� ��������� ���� � ���������

                itemCreated = player.GetInventory().CreateInInventory("Mag_SVD_10Rnd");                 // ������ ������ �������� � AKM � ����� ��������� ���� � ���������

                itemCreated = player.GetInventory().CreateInInventory("Mag_SVD_10Rnd");

                itemCreated = player.GetInventory().CreateInInventory("Mag_SVD_10Rnd");             // ������ ������ �������� � AKM � ����� ��������� ���� � ���������      

                itemCreated = player.GetInventory().CreateInInventory("Mag_Vikhr_30Rnd");

                itemCreated = player.GetInventory().CreateInInventory("Mag_Vikhr_30Rnd");

                itemCreated = player.GetInventory().CreateInInventory("Mag_Vikhr_30Rnd");

                itemCreated = player.GetInventory().CreateInInventory("Mag_Vikhr_30Rnd");



                itemCreated = player.GetInventory().CreateInInventory("AmmoBox_9x39AP_20Rnd");

                itemCreated = player.GetInventory().CreateInInventory("AmmoBox_9x39AP_20Rnd");

                itemCreated = player.GetInventory().CreateInInventory("AmmoBox_9x39AP_20Rnd");

                itemCreated = player.GetInventory().CreateInInventory("AmmoBox_9x39AP_20Rnd");



                itemCreated = player.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd");

                itemCreated = player.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd");

                itemCreated = player.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd");

                itemCreated = player.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd");



                itemCreated = player.GetInventory().CreateInInventory("AmmoBox_22_50Rnd");

                itemCreated = player.GetInventory().CreateInInventory("AmmoBox_22_50Rnd");

               

                itemCreated = NULL;



                itemCreated = player.GetInventory().CreateInInventory("SVD");

                if (itemCreated)

                {

                    player.SetQuickBarEntityShortcut(itemCreated, 1);

                    itemCreated.GetInventory().CreateAttachment( "AK_Suppressor" );

                    itemCreated.GetInventory().CreateAttachment( "PSO1Optic" );

                    if (itemCreated)

                    {                      

                        itemCreated.GetInventory().CreateInInventory( "Battery9V" );

                    }                      

                }                      

                           

                itemCreated = NULL;                                                                     // �������� �������� ���������� ����� ������ � ���, ����� ���� �� ����� ������������ �� �����

                itemCreated = player.GetHumanInventory().CreateInHands("VSS");                          // ������ ������ AKM � ����

                if (itemCreated)

                {

                    player.SetQuickBarEntityShortcut(itemCreated, 0);

                    itemCreated.GetInventory().CreateAttachment( "PSO11Optic" );

                    if (itemCreated)

                    {                      

                        itemCreated.GetInventory().CreateInInventory( "Battery9V" );

                    }                      

                }

               

                itemCreated = NULL;

                itemCreated1 = NULL;

               

                player.GetStatWater().Set(5000);

                player.GetStatEnergy().Set(19000);



                   

                break;

            }

           

            case 3: //Set with number 3   (��� � ������� 3)

            {

                break;

            }

           

            case 4: //Set with number 4   (��� � ������� 4)

            {

                break;

            }

           

            case 5: //Set with number 5   (��� � ������� 5)

            {

                break;

            }

           

            case 6: //Set with number 6   (��� � ������� 6)

            {

                break;

            }

           

            default: //Default starting spawn set (��� ����������� ��� ���� �������, ���� ������ ��������� - ���������� �����!)

            {

                //My_Custom_Spawn_Parameters.RemoveAllItems(player); // ����� ������� � ��������� ��� ��������� ����������� ��������� ������ ����������������� ������

                //DefaultSets(player); // ��� ������ ����� ����� �� ������� ���� �������, �� ����������� � �������, ����������������� ��� ������

                break;

            }

        }

    }

   

    void SetRandomHealthItem(EntityAI itemCreated) // ������� ���������� � ��������� ��� �������� ��������� �������� ��������!

    {

        if ( itemCreated )

        {

            private int rndHlt = Math.RandomInt(55,6);

            itemCreated.SetHealth("","",rndHlt);

        }

    }

   

    void DefaultSets(PlayerBase player) // ������� ������ ���� �������, �� ����������� � ������������ �������!!!

    {

        EntityAI itemCreated = NULL;

        EntityAI itemCreated1 = NULL;

        ItemBase itemCasted = NULL;

       

        // ���� ������, ���� ��� ����� ������ ���� ����� ������ ��� ���� �������. ���� ��� ����� ����� ������������ � ��� ������� ���� �������������!

        // ��� ���������������, ���� ��� ���� - ����������������!

        // ������ ���� ����� ������ ������

        /*

        private array <vector>  spawnpoints = {"7500 0 7500",

            "7500 0 7500","7500 0 7500",

            "7500 0 7500"};

        private vector selected_spawnpoint = spawnpoints.GetRandomElement();

        player.SetPosition(selected_spawnpoint);

        */

        // ����� ���� ����� ������ ������

       

        private int random_set_number = Math.RandomIntInclusive(1,3); // ���������� ������ ����� ���� �� 1 �� 6 ������������ (�� ��������� ������ case ����)

        switch( random_set_number ) //������� ��� (����� ������������ �������� �� 1 � ����, ������ �� 0 � �� -1)

        {

            case 1: //Set with number 1 (��� � ������� 1)

            {

                RemoveAllItems(player); // ����� ������� � ��������� ��� ��������� ����������� ��������� ������ ����������������� ������

                itemCreated = player.GetInventory().CreateInInventory("MountainBag_Green");             // ������ ������ � ���������� � ���������� itemCreated

                if (itemCreated)                                                                        // ���������, �������� �� ������. ���� �� ��������, ���������� itemCreated ����� �� ����� � �������� �������

                {                                                                                      

                    SetRandomHealthItem(itemCreated);                                                   // ������ ������� ��������� ��������

                    itemCreated1 = itemCreated.GetInventory().CreateInInventory("Apple");               // ��������� � ��������� ���������� ������� ������ � ���������� � ���������� itemCreated1

                    if (itemCreated1)                                                                   // ���������, ��������� �� ������ � �������, ������ � ��� � ���������� itemCreated1

                    {                                                                                  

                        SetRandomHealthItem(itemCreated1);                                              // ������ ������ ��������� ��������

                    }                                                                                  

                    itemCreated1 = NULL;                                                                // �������� �������� ���������� ����� ������ � ���, ����� ��������� �������� ������ ���������

                    itemCreated1 = itemCreated.GetInventory().CreateInInventory("Rag");                 // ������ ������ ����� � ������ � ���������� � ���������� itemCreated1

                    if (itemCreated1)                                                                   // ���������, ��������� �� ����� � �������, ��� � ��� � ���������� itemCreated1

                    {                                                                                  

                        itemCasted = ItemBase.Cast(itemCreated1);                                       // ��������� �������������� � ������ ����� ��� ������ � ������ ��� ��������, ��������� � ������ EntityAI ��� ������ ��� ������� SetQuantity, � � ��������� ItemBase ��� ����. ������� ��� ���� ��� � �������� ���� � ��� ��!

                        itemCasted.SetQuantity(4);                                                      // ���������� ���������� ��� ��������� ������ ��� 4 �����

                        SetRandomHealthItem(itemCreated);                                               // ������ ������ ��������� ��������, ������� �������� � ������� EntityAI (��. � ����� �����)

                    }

                }

                // ���������� itemCreated �� �������� �����, ��������� �� �� �� ���������� � �������� ����.

                itemCreated = player.GetInventory().CreateInInventory("SantasHat");                     // ������ ������ �������� ����

                itemCreated = player.GetInventory().CreateInInventory("SantasBeard");                   // ������ ������ �����

                itemCreated = player.GetInventory().CreateInInventory("OMNOGloves_Gray");               // ������ ������ ��������

                itemCreated = player.GetInventory().CreateInInventory("TrackSuitPants_Green");          // ������ ������ �����

                itemCreated = player.GetInventory().CreateInInventory("Sneakers_Green");                // ������ ������ �����

                itemCreated = player.GetInventory().CreateInInventory("ChernarusSportShirt");           // ������ ������ ������            

                itemCreated = NULL;

                itemCreated = player.GetInventory().CreateInInventory("PlateCarrierVest");              // ������ �����

                if (itemCreated)                                                                        // ���������, ��������� �� �����. ���� �� ��������, ���������� itemCreated ����� �� ����� � �������� �������

                {                                                                                      

                    itemCreated.GetInventory().CreateAttachment( "PlateCarrierHolster" );               // ������ ������ � ������

                    itemCreated.GetInventory().CreateAttachment( "PlateCarrierPouches" );               // ������ ������� � ������

                   

                }

                itemCreated = NULL;

                itemCreated = player.GetInventory().CreateInInventory("MilitaryBelt");                  // ������ ������

                if (itemCreated)                                                                        // ���������, �������� �� ������. ���� �� ��������, ���������� itemCreated ����� �� ����� � �������� �������

                {                                                                                      

                    itemCreated.GetInventory().CreateAttachment( "NylonKnifeSheath" );                  // ������ ����� � ������

                    itemCreated.GetInventory().CreateAttachment( "PlateCarrierHolster" );               // ������ ������ � ������

                   

                }

                itemCreated = NULL;

                //itemCasted = ItemBase.Cast(itemCreated);                                              // ������ �� �����, ���������������. ������������ ��� ��������� ������ EntityAI � ItemBase (����� ������ �������� ���� ��������)

                itemCreated = player.GetInventory().CreateInInventory("CombatKnife");                   // ������ ������ ����� � ����� ��������� ���� � ���������

                itemCreated = player.GetInventory().CreateInInventory("MKII");                          // ������ ������ MKII

                itemCreated = player.GetInventory().CreateInInventory("Mag_MKII_10Rnd");                // ������ ������ �������� � MKII

                itemCreated = player.GetInventory().CreateInInventory("Mag_MKII_10Rnd");                // ������ ������ �������� � MKII

                itemCreated = player.GetInventory().CreateInInventory("Mag_AKM_30Rnd");                 // ������ ������ �������� � AKM � ����� ��������� ���� � ���������

                itemCreated = player.GetInventory().CreateInInventory("Mag_AKM_30Rnd");                 // ������ ������ �������� � AKM � ����� ��������� ���� � ���������

                itemCreated = NULL;                                                                     // �������� �������� ���������� ����� ������ � ���, ����� ���� �� ����� ������������ �� �����

                itemCreated = player.GetHumanInventory().CreateInHands("akm");                          // ������ ������ AKM � ����

                if (itemCreated)                                                                        // ���������, �������� �� ���

                {                                                                                      

                    itemCreated.GetInventory().CreateAttachment( "PSO11Optic" );                        // ������ ������ �� AKM ������ ��� 11 � ������

                    itemCreated.GetInventory().CreateAttachment( "AK_WoodBttstck" );                    // ������ ������ �� AKM �����, ������� � ���������, � ������

                    itemCreated.GetInventory().CreateAttachment( "AK_WoodHndgrd" );                     // ������ ������ �� AKM �����, ������� � ���������, � ������

                    itemCreated.GetInventory().CreateAttachment( "AK_Suppressor" );                     // ������ ������ �� AKM �����, ������� � ���������, � ������

                }                  

                break;

            }

           

            case 2: //Set with number 2  (��� � ������� 2)

            {

                RemoveAllItems(player); // ����� ������� � ��������� ��� ��������� ����������� ��������� ������ ����������������� ������

                itemCreated = player.GetInventory().CreateInInventory("MountainBag_Green");                 // ������ ������ � ���������� � ���������� itemCreated

                if (itemCreated)                                                                        // ���������, �������� �� ������. ���� �� ��������, ���������� itemCreated ����� �� ����� � �������� �������

                {                                                                                      

                    SetRandomHealthItem(itemCreated);                                                   // ������ ������� ��������� ��������

                    itemCreated1 = itemCreated.GetInventory().CreateInInventory("Apple");               // ��������� � ��������� ���������� ������� ������ � ���������� � ���������� itemCreated1

                    if (itemCreated1)                                                                   // ���������, ��������� �� ������ � �������, ������ � ��� � ���������� itemCreated1

                    {                                                                                  

                        SetRandomHealthItem(itemCreated1);                                              // ������ ������ ��������� ��������

                    }                                                                                  

                    itemCreated1 = NULL;                                                                // �������� �������� ���������� ����� ������ � ���, ����� ��������� �������� ������ ���������

                    itemCreated1 = itemCreated.GetInventory().CreateInInventory("Rag");                 // ������ ������ ����� � ������ � ���������� � ���������� itemCreated1

                    if (itemCreated1)                                                                   // ���������, ��������� �� ����� � �������, ��� � ��� � ���������� itemCreated1

                    {                                                                                  

                        itemCasted = ItemBase.Cast(itemCreated1);                                       // ��������� �������������� � ������ ����� ��� ������ � ������ ��� ��������, ��������� � ������ EntityAI ��� ������ ��� ������� SetQuantity, � � ��������� ItemBase ��� ����. ������� ��� ���� ��� � �������� ���� � ��� ��!

                        itemCasted.SetQuantity(4);                                                      // ���������� ���������� ��� ��������� ������ ��� 4 �����

                        SetRandomHealthItem(itemCreated);                                               // ������ ������ ��������� ��������, ������� �������� � ������� EntityAI (��. � ����� �����)

                    }

                }

                // ���������� itemCreated �� �������� �����, ��������� �� �� �� ���������� � �������� ����.

                itemCreated = player.GetInventory().CreateInInventory("SantasHat");                     // ������ ������ �������� ����

                itemCreated = player.GetInventory().CreateInInventory("SantasBeard");                   // ������ ������ �����

                itemCreated = player.GetInventory().CreateInInventory("OMNOGloves_Gray");               // ������ ������ ��������

                itemCreated = player.GetInventory().CreateInInventory("TrackSuitPants_Green");          // ������ ������ �����

                itemCreated = player.GetInventory().CreateInInventory("Sneakers_Green");                // ������ ������ �����

                itemCreated = player.GetInventory().CreateInInventory("ChernarusSportShirt");           // ������ ������ ������            

                itemCreated = NULL;

                itemCreated = player.GetInventory().CreateInInventory("PlateCarrierVest");              // ������ �����

                if (itemCreated)                                                                        // ���������, ��������� �� �����. ���� �� ��������, ���������� itemCreated ����� �� ����� � �������� �������

                {                                                                                      

                    itemCreated.GetInventory().CreateAttachment( "PlateCarrierHolster" );               // ������ ������ � ������

                    itemCreated.GetInventory().CreateAttachment( "PlateCarrierPouches" );               // ������ ������� � ������

                   

                }

                itemCreated = NULL;

                //itemCasted = ItemBase.Cast(itemCreated);                                              // ������ �� �����, ���������������. ������������ ��� ��������� ������ EntityAI � ItemBase (����� ������ �������� ���� ��������)

                itemCreated = player.GetInventory().CreateInInventory("CombatKnife");                   // ������ ������ ����� � ����� ��������� ���� � ���������

                itemCreated = player.GetInventory().CreateInInventory("Mag_AKM_30Rnd");                 // ������ ������ �������� � AKM � ����� ��������� ���� � ���������

                itemCreated = player.GetInventory().CreateInInventory("Mag_AKM_30Rnd");                 // ������ ������ �������� � AKM � ����� ��������� ���� � ���������

                itemCreated = NULL;                                                                     // �������� �������� ���������� ����� ������ � ���, ����� ���� �� ����� ������������ �� �����

                itemCreated = player.GetHumanInventory().CreateInHands("akm");                          // ������ ������ AKM � ����

                if (itemCreated)                                                                        // ���������, �������� �� ���

                {                                                                                      

                    itemCreated.GetInventory().CreateAttachment( "PSO11Optic" );                        // ������ ������ �� AKM ������ ��� 11 � ������

                    itemCreated.GetInventory().CreateAttachment( "AK_WoodBttstck" );                    // ������ ������ �� AKM �����, ������� � ���������, � ������

                    itemCreated.GetInventory().CreateAttachment( "AK_WoodHndgrd" );                     // ������ ������ �� AKM �����, ������� � ���������, � ������

                    itemCreated.GetInventory().CreateAttachment( "AK_Suppressor" );                     // ������ ������ �� AKM �����, ������� � ���������, � ������

                }                  

                break;

            }

           

            case 3: //Set with number 3   (��� � ������� 3)

            {

                RemoveAllItems(player); // ����� ������� � ��������� ��� ��������� ����������� ��������� ������ ����������������� ������

                itemCreated = player.GetInventory().CreateInInventory("CoyoteBag_Green");   // ������ ������ � ���������� � ���������� itemCreated

                if (itemCreated)                                                            // ���������, �������� �� ������. ���� �� ��������, ���������� itemCreated ����� �� ����� � �������� �������

                {

                    SetRandomHealthItem(itemCreated);                                               // ������ ������� ��������� ��������

                    itemCreated1 = itemCreated.GetInventory().CreateInInventory("Apple");           // ��������� � ��������� ���������� ������� ������ � ���������� � ���������� itemCreated1

                    if (itemCreated1)                                                               // ���������, ��������� �� ������ � �������, ������ � ��� � ���������� itemCreated1

                    {

                        SetRandomHealthItem(itemCreated1);                                              // ������ ������ ��������� ��������

                    }

                    itemCreated1 = NULL;                                                            // �������� �������� ���������� ����� ������ � ���, ����� ��������� �������� ������ ���������

                    itemCreated1 = itemCreated.GetInventory().CreateInInventory("Rag");             // ������ ������ ����� � ������ � ���������� � ���������� itemCreated1

                    if (itemCreated1)                                                               // ���������, ��������� �� ����� � �������, ��� � ��� � ���������� itemCreated1

                    {

                        itemCasted = ItemBase.Cast(itemCreated1);                                       // ��������� �������������� � ������ ����� ��� ������ � ������ ��� ��������, ��������� � ������ EntityAI ��� ������ ��� ������� SetQuantity, � � ��������� ItemBase ��� ����. ������� ��� ���� ��� � �������� ���� � ��� ��!

                        itemCasted.SetQuantity(4);                                                      // ���������� ���������� ��� ��������� ������ ��� 4 �����

                        SetRandomHealthItem(itemCreated);                                               // ������ ������ ��������� ��������, ������� �������� � ������� EntityAI (��. � ����� �����)

                    }

                }

                // ���������� itemCreated �� �������� �����, ��������� �� �� �� ���������� � �������� ����.

                itemCreated = player.GetInventory().CreateInInventory("TTSKOPants");        // ������ ������ �����

                itemCreated = player.GetInventory().CreateInInventory("TTsKOJacket_Camo");  // ������ ������ ������

                itemCreated = player.GetInventory().CreateInInventory("CombatBoots_Black"); // ������ ������ �����

                //itemCasted = ItemBase.Cast(itemCreated);                                      // ������ �� �����, ���������������. ������������ ��� ��������� ������ EntityAI � ItemBase (����� ������ �������� ���� ��������)

                itemCreated = player.GetInventory().CreateInInventory("CombatKnife");       // ������ ������ ����� � ����� ��������� ���� � ���������

                itemCreated = player.GetInventory().CreateInInventory("FNX45");             // ������ ������ FNX � ����� ��������� ���� � ���������

                itemCreated = player.GetInventory().CreateInInventory("Mag_FNX45_15Rnd");   // ������ ������ �������� � FNX � ����� ��������� ���� � ���������

                itemCreated = player.GetInventory().CreateInInventory("Mag_FNX45_15Rnd");   // ������ ������ �������� � FNX � ����� ��������� ���� � ���������

                itemCreated = player.GetInventory().CreateInInventory("Mag_AKM_30Rnd");     // ������ ������ �������� � AKM � ����� ��������� ���� � ���������

                itemCreated = player.GetInventory().CreateInInventory("Mag_AKM_30Rnd");     // ������ ������ �������� � AKM � ����� ��������� ���� � ���������

                itemCreated = NULL;                                                         // �������� �������� ���������� ����� ������ � ���, ����� ���� �� ����� ������������ �� �����

                itemCreated = player.GetHumanInventory().CreateInHands("akm");              // ������ ������ AKM � ����

                if (itemCreated)                                                            // ���������, �������� �� ���

                {

                    itemCreated.GetInventory().CreateAttachment( "PSO11Optic" );                // ������ ������ �� AKM ������ ��� 11 � ������

                    itemCreated.GetInventory().CreateAttachment( "AK_WoodBttstck" );            // ������ ������ �� AKM �����, ������� � ���������, � ������

                    itemCreated.GetInventory().CreateAttachment( "AK_WoodHndgrd" );             // ������ ������ �� AKM �����, ������� � ���������, � ������

                    itemCreated.GetInventory().CreateAttachment( "AK_Suppressor" );             // ������ ������ �� AKM �����, ������� � ���������, � ������

                }                  

                break;

            }

           

            case 4: //Set with number 4   (��� � ������� 4)

            {

                break;

            }

           

            case 5: //Set with number 5   (��� � ������� 5)

            {

                break;

            }

           

            case 6: //Set with number 6   (��� � ������� 6)

            {

                break;

            }

           

            default: //Default starting spawn set (��� ����������� ��� ���� �������, � ������ ���� �� ���� �� ����� ���� �� �����.

            {

                //My_Custom_Spawn_Parameters.RemoveAllItems(player); // ����� ������� � ��������� ��� ��������� ����������� ��������� ������ ����������������� ������

               

                break;

            }

        }

    }

    void RemoveAllItems(PlayerBase player)

    {

        array<EntityAI> itemsArray = new array<EntityAI>;

        ItemBase item;

        player.GetInventory().EnumerateInventory(InventoryTraversalType.PREORDER, itemsArray);

       

        for (int i = 0; i < itemsArray.Count(); i++)

        {

            Class.CastTo(item, itemsArray.Get(i));

            if (item && !item.IsInherited(SurvivorBase))

            {

                InventoryLocation il = new InventoryLocation();

                if (item && item.GetInventory().GetCurrentInventoryLocation(il))

                {

                    player.GetInventory().LocalDestroyEntity(item);

                }

            }

        }

    }

}

 

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Эээ. Что за "простыня" с ироглифами. Тэги не не знаем?

И если вместо вопросительных знаков у впс киррилица может дело в ней?

Share this post


Link to post
Share on other sites



  • 0

Дело не в ней, визуал код видит текст в виде иероглифов, правлю текст в текстовике и там все подписано на русском через // подчеркивания

 

Share this post


Link to post
Share on other sites

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

×
×
  • 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.