[Release] xnTattoos (ESX)

Inside Menu

xnTattoos

ESX Tattoo Shop using all the available GTA Online tattoos with correct names and configured pricing. You can select parts of the body and apply multiple tattoos to each area, change the opacity of the tattoos, rotate the camera to see them from multiple angles and even remove tattoos.

Installation

Add tattoos.sql to your database if you don’t already have a tattoos field in your users table (or update the VARCHAR(255) to LONGTEXT to prevent errors of having too many tattoos

Copy xnTattoos to your resources folder and add start xnTattoos to your server.cfg

Customisation

All the tattos are stored in the AllTattoos.json file, these are ripped directly from V thanks to root-cause

The prices of the tattoos are being divided by 20 otherwise they would all be massively expensive, so if you plan to change the prices keep that in mind unless you plan to change the script itself

All tattoo names are stored text labels inside the game, so if you plan to add custom tattoos make sure it has a matching label being created with AddTextEntry()

Categories are defined by the Zone entry in the json and the DLC they come from is defined by Collection which is used to load the correct textures

Dependencies

Obviously this needs ESX and mysql-async Another dependency is JayMenu which is currently included in this release until it is actually fully released by Jaymo

Known Issues

Sometime the camera goes into the wrong spot. Leave the menu and re-enter it to fix that.

Head Blend Data is memed on OneSync so the tattoos try and reapply themselves every 5 minutes to counter that (maybe)

Download & Source

Video Demo

Video Demo

27 Likes

nice script, sorry for this question nothing to do with the post but i see the face of your player in demonstration video is different you use some character creator?if yes can say the name please i need so much this, sorry my bad english i not using a translator and i will use with pleasure your script is very nice good job

2 Likes

Remove the cap, body armor

sex      = 0,
				tshirt_1 = 15,
				tshirt_2 = 0,
				arms     = 15,
				torso_1  = 91,
				torso_2  = 0,
				pants_1  = 14,
				pants_2  = 0,
				shoes_1 = 5,
				glasses_1 = 0,
				helmet_1 = -1,
				decals_1 = -1,
		        chain_1 = -1,
				bproof_1 = -1,
2 Likes

Make a PR on github

1 Like

Very nice release, but what’s the difference between your script and his ([Release] [ESX] Tattoos Shops)?
Thank you.

1 Like

You can delete a tattoo, and it won’t disappear when you log in again.

This is a good mode too.

1 Like

Literally everything, takes 2 seconds to see that.

1 Like

Oh This Work is sooooooo Great :slight_smile: Thank you very Much

But, why 73 - 345 $ for a Tattoo?

Where can this raise

Best Regards
:slight_smile:

2 Likes

I changed the code so i could change the prices in the AllTattoos.json

client.lua, rule 307 & 331

From

local price = math.ceil(tattoo.Price / 20) == 0 and 100 or math.ceil(tattoo.Price / 20)

To

local price = math.ceil(tattoo.Price)

If you change now your price in the .json file they will change to those :partying_face:

1 Like

Thanks

Thanks work nice! :slight_smile:

Hey Smallo great and clean work as usual :smiley: did you think of making a barbershop, mask shop, or clothes shop :slight_smile:

Clean & simple, great job :smiley:

If you could give me any ideas on where yo trouble shoot, I have every thing working, the shops, the placement and every shows correct, but I cant buy, I press enter and I get a ring, but no money is taken and no tattoos applied. I am still pretty new to this so sorry if this is a simple thing

Here is the update for xnTattoos

config.lua

Config.NewEsx = true

AND

server/main.lua

ESX.RegisterServerCallback('SmallTattoos:PurchaseTattoo', function(source, cb, tattooList, price, tattoo, tattooName)
	local xPlayer = ESX.GetPlayerFromId(source)

	if Config.NewEsx then
		if xPlayer.getAccount('money').money >= price then
			xPlayer.removeAccountMoney('money', price)
			table.insert(tattooList, tattoo)
	
			MySQL.Async.execute('UPDATE users SET tattoos = @tattoos WHERE identifier = @identifier', {
				['@tattoos'] = json.encode(tattooList),
				['@identifier'] = xPlayer.identifier
			})
	
			TriggerClientEvent('esx:showNotification', source, "You have bought the ~y~" .. tattooName .. "~s~ tattoo for ~g~$" .. price)
			cb(true)
		else
			TriggerClientEvent('esx:showNotification', source, "You do not have enough money for this tattoo")
			cb(false)
		end
	else
		if xPlayer.getMoney() >= price then
			xPlayer.removeMoney(price)
			table.insert(tattooList, tattoo)

			MySQL.Async.execute('UPDATE users SET tattoos = @tattoos WHERE identifier = @identifier', {
				['@tattoos'] = json.encode(tattooList),
				['@identifier'] = xPlayer.identifier
			})

			TriggerClientEvent('esx:showNotification', source, "You have bought the ~y~" .. tattooName .. "~s~ tattoo for ~g~$" .. price)
			cb(true)
		else
			TriggerClientEvent('esx:showNotification', source, "You do not have enough money for this tattoo")
			cb(false)
		end
	end
end)
1 Like

Like I said in the other topic, please make a PR on the Github so it can be pushed more easily

Yeah, I have other things going on and do not have time to deal with Github for pull requests (packing in rl) so I just posted the code here so that other’s could update it themselves until you got around to doing it. During a time where I wasn’t so busy, I would.

How do I do that so if someone has the job “Tattoo” they can acces the Menu. Would like if someone could Help.

1 Like

Can someone say how I can rotate the Camera?

while you’re using the menu it tells you down the bottom right what buttons do what.