Logo

DIVERSITY

Documentation

Event Listeners

Client Listeners

This section lists all available event listeners, detailing each events's purpose to help you integrate with the resource effectively.

These events should not be triggered by any other scripts.

Creation Events


div_tape/client/tapeCreated

This event is triggered when a tape object is successfully created in the world. It provides detailed information about the placement, including the player who created it, the coordinates, and the tape's identifier.

client.lua
RegisterNetEvent('div_tape/client/tapeCreated', function(payload)
  print(json.encode(payload, { indent = true }))
end)
Returned DataTypeDescription
source
number
The server ID of the player who created the tape.
coords
vector3
The exact world coordinates where the tape was created.
rotation
vector3
The rotation of the tape object relative to the world.
tapeId
number
A unique identifier for the tape object, useful for tracking or removing the tape.
texture
string
Texture of the tape (e.g., police tape).
timestamp
number
A Unix timestamp representing the moment the tape was created.

div_tape/client/creationStarted

This event is triggered when the creation process has started. It provides information about the situation, including the player who started it, the player's position and time of the event.

client.lua
RegisterNetEvent('div_tape/client/creationStarted', function(payload)
  print(json.encode(payload, { indent = true }))
end)
Returned DataTypeDescription
source
number
The server ID of the player who started the creation.
coords
vector3
The exact world coordinates where the creation started.
timestamp
number
A Unix timestamp representing the moment the creation started.

div_tape/client/creationStopped

This event is triggered when the creation process has stopped. It provides information about the situation, including the player who stopped it, the player's position and time of the event.

client.lua
RegisterNetEvent('div_tape/client/creationStopped', function(payload)
  print(json.encode(payload, { indent = true }))
end)
Returned DataTypeDescription
source
number
The server ID of the player who stopped the creation.
coords
vector3
The exact world coordinates where the creation stopped.
timestamp
number
A Unix timestamp representing the moment the creation stopped.

Deletion Events


div_tape/client/tapeDeleted

This event is triggered when a tape object is deleted from the world. It provides information about the removal, including the player who deleted it and the identifier of the deleted tape.

client.lua
RegisterNetEvent('div_tape/client/tapeDeleted', function(payload)
  print(json.encode(payload, { indent = true }))
end)
Returned DataTypeDescription
source
number
The server ID of the player who deleted the tape.
coords
vector3
The exact world coordinates where the tape was deleted (or its last known location).
tapeId
number
The unique identifier for the deleted tape.
texture
string
Texture of the tape (e.g., police tape).
method
string
The method of deletion (manual | decayed | tool | script).
timestamp
number
A Unix timestamp representing the moment the tape was deleted.

div_tape/client/deletionStarted

This event is triggered when the deletion process has started. It provides information about the situation, including the player who started it, the player's position and time of the event.

client.lua
RegisterNetEvent('div_tape/client/deletionStarted', function(payload)
  print(json.encode(payload, { indent = true }))
end)
Returned DataTypeDescription
source
number
The server ID of the player who started the deletion.
coords
vector3
The exact world coordinates where the deletion started.
method
manual
The method used when deleting the tape.
timestamp
number
A Unix timestamp representing the moment the deletion started.

div_tape/client/deletionStopped

This event is triggered when the creation process has stopped. It provides information about the situation, including the player who stopped it, the player's position and time of the event.

client.lua
RegisterNetEvent('div_tape/client/deletionStopped', function(payload)
  print(json.encode(payload, { indent = true }))
end)
Returned DataTypeDescription
source
number
The server ID of the player who stopped the deletion.
coords
vector3
The exact world coordinates where the deletion stopped.
timestamp
number
A Unix timestamp representing the moment the deletion stopped.

Was this page helpful?