Skip to content
This repository has been archived by the owner on Dec 26, 2021. It is now read-only.

Commit

Permalink
Merge pull request #85 from ciber96/master
Browse files Browse the repository at this point in the history
Merge master to stable
  • Loading branch information
mtadayz authored Apr 28, 2017
2 parents 3b3981e + 0617c12 commit 5b4b604
Show file tree
Hide file tree
Showing 75 changed files with 3,294 additions and 2,416 deletions.
18 changes: 12 additions & 6 deletions DayZ/configs/cfgClient.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
]]

-- PING CHECK
gameplayVariables["ping"] = 600 -- Checks if ping is over the set amount. DEFAULT: 600
gameplayVariables["ping"] = 600 -- Checks if ping is over the set amount - DEFAULT: 600

-- PARAMETER
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).
gameplayVariables["zombiedamage"] = 650 -- Damage done by zombies - DEFAULT: 650
gameplayVariables["waterdamage"] = math.random(5500,7100) -- Damage dealt when drowning - DEFAULT: math.random(5500,7100)

-- MISC
gameplayVariables["enablenight"] = true -- Whether or not the night should be darker - DEFAULT: true
gameplayVariables["armachat"] = false
gameplayVariables["armachat"] = false -- Activates/deactivates ArmA II style chatbox - DEFAULT: false

-- HEADSHOT MULTIPLIER
gameplayVariables["headshotdamage_player"] = 1.5 -- Multiplier for damage on head shot (player). DEFAULT: 1.5, EXAMPLE: damage*1.5
Expand All @@ -26,5 +26,11 @@ gameplayVariables["headshotdamage_zombie"] = 1.5 -- Multiplier for damage on hea
-- SOUND VOLUME
gameplayVariables["ambiencesoundvolume"] = 0.8 -- How loud ambience sounds should be. Set to 0 to disable, max is 1.0. - DEFAULT: 0.8

-- PAIN SHAKE LEVEL
gameplayVariables["painshakelevel"] = 150 -- How much should the camera shake when in pain. DEFAULT: 150, value can be from 0 - 255
-- PAIN SHAKE
gameplayVariables["painshakesway"] = true -- Determines if camera should sway from left to right or shake violently - DEFAULT: true (= camera will sway)
gameplayVariables["painshakelevel"] = 150 -- How much should the camera shake when in pain. DEFAULT: 150, value can be from 0 - 255

-- DEBUG MONITOR OPTION
gameplayVariables["debugmonitorenabled"] = false --Debug Monitor available to the players? DEFAULT: false

outputDebugString("[DayZ] cfgClient loaded")
18 changes: 16 additions & 2 deletions DayZ/configs/cfgLoot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#-----------------------------------------------------------------------------#
]]

outputDebugString("[DayZ] cfgLoot loaded")


-- SPAWNPOINTS (ITEMS)
pickupPositions = {
Expand Down Expand Up @@ -2713,4 +2713,18 @@ pickupPositions = {
{978.47210693359,-678.15814208984,131.05409240723},
{965.54089355469,-674.3095703125,131.05401611328},
},
}
}


zombieBuildingSpawn = {
-- {zombieSpawnChance,minRoaming,maxRoaming}
{"Residential",0.3,0,3},
{"Farm",0.3,0,3},
{"Supermarket",0.4,2,6},
{"Military",0.3,0,6},
{"Industrial",0.3,0,2},
}



outputDebugString("[DayZ] cfgLoot loaded")
5 changes: 3 additions & 2 deletions DayZ/configs/cfgNutritions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#-----------------------------------------------------------------------------#
]]

outputDebugString("[DayZ] cfgNutritions loaded")

gameplayVariables["nutritions"] = {
-- {Name,bloodRegen,calories,food,water,temperature},
Expand All @@ -33,4 +32,6 @@ gameplayVariables["nutritions"] = {
{"Soda Can (Mountain Dew)",0,90,0,500,0},
{"Can (Milk)",100,0,380,420,0},
{"Cooked Meat",1000,817,900,0,2},
}
}

