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

Commit 5b4b604

Browse files
authored
Merge pull request #85 from ciber96/master
Merge master to stable
2 parents 3b3981e + 0617c12 commit 5b4b604

75 files changed

Lines changed: 3294 additions & 2416 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

DayZ/configs/cfgClient.lua

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
]]
1010

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

1414
-- PARAMETER
15-
gameplayVariables["zombiedamage"] = 650 -- Damage done by zombies - DEFAULT: 650, for consistent damage, remove math.random(400,900) and insert value (EXAMPLE: 1000)
16-
gameplayVariables["waterdamage"] = math.random(5500,7100) -- Damage received by a player every 4 seconds when it is under water. DEFAULT: math.random(5500,7100).
15+
gameplayVariables["zombiedamage"] = 650 -- Damage done by zombies - DEFAULT: 650
16+
gameplayVariables["waterdamage"] = math.random(5500,7100) -- Damage dealt when drowning - DEFAULT: math.random(5500,7100)
1717

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

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

29-
-- PAIN SHAKE LEVEL
30-
gameplayVariables["painshakelevel"] = 150 -- How much should the camera shake when in pain. DEFAULT: 150, value can be from 0 - 255
29+
-- PAIN SHAKE
30+
gameplayVariables["painshakesway"] = true -- Determines if camera should sway from left to right or shake violently - DEFAULT: true (= camera will sway)
31+
gameplayVariables["painshakelevel"] = 150 -- How much should the camera shake when in pain. DEFAULT: 150, value can be from 0 - 255
32+
33+
-- DEBUG MONITOR OPTION
34+
gameplayVariables["debugmonitorenabled"] = false --Debug Monitor available to the players? DEFAULT: false
35+
36+
outputDebugString("[DayZ] cfgClient loaded")

DayZ/configs/cfgLoot.lua

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#-----------------------------------------------------------------------------#
99
]]
1010

11-
outputDebugString("[DayZ] cfgLoot loaded")
11+
1212

1313
-- SPAWNPOINTS (ITEMS)
1414
pickupPositions = {
@@ -2713,4 +2713,18 @@ pickupPositions = {
27132713
{978.47210693359,-678.15814208984,131.05409240723},
27142714
{965.54089355469,-674.3095703125,131.05401611328},
27152715
},
2716-
}
2716+
}
2717+
2718+
2719+
zombieBuildingSpawn = {
2720+
-- {zombieSpawnChance,minRoaming,maxRoaming}
2721+
{"Residential",0.3,0,3},
2722+
{"Farm",0.3,0,3},
2723+
{"Supermarket",0.4,2,6},
2724+
{"Military",0.3,0,6},
2725+
{"Industrial",0.3,0,2},
2726+
}
2727+
2728+
2729+
2730+
outputDebugString("[DayZ] cfgLoot loaded")

DayZ/configs/cfgNutritions.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#-----------------------------------------------------------------------------#
99
]]
1010

11-
outputDebugString("[DayZ] cfgNutritions loaded")
1211

1312
gameplayVariables["nutritions"] = {
1413
-- {Name,bloodRegen,calories,food,water,temperature},
@@ -33,4 +32,6 @@ gameplayVariables["nutritions"] = {
3332
{"Soda Can (Mountain Dew)",0,90,0,500,0},
3433
{"Can (Milk)",100,0,380,420,0},
3534
{"Cooked Meat",1000,817,900,0,2},
36-
}
35+
}
36+
37+
outputDebugString("[DayZ] cfgNutritions loaded")

DayZ/configs/cfgSecurity.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
#-----------------------------------------------------------------------------#
1010
]]
1111

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

DayZ/configs/cfgServer.lua

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
#-----------------------------------------------------------------------------#
99
]]
1010

11-
outputDebugString("[DayZ] cfgServer loaded")
12-
1311
shownInfos["nomag"] = "No ammo left for this weapon!"
1412
shownInfos["youconsumed"] = "You consumed"
1513
shownInfos["needwatersource"] = "You have to be inside a body of water!"
@@ -18,21 +16,36 @@ shownInfos["noradio"] = "You have no Radio Device!"
1816

