why was this a thing, smh

This commit is contained in:
Mycroft
2022-08-28 18:01:15 +01:00
parent d942fa195e
commit 2eee7d6a8b
2 changed files with 7 additions and 6 deletions
-5
View File
@@ -267,11 +267,6 @@ if not Config.OxInventory then
end)
end
RegisterNetEvent('esx:teleport')
AddEventHandler('esx:teleport', function(coords)
ESX.Game.Teleport(ESX.PlayerData.ped, coords)
end)
RegisterNetEvent('esx:setJob')
AddEventHandler('esx:setJob', function(Job)
if Config.EnableHud then
+7 -1
View File
@@ -26,7 +26,13 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
function self.setCoords(coords)
self.updateCoords(coords)
self.triggerEvent('esx:teleport', coords)
local Ped = GetPlayerPed(self.source)
local vector = type(coords) == "vector4" and coords or type(coords) == "vector3" and vector4(coords, 0.0) or
vec(coords.x, coords.y, coords.z, coords.heading or 0.0)
SetEntityCoords(Ped, vector.xyz, false, false, false, false)
SetEntityHeading(Ped, vector.w)
end
end
function self.updateCoords(coords)