GR1M Docs

Graffiti

Admin-assigned graffiti logos. Players on the allow list can spray the logos an admin gave them, without being in an op-crime gang.

v1.0.0Needs oxmysql, ox_lib, qbx_core, ox_inventory

#Install

add_ace group.admin gr1mgraffiti.admin allow   # optional, `command` ace and qbx admin/god also work

ensure ox_inventory
ensure op-crime
ensure GR1M_Graffiti

Tables auto-create on boot (sql/install.sql has the same schema). Restart ox_inventory once for the item event change.

#Items (shared with op-crime)

spray_can and spray_remover in ox_inventory/data/items.lua point at GR1M_Graffiti:useSpray / GR1M_Graffiti:useRemover.

If this resource is stopped, both items do nothing.

#Admin: /graffitiadmin

#Placing

Aim at a wall or floor within 3 m (MLO interiors included). Scroll or Up/Down for size, Shift+Scroll or Left/Right to rotate, E or left click to spray, Backspace to cancel. On floors the logo's top faces the way you look. Ceilings (Config.AllowCeilings), glass, foliage, peds and vehicles are refused.

A tag sprayed inside an MLO saves that interior's name hash and origin (interior, ix/iy/iz columns, added on boot), and only draws for players standing inside the same interior. Outdoor tags draw for everyone in range.

#How it draws

Each logo URL is loaded in web/dui.html as a DUI, turned into a runtime texture and drawn on the wall with DrawSpritePoly. One DUI per logo, shared by every tag of it, released after 60 s with no tag in range. No streamed files, so new logos need no restart.

#GR1M_Syndicate crews

Crew spray tags approved in GR1M_Syndicate are made here as normal logos (named [TAG] name) and every member of that crew can spray them without being on the allow list. Exports for that: UpsertLogo(id, label, url), DeleteLogo(id), GetTagsOf(logoIds), IsReady(). Placing or removing a tag fires the server events GR1M_Graffiti:server:tagPlaced / tagRemoved, which Syndicate turns into turf influence.