[Release] [ESX] 99kr-burglary

OK have molded a few scripts together to get this to work so will give credit to the right people before posting.
Still a few bugs to iron out will upload when they are fixed.
But have the exit point working, the position you enter, you will return to that position on exit
Useitem to start the break in lockpick use from inventory.
All steal points inside house run off a random list, there is a 60/40 to find something from each place
and there is 8 different items in the list.
a pawnshop script has been added so you can sell the items you find.
also the script works on lockpicking cars too.
there is a 10% chance to use a lockpick/break
will do a sql for the items.

things I would love to find out are adding extra ipls to each house made into a burglary and the best animation for lockpicking cars.

video

5 Likes

Damn, good job can’t wait for the release.

Edit-- had to remove the % of chance to get nothing from stealing spots so will get a item each time you try. will try and fix

4 Likes

so can u rob multiple homes or have u having the same issue I am where you can only add one robbable home?

NZMacgyver has fixed it with his edited version of the script and it works great.

Are you sure he fixed it? In the video he doesn’t ever show himself looting the same place twice, he intentionally skips over them.

In my testing, it’s pretty much the same thing other then non guaranteed items. Multiple locations still use the same instance

He fixed the main issue which was when you have more than one house that you can enter the exit teleport would always be the same location, so if you had house 1 and house 2 the exit would always be the same so it would teleport you outside of house 1 even if you left from house 2

yeah the main fix was to exiting at the same location. still have the problem of using the same ipl. so if you loot one house and go into the next house all the loot will be gone. in my post I had a list of things i would love to find out and ipls to each house was one of them.

1 Like

Update from last, still a few bugs but can do more then one house now.

3 Likes

Walked up to the door with a lockpick and said yes i want to use it and…nothing. No interaction seemed to happen. Am i missing something?

You’re seriously an animal and I look forward to seeing how you do it. I’ve been trying to teach myself Lua mainly so I could do this and I’ve had mixed results so far, glad to see someone accomplish it.

1 Like

its not a problem, but just for laugh, your sql file try will try to import

‘booweed_poochk’, ‘Bag of weed’

That must be some kind of hydroponic sativa purple kush!

1 Like

Lol, he probably got in between the original ‘book’ haha, nice :smiley:

1 Like

Ok my server is not live so cant say how it works with more then 1 person doing it.
you should be able to add as many houses you want just add a name and the pos and animpos and you should be good to go. it would be cool for the crasy people that plan on going door to door and getting the name and x,y,z for doors to upload them on here for everyone else.
also got rid of the hydroponic sativa purple kush! and added just normal weed back.
going to next try and add local inside the house that works off noise but we will see heres the code.

3 Likes

ok so u can rob multiple homes and stuff but im wondering right now if people rob homes they get in the same instanced and u can see each other how do we separate the instance or entity ?

yes they can rob the same house, need to locpick it then you are in the same house. pretty fun and real :wink:

I don’t think i’m gonna be able to help with this one as my server is just a local one to code on. will be something to do with setting entity to be invisible to others. and giving i onlyr have 1 GTA account I wouldn’t no if its working or not

so idk why but i dont get any police notifcations I have added:

TriggerServerEvent('esx_addons_gcphone:startCall', 'police', burglaryDetected .. ' ' .. house .. '. ' .. sentPhoto, { x = v.pos.x, y = v.pos.y, z = v.pos.z })
                end)
              end
                  if useQalleCameraSystem == false then
                    if random <= chancePoliceNoti then
                      TriggerServerEvent('esx_addons_gcphone:startCall', 'police', burglaryDetected .. ' ' .. house, { x = v.pos.x, y = v.pos.y, z = v.pos.z })
                    end

I do not use qalle system but I use gcphone not sure why it isn’t working because this works for the cargodelivery job

hows u make it work with gcphone

Try add that in and change the chance to 100 to test. remember to stay in the house untill the random wait is over

if LockpickAmount > 0 then
          HouseBreak(house)
          v.locked = false
          Citizen.Wait(math.random(15000,30000))
          local random = math.random(0, 100)
          if random <= chancePoliceNoti then 
            TriggerServerEvent('esx_addons_gcphone:startCall', 'police', burglaryDetected .. ' ' .. house, { x = v.pos.x, y = v.pos.y, z = v.pos.z })
          end
        else 
          ESX.ShowNotification(noLockpickText)
        end
	end)
end
2 Likes