[RELEASE] ESX dzp_treasure - spawn treasure boxes and abandoned cars for players to find

dzp_treasure

FiveM treasure system that allows treasure spawning in any place in map and adding items to it.



Features:

  • Ability to spawn boxes anywhere in map and items to them to be looted;
  • Ability to spawn vehicles anywhere in map and add key item as a requirement;
  • When car is found and required key is in inventory car will be given to player’s garage

Preview:

Requirements:

  • esx_vehicleshop (only to use for cars, normal boxes will work without this)

Installation:

  1. Just download or use git clone git@github.com:daZepelin/dzp_treasure.git. And add it to your resources folder
  2. To your server.cfg file add the following lines, which will allow you to create treasure boxes and add loot to them:
start dzp_treasures
add_ace group.admin dzp allow

or

start dzp_treasures
add_ace identifier.steam.<steam-64-id> dzp allow
  1. Add sql.sql file query to your database.

Usage:

After you added your permissions you can create boxes or cars. To do so use the following chat commands:

/addbox <<item1-name> <item1-amount> <item2-name> <item2-amount> ... <itemN-name> <itemN-amount>>

e.g.

/addbox beer 5 black_money 2000

You can add as many items as you want.

To add car use the same command, but as an item name use car (to specify car model) and key (to specify key needed to get the car)

/addbox car <car-model> key <key-item-name>

e.g.

/addbox car elegy key carkey

Git:

github repository

18 Likes

Great release. Thanks for sharing!

1 Like

Nice stuff :slight_smile:

1 Like

Pretty cool for events and stuff, thanks <3

1 Like

when i take a crate, then i get this shit

2 Likes

Thank you for reporting that. Does it happen every time? Also did you try it when there was more than one player in the server? I will try having a look at it later

Hey brother! Nice release just wondering can you spawn weapons too?

Hello, thanks for showing interest. You can put in weapons using e.g. /addbox WEAPON_PISTOL 20 money using e.g /addbox black_money 2000 and any item using it’s name and amount

1 Like

Great release, I always want to make something similar, thank you for sharing, it helps me solve many problems. However, I found that if a treasure has been generated on the map, when the player leaves the game and then come back again, this treasure cannot be deleted. And now I also think about the solution, but I also look forward to your reply, thank you!

Hello, thank you for the feedback. Sorry, but I did not quite get what you meant. The boxes are being generated for each player separately, if he leaves game, the box just disappears, because the player is not in game. I do know that if you restart the resource there is no way to destroy the boxes that were spawned.

Oh, what I mean is that there are about 2 players in the server, namely Player A and Player B, and Player A generated a treasure, and I know that all online players can see or get the treasure. The problem I found is that assuming that the treasure on the map is not to be looted. When Player B leaves the game and then returns to the game, Player B can still see the treasure just now, and at the same time he can also obtain the treasure items, but the treasure will not be deleted.

Hmm, that is really weird and I have no idea why it is happening, because I thought about it and everytime anyone loots a box all of them are getting deleted and created again for all clients.

It seems that there is no problem, but it is very strange. I found out that there is such a problem with my other computer. The treasure needs to be pressed several times to disappear.

I tried fixing it, get the latest version from github and let me know if it got solved. Thank you.

Fantastic, good release

1 Like

works great! Except, if I have the carkey and claims the car I found. I can just spam “E” to get infinite of that car. It doesn’t dissapear after

hey man i cannot get the command stuff to work keeps saying i dont have permission yet i set it all in the cfg

1 Like

Could you show me the config lines you have added?

i got the command working but it wouldnt let me collect a vehicle crate and when i collected and item crate i didnt get the items in it but crate dissapeared and it kept saying click e

Could you type here the command you tired using in the server?

1 Like