Skip to content

Commit

Permalink
Fix issues #62
Browse files Browse the repository at this point in the history
  • Loading branch information
Rémi Gaffet committed Jun 24, 2016
1 parent fd8b399 commit c6f1f46
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
3 changes: 2 additions & 1 deletion DayZ/configs/cfgClient.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 14 additions & 0 deletions DayZ/handlers/players/client/status_player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.

Expand Down
4 changes: 3 additions & 1 deletion rollingchangelog.txt
Original file line number Diff line number Diff line change
@@ -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)
## [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)

0 comments on commit c6f1f46

Please sign in to comment.