βοΈOptional edits
These edits are not required but will make your live easier as a K9 unit! I highly recommend doing at least the qb-ambulancejob edits.
qb-ambulancejob
Go to
client > dead.luaReplace the OnDeath function to this
function OnDeath()
if not isDead then
isDead = true
TriggerServerEvent('hospital:server:SetDeathStatus', true)
TriggerServerEvent('InteractSound_SV:PlayOnSource', 'demo', 0.1)
local player = PlayerPedId()
while GetEntitySpeed(player) > 0.5 or IsPedRagdoll(player) do
Wait(10)
end
if isDead then
local pos = GetEntityCoords(player)
local heading = GetEntityHeading(player)
local ped = PlayerPedId()
if IsPedInAnyVehicle(ped) then
local veh = GetVehiclePedIsIn(ped)
local vehseats = GetVehicleModelNumberOfSeats(GetHashKey(GetEntityModel(veh)))
for i = -1, vehseats do
local occupant = GetPedInVehicleSeat(veh, i)
if occupant == ped then
NetworkResurrectLocalPlayer(pos.x, pos.y, pos.z + 0.5, heading, true, false)
SetPedIntoVehicle(ped, veh, i)
end
end
else
NetworkResurrectLocalPlayer(pos.x, pos.y, pos.z + 0.5, heading, true, false)
end
SetEntityInvincible(player, true)
SetEntityHealth(player, GetEntityMaxHealth(player))
if IsPedInAnyVehicle(player, false) then
loadAnimDict('veh@low@front_ps@idle_duck')
TaskPlayAnim(player, 'veh@low@front_ps@idle_duck', 'sit', 1.0, 1.0, -1, 1, 0, 0, 0, 0)
else
if exports['lumio-k9']:HasK9Model(GetEntityModel(ped)) then
loadAnimDict("creatures@dog@move")
TaskPlayAnim(ped, "creatures@dog@move", "dying", 8.0, 8.0, -1, 2, 0, 0, 0, 0)
else
loadAnimDict(deadAnimDict)
TaskPlayAnim(player, deadAnimDict, deadAnim, 1.0, 1.0, -1, 1, 0, 0, 0, 0)
end
end
TriggerServerEvent('hospital:server:ambulanceAlert', Lang:t('info.civ_died'))
end
end
end
Then scroll a bit down to around line 131 and replace it fully with this
If using qb-target
In data > bones.lua at the bottom replace this
With this
Last updated
