*sigh*…
local relationshipTypes = {
"PLAYER",
"CIVMALE",
"CIVFEMALE",
"COP",
"SECURITY_GUARD",
"PRIVATE_SECURITY",
"FIREMAN",
"GANG_1",
"GANG_2",
"GANG_9",
"GANG_10",
"AMBIENT_GANG_LOST",
"AMBIENT_GANG_MEXICAN",
"AMBIENT_GANG_FAMILY",
"AMBIENT_GANG_BALLAS",
"AMBIENT_GANG_MARABUNTE",
"AMBIENT_GANG_CULT",
"AMBIENT_GANG_SALVA",
"AMBIENT_GANG_WEICHENG",
"AMBIENT_GANG_HILLBILLY",
"DEALER",
"HATES_PLAYER",
"HEN",
"WILD_ANIMAL",
"SHARK",
"COUGAR",
"NO_RELATIONSHIP",
"SPECIAL",
"MISSION2",
"MISSION3",
"MISSION4",
"MISSION5",
"MISSION6",
"MISSION7",
"MISSION8",
"ARMY",
"GUARD_DOG",
"AGGRESSIVE_INVESTIGATE",
"MEDIC",
"CAT",
}
local RELATIONSHIP_HATE = 5
Citizen.CreateThread(function()
while true do
Wait(50)
for _, group in ipairs(relationshipTypes) do
-- not sure about argument order, players don't have AI so only one of these should be needed
SetRelationshipBetweenGroups(RELATIONSHIP_HATE, GetHashKey('PLAYER'), GetHashKey(group))
SetRelationshipBetweenGroups(RELATIONSHIP_HATE, GetHashKey(group), GetHashKey('PLAYER'))
end
end
end)
Untested, not sure if this code even compiles or doesn’t error out, but this should work in theory, unless peds are set to use decision makers that don’t cause hated targets to be attacked, or network players aren’t a relationship group anymore.
Normally you should only ever need to set CIVMALE/CIVFEMALE and various gangs (the GTA:SA ‘riot mode’ cheat code for instance overwrote CIVMALE and CIVFEMALE relation to hate every other group), but setting all of them also works.