mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-30 17:58:54 +00:00
why was this a thing, smh
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user