Domas Scripts
v1.0
Title
Message
Create new category
What is the title of your new category?
Edit page index title
What is the title of the page index?
Edit category
What is the new title of your category?
Edit link
What is the new title and URL of your link?
Server
Copy Markdown
Open in ChatGPT
Open in Claude
local Framework = nil
if Config.Framework == 'esx' then
Framework = exports['es_extended']:getSharedObject()
elseif Config.Framework == 'qb' then
Framework = exports['qb-core']:GetCoreObject()
end
function Dispatch(vehiclePlate, vehicleManufacturer, vehicleModel, speed, coord)
local _vehiclePlate = 'Unkown'
if Config.Jammer.notifyPolice.vehiclePlate then
_vehiclePlate = vehiclePlate
end
local _vehicleModel = 'Unkown'
if Config.Jammer.notifyPolice.vehicleModel then
_vehicleModel = vehicleModel
end
local _vehicleMade = 'Unkown'
if Config.Jammer.notifyPolice.vehicleMade then
_vehicleMade = vehicleManufacturer
end
local dispatchData = {
message = "Vehicle has speed camera jammer!", -- add this into your locale
codeName = 'jammer', -- this should be the same as in config.lua
code = '9-14',
icon = 'fas fa-car-burst',
coords = coord,
priority = 2,
vehicle = _vehicleMade..' '..vehicleModel,
plate = _vehiclePlate,
jobs = { 'leo' }
}
TriggerEvent('ps-dispatch:server:notify', dispatchData)
end
function Bill(src, price, plate, reason) -- Implement your own logic here
print("^1Add Your Billing Logic HERE: ^4Domas_Radar/server/editable.lua")
print("^2Add Your Billing Logic HERE: ^5Domas_Radar/server/editable.lua")
print("^3Add Your Billing Logic HERE: ^6Domas_Radar/server/editable.lua^0")
print('Source: '..src)
print('Price: '..price)
print('Plate: '..plate)
print('Reason: '..reason)
end
function InsuranceCheck(src, plate)
print("Draudimas good")
if GetJammer(plate) then
return
end
local draudimas = exports.Domas_MasinuDokai:SearchDocument_Draudimas(src, plate) -- Implement your own logic here
if not draudimas then
Bill(src, 5000, plate, "Vehicle exploitation plate: " ..plate.. " without insurance")
end
end
function TexCheck(src, plate)
print("Texas good")
if GetJammer(plate) then
return
end
local texas = exports.Domas_MasinuDokai:SearchDocument_Techas(src, plate) -- Implement your own logic here
if not texas then
Bill(src, 5000, plate, "Vehicle exploitation plate: " ..plate.. " without vehicle inspection")
end
end
RegisterNetEvent('DomasRadarai:Greitis')
AddEventHandler('DomasRadarai:Greitis', function(player, price, vehiclePlate, reason, radar, speed, vehicleManufacturer, vehicleModel, coord)
if Config.Jammer.enabled then
if GetJammer(vehiclePlate) then
if Config.Jammer.notifyPolice.enabled then
Dispatch(vehiclePlate, vehicleManufacturer, vehicleModel, speed, coord)
end
return
end
end
if not IsCameraActive(radar) then
Debug("Camera is not active and player did not get fine")
return
end
Debug('Camera is active')
Bill(player, price, vehiclePlate, reason, vehiclePlate)
SaveCameraInfo(radar, vehiclePlate, 'Vehicle: '..vehiclePlate..' was going at '..math.floor(speed)..' KMH at this location')
-- Logging stuff
local name = GetPlayerName(player)
local title = "Domas Speed Cameras"
local msg = 'Player '..name.. ' got fined for speeding\nFine: '..price..' EUR'
local color = 0x86298C
SendDiscordWebhook(title, msg, color)
end)
RegisterNetEvent('DomasRadarai:Texas')
AddEventHandler('DomasRadarai:Texas', function(plate, radar)
local src = source
if not IsCameraActive(radar) then
Debug("Camera is not active and player did not get fine")
return
end
SaveCameraInfo(radar, plate, 'Vehicle: '..plate..' not having vehicle inspection')
TexCheck(src, plate)
-- Logging stuff
local name = GetPlayerName(src)
local title = "Domas Speed Cameras"
local msg = 'Player '..name.. ' got fined for not having vehicle inspection\nVehicle`s plate: '..plate
local color = 0x86298C
SendDiscordWebhook(title, msg, color)
end)
RegisterNetEvent('DomasRadarai:Draudimas')
AddEventHandler('DomasRadarai:Draudimas', function(plate, radar)
local src = source
if not IsCameraActive(radar) then
Debug("Camera is not active and player did not get fine")
return
end
SaveCameraInfo(radar, plate, 'Vehicle: '..plate..' not having vehicle insurance')
InsuranceCheck(src, plate)
-- Logging stuff
local name = GetPlayerName(src)
local title = "Domas Speed Cameras"
local msg = 'Player '..name.. ' got fined for not having insurance'
local msg = 'Player '..name.. ' got fined for not having insurance\nVehicle`s plate: '..plate
local color = 0x86298C
SendDiscordWebhook(title, msg, color)
end)
›
⌄
⌄
⌄
⌄
⌄
⌄
⌄
Last updated on
Was this page helpful?
Next to read:
Domas_Dropshipnull
Discard Changes
Do you want to discard your current changes and overwrite with the template?
Archive Synced Block
Message
Create new Template
What is this template's title?
Delete Template
Message