diff --git a/init.lua b/init.lua index 583aaf4..fb008f6 100644 --- a/init.lua +++ b/init.lua @@ -106,12 +106,12 @@ bounty.notify = function(player_name, amount) core.chat_send_all(player_name .. " no longer has a bounty") end 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 for key, value in pairs(bounty.prizes) do 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 $" .. - bounty.get_player_bounty(player_name).split(" ")[1] .. "00") + bounty.get_player_bounty(player_name):split(" ")[1] .. "00") break end end @@ -164,7 +164,11 @@ core.register_chatcommand('bounty', { if inv:contains_item("main", "currency:minegeld_100") then inv:remove_item("main", "currency:minegeld_100") bounty.increase(params, 100) + else + core.chat_send_player(name, "Insufficient funds: $100 minegeld needed") end + else + core.chat_send_player(name, "Player " .. params .. " does not exist") end end }) @@ -175,6 +179,8 @@ core.register_chatcommand('forgive', { func = function(name, params) if bounty.player_exists(params) then bounty.decrease(params, 100) + else + core.chat_send_player(name, "Player " .. params .. " does not exist") end end })