mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 03:01:31 +00:00
Update readme.md
This commit is contained in:
@@ -241,24 +241,26 @@ comment or delete
|
|||||||
* esx_ambulancejob: (`esx_ambulancejob/client/main.lua`)
|
* esx_ambulancejob: (`esx_ambulancejob/client/main.lua`)
|
||||||
### find:
|
### find:
|
||||||
```lua
|
```lua
|
||||||
AddEventHandler('playerSpawned', function()
|
AddEventHandler('esx:onPlayerSpawn', function()
|
||||||
IsDead = false
|
isDead = false
|
||||||
|
|
||||||
if FirstSpawn then
|
if firstSpawn then
|
||||||
exports.spawnmanager:setAutoSpawn(false) -- disable respawn
|
exports.spawnmanager:setAutoSpawn(false)
|
||||||
FirstSpawn = false
|
firstSpawn = false
|
||||||
|
|
||||||
ESX.TriggerServerCallback('esx_ambulancejob:getDeathStatus', function(isDead)
|
if Config.AntiCombatLog then
|
||||||
if isDead and Config.AntiCombatLog then
|
while not PlayerLoaded do
|
||||||
while not PlayerLoaded do
|
Citizen.Wait(1000)
|
||||||
Citizen.Wait(1000)
|
end
|
||||||
end
|
|
||||||
|
|
||||||
ESX.ShowNotification(_U('combatlog_message'))
|
ESX.TriggerServerCallback('esx_ambulancejob:getDeathStatus', function(shouldDie)
|
||||||
RemoveItemsAfterRPDeath()
|
if shouldDie then
|
||||||
end
|
ESX.ShowNotification(_U('combatlog_message'))
|
||||||
end)
|
RemoveItemsAfterRPDeath()
|
||||||
end
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -266,18 +268,21 @@ end)
|
|||||||
```lua
|
```lua
|
||||||
RegisterNetEvent('esx_ambulancejob:multicharacter')
|
RegisterNetEvent('esx_ambulancejob:multicharacter')
|
||||||
AddEventHandler('esx_ambulancejob:multicharacter', function()
|
AddEventHandler('esx_ambulancejob:multicharacter', function()
|
||||||
IsDead = false
|
IsDead = false
|
||||||
if Config.AntiCombatLog then
|
if firstSpawn then
|
||||||
while not PlayerLoaded do
|
firstSpawn = false
|
||||||
Citizen.Wait(1000)
|
if Config.AntiCombatLog then
|
||||||
end
|
while not PlayerLoaded do
|
||||||
ESX.TriggerServerCallback('esx_ambulancejob:getDeathStatus', function(isDead)
|
Citizen.Wait(1000)
|
||||||
if isDead and Config.AntiCombatLog then
|
end
|
||||||
ESX.ShowNotification(_U('combatlog_message'))
|
ESX.TriggerServerCallback('esx_ambulancejob:getDeathStatus', function(isDead)
|
||||||
RemoveItemsAfterRPDeath()
|
if isDead and Config.AntiCombatLog then
|
||||||
end
|
ESX.ShowNotification(_U('combatlog_message'))
|
||||||
end)
|
RemoveItemsAfterRPDeath()
|
||||||
end
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user