Jump to content

mastaZz

Members
  • Content Count

    33
  • Joined

  • Last visited

Community Reputation

0 Neutral

About mastaZz

  • Rank
    Woodland Warrior

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. mastaZz

    modding tools

    I would be very happy if it came up for dayz ... sorry I don’t understand English by ear (((
  2. mastaZz

    modding tools

    Tell me please guide on the instruments
  3. mastaZz

    modding tools

    where to download the tools for moding mentioned in the report?
  4. mastaZz

    team play

    Ребята скажите, пожалуйста, есть ли возможность организовать командную игру?
  5. mastaZz

    pvp zone

    I play 1 everything is clear. play 3 starts working 3 random zones override void OnInit() { GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(NumPLayersOnServer, 60000, true); // 10 min // DOES NOT BELONG TO PVP ZONE!!! super.OnInit(); GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(CheckPVPZone, 5000, true); //pvp //CHANGED TO 5 SECONDS TO AVOID SERVER STRESS } void CheckPVPZone()//pvp { static vector zonepvp_pos1 = {5217.25, 0, 9786.31};// point1 static vector zonepvp_pos2 = {5217, 0, 9834};// point2 static vector zonepvp_pos3 = {5182, 337.198, 9900}; static vector zonepvp_pos4 = {5295, 337.198, 9847}; static vector zonepvp_pos5 = {5224.25, 0, 9786.31}; bool in_zone1 = true; bool in_zone2 = true; bool in_zone3 = true; bool in_zone4 = true; bool in_zone5 = true; ref array<Man> players = new array<Man>; GetGame().GetPlayers( players ); if ( players.Count() > 0 ) { for ( int i = 0; i < players.Count(); i++ ) { PlayerBase player; Class.CastTo(player, players.Get(i)); float dist1 = vector.Distance(player.GetPosition(),zonepvp_pos1); float dist2 = vector.Distance(player.GetPosition(),zonepvp_pos2); float dist3 = vector.Distance(player.GetPosition(),zonepvp_pos3); float dist4 = vector.Distance(player.GetPosition(),zonepvp_pos4); float dist5 = vector.Distance(player.GetPosition(),zonepvp_pos5); if (dist1 > 345) in_zone1 = false; //DISTANCE ZONE 1 if (dist2 > 345) in_zone2 = false;// DISTANCE ZONE 2 if (dist3 > 23) in_zone3 = false;//гаражи if (dist4 > 23) in_zone4 = false;//красные контейнера if (dist5 > 345) in_zone5 = false;//у бараков if(!in_zone1 && !in_zone2 && !in_zone3 && !in_zone4 && !in_zone5) //distance from the center to the player, from where the player will receive warnings and damage { float newHeal = player.GetHealth("", "") - 5; //5 - this is damage to the player //CHANGED TO 5 BECAUSE OF TIME-CHANGE ABOVE player.SetHealth("", "", newHeal); string messPlayers = "Эй! " + player.GetIdentity().GetName() + " вернись или умрёшь!"; Param1<string> m_MessageParam = new Param1<string>(messPlayers); GetGame().RPCSingleParam(player, ERPCs.RPC_USER_ACTION_MESSAGE, m_MessageParam, true, player.GetIdentity()); } } } }
  6. mastaZz

    pvp zone

    thanks for the effort
  7. mastaZz

    pvp zone

  8. mastaZz

    pvp zone

    yes I fixed it but only 1 zone works
  9. mastaZz

    pvp zone

    override void OnInit() //показывает сколько играков и пвп { GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(NumPLayersOnServer, 60000, true); // 10 min super.OnInit(); GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(CheckPVPZone, 1000, true); //pvp } void CheckPVPZone()//pvp { static vector zonepvp_pos1 = {5231.25, 0, 9820.31};// Координаты для центра зоны static vector zonepvp_pos2 = {5180.73, 0, 9907.51}; ref array<Man> players = new array<Man>; GetGame().GetPlayers( players ); if ( players.Count() > 0 ) { for ( int i = 0; i < players.Count(); i++ ) { PlayerBase player; Class.CastTo(player, players.Get(i)); float dist = vector.Distance(player.GetPosition(),zonepvp_pos1); float dist1 = vector.Distance(player.GetPosition(),zonepvp_pos2); if(dist > 350) //дистанция от центра к игроку, откуда игрок будет получать предупреждения и урон { float newHeal = player.GetHealth("", "") - 1; //1 - это урон для игрока player.SetHealth("", "", newHeal); string messPlayers = "эй ты (" + player.GetIdentity().GetName() + ") пиздуй обратно, а то здохнеш!"; Param1<string> m_MessageParam = new Param1<string>(messPlayers); GetGame().RPCSingleParam(player, ERPCs.RPC_USER_ACTION_MESSAGE, m_MessageParam, true, player.GetIdentity()); } } } } only 1 zone works
  10. mastaZz

    pvp zone

    static vector zonepvp_pos1 = {2321.25, 0, 8452.31};// point2 on line error
  11. mastaZz

    pvp zone

    who knows how to make two pvp zones by the example of this script? static vector zonepvp_pos = {5231.25, 0, 9820.31};// point override void OnInit() { GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(NumPLayersOnServer, 60000, true); // 10 min super.OnInit(); GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(CheckPVPZone, 1000, true); //pvp } void CheckPVPZone()//pvp { ref array<Man> players = new array<Man>; GetGame().GetPlayers( players ); if ( players.Count() > 0 ) { for ( int i = 0; i < players.Count(); i++ ) { PlayerBase player; Class.CastTo(player, players.Get(i)); float dist = vector.Distance(player.GetPosition(),zonepvp_pos); if(dist > 346) //дистанция от центра к игроку, откуда игрок будет получать предупреждения и урон { float newHeal = player.GetHealth("", "") - 1; //1 - это урон для игрока player.SetHealth("", "", newHeal); string messPlayers = "эй ты (" + player.GetIdentity().GetName() + ") пиздуй обратно, а то здохнеш!"; Param1<string> m_MessageParam = new Param1<string>(messPlayers); GetGame().RPCSingleParam(player, ERPCs.RPC_USER_ACTION_MESSAGE, m_MessageParam, true, player.GetIdentity()); } } } }
  12. cases earned correctly, it turned out I did not erase the server database. You do not know how to do what magazin was inserted into the gun at the start right away?
  13. do you happen to know how to add magazin to gun in this form at the start ??? and how to add a sight with the battery inserted ??? thanks in advance InventoryLocation handInventoryLocation = new InventoryLocation; handInventoryLocation.SetHands(player, null); EntityAI gun = player.GetInventory().SpawnItemOnLocation("AKM", handInventoryLocation, false); gun.GetInventory().CreateAttachment("Mag_AKM_30Rnd"); gun.GetInventory().CreateAttachment("AK_FoldingBttstck"); gun.GetInventory().CreateAttachment("AK_RailHndgrd"); gun.GetInventory().CreateAttachment("AK_Suppressor"); EntityAI aspants = player.GetInventory().CreateInInventory("CargoPants_Black"); EntityAI asjacket = player.GetInventory().CreateInInventory("RidersJacket_Black"); EntityAI asboots = player.GetInventory().CreateInInventory("CombatBoots_Black"); EntityAI helmet = player.GetInventory().CreateInInventory("MotoHelmet_Black"); EntityAI asbag = player.GetInventory().CreateInInventory("CourierBag"); addMags(player, "Mag_AKM_30Rnd", 3); this option does not work properly
  14. I'm sorry I checked on 2 cases. when I added 3 cases, they began to drop out 1-2 without 3. many thanks for helping !!!
  15. void addMags(PlayerBase player, string mag_type, int count) { EntityAI mag; mag = player.GetInventory().CreateInInventory(mag_type); player.SetQuickBarEntityShortcut(mag, 1, true); EntityAI mag1; mag1 = player.GetInventory().CreateInInventory(mag_type); player.SetQuickBarEntityShortcut(mag1, 2, true); EntityAI mag2; mag2 = player.GetInventory().CreateInInventory(mag_type); player.SetQuickBarEntityShortcut(mag2, 3, true); } EntityAI baikerClass(PlayerBase player) { InventoryLocation handInventoryLocation = new InventoryLocation; handInventoryLocation.SetHands(player, null); EntityAI gun = player.GetInventory().SpawnItemOnLocation("AKM", handInventoryLocation, false); gun.GetInventory().CreateAttachment("AK_FoldingBttstck"); gun.GetInventory().CreateAttachment("AK_RailHndgrd"); gun.GetInventory().CreateAttachment("AK_Suppressor"); EntityAI aspants = player.GetInventory().CreateInInventory("CargoPants_Black"); EntityAI asjacket = player.GetInventory().CreateInInventory("RidersJacket_Black"); EntityAI asboots = player.GetInventory().CreateInInventory("CombatBoots_Black"); EntityAI helmet = player.GetInventory().CreateInInventory("MotoHelmet_Black"); EntityAI asbag = player.GetInventory().CreateInInventory("CourierBag"); addMags(player, "Mag_AKM_30Rnd", 3); return gun; } EntityAI mosinaClass(PlayerBase player) { InventoryLocation handInventoryLocation = new InventoryLocation; handInventoryLocation.SetHands(player, null); EntityAI gun = player.GetInventory().SpawnItemOnLocation("svd", handInventoryLocation, false); EntityAI asgpants = player.GetInventory().CreateInInventory("BDUPants"); EntityAI asjacket = player.GetInventory().CreateInInventory("Sweater_Green"); EntityAI asgboots = player.GetInventory().CreateInInventory("CombatBoots_Black"); EntityAI helmet = player.GetInventory().CreateInInventory("Ssh68Helmet"); addMags(player, "Mag_SVD_10Rnd", 5); return gun; } EntityAI FirefightersClass(PlayerBase player) { InventoryLocation handInventoryLocation = new InventoryLocation; handInventoryLocation.SetHands(player, null); EntityAI gun = player.GetInventory().SpawnItemOnLocation("M4A1", handInventoryLocation, false); gun.GetInventory().CreateAttachment("M4_RISHndgrd_Black"); gun.GetInventory().CreateAttachment("M4_MPBttstck_Black"); gun.GetInventory().CreateAttachment("M4_Suppressor"); EntityAI asboots = player.GetInventory().CreateInInventory("CombatBoots_Black"); EntityAI asjacket = player.GetInventory().CreateInInventory("Hoodie_Grey"); EntityAI asmask = player.GetInventory().CreateInInventory("GasMask"); EntityAI asbag = player.GetInventory().CreateInInventory("CourierBag"); EntityAI aspants = player.GetInventory().CreateInInventory("FirefightersPants_Black"); EntityAI asvest = player.GetInventory().CreateInInventory("PoliceVest"); addMags(player, "Mag_STANAG_30Rnd", 5); return gun; } override void StartingEquipSetup(PlayerBase player, bool clothesChosen) { player.RemoveAllItems(); EntityAI primary; switch (Math.RandomInt(0, 2)) { case 0: primary = baikerClass(player); break; case 1: primary = mosinaClass(player); break; case 2: primary = FirefightersClass(player); break; } player.SetQuickBarEntityShortcut(primary, 0, true); player.GetInventory().CreateInInventory("HuntingKnife"); ItemBase rags = player.GetInventory().CreateInInventory("Rag"); rags.SetQuantity(2); } }; Mission CreateCustomMission(string path) { return new CustomMission(); } weapon in hand but only 1 case falls out (((
×