rcore.cz
  • rcore.cz
  • Store
  • Discord
  • Web administration
  • Our store
  • YouTube
  • 🐌CFX Auth system
    • CFX Auth system
    • Transfer script to another account
    • Error: You lack the required entitlement
    • Error: syntax error near '<\1>'
  • Server
    • Updating server
    • onesync
  • Administration
    • How to change IP
    • Forgot your password?
  • FAQ
    • General issues
    • Cannot verify license
    • Cannot hear any music
    • ECONNRESET: Unable to execute a query
  • paid resources
    • 🏑rcore_airhockey
      • How To Play
      • Spawning a Hockey Table
    • 💪rcore_armwrestling
      • How to place arm table
    • 🎴rcore_banners
      • How to Begin
      • How to Update
      • Common issues & solutions
      • Installation
      • Inventory Items
      • Configs
        • General
        • Billboards
        • Business
        • Permissions
        • Job
        • Config
      • Guides
        • How to change UI logo?
        • How to create new server banner?
        • How to create business?
        • How to buy billboard?
        • How to place banner?
        • Cannot see banners?
        • Expired images
      • API
    • 🏀rcore_basketball
      • Configure new hoop
    • 🏓rcore_beerpong
      • How to use
    • 📹rcore_bodycam
      • Integration
      • Anticheat
      • Recordings don't save
    • 🎳rcore_bowling
      • Configure new alley
    • 🎥rcore_cam
      • Integration
      • Anticheat
    • ⛺rcore_camping
      • Installation
      • Config
      • Consumable Beer
      • OX Inventory
      • Frameworks
      • API
    • 🎪rcore_carnival
      • Create new minigame
    • 🃏rcore_casino
      • Installing Maps
        • UncleJust Casino
        • DlcIplLoader
        • Gabz Casino
        • NoPixel Casino
        • K4MB1 Casino
        • rcore_casino_interior
        • Underground Casino Paleto
        • K4MB1 Enterable Diamond Casino
        • Patoche Casino
        • Clawles: Casino Los Santos
        • Molo Casino
        • Jurassic Jackpot Casino
      • Standalone Version
      • Custom Framework
      • Installing on QBCore
      • Installing on ESX
      • Installing Inventory Items
      • The Cashier
      • Society
      • Lucky Wheel & Podium Vehicle
      • Table Games
      • Slot Machines
      • Casino Bar
      • Inside Track
      • Translations
      • Discord Hook
      • MYSQL Info
      • CasinoControl (Exports)
      • Casino Job & Office
      • Changing Odds
    • 👕rcore_clothes
      • Dark theme
      • Adding a new clothes shop
      • Components
      • Restriction for certian job
      • Custom clothes price
      • Clothes blacklist / Whitelist
      • esx_accessories
      • qb_apartments
      • cui_character
      • API: Open outfits
      • API: Open clothes shop
    • 🎽rcore_clothing 🆕
      • How to begin
      • Installation
      • Migration
      • Configs
        • Main config
        • Price config
        • Shop config
        • Peds config
        • Undress clothes
      • FAQ
      • Admin mode
        • Modes
        • Image debugging
        • Stock management
      • Adding replace/addon clothes
      • Categorize clothing automatically
      • API
      • Troubleshooting
      • Integration
        • Multichar integration guide
        • esx_multicharacter
        • esx_multicharacter OLD
        • qb-multicharacter
        • crm_multichar
        • codem_multichar
        • okok_multichar
        • qbox_multichar
        • ESX vms_multichar
        • QB vms_multichar
        • qs-multicharacter
        • um_multichar
        • wais_multicharacter v2
        • zr_multichar
        • zsx_multicharacter
    • 💃rcore_dance
      • Installation
      • Config
      • FAQ
      • Troubleshooting
      • API
    • 📱rcore_dispatch
      • Config
      • Add alerts
      • Add jobs
      • Locales
      • Logs
      • Integrations
      • Framework
      • Voice and radio
    • 🔒rcore_doorlock
      • Installation
      • Configuration
      • Migration
      • Business
        • Configuration
        • Locksmith Example
      • Inventory Items
      • Keychain
      • API
    • 🍺rcore_drunk
      • How to place drink on table
      • Create new item drink
      • ox inventory
      • API
      • How to use
    • 🥚rcore_easter
      • Installation
      • Configuration
      • API
    • ⛽rcore_fuel
      • Installation
        • ESX
        • QBCore
      • Inventory
        • ESX
        • QBCore
        • ox_inventory
      • Config
        • New fuel station
        • Change fuel type for vehicle
        • Change fuel capacity for vehicle
        • Setting fuel station to be ownable
        • Wrong fuel type
        • Change gas price
      • Integrations
        • API
        • Vehicle keys integrations
        • Hud/Garage integration
      • Server
        • Commands
    • 🔫rcore_gangs
      • API
        • Client
        • Server
      • Integration
        • Framework
        • Inventory
        • Dispatch
      • Localization
      • Configuration
        • Custom gang zone
    • 🚙rcore_garage
      • qb-phone missing garages name
      • missing screenshots
    • 📙rcore_guidebook
      • Installation
      • Config
      • Data permissions
      • API
      • Themes
      • 📙V1 Docs
        • Installation
        • API
        • Themes
    • 🔫rcore_gunshop
      • QBCore Installation
      • ESX Installation
      • How to change pricing
      • How to enable sales of weapons
      • Enabling MK2 weapons on QBCore
      • Adding the ammunation job for QBCore
      • Adding the ammunation job for ESX
    • 🎯rcore_gunrange
      • Installation
      • API
      • Troubleshooting
      • Frequently Asked Questions
      • Gun Range Editor
    • 🏨rcore_hotel
      • How to add another hotel example
      • esx_inventoryhud
      • Quasar inventory
      • OX inventory
      • MF inventory
      • Custom wardrobe
    • 🧑rcore_identity
      • How to change date format
      • esx_kasharacter
    • 🟠rcore_job_blips
      • Installation
      • Configuration
      • Blip Setup
      • Group Setup
      • API
    • ⛳rcore_minigolf
      • Builder
      • Company
      • Config
    • 🚛rcore_missionpack_legal
      • Migrate from old version
    • 🚗rcore_pdm
      • Missing images
      • Blips on minimap
      • Vehicles in stock
      • Missing vehicle names
      • Edit the speed of the vehicle in UI
      • Boss menu + locations
      • Displayed vehicle in the shop
      • How to add a vehicle with a new category
      • QBCore
        • Import missing vehicles from qbcore to rcore_pdm
        • Job data for QBCore framework
        • Import vehicles from database to qbcore
    • 🏓rcore_pingpong
      • How To Play
      • Spawning a Pong Table
      • Match Settings
    • 🤽‍♀️rcore_pool
      • Anticheat
      • How to place pool table
    • 👮rcore_police
      • Installation
      • How to Update
      • Features
      • Inventory
      • Deployer
      • Configs
        • Main Config
      • API
        • Client
        • Server
    • ⛓️rcore_prison
      • Migration from V1
      • How to Begin
      • How to Update
      • Installation
      • Inventory items
      • Configs
        • Main Config
      • Guides
        • Deployer
        • Changing minigame for Cigarette packaging
        • Changing Prison jobs reward
        • Configuring Permissions
        • How to translate in-game panel
        • How to define own stats for Prison GYM?
        • How to define/change default Prisoner outfits?
        • How to define own Prison map?
      • Features
        • Prison Break
        • Solitary
        • Cigar packaging
        • Canteen
        • Dealer
        • Dashboard
        • Chair system
        • Prison Prolog
      • Integrations
        • Inventory
        • Inventory items
      • API
        • Client
        • Server
      • ⛓️V1 Docs
        • Config
        • Inventory
        • API
          • Client
          • Server
        • Locales system
        • Interiors presets
        • Camera prolog
        • Outfits
    • 📻rcore_radiocar
      • API
        • Radio item
        • Marker for buying radio
    • 📋rcore_report
      • Installation
      • API
      • Ace Permissions
      • Config
      • UI Config
      • Features
      • Console Logs
      • Custom Data
      • Responsivity
    • 🏪rcore_shops
      • Add new shop
      • How to add weapon
      • Hide blip on minimap / map
      • Restrict shop to certain job
    • 🔠rcore_shortcuts
      • API
      • Commands and Hotkeys
      • Permissions
      • Notifications
      • Limits
      • Styles
    • ✨rcore_spray
      • ESX instalation
      • QBCore instalation
      • OX Inventory instalation
      • How to add a new image
      • How to add a new font
      • Gang integration
      • Anticheat
    • 📈rcore_stats
      • Installation
      • Permissions
      • Configs
        • Main config
        • Performance
        • Units
        • Other
      • Translation
      • Changing Default Values
      • API
        • Integration
        • Delete
        • Other
    • 👹rcore_tattoos
      • Installation
      • Migrations
      • Add-on tattoos
      • Config
      • Custom Framework
      • Design
      • Tattoo config options
      • Tattoo permissions
      • Troubleshooting
      • API
      • Integrations
        • qb-gangs
      • Business update
        • Config
        • Simple Business
        • Business with jobs
        • Default settings
    • 📺rcore_television
      • How to add a new television
    • 🔧rcore_tuning
      • Editing your config
      • Configuring your framework
      • Job integration
      • Item integration
      • Editing tuning prices
    • 📋rcore_whiteboard
      • Whiteboard type & data
      • Position editor
      • API
      • FAQ
    • 🎁rcore_xmas
      • Installation
      • Configuration
      • Inventory Items
      • Snowball Damage
      • API
    • 📻xradio
      • API
      • Custom menu
      • Ox inventory
  • free resources
    • rcore_arcade
      • How to add msdos games