1917
--GAMEPLAY
2018
gameplayVariables["zombieblood"] = 4500 -- Zombie Blood/Health - DEFAULT: 4500
21-
gameplayVariables["loseWire"] = 1000 -- Amount of losing blood when hitting a Wirefence that's not yours. DEFAULT: 1000
19+
gameplayVariables["loseWire"] = 1000 -- Amount of losing blood when hitting a Wirefence that's not yours - DEFAULT: 1000
2220
gameplayVariables["playerzombies"] = 6 -- At what amount of zombies should they respawn? - DEFAULT: 6
2321
gameplayVariables["amountzombies"] = 3 -- How often should the script iterate through zombie spawning (= how many zombies should spawn)? - DEFAULT: 3
2422
gameplayVariables["temperaturewater"] = -0.1 -- Amount of temperature to be lost when in water - DEFAULT: -0.01
2523
gameplayVariables["temperaturesprint"] = 0.005 -- Amount of temperature to be gained when sprinting - DEFAULT: 0.005
26-
gameplayVariables["itemrespawntimer"] = 14400000 -- Number of milliseconds that should elapse before the items will respawn. Note: You can also do math on the number.
24+
gameplayVariables["itemrespawntimer"] = 14400000 -- Number of milliseconds that should elapse before the items will respawn. Note: You can also do math on the number
2725
gameplayVariables["autostartaddons"] = true -- Allow the gamemode to autostart resources with addon_ prefix
2826
gameplayVariables["enableprone"] = true --Whether or not prone is enabled for players - DEFAULT: true
2927
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
3028
gameplayVariables["fuelEnabled"] = true -- Is the vehicle fuel enabled? - DEFAULT: true
31-
gameplayVariables["realtime"] = false -- Enables/Disables real time use. When disabled, gameplayVariables["customtime"] is in effect - DEFAULT: false
29+
gameplayVariables["realtime"] = false -- Enables/Disables real time use. When set to false, gameplayVariables["customtime"] is in effect - DEFAULT: false
3230
gameplayVariables["customtime"] = 10000 -- How long should an ingame minute be (in ms)? Example: 10000ms (10s) realtime = 1 minute gametime - DEFAULT: 10000
3331
gameplayVariables["pingkick"] = true -- Should the ping kicker be enabled? - DEFAULT: true
3432
gameplayVariables["maxzombiesglobal"] = 600 -- Not in use
35-
gameplayVariables["maxPetrolFuelAmount"] = math.random(1,15) -- Determine amount of fuel each petrol station in the world contains - DEFAULT: math.random(1,15)
33+
gameplayVariables["maxPetrolFuelAmount"] = math.random(1,15) -- Determines amount of fuel each petrol station in the world contains - DEFAULT: math.random(1,15)
34+
gameplayVariables["spawnselection"] = false -- Allow player to select his spawnpoint - DEFAULT: false
35+
gameplayVariables["explodedvehiclesrespawn"] = 1800000 -- When should exploded vehicles respawn? - DEFAULT: 1800000 (= 30 Min)
36+
gameplayVariables["watervehiclerespawn"] = 1800000 -- When should vehicles which are submerged in water respawn? - DEFAULT: 1800000 (= 30 Min)
37+
38+
-- EXPERIMENTAL FEATURES
39+
gameplayVariables["newzombiespawnsystem"] = false -- Experimental feature, zombies only spawn near loot - DEFAULT: false
40+
gameplayVariables["zombiespawnradius"] = 20 -- If newzombiespawnsystem is set to true, determines the radius where zombies spawn around loot - DEFAULT: 20
41+
gameplayVariables["maxzombiesperloot"] = 6 -- if newzombiespawnsystem is set to true, determines how many zombies should spawn around loot - DEFAULT: 6
42+
gameplayVariables["MySQL"] = false -- if MySQL is set to true, MTA:DayZ will use MySQL to store accounts and items of players - DEFAULT: false
43+
gameplayVariables["MySQL_host"] = "localhost" -- MySQL host IP, example: 127.0.0.1 or localhost
44+
gameplayVariables["MySQL_port"] = "3306" -- MySQL port, example: 3306
45+
gameplayVariables["MySQL_user"] = "root" -- MySQL user
46+
gameplayVariables["MySQL_pass"] = "pass" -- MySQL pass
47+
gameplayVariables["MySQL_DB"] = "dayz" -- MySQL Database name
48+
3649

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

DayZ/configs/cfgSettings.lua

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
--[[
2+
#-----------------------------------------------------------------------------#
3+
----* MTA DayZ: cfgSettings.lua *----
4+
----* Original Author: Marwin W., Germany, Lower Saxony, Otterndorf *----
5+
6+
----* This gamemode is being developed by L, CiBeR96, 1B0Y *----
7+
----* Type: SHARED *----
8+
#-----------------------------------------------------------------------------#
9+
]]
10+
11+
gameplayVariables["newclothingsystem"] = false -- Enables new clothing system with CJ, if disabled (=false), old skins are used - DEFAULT: false
12+
13+
outputDebugString("[DayZ] cfgSettings loaded")

