An identification card resource created for use with linden_inventory for ESX Legacy.
This resource was inspired by the original jsfour identification script and still uses some of the javascript from it. The rest of the LUA is entirely re-written.
Dependencies
Hard Dependencies
These are required resources that this resource was built around. It’s not designed to work without these resources and if you want to remove the requirement for them you’ll be better off writing your own resource rather than try to remove those dependencies from this resource.
By default this resource needs these resources, however the core functionality (creating identification cards, metadata, showing identification cards) will still work if you remove the appropriate code in peds.lua and menu.lua
Make sure you install the required dependencies (listed above)
Follow the instructions to install the other resources - especially the mugshot one for the imgur API
Done!
Config / Disclaimer
Cards Types
I’ve done my best to provide a configurable resource. You are able to add your own identification types to this list however it’s not just just plug and play, you’ll still need to modify the server event and the js events for additional
You’ll have to make sure that the list reflects the items that are available for you and your server, along with your own costs.
The rest of the config is pretty heavily commented, so it should be self explanatory.
With Linden Inventory, items are not stored/read from the databse, but via the inventory itself. I would suggest reading up on the inventory system to learn about it as it is 1 of the best inventory resources out and has a lot of unique features.
Those three dependencies are purely for purchase and setup of the identification item. The meat and bones of the identification script does not hard rely on them.
Does anyone know how you could change the picture background for the id it’s currently pure black so the photo ends up being dark and its hard to see the image
I have one odd problem. Since I use Multicharacter, the “identifier” field is way longer than the field on the ID card. It uses “CHAR1:” plus the 40-digit Rockstar license as the “identifier” in the database. There’s only room for a maximum of 17 digits on the default templates. So it’s about 30 characters too long and the image looks really bad when I show my ID in game.
I do not know much Lua yet, since I am just a newbie. Is there some sort of formula or function that can be added to the creation of the license metadata in the server.lua file that can create a shorter ID number and add it to the users table for future use?
Also, how would I create different licenses in the future other than these three? Is it just a case of creating more items and dummy cards in the inventory items table and the menus?