Powered by GitBook
On this page
  • Explanation
  • Server Events
  • Add player tattoo
  • Remove player tattoo
  • Buy tattoo
  • Get players tattoos
  • Get tattoo price
  • Open tattoo menu from anywhere
  • Get tattoo collection by name
  • Get tattoo name hashes by name
  • Callback
  • Client events
  • Apply player tattoos
  • Open tattoo menu from anywhere
  • Additional call after tattoo reset
  • Business bossmenu marker reload

Was this helpful?

  1. paid resources
  2. rcore_tattoos

API

Integrate Tattoos with your system

All events are SERVER SIDE!

Explanation

  • playerId* = player server id

  • tattooName* = name of the tattoo in tattoo list (e.g. "TAT_AR_001")

  • tattooIdentifier* = combination of male & female hash (e.g "mpHeist3_Tat_003_M-mpHeist3_Tat_003_F")

  • expiration = expiration in real life days, if you want the tattoo to disappear, like a henna tattoo

  • opacity = tattoo opacity (1-5), default is 1

  • onlyPreview = open the shop as a preview shop (only browsing tattoos), true/false

  • part - body part to open the menu for - head, body, left_arm, right_arm, left_leg, right_leg, can be set as nil to open whole menu

  • cb* = callback function to handle response from the called event

