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 serversDon'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
33 answers to this question
Recommended Posts
-
Our picks
Помогите, не могу уже... Где допустил ошибку в серверном моде-
class CfgPatches { class DZ_Scripts { units[]={}; weapons[]={}; requiredVersion=0.1; requiredAddons[]={}; }; }; class CfgMods { class NextShock { dir = "NextShock"; picture = ""; action = ""; hideName = 1; hidePicture = 1; name = "NextShock"; credits = ""; author = "Next"; authorID = "0"; version = "1.0"; extra = 0; type = "mod"; dependencies[] = {"World"}; class defs { class GameScriptModule { value = ""; files[] = {"NextShock\4_World\Classes\PlayerModifiers\Modifiers"}; }; }; }; };
config
modded class GameConstants { private const float UNCONSCIOUS_LIMIT = 80; private const float SHOCK_INCREMENT_PER_SEC = 0.20; override void Init() { m_ID = eModifiers.MDF_SHOCK; m_TickIntervalInactive = 0.20; m_TickIntervalActive = 0.20; //DisableActivateCheck(); DisableDeactivateCheck(); } override bool ActivateCondition(PlayerBase player) { return true; } override bool DeactivateCondition(PlayerBase player) { return false; } override void OnActivate(PlayerBase player) { } override void OnDeactivate(PlayerBase player) { } override void OnTick(PlayerBase player, float deltaT) { //Print("m_UnconRefillModifier" + player.m_UnconRefillModifier); if( GetGame().GetTime() > player.m_LastShockHitTime + PlayerConstants.SHOCK_REFILL_COOLDOWN_AFTER_HIT && player.GetPulseType() == EPulseType.REGULAR) { bool uncon = player.IsUnconscious(); if (!uncon) player.m_UnconRefillModifier = 1;//reset this UnconRefillModifier some time after the player has been hit(we want the UnconRefillModifier to only apply to uncon induced by a projectile) if(player.GetHealth01("","Shock") == 1)//no need to continue if the shock is full return; float refill_speed; if ( !CfgGameplayHandler.GetAllowRefillSpeedModifier() ) player.m_UnconRefillModifier = 1; if( uncon ) { refill_speed = CfgGameplayHandler.GetShockRefillSpeedUnconscious() * player.m_UnconRefillModifier; } else if (player.GetBrokenLegs() != eBrokenLegs.BROKEN_LEGS || (player.m_MovementState.m_iStanceIdx == DayZPlayerConstants.STANCEIDX_PRONE || player.m_MovementState.m_iStanceIdx == DayZPlayerConstants.STANCEIDX_RAISEDPRONE)) { refill_speed = CfgGameplayHandler.GetShockRefillSpeedConscious(); } else if ( player.GetBrokenLegs() == eBrokenLegs.BROKEN_LEGS && (player.IsSwimming() || player.IsClimbingLadder()) ) { refill_speed = CfgGameplayHandler.GetShockRefillSpeedUnconscious(); } else refill_speed = 0; //Block shock regen when standing with broken legs player.AddHealth("","Shock", deltaT * refill_speed ); } } override void OnReconnect(PlayerBase player) { } };
mod
DayZServer_x64" -config=serverDZ.cfg -port=3402 -profiles=profiles -freezecheck -serverMod=@NextSMod "-mod=@CF;@Community-Online-Tools;@Namalsk Island;@Namalsk Survival
Параметры запуска.
Не могу заставить работать
Share this post
Link to post
Share on other sites