Make the sniper alot stronger and other changes

This commit is contained in:
IonicCheese 2025-12-09 23:49:27 -08:00
commit fa83d73135

View file

@ -43,7 +43,7 @@ function give_player_items(player)
inv:set_list("main", {})
if class == "sniper" then
inv:add_item("main", "ctf_ranged:svd_loaded")
inv:add_item("main", "ctf_ranged:m200_loaded")
inv:add_item("main", "default:sword_steel")
inv:add_item("main", "ctf_ranged:ammo 100")
elseif class == "assault" then
@ -155,6 +155,12 @@ function start_match()
player:set_hp(20)
end
for i = 10, 1, -1 do -- count down from 10 to 1 (yes you are free to set me on fire for this horrible solution)
core.after(20 + i, function()
core.chat_send_all(core.colorize("green", "Match starts in " .. (11 - i) .. " seconds."))
end)
end
core.after(30, function()
set_match_state("in_progress")
core.chat_send_all(core.colorize("green", "Match started!"))
@ -309,6 +315,18 @@ core.register_on_respawnplayer(function(player)
return true
end)
local timer = 0
core.register_globalstep(function(dtime)
timer = timer + dtime
if timer >= 10 then
timer = 0
for _, player in pairs(core.get_connected_players()) do
player:set_hp(math.min(player:get_hp() + 2, 20))
end
end
end)
core.register_on_player_receive_fields(function(player, formname, fields)
if match_state ~= "pre_match" then