From 63da91273d41856cd9dda12963f902404a3d7c9d Mon Sep 17 00:00:00 2001 From: ElPumpo Date: Fri, 22 Feb 2019 18:51:27 +0100 Subject: [PATCH] death: x,y,z variables instead of unpacked table --- client/modules/death.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/modules/death.lua b/client/modules/death.lua index a7015bdd..650f1e6a 100644 --- a/client/modules/death.lua +++ b/client/modules/death.lua @@ -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)