@TheIndra
Are you somewhere defining ESX isntead of just letting it nil?
I don’t really understand what you mean, but if you mean ESX = nil, then yes, in the server script , at top I use ESX = nil, nowhere else
@schwim
The reason you find no solutions is because that error can be caused by a myriad of issues. The first thing to check is to make sure that this resource is starting after es_extended.
There’s a lot of your script that isn’t being displayed so the issue could be the way the client file initiates ESX.
local markerCoords = vector3(-1223.373, -907.041, 12.326)
local blip = AddBlipForCoord(markerCoords.x, markerCoords.y)
local h_key = 74
local robbing = false
local robbingTime = 0
local color = {
r=0,
g=255,
b=255,
a=255
}
SetBlipSprite(blip, 59)
SetBlipDisplay(blip, 6)
SetBlipScale(blip, 0.9)
BeginTextCommandSetBlipName("STRING")
AddTextComponentString("Parduotuve")
EndTextCommandSetBlipName(blip)
Citizen.CreateThread(function()
while true do
Citizen.Wait(1)
DrawMarker(2, markerCoords.x, markerCoords.y, markerCoords.z, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.5, 0.5, 0.5, 255, 255, 0, 255, true, false, 2, false, false, false, false)
if Vdist2(GetEntityCoords(PlayerPedId(), false), markerCoords) < 1 then
alert("Norint apiplešti parduotuvę spauskite ~INPUT_VEH_HEADLIGHT~")
if IsControlJustReleased(1, h_key) then
if robbing then
notif("Jus jau apiplešinejate")
else
notif("Pradejote apiplešimą, jums reikia išbuti parduotuveje 2 minutes")
robbing = true
robbingTime = 5
end
end
end
if robbing then
SetTextFont(0)
SetTextScale(0.4, 0.4)
SetTextColour(color.r, color.g, color.b, color.a)
SetTextEntry("STRING")
AddTextComponentString("Liko "..robbingTime.." sek.")
DrawText(0.5, 0.5)
end
end
end)
Citizen.CreateThread(function()
while true do
Citizen.Wait(1000)
if robbing then
if Vdist2(GetEntityCoords(PlayerPedId(), false), markerCoords) > 50 then
notif("Išejote iš parduotuves, apiplešimas buvo nutrauktas")
robbing = false
robbingTime = 0
end
if robbingTime < 1 then
robbing = false
robbingTime = 0
TriggerServerEvent('apvoge')
else
a = robbingTime - 1
robbingTime = a
end
end
end
end)
function alert(msg)
SetTextComponentFormat("STRING")
AddTextComponentString(msg)
DisplayHelpTextFromStringLabel(0,0,1,-1)
end
function notif(msg)
SetNotificationTextEntry("STRING")
AddTextComponentString(msg)
DrawNotification(true, false)
end
Here’s the whole client script
EDIT: I also tried executing this resource after es_extended but that didn’t fix it