Open ShortWlf opened 1 year ago
-- modified qb-smallresources -- removed the false boolens from ignore.lua, and the blacklisted stuff from smallresources config file.
-- modded config
Config.BlacklistedScenarios = {
['TYPES'] = {
-- "WORLD_VEHICLE_MILITARY_PLANES_SMALL",
-- "WORLD_VEHICLE_MILITARY_PLANES_BIG",
-- "WORLD_VEHICLE_AMBULANCE",
-- "WORLD_VEHICLE_POLICE_NEXT_TO_CAR",
-- "WORLD_VEHICLE_POLICE_CAR",
-- "WORLD_VEHICLE_POLICE_BIKE",
},
['GROUPS'] = {
-- 2017590552,
-- 2141866469,
-- 1409640232,
-- `ng_planes`,
}
}
-- modded ignore.lua
CreateThread(function()
while true do
for _, sctyp in next, Config.BlacklistedScenarios['TYPES'] do
SetScenarioTypeEnabled(sctyp, false)
end
for _, scgrp in next, Config.BlacklistedScenarios['GROUPS'] do
SetScenarioGroupEnabled(scgrp, false)
end
Wait(10000)
end
end)
AddEventHandler("populationPedCreating", function(x, y, z)
Wait(500) -- Give the entity some time to be created
local _, handle = GetClosestPed(x, y, z, 1.0) -- Get the entity handle
SetPedDropsWeaponsWhenDead(handle, false)
end)
CreateThread(function() -- all these should only need to be called once
if Config.DisableAmbience then
StartAudioScene("CHARACTER_CHANGE_IN_SKY_SCENE")
end
SetAudioFlag("PoliceScannerDisabled", true)
SetGarbageTrucks(true)
SetCreateRandomCops(true)
SetCreateRandomCopsNotOnScenarios(true)
SetCreateRandomCopsOnScenarios(true)
DistantCopCarSirens(false)
-- RemoveVehiclesFromGeneratorsInArea(335.2616 - 300.0, -1432.455 - 300.0, 46.51 - 300.0, 335.2616 + 300.0, -1432.455 + 300.0, 46.51 + 300.0) -- central los santos medical center
-- RemoveVehiclesFromGeneratorsInArea(441.8465 - 500.0, -987.99 - 500.0, 30.68 -500.0, 441.8465 + 500.0, -987.99 + 500.0, 30.68 + 500.0) -- police station mission row
-- RemoveVehiclesFromGeneratorsInArea(316.79 - 300.0, -592.36 - 300.0, 43.28 - 300.0, 316.79 + 300.0, -592.36 + 300.0, 43.28 + 300.0) -- pillbox
-- RemoveVehiclesFromGeneratorsInArea(-2150.44 - 500.0, 3075.99 - 500.0, 32.8 - 500.0, -2150.44 + 500.0, -3075.99 + 500.0, 32.8 + 500.0) -- military
-- RemoveVehiclesFromGeneratorsInArea(-1108.35 - 300.0, 4920.64 - 300.0, 217.2 - 300.0, -1108.35 + 300.0, 4920.64 + 300.0, 217.2 + 300.0) -- nudist
-- RemoveVehiclesFromGeneratorsInArea(-458.24 - 300.0, 6019.81 - 300.0, 31.34 - 300.0, -458.24 + 300.0, 6019.81 + 300.0, 31.34 + 300.0) -- police station paleto
-- RemoveVehiclesFromGeneratorsInArea(1854.82 - 300.0, 3679.4 - 300.0, 33.82 - 300.0, 1854.82 + 300.0, 3679.4 + 300.0, 33.82 + 300.0) -- police station sandy
-- RemoveVehiclesFromGeneratorsInArea(-724.46 - 300.0, -1444.03 - 300.0, 5.0 - 300.0, -724.46 + 300.0, -1444.03 + 300.0, 5.0 + 300.0) -- REMOVE CHOPPERS WOW
end)
CreateThread(function()
local sleep
while true do
sleep = 1000
local ped = PlayerPedId()
if IsPedBeingStunned(ped, 0) then
sleep = 0
SetPedMinGroundTimeForStungun(ped, math.random(4000, 7000))
end
Wait(sleep)
end
end)
CreateThread(function()
for i = 1, 15 do
EnableDispatchService(i, true)
end
SetMaxWantedLevel(5)
end)
if Config.IdleCamera then --Disable Idle Cinamatic Cam
DisableIdleCamera(true)
end
CreateThread(function()
local sleep
while true do
sleep = 500
local ped = PlayerPedId()
local weapon = GetSelectedPedWeapon(ped)
if weapon ~= `WEAPON_UNARMED` then
if IsPedArmed(ped, 6) then
sleep = 0
DisableControlAction(1, 140, true)
DisableControlAction(1, 141, true)
DisableControlAction(1, 142, true)
end
if weapon == `WEAPON_FIREEXTINGUISHER` or weapon == `WEAPON_PETROLCAN` then
if IsPedShooting(ped) then
SetPedInfiniteAmmo(ped, true, `WEAPON_FIREEXTINGUISHER`)
SetPedInfiniteAmmo(ped, true, `WEAPON_PETROLCAN`)
end
end
end
Wait(sleep)
end
end)
CreateThread(function()
local pedPool = GetGamePool('CPed')
for _, v in pairs(pedPool) do
SetPedDropsWeaponsWhenDead(v, false)
end
end)
qb-smallresources/client/calmai.lua modded the ai groups to make them be hostile if player is hostile near groups
-- Relationship Types:
-- 0 = Companion
-- 1 = Respect
-- 2 = Like
-- 3 = Neutral
-- 4 = Dislike
-- 5 = Hate
SetRelationshipBetweenGroups(3, `AMBIENT_GANG_HILLBILLY`, `PLAYER`)
SetRelationshipBetweenGroups(3, `AMBIENT_GANG_BALLAS`, `PLAYER`)
SetRelationshipBetweenGroups(3, `AMBIENT_GANG_MEXICAN`, `PLAYER`)
SetRelationshipBetweenGroups(3, `AMBIENT_GANG_FAMILY`, `PLAYER`)
SetRelationshipBetweenGroups(3, `AMBIENT_GANG_MARABUNTE`, `PLAYER`)
SetRelationshipBetweenGroups(3, `AMBIENT_GANG_SALVA`, `PLAYER`)
SetRelationshipBetweenGroups(3, `AMBIENT_GANG_LOST`, `PLAYER`)
SetRelationshipBetweenGroups(3, `GANG_1`, `PLAYER`)
SetRelationshipBetweenGroups(3, `GANG_2`, `PLAYER`)
SetRelationshipBetweenGroups(3, `GANG_9`, `PLAYER`)
SetRelationshipBetweenGroups(3, `GANG_10`, `PLAYER`)
SetRelationshipBetweenGroups(1, `FIREMAN`, `PLAYER`)
SetRelationshipBetweenGroups(1, `MEDIC`, `PLAYER`)
SetRelationshipBetweenGroups(1, `COP`, `PLAYER`)
SetRelationshipBetweenGroups(3, `PRISONER`, `PLAYER`)
SetRelationshipBetweenGroups(3, `GUARD_DOG`, `PLAYER`)
-- gang locations
--
-- ballas
-- 89.04, -1967.09, 20.75
-- int vector4(111.25625, -1957.808, 20.779193, 216.01728)
--
-- families
-- -108.24, -1597.97, 31.65
--int vector4(-140.7607, -1596.952, 34.832622, 342.46157)
--
-- marabunta
-- 1421.77, -1506.75, 60.9
--int vector4(1435.7231, -1496.424, 63.224273, 331.8688)
--
-- https://docs.fivem.net/natives/?_0xBF25EB89375A37AD
-- SetRelationshipBetweenGroups
-- 0xBF25EB89375A37AD
-- 0xD4A215BA
-- Sets the relationship between two groups. This should be called twice (once for each group).
-- Relationship types:
-- 0 = Companion
-- 1 = Respect
-- 2 = Like
-- 3 = Neutral
-- 4 = Dislike
-- 5 = Hate
-- 255 = Pedestrians
-- Example:
-- PED::SET_RELATIONSHIP_BETWEEN_GROUPS(2, l_1017, 0xA49E591C);
-- PED::SET_RELATIONSHIP_BETWEEN_GROUPS(2, 0xA49E591C, l_1017);
-- relationshops.dat