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.
#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.
- Spray can: players with GR1M logos get a menu of their logos plus "Gang tag" (hands to
op-crime:useSpray). Everyone else goes straight to op-crime. - Spray remover: scrubs the GR1M tag in front of you; with none there it hands to
op-crime:useRemover. Anyone holding one can scrub any GR1M tag. - One item is used per spray or scrub, only when it succeeds.
If this resource is stopped, both items do nothing.
#Admin: /graffitiadmin
- Logos: name + https image link (fivemanage, Discord, imgur), live preview. Deleting a logo removes its tags and access rows.
- Players: pick an online player or type a citizen id, tick logos. Untick all to remove them.
- Tags: every tag with owner, age and fade time. Waypoint or delete.
- Settings: tags per player, cooldown, size range, lifetime, render distance, spray/scrub time. Saved in resource KVP.
#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.
GR1M