mirror of
https://codeberg.org/usrib/emeraldbank.git
synced 2025-01-24 06:51:32 +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
|
if not player or player.is_fake_player then return end
|
||||||
local meta = player:get_meta()
|
local meta = player:get_meta()
|
||||||
local bankemeralds = meta:get_int("emeraldbank:emerald")
|
local bankemeralds = meta:get_int("emeraldbank:emerald")
|
||||||
emeraldbank.add_emeralds(player, bankemeralds)
|
if bankemeralds > 0 then
|
||||||
meta:set_int("emeraldbank:emerald", 0)
|
emeraldbank.add_emeralds(player, bankemeralds)
|
||||||
|
meta:set_int("emeraldbank:emerald", 0)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user