102 lines
5.7 KiB
Lua
102 lines
5.7 KiB
Lua
Config.Callouts["roxwood_arson"] = {
|
|
|
|
Enabled = true,
|
|
CalloutName = "Reports of Arson in Roxwood",
|
|
CalloutDescriptions = {
|
|
"Suspected arson incidents have been reported, requiring immediate response from law enforcement and fire services.",
|
|
"Urgent assistance needed to address suspected arson, ensuring community safety and property protection.",
|
|
"Multiple suspected arson cases reported, demanding swift action to prevent further damage and risk.",
|
|
"Identified arson cases prompt the need for additional resources to investigate and control the situation.",
|
|
"Emergency services alerted to suspected arson, necessitating coordinated efforts to apprehend those responsible.",
|
|
"Authorities seek assistance in addressing suspected arson, emphasizing public vigilance and cooperation.",
|
|
"Additional units required to support law enforcement and fire teams in responding to suspected arson incidents.",
|
|
"Emergency backup needed to help manage and contain suspected arson, ensuring public safety.",
|
|
"Responders call for assistance in dealing with suspected arson, highlighting the urgency of the situation.",
|
|
"Immediate intervention crucial to manage and address suspected arson, safeguarding lives and property.",
|
|
},
|
|
CalloutUnitsRequired = {
|
|
description = "Police, Fire",
|
|
policeRequired = true,
|
|
ambulanceRequired = false,
|
|
fireRequired = true,
|
|
towRequired = false,
|
|
},
|
|
CalloutLocations = {
|
|
[1] = vector3(-3082.4443, 7910.6416, 54.4692),
|
|
[2] = vector3(-3083.5991, 7936.8086, 54.1143),
|
|
[3] = vector3(-3044.8267, 7937.8999, 58.7173),
|
|
[4] = vector3(-3013.9849, 7916.1396, 58.6186),
|
|
[5] = vector3(-2541.5210, 7480.6040, 28.7263),
|
|
[6] = vector3(-2304.5576, 7760.9302, 44.3912),
|
|
[7] = vector3(-2281.4097, 8151.0815, 34.1373),
|
|
[8] = vector3(-1140.2708, 8119.0449, 23.1818),
|
|
[9] = vector3(-416.6748, 7650.4414, 6.3326),
|
|
[10] = vector3(-341.3544, 7396.8135, 6.4100),
|
|
},
|
|
PedChanceToFleeFromPlayer = 50, -- Value between 0 and 100 -> Lower is less chance.
|
|
PedChanceToAttackPlayer = 50, -- Value between 0 and 100 -> Lower is less chance.
|
|
PedChanceToSurrender = 10, -- Value between 0 and 100 -> Lower is less chance.
|
|
PedChanceToObtainWeapons = 60, -- Value between 0 and 100 -> Lower is less chance.
|
|
PedActionMinimumTimeoutInMs = 5000, -- Milliseconds for the minimum timeout time to start the secondary action listed above.
|
|
PedActionMaximumTimeoutInMs = 10000, -- Milliseconds for the maximum timeout time to start the secondary action. Must be a higher number than the minimum!
|
|
PedActionOnNoActionFound = "flee", -- When no action of the above options is found. It'll perform this action after the set timeout. Options: "none", "attack", "flee", "surrender"
|
|
PedWeaponData = { -- The ped will be given one randomly selected weapon (in hand) from these weapons if PedChanceToObtainWeapons passed.
|
|
"weapon_knife",
|
|
"weapon_hammer",
|
|
"weapon_crowbar",
|
|
"weapon_bottle",
|
|
},
|
|
|
|
client = function(plyPed, pedList, vehicleList, playersList, objectList, propList, fireList, smokeList, calloutDataClient)
|
|
|
|
for index, pedNetId in pairs(pedList) do
|
|
local ped = NetToPed(pedNetId)
|
|
if DoesEntityExist(ped) then
|
|
ERS_RequestNetControlForEntity(ped)
|
|
TaskSetBlockingOfNonTemporaryEvents(ped, true)
|
|
Wait(100)
|
|
ERS_SetPedToFleeFromPlayer(ped)
|
|
end
|
|
end
|
|
|
|
ERS_CreateTemporaryBlipForEntities(pedList, 15000)
|
|
|
|
ERS_PerformTimedActionOnPed(calloutDataClient, pedList)
|
|
|
|
end,
|
|
server = function(request, src, calloutData, pedList, vehicleList, objectList, propList, playersList, fireList, smokeList)
|
|
|
|
local diameter = 2
|
|
|
|
if UsingSmartFires then
|
|
-- Full version
|
|
local fireSize = Config.RandomSmallFireOrSmokeSize[math.random(#Config.RandomSmallFireOrSmokeSize)]
|
|
local fireType = Config.NormalFireTypes[math.random(#Config.NormalFireTypes)]
|
|
local fireId = exports['SmartFires']:CreateFire(vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z-0.5), fireSize, fireType)
|
|
DebugPrint("Created fire with ID: "..fireId)
|
|
table.insert(fireList, fireId)
|
|
else
|
|
-- Lite version
|
|
local fireSize = Config.RandomSmallFireOrSmokeSize[math.random(#Config.RandomSmallFireOrSmokeSize)]
|
|
local fireType = "normal"
|
|
local fireId = exports['SmartFiresLite']:CreateFire(vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z-0.5), fireSize, fireType)
|
|
DebugPrint("Created fire with SmartFiresLite with ID: "..fireId)
|
|
table.insert(fireList, fireId)
|
|
end
|
|
|
|
-- Build suspect peds
|
|
local randomAmountOfSuspects = math.random(3)
|
|
for i = 1, randomAmountOfSuspects do
|
|
local coords = ERS_GetRandomCoordinateWithinRangeOfCoordinate(calloutData.Coordinates, diameter)
|
|
|
|
local suspectPedModel = ERS_GetRandomModel(Config.randomPeds)
|
|
local suspectPedCoords = vector3(coords.x, coords.y, coords.z)
|
|
local suspectPedHeading = math.random(360)
|
|
local suspectPedNetId = ERS_CreatePed(suspectPedModel, suspectPedCoords, suspectPedHeading)
|
|
local suspectPed = NetworkGetEntityFromNetworkId(suspectPedNetId)
|
|
table.insert(pedList, suspectPedNetId)
|
|
end
|
|
|
|
return true
|
|
end
|
|
} |