@@ -66,6 +66,37 @@ local function PlaceItem(itemType)
6666 SetEntityAlpha (obj , 150 , false )
6767 SetEntityCollision (obj , false , false )
6868 SetEntityAsMissionEntity (obj , true , true )
69+ if Config .UseObjectGizmo then
70+ exports .object_gizmo :useGizmo (obj )
71+ FreezeEntityPosition (obj , true )
72+ SetEntityAlpha (obj , 255 , false )
73+ SetEntityCollision (obj , true , true )
74+ placedObjects [itemType ] = obj
75+
76+ if itemType == Config .Items .generator then
77+ local generatorCoords = GetEntityCoords (obj )
78+ lib .zones .box ({
79+ coords = generatorCoords ,
80+ size = vec3 (2.0 , 2.0 , 2.0 ),
81+ rotation = 0 ,
82+ debug = false ,
83+ onEnter = function ()
84+ local percentage = math.floor ((generatorFuel / Config .RequiredFuel ) * 100 )
85+ currentFuelText = lib .showTextUI (" Fuel: " .. percentage .. " %" )
86+ end ,
87+ onExit = function ()
88+ lib .hideTextUI ()
89+ currentFuelText = nil
90+ end ,
91+ })
92+ end
93+
94+ if itemType == Config .Items .laptop or itemType == Config .Items .generator or itemType == Config .Items .printer then
95+ Framework_AddTargetToEntity (obj , itemType )
96+ end
97+ TriggerEvent (" pl_fraud:notification" ,locale (" itemPlaced" , itemType ), " success" )
98+ SetModelAsNoLongerNeeded (model )
99+ else
69100 local heading = GetEntityHeading (obj )
70101 local zOffset = 0.0
71102
@@ -133,6 +164,7 @@ local function PlaceItem(itemType)
133164 end
134165 end
135166 end )
167+ end
136168end
137169
138170
@@ -539,6 +571,22 @@ function DispatchAlert()
539571 }
540572 TriggerServerEvent (' rcore_dispatch:server:sendAlert' , alert )
541573 end )
574+ elseif Config .Dispatch .script == ' op' then
575+ local ped = PlayerPedId ()
576+ local coords = GetEntityCoords (ped )
577+ local street1 , street2 = GetStreetNameAtCoord (coords .x , coords .y , coords .z )
578+ local street1name = GetStreetNameFromHashKey (street1 )
579+ local street2name = GetStreetNameFromHashKey (street2 )
580+
581+ local job = Config .Police .Job -- Jobs that will receive the alert
582+ local title = " Card Cloning" -- Main title alert
583+ local id = GetPlayerServerId (PlayerId ()) -- Player that triggered the alert
584+ local panic = false -- Allow/Disable panic effect
585+
586+ local locationText = street2name and (street1name .. " and " .. street2name ) or street1name
587+ local text = " Card Cloning Activity Reported in progress on " .. locationText -- Main text alert
588+
589+ TriggerServerEvent (' Opto_dispatch:Server:SendAlert' , job , title , text , coords , panic , id )
542590 elseif Config .Dispatch .script == ' custom' then
543591
544592 end
@@ -581,7 +629,11 @@ AddEventHandler('pl_fraud:notification', function(message, type)
581629 elseif Config .Notify == ' qb' then
582630 TriggerEvent (" QBCore:Notify" , message , type , 6000 )
583631 elseif Config .Notify == ' wasabi' then
584- exports .wasabi_notify :notify (" ATM ROBBERY" , message , 6000 , type , false , ' fas fa-ghost' )
632+ exports .wasabi_notify :notify (" Fraud Script" , message , 6000 , type , false , ' fas fa-ghost' )
633+ elseif Config .Notify == ' brutal_notify' then
634+ exports [' brutal_notify' ]:SendAlert (' Notify' , message , 6000 , type , false )
635+ elseif Config .Notify == ' mythic_notify' then
636+ exports [' mythic_notify' ]:SendAlert (type , message )
585637 elseif Config .Notify == ' custom' then
586638 -- Add your custom notifications here
587639 end
@@ -596,4 +648,3 @@ AddEventHandler('onResourceStop', function(resourceName)
596648 end
597649end )
598650
599-
0 commit comments