* required

Server Events

Add player tattoo

Adds a tattoo to player's body without deducting their money and passes true/false to callback depending on success.

TriggerEvent('rcore_tattoos:addPlayerTattoo', playerId, tattooName, tattooIdentifier, expiration, opacity, cb)

Remove player tattoo

Removes a tattoo on player's body and passes true/false to callback depending on success.

TriggerEvent('rcore_tattoos:removePlayerTattoo', playerId, tattooIdentifier, cb)

Buy tattoo

Same as adding a tattoo, but this will go through the buying process (removing player money etc.) and passes true/false to callback depending on success.

TriggerEven-t('rcore_tattoos:buyTattoo', playerId, tattooName, tattooIdentifier, expiration, opacity, cb)

Get players tattoos

Returns a table of player's tattoos.

TriggerEvent('rcore_tattoos:getPlayerTattoos', playerId, cb)

Get tattoo price

Returns a price of the given tattoo as a number.

TriggerEvent('rcore_tattoos:getTattooPriceByName', tattooName, cb)

TriggerEvent('rcore_tattoos:getTattooPriceByIdentifier', tattooIdentifier, cb)

Open tattoo menu from anywhere

Opens the tattoo shop UI for a player

Also available for client! More info in client section below.

TriggerEvent('rcore_tattoos:openTattooMenuForPlayer', playerId, onlyPreview, part, cb)

