forked from Simnation/Main
Change PlayerData
This commit is contained in:
parent
97177c4f08
commit
74a29fad89
2 changed files with 3 additions and 10 deletions
|
@ -38,7 +38,7 @@ end
|
||||||
|
|
||||||
function OpenChiefAddVehicleMenu()
|
function OpenChiefAddVehicleMenu()
|
||||||
local coords = GetEntityCoords(PlayerPedId())
|
local coords = GetEntityCoords(PlayerPedId())
|
||||||
|
local Player = QBCore.Functions.GetPlayerData()
|
||||||
local vehicles = GetGamePool('CVehicle')
|
local vehicles = GetGamePool('CVehicle')
|
||||||
local opt = {}
|
local opt = {}
|
||||||
|
|
||||||
|
|
|
@ -1,25 +1,18 @@
|
||||||
QBCore = exports['qb-core']:GetCoreObject()
|
QBCore = exports['qb-core']:GetCoreObject()
|
||||||
isInZone = false
|
isInZone = false
|
||||||
Zone = nil
|
Zone = nil
|
||||||
Player = nil
|
|
||||||
|
|
||||||
-- SetPosition
|
-- SetPosition
|
||||||
Citizen.CreateThread(function()
|
Citizen.CreateThread(function()
|
||||||
while Player == nil do
|
|
||||||
Wait(10)
|
|
||||||
Player = exports['qb-core']:GetPlayerData()
|
|
||||||
print(json.encode(Player))
|
|
||||||
end
|
|
||||||
Wait(1000)
|
|
||||||
while true do
|
while true do
|
||||||
local sleep = 1000
|
local sleep = 1000
|
||||||
local ped = PlayerPedId()
|
local ped = PlayerPedId()
|
||||||
local coords = GetEntityCoords(ped)
|
local coords = GetEntityCoords(ped)
|
||||||
local isInMarker = false
|
local isInMarker = false
|
||||||
|
local Player = QBCore.Functions.GetPlayerData()
|
||||||
|
|
||||||
|
|
||||||
|
if Player and Player.job then
|
||||||
if Player then
|
|
||||||
for k, v in pairs(Config.Zonen) do
|
for k, v in pairs(Config.Zonen) do
|
||||||
local dist = #(coords - v.Schluesselkasten)
|
local dist = #(coords - v.Schluesselkasten)
|
||||||
if dist < Config.DrawDistance and Player.job.name == v.Job then
|
if dist < Config.DrawDistance and Player.job.name == v.Job then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue