Suku_Burglaries

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.

REQUIREMENTS:

Download:

8 Likes

Maybe writing somewhere on your thread that the resource is for ESX, as that’s unclear unless you go look at the code :+1:

1 Like

And do u have still your drug script

Does this alert police?

Also what the reasoning behind it adding the robbery to the DB?

Thanks :slight_smile:

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.

2 Likes

Preview?

Sounds pretty sweet!

So ofcourse the player gets logged, and stops them robbing the house again, When does that reset?

A few pics to show others what it does :slight_smile:

Fixed it, thank you for the feedback.

1 Like

the estates each have their own cooldowns, but generally speaking a cooldown gets reset 2 ingame days after the cooldown is initiated.

1 Like

I will make a video of the general functionality.

Perfect, Great work thank you :smiley:

Another note is its running @ 0.35ms which is alittle high but nothing worrying :slight_smile:

All the houses use the same interior? Is it instanced?

It is not instanced, no.

Players are getting stuck when lockpick fails?

Is it correctly unfreezing the player here?

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

how can i fix it?

I’ll be testing this today looks pretty cool!

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
1 Like

Thank you :slight_smile:

1 Like

My bad, I must have overlooked it but I’ll add the unfreeze line in the fail part of the code.

1 Like

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!