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
Name | Type | Explanation |
---|---|---|
graffitiData | Table | The newly added graffiti data |
Graffiti Data Structure
Name | Type | Explanation |
---|---|---|
id | Number | Unique identifier for the graffiti |
owner | String | Identifier of the graffiti owner |
scale | Vector3 | Scale of the graffiti |
alpha | Number | Opacity of the graffiti |
offset | Vector3 | Offset position from the surface |
position | Vector3 | Position of the graffiti in the world |
rotation | Vector3 | Rotation of the graffiti |
url | String | URL of the graffiti image |
date | String | Creation date of the graffiti |
dir | Number | Direction/orientation of the graffiti |
Example
AddEventHandler("RiP-Graffiti:onGraffitiAdded", function(graffitiData)
print("New graffiti added:", json.encode(graffitiData))
end)