From 151d7cfae9fa2a36b8bbaa90bffbd61117ac3aef Mon Sep 17 00:00:00 2001 From: mtadayz Date: Sat, 31 Mar 2018 11:54:41 +0200 Subject: [PATCH] Fixed backpack bug detailed in Issue #168 --- DayZ/handlers/players/server/backpack_player.lua | 3 ++- DayZ/init/players/login_init.lua | 2 +- DayZ/init/players/spawn_init.lua | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/DayZ/handlers/players/server/backpack_player.lua b/DayZ/handlers/players/server/backpack_player.lua index da5169a..68013fc 100644 --- a/DayZ/handlers/players/server/backpack_player.lua +++ b/DayZ/handlers/players/server/backpack_player.lua @@ -8,7 +8,8 @@ #-----------------------------------------------------------------------------# ]] -function addBackpackToPlayer(slots) +function addBackpackToPlayer(player,slots) + local source = player local x,y,z = getElementPosition(source) local rx,ry,rz = getElementRotation(source) if slots == 8 then diff --git a/DayZ/init/players/login_init.lua b/DayZ/init/players/login_init.lua index ce11481..9bdef37 100644 --- a/DayZ/init/players/login_init.lua +++ b/DayZ/init/players/login_init.lua @@ -395,7 +395,7 @@ function playerRegister(username, pass, player) --dbExec(skillsDB, "INSERT INTO skills (playerName,skillsData) VALUES(?,?)",username,toJSON(playerSkillsTable[player])) determineBloodType(player) - addBackpackToPlayer(playerStatusTable[player]["MAX_Slots"]) + addBackpackToPlayer(player,playerStatusTable[player]["MAX_Slots"]) if not gameplayVariables["newclothingsystem"] then playerStatusTable[player]["skin"] = 73 diff --git a/DayZ/init/players/spawn_init.lua b/DayZ/init/players/spawn_init.lua index c6a9332..a04cd80 100644 --- a/DayZ/init/players/spawn_init.lua +++ b/DayZ/init/players/spawn_init.lua @@ -66,7 +66,7 @@ function spawnDayZPlayer(player) determineBloodType(player) setPlayerFracturedBones(player,false) - addBackpackToPlayer(playerStatusTable[player]["MAX_Slots"]) + addBackpackToPlayer(player,playerStatusTable[player]["MAX_Slots"]) if not gameplayVariables["newclothingsystem"] then playerStatusTable[player]["skin"] = 73