outputDebugString("[DayZ] cfgNutritions loaded")
4 changes: 2 additions & 2 deletions DayZ/configs/cfgSecurity.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
#-----------------------------------------------------------------------------#
]]

outputDebugString("[DayZ] cfgSecurity loaded")

gameplayVariables["combatlog"] = true -- // Enable/Disable anti combat logging - DEFAULT: true
gameplayVariables["securitylevel"] = 1 -- // Set security level: 2 = Ban, 1 = Kick, 0 = Disabled - DEFAULT: 1
gameplayVariables["bantime"] = 0 -- // If security level is 2, for how long should the player be banned (in seconds)? - 0 = Forever - DEFAULT: 0
Expand All @@ -19,3 +17,5 @@ gameplayVariables["packetlossmax"] = 10 -- Set the max packet loss counter - DEF
gameplayVariables["maxslots"] = 30 -- Max slot amount in your server( Include VIP Slots ) - DEFAULT: 30
gameplayVariables["noadvert"] = true -- Banning players who write the server ip
gameplayVariables["adBanTime"] = 86400 -- If noadvert is true, define how much time should the banTime be in seconds. DEFAULT: 86400( 1 Day )

outputDebugString("[DayZ] cfgSecurity loaded")
30 changes: 24 additions & 6 deletions DayZ/configs/cfgServer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
#-----------------------------------------------------------------------------#
]]

outputDebugString("[DayZ] cfgServer loaded")

shownInfos["nomag"] = "No ammo left for this weapon!"
shownInfos["youconsumed"] = "You consumed"
shownInfos["needwatersource"] = "You have to be inside a body of water!"
Expand All @@ -18,21 +16,36 @@ shownInfos["noradio"] = "You have no Radio Device!"

--GAMEPLAY
gameplayVariables["zombieblood"] = 4500 -- Zombie Blood/Health - DEFAULT: 4500
gameplayVariables["loseWire"] = 1000 -- Amount of losing blood when hitting a Wirefence that's not yours. DEFAULT: 1000
gameplayVariables["loseWire"] = 1000 -- Amount of losing blood when hitting a Wirefence that's not yours - DEFAULT: 1000
gameplayVariables["playerzombies"] = 6 -- At what amount of zombies should they respawn? - DEFAULT: 6
gameplayVariables["amountzombies"] = 3 -- How often should the script iterate through zombie spawning (= how many zombies should spawn)? - DEFAULT: 3
gameplayVariables["temperaturewater"] = -0.1 -- Amount of temperature to be lost when in water - DEFAULT: -0.01
gameplayVariables["temperaturesprint"] = 0.005 -- Amount of temperature to be gained when sprinting - DEFAULT: 0.005
gameplayVariables["itemrespawntimer"] = 14400000 -- Number of milliseconds that should elapse before the items will respawn. Note: You can also do math on the number.
gameplayVariables["itemrespawntimer"] = 14400000 -- Number of milliseconds that should elapse before the items will respawn. Note: You can also do math on the number
gameplayVariables["autostartaddons"] = true -- Allow the gamemode to autostart resources with addon_ prefix
gameplayVariables["enableprone"] = true --Whether or not prone is enabled for players - DEFAULT: true
gameplayVariables["respawnwarning"] = true -- Should the warning "BEWARE OF MASSIVE LAG" when items are being respawned be displayed? If set to true, warning will be displayed. - DEFAULT: true
gameplayVariables["fuelEnabled"] = true -- Is the vehicle fuel enabled? - DEFAULT: true
gameplayVariables["realtime"] = false -- Enables/Disables real time use. When disabled, gameplayVariables["customtime"] is in effect - DEFAULT: false
gameplayVariables["realtime"] = false -- Enables/Disables real time use. When set to false, gameplayVariables["customtime"] is in effect - DEFAULT: false
gameplayVariables["customtime"] = 10000 -- How long should an ingame minute be (in ms)? Example: 10000ms (10s) realtime = 1 minute gametime - DEFAULT: 10000
gameplayVariables["pingkick"] = true -- Should the ping kicker be enabled? - DEFAULT: true
gameplayVariables["maxzombiesglobal"] = 600 -- Not in use
gameplayVariables["maxPetrolFuelAmount"] = math.random(1,15) -- Determine amount of fuel each petrol station in the world contains - DEFAULT: math.random(1,15)
gameplayVariables["maxPetrolFuelAmount"] = math.random(1,15) -- Determines amount of fuel each petrol station in the world contains - DEFAULT: math.random(1,15)
gameplayVariables["spawnselection"] = false -- Allow player to select his spawnpoint - DEFAULT: false
gameplayVariables["explodedvehiclesrespawn"] = 1800000 -- When should exploded vehicles respawn? - DEFAULT: 1800000 (= 30 Min)
gameplayVariables["watervehiclerespawn"] = 1800000 -- When should vehicles which are submerged in water respawn? - DEFAULT: 1800000 (= 30 Min)

