mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-30 17:58:54 +00:00
Check for if player is concious, fixed missing translations
This commit is contained in:
+31
-19
@@ -339,7 +339,6 @@ function OpenMobileAmbulanceActionsMenu()
|
||||
local health = GetEntityHealth(closestPlayerPed)
|
||||
|
||||
if health == 0 then
|
||||
menu.close()
|
||||
local playerPed = GetPlayerPed(-1)
|
||||
|
||||
ESX.ShowNotification(_U('revive_inprogress'))
|
||||
@@ -372,16 +371,22 @@ function OpenMobileAmbulanceActionsMenu()
|
||||
else
|
||||
ESX.TriggerServerCallback('esx_ambulancejob:getItemAmount', function(qtty)
|
||||
if qtty > 0 then
|
||||
menu.close()
|
||||
local playerPed = GetPlayerPed(-1)
|
||||
ESX.ShowNotification(_U('heal_inprogress'))
|
||||
TaskStartScenarioInPlace(playerPed, 'CODE_HUMAN_MEDIC_TEND_TO_DEAD', 0, true)
|
||||
Citizen.Wait(10000)
|
||||
ClearPedTasks(playerPed)
|
||||
local closestPlayerPed = GetPlayerPed(closestPlayer)
|
||||
local health = GetEntityHealth(closestPlayerPed)
|
||||
|
||||
TriggerServerEvent('esx_ambulancejob:removeItem', 'bandage')
|
||||
TriggerServerEvent('esx_ambulancejob:heal', GetPlayerServerId(closestPlayer), 'small')
|
||||
ESX.ShowNotification(_U('heal_complete'))
|
||||
if health > 0 then
|
||||
local playerPed = GetPlayerPed(-1)
|
||||
ESX.ShowNotification(_U('heal_inprogress'))
|
||||
TaskStartScenarioInPlace(playerPed, 'CODE_HUMAN_MEDIC_TEND_TO_DEAD', 0, true)
|
||||
Citizen.Wait(10000)
|
||||
ClearPedTasks(playerPed)
|
||||
|
||||
TriggerServerEvent('esx_ambulancejob:removeItem', 'bandage')
|
||||
TriggerServerEvent('esx_ambulancejob:heal', GetPlayerServerId(closestPlayer), 'small')
|
||||
ESX.ShowNotification(_U('heal_complete', GetPlayerName(closestPlayer)))
|
||||
else
|
||||
ESX.ShowNotification(_U('player_not_conscious'))
|
||||
end
|
||||
else
|
||||
ESX.ShowNotification(_U('not_enough_bandage'))
|
||||
end
|
||||
@@ -395,15 +400,22 @@ function OpenMobileAmbulanceActionsMenu()
|
||||
else
|
||||
ESX.TriggerServerCallback('esx_ambulancejob:getItemAmount', function(qtty)
|
||||
if qtty > 0 then
|
||||
menu.close()
|
||||
local playerPed = GetPlayerPed(-1)
|
||||
ESX.ShowNotification(_U('heal_inprogress'))
|
||||
TaskStartScenarioInPlace(playerPed, 'CODE_HUMAN_MEDIC_TEND_TO_DEAD', 0, true)
|
||||
Citizen.Wait(10000)
|
||||
ClearPedTasks(playerPed)
|
||||
TriggerServerEvent('esx_ambulancejob:removeItem', 'medikit')
|
||||
TriggerServerEvent('esx_ambulancejob:heal', GetPlayerServerId(closestPlayer), 'big')
|
||||
ESX.ShowNotification(_U('heal_complete'))
|
||||
local closestPlayerPed = GetPlayerPed(closestPlayer)
|
||||
local health = GetEntityHealth(closestPlayerPed)
|
||||
|
||||
if health > 0 then
|
||||
local playerPed = GetPlayerPed(-1)
|
||||
ESX.ShowNotification(_U('heal_inprogress'))
|
||||
TaskStartScenarioInPlace(playerPed, 'CODE_HUMAN_MEDIC_TEND_TO_DEAD', 0, true)
|
||||
Citizen.Wait(10000)
|
||||
ClearPedTasks(playerPed)
|
||||
|
||||
TriggerServerEvent('esx_ambulancejob:removeItem', 'medikit')
|
||||
TriggerServerEvent('esx_ambulancejob:heal', GetPlayerServerId(closestPlayer), 'big')
|
||||
ESX.ShowNotification(_U('heal_complete', GetPlayerName(closestPlayer)))
|
||||
else
|
||||
ESX.ShowNotification(_U('player_not_conscious'))
|
||||
end
|
||||
else
|
||||
ESX.ShowNotification(_U('not_enough_medikit'))
|
||||
end
|
||||
|
||||
@@ -14,9 +14,12 @@ Locales['br'] = {
|
||||
['revive_inprogress'] = 'Reanimação em andamento',
|
||||
['revive_complete'] = 'você ressuscitou ~y~%s~s~',
|
||||
['revive_complete_award'] = 'você ressuscitou ~y~%s~s~, ~g~$%s~s~',
|
||||
['heal_inprogress'] = 'you are healing!',
|
||||
['heal_complete'] = 'you have healed ~y~%s~s~',
|
||||
['no_players'] = 'Nenhum jogador nas proximidades',
|
||||
['no_vehicles'] = 'Sem veículos nas proximidades',
|
||||
['player_not_unconscious'] = 'Não está inconsciente',
|
||||
['player_not_conscious'] = 'that player is not conscious!',
|
||||
-- Boss Menu
|
||||
['deposit_society'] = 'Depositar dinheiro',
|
||||
['withdraw_society'] = 'Retirar dinheiro da empresa',
|
||||
|
||||
@@ -14,9 +14,12 @@ Locales['de'] = {
|
||||
['revive_inprogress'] = 'wiederbeleben im Gange',
|
||||
['revive_complete'] = 'du wurdest wiederbelebt ~y~%s~s~',
|
||||
['revive_complete_award'] = 'du wurdest wiederbelebt ~y~%s~s~, ~g~$%s~s~',
|
||||
['heal_inprogress'] = 'you are healing!',
|
||||
['heal_complete'] = 'you have healed ~y~%s~s~',
|
||||
['no_players'] = 'keine Spieler in der Nähe',
|
||||
['no_vehicles'] = 'keine Fahrzeuge in der Nähe',
|
||||
['player_not_unconscious'] = 'ist nicht im Koma',
|
||||
['player_not_conscious'] = 'that player is not conscious!',
|
||||
-- Boss Menu
|
||||
['deposit_society'] = 'Notdienst einzahlen',
|
||||
['withdraw_society'] = 'Notdienst abheben',
|
||||
|
||||
@@ -14,9 +14,12 @@ Locales['en'] = {
|
||||
['revive_inprogress'] = 'a revive is in progress!',
|
||||
['revive_complete'] = 'you have revived ~y~%s~s~',
|
||||
['revive_complete_award'] = 'you have revived ~y~%s~s~ and earned ~g~$%s~s~!',
|
||||
['heal_inprogress'] = 'you are healing!',
|
||||
['heal_complete'] = 'you have healed ~y~%s~s~',
|
||||
['no_players'] = 'no players nearby',
|
||||
['no_vehicles'] = 'no vehicles nearby',
|
||||
['player_not_unconscious'] = 'that player is not unconscious!',
|
||||
['player_not_conscious'] = 'that player is not conscious!',
|
||||
-- Boss Menu
|
||||
['deposit_society'] = 'eMS Deposit',
|
||||
['withdraw_society'] = 'eMS Withdraw',
|
||||
|
||||
@@ -14,9 +14,12 @@ Locales['es'] = {
|
||||
['revive_inprogress'] = 'reanimación en curso',
|
||||
['revive_complete'] = 'has sido reanimado ~y~%s~s~',
|
||||
['revive_complete_award'] = 'has sido reanimado ~y~%s~s~, ~g~$%s~s~',
|
||||
['heal_inprogress'] = 'you are healing!',
|
||||
['heal_complete'] = 'you have healed ~y~%s~s~',
|
||||
['no_players'] = 'ningún jugador cerca',
|
||||
['no_vehicles'] = 'ningún vehículo cerca',
|
||||
['player_not_unconscious'] = 'n\'estás inconsciente',
|
||||
['player_not_conscious'] = 'that player is not conscious!',
|
||||
-- oss Menu
|
||||
['deposit_society'] = 'depositar dinero',
|
||||
['withdraw_society'] = 'retirar dinero',
|
||||
|
||||
@@ -14,9 +14,12 @@ Locales['fr'] = {
|
||||
['revive_inprogress'] = 'réanimation en cours',
|
||||
['revive_complete'] = 'vous avez réanimé ~y~%s~s~',
|
||||
['revive_complete_award'] = 'vous avez réanimé ~y~%s~s~, ~g~$%s~s~',
|
||||
['heal_inprogress'] = 'you are healing!',
|
||||
['heal_complete'] = 'you have healed ~y~%s~s~',
|
||||
['no_players'] = 'aucun joueur à proximité',
|
||||
['no_vehicles'] = 'aucun véhicule à proximité',
|
||||
['player_not_unconscious'] = 'n\'est pas inconscient',
|
||||
['player_not_conscious'] = 'that player is not conscious!',
|
||||
-- Boss Menu
|
||||
['deposit_society'] = 'déposer argent',
|
||||
['withdraw_society'] = 'retirer argent société',
|
||||
|
||||
+4
-1
@@ -14,9 +14,12 @@ Locales['sv'] = {
|
||||
['revive_inprogress'] = 'Återupplivning pågår...',
|
||||
['revive_complete'] = 'du har återupplivat ~y~%s~s~, bra jobbat!',
|
||||
['revive_complete_award'] = 'du har återupplivat ~y~%s~s~ och tjärnat ~g~$%s~s~ i processen, bra jobbat!',
|
||||
['heal_inprogress'] = 'du behandlar patienten!',
|
||||
['heal_complete'] = 'du har behandlat ~y~%s~s~',
|
||||
['no_players'] = 'Inga spelare i närheten!',
|
||||
['no_vehicles'] = 'Inga fordon i närheten!',
|
||||
['player_not_unconscious'] = 'spelaren är inte medvetslös!',
|
||||
['player_not_conscious'] = 'spelaren är inte vid medvetande!',
|
||||
-- Boss Menu
|
||||
['deposit_society'] = 'Sjukvårdens insättning',
|
||||
['withdraw_society'] = 'Sjukvårdens uttagning',
|
||||
@@ -55,6 +58,6 @@ Locales['sv'] = {
|
||||
['used_bandage'] = 'Du har använt ~y~1x~s~ ~b~Bandage~s~',
|
||||
['not_enough_medikit'] = 'Du har inget ~b~Medecinkit~w~.',
|
||||
['not_enough_bandage'] = 'Du har inget ~b~Bandage~w~.',
|
||||
['healed'] = 'Du har blivit återupplivad.',
|
||||
['healed'] = 'dina skador har blivit behandlade.',
|
||||
-- Misc
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user