Server 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/server/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.
RegisterNetEvent('div_tape/server/tapeCreated', function(payload)
print(json.encode(payload, { indent = true }))
end)| Returned Data | Type | Description |
|---|---|---|
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/server/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.
RegisterNetEvent('div_tape/server/creationStarted', function(payload)
print(json.encode(payload, { indent = true }))
end)| Returned Data | Type | Description |
|---|---|---|
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/server/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.
RegisterNetEvent('div_tape/server/creationStopped', function(payload)
print(json.encode(payload, { indent = true }))
end)| Returned Data | Type | Description |
|---|---|---|
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/server/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.
RegisterNetEvent('div_tape/server/tapeDeleted', function(payload)
print(json.encode(payload, { indent = true }))
end)| Returned Data | Type | Description |
|---|---|---|
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/server/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.
RegisterNetEvent('div_tape/server/deletionStarted', function(payload)
print(json.encode(payload, { indent = true }))
end)| Returned Data | Type | Description |
|---|---|---|
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/server/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.
RegisterNetEvent('div_tape/server/deletionStopped', function(payload)
print(json.encode(payload, { indent = true }))
end)| Returned Data | Type | Description |
|---|---|---|
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. |