Suku_Burglaries is a resource designed ontop of the ESX Framework that allows the players to rob “set” estates, new locations can be added or existing ones can be edited. The amount of loot locations per locations can be changed, every loot location within said house can be changed to give the robbing player a low quality, med quality or high quality item from their respective loot tables.
YOU WILL HAVE TO CHANGE THE LOOTTABLES TO FIT YOUR NEEDS OR ADD ITEMS INTO YOUR DB AS YOU DESIRE.
Before you run your server with my resource, make sure you imported the SQL file into your DB otherwise IT WILL NOT WORK!
I will not offer you any support, trying to fix what issue you seem to have. I’ve tried this on public servers and developer servers and it worked perfectly fine.
It does alert the police with a pulsating blip for about 20second, if the police fails to respond in that time frame or look at the map they will miss the call.
I put it into the DB as it will keep everything synchronized between client and server, even when you reboot the server due to an unexpected crash or whatever it keeps the previously registered data instead of resetting everything like the other resources do.
function AttemptPicklock(location)
isLockPicking = true
SetEntityHeading(GetPlayerPed(-1), location.h - 180)
FreezeEntityPosition(GetPlayerPed(-1), true)
TweekTaskTimer(10000, "Attempting Lockpick")
randomSeed = math.random(1, 7)
Citizen.Wait(10000)
if randomSeed == 3 or randomSeed == 4 or randomSeed == 5 or randomSeed == 6 then
exports['mythic_notify']:DoHudText('error', 'You have failed the attempt!')
TriggerServerEvent("suku:BreakPicklock", 1)
TriggerServerEvent('suku:StartBurglaryBlip', true, location)
isLockPicking = false
else
location.isActive = true
TriggerServerEvent("suku:UpdateBurglariesToDB", BurglaryLocations)
exports['mythic_notify']:DoHudText('success', 'Your attempt was successful!')
local chance = math.random(1, 5)
if chance == 5 then
TriggerServerEvent("suku:BreakPicklock", 1)
end
local ClosestEntity = GetClosestPed(location.x, location.y, location.z, 20, 1, 0, 0, 0, 1)
if DoesEntityExist(ClosestEntity) then
print(" There is an entity")
TriggerServerEvent('suku:StartBurglaryBlip', true, location)
end
FreezeEntityPosition(GetPlayerPed(-1), false)
TeleportPlayerToInterior(location)
isLockPicking = false
ClearPedTasks(GetPlayerPed(-1))
end
isLockPicking = false
end
Just add the freeze false in the fail section like this
function AttemptPicklock(location)
isLockPicking = true
SetEntityHeading(GetPlayerPed(-1), location.h - 180)
FreezeEntityPosition(GetPlayerPed(-1), true)
TweekTaskTimer(10000, "Attempting Lockpick")
randomSeed = math.random(1, 7)
Citizen.Wait(10000)
if randomSeed == 3 or randomSeed == 4 or randomSeed == 5 or randomSeed == 6 then
exports['mythic_notify']:DoHudText('error', 'You have failed the attempt!')
TriggerServerEvent("suku:BreakPicklock", 1)
TriggerServerEvent('suku:StartBurglaryBlip', true, location)
FreezeEntityPosition(GetPlayerPed(-1), false) --unfreeze when fail
isLockPicking = false
else
location.isActive = true
TriggerServerEvent("suku:UpdateBurglariesToDB", BurglaryLocations)
exports['mythic_notify']:DoHudText('success', 'Your attempt was successful!')
local chance = math.random(1, 5)
if chance == 5 then
TriggerServerEvent("suku:BreakPicklock", 1)
end
local ClosestEntity = GetClosestPed(location.x, location.y, location.z, 20, 1, 0, 0, 0, 1)
if DoesEntityExist(ClosestEntity) then
print(" There is an entity")
TriggerServerEvent('suku:StartBurglaryBlip', true, location)
end
FreezeEntityPosition(GetPlayerPed(-1), false)
TeleportPlayerToInterior(location)
isLockPicking = false
ClearPedTasks(GetPlayerPed(-1))
end
isLockPicking = false
end
Nice script! Defintely going to use it on our server and we have been testing it out for a bit. Found out that all the houses do not put you in a instance for that specific house. Also there is no noise levels like the 99kr one. Would be great if it had those two features, but great job!