🔧Installation
Here we're going to guide you in the installation of origen_police.
First we want you to know that our script only supports the following versions of the two most used frameworks, in older versions it may be usable but we do not provide support since the development focuses on the following versions:
ensure oxmysql
ensure qb-core
...(make sure to start the connectqueue before the script)
ensure origen_races
Now you have to insert the SQL files into your database:
Ambulance modifications
If your tunning script don't appear here you don't have to modify anything inside it.
Replace the gameEventTriggered
handler that is qb-ambulancejob/client/dead.lua
to this:
AddEventHandler('gameEventTriggered', function(event, data)
if event == "CEventNetworkEntityDamage" then
local victim, attacker, victimDied, weapon = data[1], data[2], data[4], data[7]
local IsPlayerInRace
if not IsEntityAPed(victim) then return end
if GetResourceState("origen_races") == "started" then
IsPlayerInRace = exports["origen_races"]:IsPlayerInRace()
else
IsPlayerInRace = false
end
if not (IsPlayerInRace) then
if victimDied and NetworkGetPlayerIndexFromPed(victim) == PlayerId() and IsEntityDead(PlayerPedId()) then
if not InLaststand then
SetLaststand(true)
elseif InLaststand and not isDead then
SetLaststand(false)
local playerid = NetworkGetPlayerIndexFromPed(victim)
local playerName = GetPlayerName(playerid) .. " " .. "("..GetPlayerServerId(playerid)..")" or Lang:t('info.self_death')
local killerId = NetworkGetPlayerIndexFromPed(attacker)
local killerName = GetPlayerName(killerId) .. " " .. "("..GetPlayerServerId(killerId)..")" or Lang:t('info.self_death')
local weaponLabel = (QBCore.Shared.Weapons and QBCore.Shared.Weapons[weapon] and QBCore.Shared.Weapons[weapon].label) or 'Unknown'
local weaponName = (QBCore.Shared.Weapons and QBCore.Shared.Weapons[weapon] and QBCore.Shared.Weapons[weapon].name) or 'Unknown'
TriggerServerEvent("qb-log:server:CreateLog", "death", Lang:t('logs.death_log_title', {playername = playerName, playerid = GetPlayerServerId(playerid)}), "red", Lang:t('logs.death_log_message', {killername = killerName, playername = playerName, weaponlabel = weaponLabel, weaponname = weaponName}))
deathTime = Config.DeathTime
OnDeath()
DeathTimer()
end
end
end
end
end)
Last updated