Fixing hp bugs

This commit is contained in:
Vladislav Khorev committed 2026-05-18 09:17:05 +03:00
1 parent 49501e32ce
commit 21bf3f0710
10 files changed
+38 -16

No files matched your search

+3 -2
View File
@@ -75,12 +75,13 @@ end
game_api.set_location_callbacks(
function()
print("Enter location dorm")
local hp = game_api.getIntValue("player_hp")
local hp = game_api.getFloatValue("player_hp")
game_api.set_player_hp(hp)
end,
function()
print("Exit location dorm")
local hp = game_api.get_player_hp()
game_api.setIntValue("player_hp", hp)
game_api.setFloatValue("player_hp", hp)
end
)
+3 -2
View File
@@ -38,12 +38,13 @@ game_api.set_darklands_callbacks(
game_api.set_location_callbacks(
function()
print("Enter location uni exterior")
local hp = game_api.getIntValue("player_hp")
local hp = game_api.getFloatValue("player_hp")
game_api.set_player_hp(hp)
end,
function()
print("Exit location uni exterior")
local hp = game_api.get_player_hp()
game_api.setIntValue("player_hp", hp)
game_api.setFloatValue("player_hp", hp)
end
)
+7 -5
View File
@@ -334,24 +334,26 @@ function setDay1setup()
game_api.set_npc_enabled(5, false)
end
game_api.set_location_callbacks(
function()
print("Enter location uni interior")
local hp = game_api.getIntValue("player_hp")
local hp = game_api.getFloatValue("player_hp")
game_api.set_player_hp(hp)
--[[
local need_sleep = game_api.getIntValue("need_sleep")
local day = game_api.getIntValue("day")
if (day==1) then
setDay1setup()
end
end]]
end,
function()
print("Exit location uni interior")
local hp = game_api.get_player_hp()
game_api.setIntValue("player_hp", hp)
game_api.setFloatValue("player_hp", hp)
end
)
print("Lua script loaded successfully!")