cl_functions.lua

Full View

DrawText3Ds = function(x, y, z, text)
	SetTextScale(0.35, 0.35)
    SetTextFont(4)
    SetTextProportional(1)
    SetTextColour(255, 255, 255, 215)
    SetTextEntry("STRING")
    SetTextCentre(true)
    AddTextComponentString(text)
    SetDrawOrigin(x,y,z, 0)
    DrawText(0.0, 0.0)
    local factor = (string.len(text)) / 370
    DrawRect(0.0, 0.0+0.0125, 0.017+ factor, 0.03, 0, 0, 0, 75)
    ClearDrawOrigin()
end

function PoliceCall()
	if Config.Dispatch.Type == 'standalone' then
		TriggerServerEvent('stoned-laundry:PoliceAlertStandalone')
	elseif Config.Dispatch.Type == 'linden_alerts' then
		TriggerServerEvent('stoned-laundry:server:PoliceAlertMessage') -- linden alerts
	elseif Config.Dispatch.Type == 'qb_defaultalert' then
    	TriggerServerEvent('police:server:policeAlert', 'Attempted Laundry Money')
    elseif Config.Dispatch.Type == 'cd_dispatch' then
		local data = exports['cd_dispatch']:GetPlayerInfo()
		TriggerServerEvent('cd_dispatch:AddNotification', {
			job_table = {'police', }, 
			coords = data.coords,
			title = '10-15 - Laundry Money',
			message = 'A '..data.sex..' robbing ATM at '..data.street, 
			flash = 0,
			unique_id = data.unique_id,
			sound = 1,
			blip = {
				sprite = Config.Dispatch.BlipSprite, 
				scale = Config.Dispatch.BlipScale, 
				colour = Config.Dispatch.BlipColor,
				flashes = false, 
				text = '911 - Laundry Money',
				time = 5,
				radius = 0,
			}
		})
	end
end

Last updated

Was this helpful?