-- EXPERIMENTAL FEATURES
gameplayVariables["newzombiespawnsystem"] = false -- Experimental feature, zombies only spawn near loot - DEFAULT: false
gameplayVariables["zombiespawnradius"] = 20 -- If newzombiespawnsystem is set to true, determines the radius where zombies spawn around loot - DEFAULT: 20
gameplayVariables["maxzombiesperloot"] = 6 -- if newzombiespawnsystem is set to true, determines how many zombies should spawn around loot - DEFAULT: 6
gameplayVariables["MySQL"] = false -- if MySQL is set to true, MTA:DayZ will use MySQL to store accounts and items of players - DEFAULT: false
gameplayVariables["MySQL_host"] = "localhost" -- MySQL host IP, example: 127.0.0.1 or localhost
gameplayVariables["MySQL_port"] = "3306" -- MySQL port, example: 3306
gameplayVariables["MySQL_user"] = "root" -- MySQL user
gameplayVariables["MySQL_pass"] = "pass" -- MySQL pass
gameplayVariables["MySQL_DB"] = "dayz" -- MySQL Database name


-- WEIGHT SETTINGS
gameplayVariables["weight_food"] = math.random(25,35) -- The weight that a player takes after eating. DEFAULT: math.random(25,35)
Expand Down Expand Up @@ -60,3 +73,8 @@ gameplayVariables["czech_gunslots"] = 6 -- Weapon slots for Czech Backpack - DEF
-- SERVER BACKUP
gameplayVariables["backupenabled"] = true -- Whether or not backup should be enabled. Backup = saves all tents, accounts & vehicles. - DEFAULT: true - Set to false to disable backup.
gameplayVariables["backupinterval"] = 3600000 -- Number of milliseconds that should elapse before backup. Minimum: 50. - 1000 milliseconds = 1 second. - DEFAULT: 3600000ms (= 1 hour)

-- WEAPON SETTINGS
gameplayVariables["silencedDMRs"] = true

outputDebugString("[DayZ] cfgServer loaded")
13 changes: 13 additions & 0 deletions DayZ/configs/cfgSettings.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
--[[
#-----------------------------------------------------------------------------#
----* MTA DayZ: cfgSettings.lua *----
----* Original Author: Marwin W., Germany, Lower Saxony, Otterndorf *----
----* This gamemode is being developed by L, CiBeR96, 1B0Y *----
----* Type: SHARED *----
#-----------------------------------------------------------------------------#
]]

gameplayVariables["newclothingsystem"] = false -- Enables new clothing system with CJ, if disabled (=false), old skins are used - DEFAULT: false

outputDebugString("[DayZ] cfgSettings loaded")
32 changes: 27 additions & 5 deletions DayZ/gui/achievements/achievements.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--[[
#-----------------------------------------------------------------------------#
----* MTA DayZ: achievements.lua *----
----* MTA DayZ: achievements.lua *----
----* Original Author: Marwin W., Germany, Lower Saxony, Otterndorf *----
----* This gamemode is being developed by L, CiBeR96, 1B0Y *----
Expand All @@ -17,7 +17,7 @@ GUIEdit = {
function panel(state)
if not GUIEdit.staticimage[1] then
GUIEdit.staticimage[1] = guiCreateStaticImage(0.00, -0.15, 0.31, 0.14, "gui/achievements/icons/bg_achievements.png", true)
guiSetAlpha(GUIEdit.staticimage[1], 0.87)
guiSetAlpha(GUIEdit.staticimage[1], 1.00)
guiBringToFront(GUIEdit.staticimage[1])

GUIEdit.staticimage[2] = guiCreateStaticImage(0.04, 0.16, 0.29, 0.67, "gui/gear/items/white.png", true, GUIEdit.staticimage[1])
Expand Down Expand Up @@ -87,6 +87,7 @@ function giveAchievement(ID)
end

function check() -- Needs optimizing
if not getElementData(localPlayer,"logedin") then return end
local achievementsunlocked = getAchievements()
local counter = 0
for i, all in pairs(achievements) do
Expand All @@ -96,20 +97,41 @@ function check() -- Needs optimizing
if getElementData(getLocalPlayer(),cond[1]) > tonumber(cond[3]) then
counter = counter+1
end
elseif(cond[2] == "equal") then
elseif (cond[2] == "equal") then
if getElementData(getLocalPlayer(),cond[1]) == cond[3] then
counter = counter+1
end
elseif(cond[2] == "less" and cond[3]) then
elseif (cond[2] == "less" and cond[3]) then
if getElementData(getLocalPlayer(),cond[1]) < tonumber(cond[3]) then
counter = counter+1
end
elseif(cond[2] == "misc_zaxis") then
elseif (cond[2] == "misc_zaxis") then
local x,y,z = getElementPosition(localPlayer)
-- outputChatBox(assert(loadstring("return "..tostring(cond[1])))()) -- Don't load > 100 above ground (idk why)
if z >= 300 then
counter = counter+1
end
elseif (cond[2] == "clothes") then
local playerClothesShirt = getPedClothes(localPlayer,0)
local playerClothesHead = getPedClothes(localPlayer,1)
local playerClothesPants = getPedClothes(localPlayer,2)
if playerClothesShirt == "player_torso" then
if playerClothesHead == "player_face" then
if playerClothesPants == "player_legs" then
counter = counter+1
end
end
end
elseif cond[2] == "area" then
local x,y,z = getElementPosition(localPlayer)
if getDistanceBetweenPoints3D(x,y,z,213,1898,17) <= 25 then
counter = counter+1
end
elseif cond[2] == "carrier" then
local x,y,z = getElementPosition(localPlayer)
if getDistanceBetweenPoints3D(x,y,z,-1325,502,18) <= 25 then
counter = counter+1
end
end
if(counter == #all["conditions"]) then
giveAchievement(i)
Expand Down
5 changes: 3 additions & 2 deletions DayZ/gui/crosshair/crosshair.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ function setCrossHairSize(weapon)
end
addEventHandler("onClientPlayerWeaponFire",localPlayer,setCrossHairSize)

function drawCrosshair()
function drawCrosshair()
if getElementData(localPlayer,"fracturedArms") then return end
local hX,hY,hZ = getPedTargetEnd ( getLocalPlayer() )
local screenX1, screenY1 = getScreenFromWorldPosition ( hX,hY,hZ )
if screenX1 then
Expand Down Expand Up @@ -73,7 +74,7 @@ end
bindKey("aim_weapon", "both", function(key, state)
local weapon = getPedWeapon(getLocalPlayer())
if gameplayVariables["difficulty"] and gameplayVariables["difficulty"] == "hardcore" then return end
if weapon ~= 0 and weapon ~=1 then
if weapon ~= 0 and weapon ~=1 then
if state == "down" then
addEventHandler("onClientRender", root, drawCrosshair)
else
Expand Down
Loading

0 comments on commit 5b4b604

Please sign in to comment.