function UTK:GetInfo()
ESX.TriggerServerCallback("utk_oh:GetData", function(output)
self.info = output
self:HandleInfo()
end)
end
function UTK:HandleInfo()
while ESX.GetPlayerData().job == nil do
Citizen.Wait(500)
end
while PlayerData == nil do
PlayerData = ESX.GetPlayerData()
Citizen.Wait(500)
end
if PlayerData.job.name ~= "police" then
if self.info.stage == 0 then
Citizen.CreateThread(function()
while true do
local coords = GetEntityCoords(PlayerPedId())
local dst = GetDistanceBetweenCoords(coords, self.loudstart.x, self.loudstart.y, self.loudstart.z, true)
if dst <= 6 then
DrawText3D(self.loudstart.x, self.loudstart.y, self.loudstart.z, self.text.loudstart, 0.40)
if dst <= 1 and IsControlJustReleased(0,38) then
ESX.TriggerServerCallback("utk_oh:startevent", function(output)
if output == true then
UTK.initiator = true
self.info.stage = 1
self.info.style = 1
self.currentplant = 0
self:Plant()
elseif output ~= true then
exports["mythic_notify"]:SendAlert("error", output)
end
end, 1)
end
end