feat(server/player): set coords function

This commit is contained in:
Andyyy7666
2023-07-09 03:38:02 +02:00
parent 1173cc2983
commit abad068eb7

View File

@@ -100,6 +100,13 @@ local function charCreateLicense(self, licenseType, expire)
if not self.source then return end
ActivePlayers[self.source] = self
end
local function charSetCoords(self, coords)
if not self.source or not coords then return end
local ped = GetPlayerPed(self.source)
if not DoesEntityExist(ped) then return end
SetEntityCoords(ped, coords.x, coords.y, coords.z)
return true
end
local function initPlayerTable(playerTable)
@@ -112,6 +119,7 @@ local function initPlayerTable(playerTable)
playerTable.save = charSave,
playerTable.unload = charUnload,
playerTable.createLicense = charCreateLicense
playerTable.setCoords = charSetCoords
return playerTable
end