Guys, i have got a script which allows to rob a truck with some money. The problem is that the ped which should respawn and a marker that should show up, do not. An error occures when i try to restart script by F8. It shows that something is wrong near the line 239 (i suppose), so i give you a piece of my script and an error here below.
Citizen.CreateThread(function()
while true do
Citizen.Wait(5)
if zrespione == 1 then
local plyCoords = GetEntityCoords(GetPlayerPed(-1), false)
local transCoords = GetEntityCoords(transport)
local dist = Vdist(plyCoords.x, plyCoords.y, plyCoords.z, transCoords.x, transCoords.y, transCoords.z)
if dist <= 55.0 then
DrawMarker(0, transCoords.x, transCoords.y, transCoords.z+4.5, 0, 0, 0, 0, 0, 0, 1.0, 1.0, 1.0, 135, 31, 35, 100, 1, 0, 0, 0)
if ostrzezenie == 0 then
ostrzezenie = 1
ESX.ShowNotification('~y~Pozbądź się ochrony zanim podłożysz ładunek.')
end
else
Citizen.Wait(500)
end
if dist <= 4.5 and wysadzony == 0 then
hintToDisplay('Wciśnij ~INPUT_DETONATE~ aby wysadzić tylne drzwi i zabrać forse')
if IsControlJustPressed(0, Keys['G']) then
SprawdzInformacjePojazdowe()
Citizen.Wait(500)
end
end
else
Citizen.Wait(1500)
end
end
end)
Help me please