DayZ/gui/achievements/achievements.lua

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--[[
22
#-----------------------------------------------------------------------------#
3-
----* MTA DayZ: achievements.lua *----
3+
----* MTA DayZ: achievements.lua *----
44
----* Original Author: Marwin W., Germany, Lower Saxony, Otterndorf *----
55
66
----* This gamemode is being developed by L, CiBeR96, 1B0Y *----
@@ -17,7 +17,7 @@ GUIEdit = {
1717
function panel(state)
1818
if not GUIEdit.staticimage[1] then
1919
GUIEdit.staticimage[1] = guiCreateStaticImage(0.00, -0.15, 0.31, 0.14, "gui/achievements/icons/bg_achievements.png", true)
20-
guiSetAlpha(GUIEdit.staticimage[1], 0.87)
20+
guiSetAlpha(GUIEdit.staticimage[1], 1.00)
2121
guiBringToFront(GUIEdit.staticimage[1])
2222

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

8989
function check() -- Needs optimizing
90+
if not getElementData(localPlayer,"logedin") then return end
9091
local achievementsunlocked = getAchievements()
9192
local counter = 0
9293
for i, all in pairs(achievements) do
@@ -96,20 +97,41 @@ function check() -- Needs optimizing
9697
if getElementData(getLocalPlayer(),cond[1]) > tonumber(cond[3]) then
9798
counter = counter+1
9899
end
99-
elseif(cond[2] == "equal") then
100+
elseif (cond[2] == "equal") then
100101
if getElementData(getLocalPlayer(),cond[1]) == cond[3] then
101102
counter = counter+1
102103
end
103-
elseif(cond[2] == "less" and cond[3]) then
104+
elseif (cond[2] == "less" and cond[3]) then
104105
if getElementData(getLocalPlayer(),cond[1]) < tonumber(cond[3]) then
105106
counter = counter+1
106107
end
107-
elseif(cond[2] == "misc_zaxis") then
108+
elseif (cond[2] == "misc_zaxis") then
108109
local x,y,z = getElementPosition(localPlayer)
109110
-- outputChatBox(assert(loadstring("return "..tostring(cond[1])))()) -- Don't load > 100 above ground (idk why)
110111
if z >= 300 then
111112
counter = counter+1
112113
end
114+
elseif (cond[2] == "clothes") then
115+
local playerClothesShirt = getPedClothes(localPlayer,0)
116+
local playerClothesHead = getPedClothes(localPlayer,1)
117+
local playerClothesPants = getPedClothes(localPlayer,2)
118+
if playerClothesShirt == "player_torso" then
119+
if playerClothesHead == "player_face" then
120+
if playerClothesPants == "player_legs" then
121+
counter = counter+1
122+
end
123+
end
124+
end
125+
elseif cond[2] == "area" then
126+
local x,y,z = getElementPosition(localPlayer)
127+
if getDistanceBetweenPoints3D(x,y,z,213,1898,17) <= 25 then
128+
counter = counter+1
129+
end
130+
elseif cond[2] == "carrier" then
131+
local x,y,z = getElementPosition(localPlayer)
132+
if getDistanceBetweenPoints3D(x,y,z,-1325,502,18) <= 25 then
133+
counter = counter+1
134+
end
113135
end
114136
if(counter == #all["conditions"]) then
115137
giveAchievement(i)

DayZ/gui/crosshair/crosshair.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ function setCrossHairSize(weapon)
3939
end
4040
addEventHandler("onClientPlayerWeaponFire",localPlayer,setCrossHairSize)
4141

42-
function drawCrosshair()
42+
function drawCrosshair()
43+
if getElementData(localPlayer,"fracturedArms") then return end
4344
local hX,hY,hZ = getPedTargetEnd ( getLocalPlayer() )
4445
local screenX1, screenY1 = getScreenFromWorldPosition ( hX,hY,hZ )
4546
if screenX1 then
@@ -73,7 +74,7 @@ end
7374
bindKey("aim_weapon", "both", function(key, state)
7475
local weapon = getPedWeapon(getLocalPlayer())
7576
if gameplayVariables["difficulty"] and gameplayVariables["difficulty"] == "hardcore" then return end
76-
if weapon ~= 0 and weapon ~=1 then
77+
if weapon ~= 0 and weapon ~=1 then
7778
if state == "down" then
7879
addEventHandler("onClientRender", root, drawCrosshair)
7980
else

0 commit comments

Comments
 (0)