Installation Guide - mirrox1337/qtarget-QBCore GitHub Wiki

qtarget is almost drag and drop, but there are couple of REALLY SIMPLE things you need to do.

  1. Drop qtarget and PolyZone into your resources folder.
  2. Add the following to your server.cfg:
ensure PolyZone
ensure qtarget
  1. Add the following snippet to the BOTTOM of qb-core\imports.lua:
------------------------------------------------------------------------
-- SHARED
------------------------------------------------------------------------
local Intervals = {}
local CreateInterval = function(name, interval, action, clear)
	local self = {interval = interval}
	CreateThread(function()
		local name, action, clear = name, action, clear
		repeat
			action()
			Citizen.Wait(self.interval)
		until self.interval == -1
		if clear then clear() end
		Intervals[name] = nil
	end)
	return self
end

SetInterval = function(name, interval, action, clear)
	if Intervals[name] and interval then Intervals[name].interval = interval
	else
		Intervals[name] = CreateInterval(name, interval, action, clear)
	end
end

ClearInterval = function(name)
	Intervals[name].interval = -1
end
  1. As long as the dependencies have been met, and you followed these instructions properly, you should now have qtarget running on your server.