GCMod

Troubleshooting

Common issues and implementation notes for gcm_tattoos.


Tattoos do not persist after reconnect

Possible Causes

  • Verify gcm_tattoos table exists and contains the player's identifier.
  • Confirm framework identifier mapping in custom/server/framework.lua matches your framework build.
  • Confirm oxmysql is started before gcm_tattoos.

Fix

  • Ensure DB schema from database.sql is imported.
  • Confirm identifier adapter returns stable identifiers for your framework.
  • Start oxmysql before gcm_tattoos in server.cfg.

Tattoo shop marker appears but UI does not open

Possible Causes

  • Confirm player has a valid identifier (playerIdentifier path in client logic).
  • Verify no custom hook in custom/client/shop.lua blocks Nui.open().
  • Check if another resource blocks key E (control 38).

Fix

  • Verify player identification path resolves correctly.
  • Temporarily disable custom shop hooks and retest.
  • Rebind or disable conflicting E key interactions from other resources.

Player cannot pay for tattoos

Possible Causes

  • Check Config.PaymentMethod in config/main.lua (bank/cash compatibility per framework).
  • Confirm target account exists for your framework/account setup.

Fix

  • Set Config.PaymentMethod to an account that exists in your economy framework.
  • Confirm account balances and account names match framework conventions.

Tattoos disappear during gameplay

Possible Causes

  • If another resource clears ped decorations, enable Config.UseForceCheckTattoos = true.
  • Verify no third-party script repeatedly calls ClearPedDecorations on the local player.

Fix

  • Enable UseForceCheckTattoos and retest synchronization.
  • Identify and patch conflicting resources that clear ped decorations.

Locked tattoos are not synced

Possible Causes

  • Confirm gcm_tattoos_locked rows exist and identifiers JSON is valid.
  • Restart resource and check startup load from MySQL.ready(...).

Fix

  • Validate and repair malformed JSON in identifiers.
  • Confirm lock rows are loaded on startup without SQL errors.

Implementation Risk Notes

These notes highlight potential edge cases or improvements in the current implementation.

Export Type Check Bug

  • Server export getTattoos(identifier) currently uses:
lua
if not type(identifier) == 'number' then

This condition is always false due Lua operator precedence and can break intended source-to-identifier conversion. Recommended fix:

lua
if type(identifier) == 'number' then
    identifier = Custom.GetIdentifier(identifier)
end