mirror of
https://github.com/ciribob/DCS-CSAR.git
synced 2025-10-29 16:56:07 +00:00
Bug Fix for Pilot Lives reset
This commit is contained in:
parent
43664ca4bc
commit
575143fec9
10
CSAR.lua
10
CSAR.lua
@ -192,6 +192,12 @@ csar.allowFARPRescue = true --allows pilot to be rescued by landing at a FARP or
|
||||
-- csar.resetAllPilotLives()
|
||||
--
|
||||
function csar.resetAllPilotLives()
|
||||
|
||||
for x, _pilot in pairs(csar.pilotLives) do
|
||||
|
||||
trigger.action.setUserFlag("CSAR_PILOT".._pilot:gsub('%W',''),csar.maxLives+1)
|
||||
end
|
||||
|
||||
csar.pilotLives = {}
|
||||
env.info("Pilot Lives Reset!")
|
||||
end
|
||||
@ -201,7 +207,11 @@ end
|
||||
-- csar.resetAllPilotLives()
|
||||
--
|
||||
function csar.resetPilotLife(_playerName)
|
||||
|
||||
csar.pilotLives[_playerName] = nil
|
||||
|
||||
trigger.action.setUserFlag("CSAR_PILOT".._playerName:gsub('%W',''),csar.maxLives+1)
|
||||
|
||||
env.info("Pilot life Reset!")
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user