More fixes

This commit is contained in:
2026-04-15 18:11:35 -04:00
parent db1b79cb37
commit 43c0661370

View File

@@ -106,12 +106,12 @@ bounty.notify = function(player_name, amount)
core.chat_send_all(player_name .. " no longer has a bounty") core.chat_send_all(player_name .. " no longer has a bounty")
end end
if type(bounty.prizes) == 'string' then if type(bounty.prizes) == 'string' then
core.chat_send_all(player_name .. "'s bounty is $" .. bounty.get_player_bounty(player_name).split(" ")[1] .. "00") core.chat_send_all(player_name .. "'s bounty is $" .. bounty.get_player_bounty(player_name):split(" ")[1] .. "00")
else else
for key, value in pairs(bounty.prizes) do for key, value in pairs(bounty.prizes) do
if bounty.data[player_name] > key and bounty.data[player_name] - amount < key then if bounty.data[player_name] > key and bounty.data[player_name] - amount < key then
core.chat_send_all(player_name .. "'s bounty has changed to $" .. core.chat_send_all(player_name .. "'s bounty has changed to $" ..
bounty.get_player_bounty(player_name).split(" ")[1] .. "00") bounty.get_player_bounty(player_name):split(" ")[1] .. "00")
break break
end end
end end
@@ -164,7 +164,11 @@ core.register_chatcommand('bounty', {
if inv:contains_item("main", "currency:minegeld_100") then if inv:contains_item("main", "currency:minegeld_100") then
inv:remove_item("main", "currency:minegeld_100") inv:remove_item("main", "currency:minegeld_100")
bounty.increase(params, 100) bounty.increase(params, 100)
else
core.chat_send_player(name, "Insufficient funds: $100 minegeld needed")
end end
else
core.chat_send_player(name, "Player " .. params .. " does not exist")
end end
end end
}) })
@@ -175,6 +179,8 @@ core.register_chatcommand('forgive', {
func = function(name, params) func = function(name, params)
if bounty.player_exists(params) then if bounty.player_exists(params) then
bounty.decrease(params, 100) bounty.decrease(params, 100)
else
core.chat_send_player(name, "Player " .. params .. " does not exist")
end end
end end
}) })