diff --git a/cl_radar.lua b/cl_radar.lua
index 99bbb73..600765d 100644
--- a/cl_radar.lua
+++ b/cl_radar.lua
@@ -106,10 +106,18 @@ READER.vars =
}
}
+function READER:GetPlate( cam )
+ return self.vars[cam].plate
+end
+
function READER:SetPlate( cam, plate )
self.vars.cams[cam].plate = plate
end
+function READER:GetIndex( cam )
+ return self.vars[cam].index
+end
+
function READER:SetIndex( cam, index )
self.vars.cams[cam].index = index
end
@@ -139,10 +147,12 @@ function READER:Main()
local cam = self:GetCamFromNum( i )
- self:SetPlate( cam, plate )
- self:SetIndex( cam, index )
+ if ( self:GetPlate( cam ) ~= plate ) then
+ self:SetPlate( cam, plate )
+ self:SetIndex( cam, index )
- SendNUIMessage( { _type = "changePlate", cam = cam, plate = plate, index = index } )
+ SendNUIMessage( { _type = "changePlate", cam = cam, plate = plate, index = index } )
+ end
end
end
end
@@ -156,6 +166,7 @@ Citizen.CreateThread( function()
end
end )
+
--[[----------------------------------------------------------------------------------
Radar variables
diff --git a/nui/radar.css b/nui/radar.css
index 7954015..5feb0a4 100644
--- a/nui/radar.css
+++ b/nui/radar.css
@@ -118,7 +118,15 @@ button:focus { outline: none; }
transform: translateX( -1px );
background-image: url( "images/bg_right.png" );
background-repeat: no-repeat;
- }
+ }
+
+.plate_blue {
+ color: rgb(0, 0, 163);
+}
+
+.plate_yellow {
+ color: rgb(255, 255, 0);
+}
.arrow {
width: 11px;
@@ -705,13 +713,13 @@ button:focus { outline: none; }
grid-template-columns: 1fr;
justify-content: center;
}
- #plateReader .plates .plate_container .text_container .text {
+ #plateReader .plates .plate_container .text_container p {
display: block;
font-family: "Plate-Font";
font-size: 58px;
text-align: center;
letter-spacing: -3px;
- color: rgb(0, 0, 163);
+ /* color: rgb(0, 0, 163); */
padding-top: 5px;
margin: 0;
grid-column: 1;
diff --git a/nui/radar.html b/nui/radar.html
index b2ece13..4952054 100644
--- a/nui/radar.html
+++ b/nui/radar.html
@@ -176,11 +176,10 @@
46EEK872
-46EEK872
-46EEK872
-46EEK872
+46EEK872
+46EEK872
+46EEK872
+46EEK872
46EEK872
-46EEK872
-46EEK872
-46EEK872
+46EEK872
+46EEK872
+46EEK872
+46EEK872