Skip to main content

onGraffitiAdded

AddEventHandler("RiP-Graffiti:onGraffitiAdded", function(graffitiData)
-- Your code here
end)

This event is triggered when a new graffiti is added to the world.

Arguments

NameTypeExplanation
graffitiDataTableThe newly added graffiti data

Graffiti Data Structure

NameTypeExplanation
idNumberUnique identifier for the graffiti
ownerStringIdentifier of the graffiti owner
scaleVector3Scale of the graffiti
alphaNumberOpacity of the graffiti
offsetVector3Offset position from the surface
positionVector3Position of the graffiti in the world
rotationVector3Rotation of the graffiti
urlStringURL of the graffiti image
dateStringCreation date of the graffiti
dirNumberDirection/orientation of the graffiti

Example

AddEventHandler("RiP-Graffiti:onGraffitiAdded", function(graffitiData)
print("New graffiti added:", json.encode(graffitiData))
end)