Bug Fix for Pilot Lives reset

This commit is contained in:
Ciaran Fisher 2016-04-24 21:54:41 +01:00
parent 43664ca4bc
commit 575143fec9

View File

@ -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