Config.MessagePosition = { respawn = { x =0.5, y =0.8 }, bleedout = { x =0.5, y =0.8 }, distress = { x =0.5, y =0.86 },}
--Make sure you have the following in String.lua Strings = { respawn_available_in ='Respawn available in ~r~%s minutes %s seconds~s~\n', respawn_bleedout_in ='You will bleed out in ~r~%s minutes %s seconds~s~\n', respawn_bleedout_prompt ='Hold [~r~E~s~] to respawn', distress_send ='Press [~r~G~s~] to send distress signal to EMS',}
local function canOpenTarget(ped)
local player = NetworkGetPlayerIndexFromPed(ped)
local playerID = GetPlayerServerId(player)
return IsPedFatallyInjured(ped)
or Player(playerID).state.dead
or IsEntityPlayingAnim(ped, 'dead', 'dead_a', 3)
or IsPedCuffed(ped)
or IsEntityPlayingAnim(ped, 'mp_arresting', 'idle', 3)
or IsEntityPlayingAnim(ped, 'missminuteman_1ig_2', 'handsup_base', 3)
or IsEntityPlayingAnim(ped, 'missminuteman_1ig_2', 'handsup_enter', 3)
or IsEntityPlayingAnim(ped, 'random@mugging3', 'handsup_standing_base', 3)
end
This snippet is intended for Quasar Inventory V2!
Navigate to qs-inventory/client/custom/framework and select lua file that corresponds with your framework.
Find function named function checkEntityDead(id, entity).
It may look something like this:
function checkEntityDead(id, entity)
local check = false
if GetEntityHealth(entity) <= 1 then
check = true
end
return check
end
Replace function with this:
function checkEntityDead(id, entity)
local check = false
local cId = NetworkGetPlayerIndexFromPed(entity)
local sId = GetPlayerServerId(cId)
local state = Player(sId).state
if GetEntityHealth(entity) < 2 or state.dead or state.isDead or state.laststand then
check = true
end
return check
end