mirror of
https://codeberg.org/usrib/emeraldbank.git
synced 2025-01-08 22:37:36 +01:00
only update account if was not updated before
This commit is contained in:
parent
12cf211d6f
commit
cd4d58ecc6
@ -44,8 +44,12 @@ function emeraldbank.update_accounts()
|
||||
if not player or player.is_fake_player then return end
|
||||
local meta = player:get_meta()
|
||||
local bankemeralds = meta:get_int("emeraldbank:emerald")
|
||||
emeraldbank.add_emeralds(player, bankemeralds)
|
||||
meta:set_int("emeraldbank:emerald", 0)
|
||||
if bankemeralds > 0 then
|
||||
emeraldbank.add_emeralds(player, bankemeralds)
|
||||
meta:set_int("emeraldbank:emerald", 0)
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user