Fixing hp bugs
This commit is contained in:
1 parent
49501e32ce
commit
21bf3f0710
10 files changed
+38
-16
No files matched your search
@@ -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!")
|
||||
Reference in new issue
Block a user