Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Citizen.Wait(0)
end
while ESX.GetPlayerData().job == nil do
Citizen.Wait(10)
end
while true do
Wait(500)
PlayerData = ESX.GetPlayerData()
if PlayerData.job.name == "ballas" then
SetRelationshipBetweenGroups(1, GetHashKey("AMBIENT_GANG_BALLAS"), GetHashKey("PLAYER"))
SetRelationshipBetweenGroups(1, GetHashKey("PLAYER"), GetHashKey("AMBIENT_GANG_BALLAS"))
end
end
end)
I’m getting this Error and it somehow resets itself after sometime or a restart so I would have to first refresh and restart the resource again so that it works, any ideas?