All data is optional except for (coords, title, and type).
-- coords: Coordinates vector3(x, y, z) in which the alert is triggered
-- title: Title of the alert
-- type: Type of alert (GENERAL, RADARS, 215, DRUGS, FORCE, 48X) This is to filter the alerts in the dashboard
-- message: Alert message
-- job: Job group related to the alert
-- metadata: Additional metadata of the alert (vehicle model, color, plate, speed, weapon, ammo type, name of the subject, unit)
TriggerServerEvent("SendAlert:police", {
coords = vector3(0, 0, 0),
title = 'Alert title',
type = 'GENERAL',
message = 'Alert message',
job = 'police',
metadata = {
model = 'Vehicle label',
color = {255, 255, 255},
plate = 'PLATE',
speed = '100 kmh',
weapon = 'Weapon name',
ammotype = 'AMMO_PISTOL',
name = 'Subject name',
unit = 'ADAM-10',
}
})
-- Returns a bool if it is cuffed
exports['origen_police']:IsHandcuffed()
CanOpenTablet
Check if the player has access to the menu.
--Return a table with data (1: true or false, 2: job category, 3: penalfilter)
-- job: Player job
exports['origen_police']:CanOpenTablet(job)
GetMinimunGrade
-- Returns whether the player has the minimum grade to perform a specific action.
-- job: Player job
-- param: Action to perform
exports['origen_police']:GetMinimunGrade(job, action)
Example of use
if exports['origen_police']:GetMinimunGrade(job, 'RadioTab') >= job.grade.level then
-- They have the grade to perform the action with their current job.
return true
else
-- They do not have the grade to perform the action with their current job.
return false
end