mastaZz
Members-
Content Count
33 -
Joined
-
Last visited
Everything posted by mastaZz
-
Hi guys. Tell me please, Is it possible to display the names of friends above your head?
-
where to download the tools for moding mentioned in the report?
-
I would be very happy if it came up for dayz ... sorry I don’t understand English by ear (((
-
Tell me please guide on the instruments
-
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()); } } } }
-
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()); } } } }
-
yes I fixed it but only 1 zone works
-
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
-
static vector zonepvp_pos1 = {2321.25, 0, 8452.31};// point2 on line error
-
the character starts with a rag in his hands. And should with a weapon.
mastaZz posted a topic in Servers
the character starts with a rag in his hands. And should with a weapon. Tell me what is wrong? override void StartingEquipSetup(PlayerBase player, bool clothesChosen) { player.GetStatStamina().Set(1000); player.RemoveAllItems(); /*itemEnt = player.GetInventory().CreateInInventory("SodaCan_Pipsi"); itemBs = ItemBase.Cast(itemEnt); itemEnt = player.GetInventory().CreateInInventory("SpaghettiCan"); itemBs = ItemBase.Cast(itemEnt); itemEnt = player.GetInventory().CreateInInventory("CanOpener"); itemBs = ItemBase.Cast(itemEnt); itemEnt = player.GetInventory().CreateInInventory("Rag"); itemBs = ItemBase.Cast(itemEnt); ItemBase.Cast(rags).SetQuantity(4);*/ EntityAI itemEnt; ItemBase itemBs; itemEnt = player.GetInventory().CreateInInventory("Rag"); itemBs = ItemBase.Cast(itemEnt); itemBs.SetQuantity(4); SetRandomHealth(itemEnt); EntityAI primary; EntityAI axe = player.GetInventory().CreateInInventory("FirefighterAxe"); EntityAI soda = player.GetInventory().CreateInInventory("SodaCan_Pipsi"); EntityAI spagetti = player.GetInventory().CreateInInventory("SpaghettiCan"); EntityAI opener = player.GetInventory().CreateInInventory("CanOpener"); switch (Math.RandomInt(0, 7)) { case 0: primary = baikerClass(player); break; case 1: primary = akClass(player); break; case 2: primary = mosinaClass(player); break; case 3: primary = svdClass(player); break; case 4: primary = FirefightersClass(player); break; case 5: primary = reporterClass(player); break; case 6: primary = umpClass(player); break; case 7: primary = copClass(player); break; } player.LocalTakeEntityToHands(primary); player.SetQuickBarEntityShortcut(primary, 0, true); //player.SetQuickBarEntityShortcut(axe, 3, true); } -
the character starts with a rag in his hands. And should with a weapon.
mastaZz replied to mastaZz's topic in Servers
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? -
the character starts with a rag in his hands. And should with a weapon.
mastaZz replied to mastaZz's topic in Servers
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 -
the character starts with a rag in his hands. And should with a weapon.
mastaZz replied to mastaZz's topic in Servers
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 !!! -
the character starts with a rag in his hands. And should with a weapon.
mastaZz replied to mastaZz's topic in Servers
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 ((( -
this code from the forum very quickly removes the dead override void OnClientRespawnEvent(PlayerIdentity identity, PlayerBase player) // { // note: player is now killed in db right after the actual kill happens /*if (GetHive() && player) { GetHive().CharacterKill(player); }*/ if(player) { if (player.IsUnconscious() || player.IsRestrained()) { // kill character player.SetHealth("", "", 0.0); } } // DELETE THE CORPSE AFTER RESPAWN GetGame().ObjectDelete(player); and how to make the guns from the corpses disappeared in a minute?
-
How to make the guns out of dead bodies disappear in a minute?
mastaZz replied to mastaZz's topic in Servers
but then if you look at the gun it will not disappear. and I would like the weapon that appeared on the map did not disappear, and only the weapon that fell from the trap disappeared -
the character starts with a rag in his hands. And should with a weapon.
mastaZz replied to mastaZz's topic in Servers
the weapon was sealed not in the hands but only in the fast slot -
the character starts with a rag in his hands. And should with a weapon.
mastaZz replied to mastaZz's topic in Servers
the weapon appears in the hands and in the fast slot 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) { EntityAI gun = player.GetInventory().CreateInInventory("AKM"); gun.GetInventory().CreateAttachment("AK_FoldingBttstck"); gun.GetInventory().CreateAttachment("AK_RailHndgrd"); gun.GetInventory().CreateAttachment("AK_Suppressor"); gun.GetInventory().CreateAttachment("KobraOptic"); 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; } -
the character starts with a rag in his hands. And should with a weapon.
mastaZz replied to mastaZz's topic in Servers
override void StartingEquipSetup(PlayerBase player, bool clothesChosen) { player.RemoveAllItems(); EntityAI primary; switch (Math.RandomInt(0, 8)) { case 0: primary = baikerClass(player); break; case 1: primary = akClass(player); break; case 2: primary = mosinaClass(player); break; case 3: primary = svdClass(player); break; case 4: primary = FirefightersClass(player); break; case 5: primary = reporterClass(player); break; case 6: primary = umpClass(player); break; case 7: primary = copClass(player); break; case 8: primary = copClass(player); break; } player.LocalTakeEntityToHands(primary); player.SetQuickBarEntityShortcut(primary, 0, true); player.GetInventory().CreateInInventory("HuntingKnife"); ItemBase rags = player.GetInventory().CreateInInventory("Rag"); rags.SetQuantity(2); } if you do that, the character starts empty-handed -
@SilvioDoHOTS how to make sure that what was in the hands is also lost? override void OnClientRespawnEvent(PlayerIdentity identity, PlayerBase player) { // note: player is now killed in db right after the actual kill happens /*if (GetHive() && player) { GetHive().CharacterKill(player); }*/ if(player) { if (player.IsUnconscious() || player.IsRestrained()) { // kill character player.SetHealth("", "", 0.0); } } // DELETE THE CORPSE AFTER RESPAWN GetGame().ObjectDelete(player); }
-
@coreyhun it would be great to be able to enable and disable the names of friends above your head. Turn on and off the infected and save zones
-
the character starts with a rag in his hands. And should with a weapon.
mastaZz replied to mastaZz's topic in Servers
Thanks for the answer. I rearranged as you said that's what happened override void StartingEquipSetup(PlayerBase player, bool clothesChosen) { player.RemoveAllItems(); player.LocalTakeEntityToHands(primary); player.SetQuickBarEntityShortcut(primary, 0, true); EntityAI primary; switch (Math.RandomInt(0, 8)) { case 0: primary = baikerClass(player); break; case 1: primary = akClass(player); break; case 2: primary = mosinaClass(player); break; case 3: primary = svdClass(player); break; case 4: primary = FirefightersClass(player); break; case 5: primary = reporterClass(player); break; case 6: primary = umpClass(player); break; case 7: primary = copClass(player); break; case 8: primary = copClass(player); break; } player.GetInventory().CreateInInventory("HuntingKnife"); ItemBase rags = player.GetInventory().CreateInInventory("Rag"); rags.SetQuantity(2); } on line player.LocalTakeEntityToHands(primary); there was an error can't find variable 'primary'