death: x,y,z variables instead of unpacked table

This commit is contained in:
ElPumpo
2019-02-22 18:51:27 +01:00
parent 7e66edc351
commit 63da91273d
+3 -3
View File
@@ -34,8 +34,8 @@ function PlayerKilledByPlayer(killerServerId, killerClientId, killerWeapon)
local distance = GetDistanceBetweenCoords(victimCoords, killerCoords, true)
local data = {
victimCoords = {table.unpack(victimCoords)},
killerCoords = {table.unpack(killerCoords)},
victimCoords = { x = ESX.Math.Round(victimCoords.x, 1), y = ESX.Math.Round(victimCoords.y, 1), z = ESX.Math.Round(victimCoords.z, 1) },
killerCoords = { x = ESX.Math.Round(killerCoords.x, 1), y = ESX.Math.Round(killerCoords.y, 1), z = ESX.Math.Round(killerCoords.z, 1) },
killedByPlayer = true,
deathCause = killerWeapon,
@@ -54,7 +54,7 @@ function PlayerKilled()
local victimCoords = GetEntityCoords(PlayerPedId())
local data = {
victimCoords = {table.unpack(victimCoords)},
victimCoords = { x = ESX.Math.Round(victimCoords.x, 1), y = ESX.Math.Round(victimCoords.y, 1), z = ESX.Math.Round(victimCoords.z, 1) },
killedByPlayer = false,
deathCause = GetPedCauseOfDeath(playerPed)