Get tattoo collection by name

Returns collection of the tattoo from given name

  • tattooName - name of the tattoo (e.g. TAT_AR_001)

TriggerEvent(triggerName('getTattooCollectionByName'), tattooName, cb)
-- returns > mpchristmas2017_overlays

Get tattoo name hashes by name

Returns name hashes of the tattoo from given name

  • tattooName - name of the tattoo (e.g. TAT_AR_001)

TriggerEvent(triggerName('getTattooNameHashByName'), tattooName, cb)
-- returns > {
--     ["hashMale"] = MP_Christmas2017_Tattoo_007_M,
--     ["hashFemale"] = MP_Christmas2017_Tattoo_007_F,
-- }

Callback

Here you can see an example of an event call with a callback function

TriggerEvent('rcore_tattoos:getTattooPriceByName', 'TAT_AR_001', function(price)
    print('The tattoo price is $' .. price)
end)

Console output:

The tattoo price is $300

Client events

Apply player tattoos

This event will reset & apply tattoos, can be useful when other script reset player tattoos

From server

TriggerClientEvent('rcore_tattoos:applyOwnedTattoos', playerId)

From client

TriggerEvent('rcore_tattoos:applyOwnedTattoos')

You can also add extra parameter so tattoos will not clear all player decoration and only add new tattoos.

local withoutClearingTattoos = true
TriggerClientEvent('rcore_tattoos:applyOwnedTattoos', playerId, withoutClearingTattoos)

From client

local withoutClearingTattoos = true
TriggerEvent('rcore_tattoos:applyOwnedTattoos', withoutClearingTattoos)

Open tattoo menu from anywhere

Parameters are the same as in the server event above in server section!

To simply open tattoo menu in default form for client, call the event without any parameters.

TriggerServerEvent('rcore_tattoos:openTattooMenuForPlayer')

If you want to change parameters, but still open for current client you are calling it from, set playerId as nil.

-- just an example, adjust parameters to your need :)
local onlyPreview = true
TriggerServerEvent('rcore_tattoos:openTattooMenuForPlayer', nil, onlyPreview)

Additional call after tattoo reset

If you for any reason need to do something from your other scripts after our script resets all ped decorations (tattoos, hair fades..), take a look at rcore_tattoos/client/api/helper.lua at the function resetPedDecorationsExtra

If you do not understand what this means, you can simply ignore it.

This function can be used for example to reapply your hair fades from another script that our script keeps deleting when it resets tattoos. If this happens to you, you can put some code inside this function and it will get executed every time the tattoos are reset from our script.

Business bossmenu marker reload

If you need to reload bossmenu markers manually, you can use this event call from client side

TriggerEvent('rcore_tattoos:reloadBusinessMarkers')

This will do the whole process of checking player job, if they are boss of certain business and whether to render the business bossmenu marker.

PreviousTroubleshootingNextIntegrations

Last updated 1 year ago

Was this helpful?

You can also use Config.JobReloadDelay if you need to do it automatically after certain seconds when the script loads. More info in section.

👹
Config