Change PlayerData

This commit is contained in:
Miho931 2025-06-11 10:56:06 +02:00
parent 97177c4f08
commit 74a29fad89
2 changed files with 3 additions and 10 deletions

View file

@ -38,7 +38,7 @@ end
function OpenChiefAddVehicleMenu()
local coords = GetEntityCoords(PlayerPedId())
local Player = QBCore.Functions.GetPlayerData()
local vehicles = GetGamePool('CVehicle')
local opt = {}

View file

@ -1,25 +1,18 @@
QBCore = exports['qb-core']:GetCoreObject()
isInZone = false
Zone = nil
Player = nil
-- SetPosition
Citizen.CreateThread(function()
while Player == nil do
Wait(10)
Player = exports['qb-core']:GetPlayerData()
print(json.encode(Player))
end
Wait(1000)
while true do
local sleep = 1000
local ped = PlayerPedId()
local coords = GetEntityCoords(ped)
local isInMarker = false
local Player = QBCore.Functions.GetPlayerData()
if Player then
if Player and Player.job then
for k, v in pairs(Config.Zonen) do
local dist = #(coords - v.Schluesselkasten)
if dist < Config.DrawDistance and Player.job.name == v.Job then