diff --git a/DayZ/configs/cfgClient.lua b/DayZ/configs/cfgClient.lua index 8438902..37973d0 100644 --- a/DayZ/configs/cfgClient.lua +++ b/DayZ/configs/cfgClient.lua @@ -11,8 +11,9 @@ -- PING CHECK gameplayVariables["ping"] = 600 -- Checks if ping is over the set amount. DEFAULT: 600 --- ZOMBIE DAMAGE +-- DAMAGE gameplayVariables["zombiedamage"] = 650 -- Damage done by zombies - DEFAULT: 650, for consistent damage, remove math.random(400,900) and insert value (EXAMPLE: 1000) +gameplayVariables["waterdamage"] = math.random(5500,7100) -- Damage received by a player every 4 seconds when it is under water. DEFAULT: math.random(5500,7100). -- MISC gameplayVariables["enablenight"] = true -- Whether or not the night should be darker - DEFAULT: true diff --git a/DayZ/handlers/players/client/status_player.lua b/DayZ/handlers/players/client/status_player.lua index c35b60d..d4efe4e 100644 --- a/DayZ/handlers/players/client/status_player.lua +++ b/DayZ/handlers/players/client/status_player.lua @@ -288,6 +288,20 @@ function updatePlayTime() end setTimer(updatePlayTime,60000,0) +function playerBloodInWater() + if getElementData(localPlayer, "logedin") then + local posX, posY, posZ = getElementPosition(localPlayer) + if posZ <= -4 then + if isElementInWater(localPlayer) then + local pBlood = getElementData(localPlayer,"blood") + setElementData(localPlayer,"blood", pBlood - gameplayVariables["waterdamage"]) + setElementData(localPlayer,"pain",true) + end + end + end +end +setTimer(playerBloodInWater,4000,0) + function onPlayerActionPlaySound(item) if item == "meat" then local number = math.random(0,1) diff --git a/changelog.txt b/changelog.txt index 359be44..e98608d 100644 --- a/changelog.txt +++ b/changelog.txt @@ -13,6 +13,7 @@ This changelog lists all changes made to MTA DayZ. It adheres to the following f ### ADDED: Arma II chatbox style ### ADDED: Server Console Output on Global Chat ### ADDED: "Dead Night" Addon +### ADDED : gameplayVariables["waterdamage"] in cfgClient.lua, damage received by a player when it is under water ### ADDED: Anti-teleport detection method to BattlDayZ ### CHANGED: For changes in existing features ### CHANGED: Added Flashlight to Spanish Language @@ -29,6 +30,7 @@ This changelog lists all changes made to MTA DayZ. It adheres to the following f ### FIXED: Ammo bug ### FIXED: Patrol Pack bug ### FIXED: Black & White shader not loading +### FIXED : The player don't get damage if are submerged for along time ### SECURITY: To invite users to upgrade in case of vulnerabilities ### LANGUAGE: Romanian is now available. diff --git a/rollingchangelog.txt b/rollingchangelog.txt index 6ab18eb..540afd6 100644 --- a/rollingchangelog.txt +++ b/rollingchangelog.txt @@ -1,4 +1,6 @@ # CHANGELOG # This changelog lists all changes made to MTA DayZ, but have yet to be released. It adheres to the following features description. -## [0.9.8a] - DATE OF RELEASE (YYYY-MM-DD) \ No newline at end of file +## [0.9.8a] - DATE OF RELEASE (YYYY-MM-DD) +### FIXED : The player don't get damage if are submerged for along time. (PicardRemi) +### ADDED : gameplayVariables["waterdamage"] in cfgClient.lua, damage received by a player when it is under water. (PicardRemi) \ No newline at end of file