mirror of
https://github.com/a-bad-dev/simple-shooter-game.git
synced 2026-06-09 20:36:15 +00:00
Prevent Players from respawning in the middle of a match
This commit is contained in:
parent
fa83d73135
commit
59c5d2eb85
1 changed files with 3 additions and 1 deletions
|
|
@ -322,9 +322,11 @@ core.register_globalstep(function(dtime)
|
||||||
if timer >= 10 then
|
if timer >= 10 then
|
||||||
timer = 0
|
timer = 0
|
||||||
for _, player in pairs(core.get_connected_players()) do
|
for _, player in pairs(core.get_connected_players()) do
|
||||||
|
if alive_players[name] == "alive" then
|
||||||
player:set_hp(math.min(player:get_hp() + 2, 20))
|
player:set_hp(math.min(player:get_hp() + 2, 20))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
core.register_on_player_receive_fields(function(player, formname, fields)
|
core.register_on_player_receive_fields(function(player, formname, fields)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue