99kr-burglary has a pawn shop built into the script that I am using. I am able to sell items with clean money, and dirty money in the pawn shop. Only crappy part is it’s only an icon, and no one has a map or mlo for a pawn shop…
Thnx for giving him a better option then the quick one i found. As far as yours not having a mlo for pawn. You could make that a bit better… by adding a npc… that every time you sell something it does a hand off… so if police are around they see you selling something to the npc (adds a bit of rp chance). I have seen the 99kr script in but never loaded it up or looked into it… but wouldn’t imagine it wouldn’t be to hard to add in a npc and some simple animations.
SpikE
I have updated the script - to use a resource i have just released to get the number of police online hopefully using less resources for the server overall.
I have not changed anything else in the script except how it gets the number of police online, so unless you are interested in using esx_jobnumbers for other scripts would be no need to update to this version.
SpikE
could you make the config choose if you want that mod to count the cops?
The orginal way I made the script count the police is the same way that this mod does… just this mod is able to be used by other scripts as well. So not sure i will look into coding it twice and having the 2nd option as a config setting.
SpikE
You will need to share “InteractSound_SV” and its sound file to sound when the crsital is broken.
Just looked at the code… and when i changed the method used to get police count… i used a older version that was coded to use interact sound. I am changing the method right now to covert to use ingame sound instead of a third party script for the sound. Will post back here when it is updated.
SpikE
I have updated the github to include the version that does not require interactsound to play the case hit/smash sounds. Sorry I didn’t notice that when I last updated.
SpikE
If you had the last version I did not change anything in the config so you can keep your config to put back in after the update so you do not have to reset any settings.
I still can’t hear the sound, but I don’t see any error in the code or in the F8. Also in this version the function does not work:
-Config.MinPolice
-Config.Closed
Will look into the Config.Closed and MinPolice function now… as far as hearing the sound - it is game sound so need to make sure you have ingame sounds turned up.
But i will dl the version on github to see what is going on .
SpikE
My error, when clearing cache it works. The sound and the 2 functions already work for me
Glad you got it sorted out. If you have any other issues feel free to list it here… or dm me directly.
SpikE
You can add this code to create a jewelry icon.
confg.lua
Config = {}
Config.MinPolice = 1 -- Min number of police needed to rob jewelry store.
Config.ResetTime = 60 -- Number of Minutes the store will reset after first case is broken
Config.Closed = true -- Sets store to closed if the police online is less then MinPolice
Config.AllowPoliceStoreClose = true -- Allows any job set in Config.PoliceJobs to Close the store after a robbery until next store reset.
Config.PoliceNotifyBroken = 75 -- The chance breaking a case will notify the police. Setting to 100 will notify first broken case..
Config.PoliceNotifyNonBroken = 25 -- The chance attempting to break a case will notify the police. Setting to 100 will notify every attempt.
Config.PlayFailSound = true -- Uses sound for failed attempt to break.
Config.Icon = true --Crear un icono
-- AllowedWewapons lists all weapons that are able to be used to break cases with the chance percent it has of breaking glass.
Config.AllowedWeapons = {
{ name = 'WEAPON_PISTOL', chance = 30 },
{ name = 'WEAPON_SMG', chance = 40 },
{ name = 'WEAPON_CROWBAR', chance = 18 },
}
client.lua
Citizen.CreateThread(function()
if Config.Icon == true then
local blip = AddBlipForCoord(-631.84, -237.84, 38.08)
SetBlipSprite (blip, 439)
SetBlipDisplay(blip, 4)
SetBlipScale (blip, 1.0)
SetBlipColour (blip, 4)
SetBlipAsShortRange(blip, true)
BeginTextCommandSetBlipName('STRING')
AddTextComponentString('Joyería')
EndTextCommandSetBlipName(blip)
end
end)
Question, in the client.lua on code lines 285, 289, 293, and 312 do you mean robable? I assume this is a typo? Also the script does not seem to work for me, I set cops required to zero and added the code to make a map blip that is all I have done. I do not have any console errors.
Update – Please add your scripts dependencies on this thread so that people are aware of them, that was the reason the script was not working for me lol
ah…sorry i though i edited that it needed my jobnumbers script.
SpikE
Need to make sure the items in the Config for drop items… is in your item list.
SpikE
Noticed last night the resource on my test server was running very high when inside of the Jewel Store. This seems to be caused by using export to get police count. So i have rewritten both JewelRobbery and JobsOnline to update different.
This change adds more security over the numbers online as they are only updated when someone logs into the server or leaves the server. Has a fair bit better resource usage (highest the ms peaked at on my computer was 0.05 while drawing text)
You will need to update both esx_jewelrobbery and esx_jobsonline .
SpikE
Since i changed the way the Jewelrobbery gets the police count… i forgot to put one line back in that will update if you are already in the store and someone signs in/out as a police officer.
You can dl the lastest version from github or just replace the print that is on like 58 of the client.lua to this
’ HasAlreadyEnteredArea = false ’
SpikE
If when entering the jewelry store there is a minimum of police and one is disconnected, if the thief is in the jewelry shop but has not yet started it, can I steal even though a police officer is missing?
No the cases will not be accessable even if they manage to enter the store without the right number of police on. If you are in the store and a police officer disconnects, your screen will fade to black and you will get put outside with a msg that ‘Vangelico’s is now Closed’.
SpikE


