[Release] [ESX] 99kr-burglary

quick update added a local ped in house if the noise goes over 3 she awakes up and is aggressive with a gun, few bugs but works, you can only break in between 11pm and 7am and there is only a 20% chance for the cops to be called, will have the local ped if woke she calls cops.

2 Likes

amazing good job will you have it released?

Because there is no “instance” this happen when you enter the house

  • Noise detection is too high, when you crouch walk it goes to 3-4 and the ped still wakeup

  • You spawn ped in 2 more different interior when not using them
    because your inside coords are always the same: inside = { x = 346.52 , y = -1013.19 , z = -99.2, h = 357.81 },

  • Noise bar appear for everyone in the server that is near the coords when someone enter a house

cheers for the feed back will have a look at the bug today.

Even after I removed all the coords for all house’s but one when when i go inside there are 4 npcs asleep on one bed lol wtf.

But you can just go outside before you leave and then join back and lockpick the same house avoiding the timer still

Ok fixed heaps of peds getting loaded into the same house (again tested offline only).
Noise bar distances less so will only show up inside the house.
Added police phone call when ped is woken up. also a 20% chance the cops will be rang when you break in.
Can only do break ins between 11pm/23:00 and 7am.
My noise bar seems to be very low crouch walking says 0 so might need changing.
new build is on github check a few post up for link

3 Likes

peds seem to work… but there are 1-3 peds that spawn on the bed because of a “delay” somewhere in the thread

i’m using a different crouch walking animation than you, and when using it sound is going to 3-4 insted of 0

and please… have a look at the instance script from ESX, we shouldn’t be able to see other player that are inside another house.

2 Likes

+1 to @RyuShin

Nice work bro. Other than the fact u can abuse the lock by relogging everything else seems fine now. Thanks

i messaged you mind reading it?

@RyuShin ok the noise detection should work now its set to 5.
I had a look at the esx_instance and looks like whats needed for this script but I have no clue where to start with that for here.
The problem with more then one ped in the house must be with server delay problem because only get one in each house every single time I try.

@J_R6 I cant help with the logging problem as it would have to be placed on the serverside for it not to get reset.

1 Like

would be awesome if you could add a safe to it
i found a mini game safe cracking
if you could add it to the script it would add a lot to it
and thank you for your efforts

Okay, I would check on my side to reduce delay if possible with the thread.
And for the instance, you can check with https://github.com/ESX-Org/esx_garage that use it or even esx_property

that will give you a exemple :slight_smile:

For everyone who wants it to be “instanced”, I’m not sure this works for the peds and whatnot because I don’t have the newest version on github, but here is what I am using.

Put this somewhere in the client


TriggerEvent(‘instance:registerType’, ‘house’)

RegisterNetEvent(‘instance:onCreate’)
AddEventHandler(‘instance:onCreate’, function(instance)
if instance.type == ‘house’ then
TriggerEvent(‘instance:enter’, instance)
end
end)

Under teleport(exitPos) put this;

	  TriggerEvent('instance:close')

and then lastly, put

	  TriggerEvent('instance:create', 'house')

I have it between
v.locked = false
TriggerEvent(‘instance:create’, ‘house’)
SetPlayerInvisibleLocally(PlayerId(), true)
the SetPlayer is no longer needed (I don’t think it works in the first place?)

Obviously make sure you have instances installed

This won’t create an instance for every house, but rather create one single instance of house as Ryu has pointed out, but will crudely work to make it so other people cannot see each other in the house.

1 Like

But that would create the instance “house” for every house, you need to get the housename or doornumber for the instance to be unique.

1 Like

Hmm, you are indeed correct. I’ll take another peak at it again. If anyone takes a look at esx_properties, it should be fairly simple to just create an instance for each of the houses you use, pulling from the burglaryhouses or whatever the table is called I cannot remember on mobile

1 Like

Does anyone know how I could make it so there are multiple noise zones, so the noise bar can pop up in a couple of different interiors? Thanks.

All you need to do is place a if statement and place the drawNoiseBar with the interior XYZ and your coords XYZ are < then a number.

1 Like

what is the line to disable the set time to rob to whenever?