createDoor
Description
Triggered when a door is created for a property. This includes both physical doors and virtual access points that control entry to property areas.
Payload Structure
{
source = playerId, -- The player's server ID
player = playerData, -- Player data object from framework
propertyId = propertyId,-- Property identifier
}Parameters
source (number): The server ID of the player creating the door
player (table): Complete player data object provided by the framework (ESX/QBCore)
propertyId (string/number): Unique identifier for the property where the door is being created
Usage Example
Example: Registering a Hook in nolag_properties
In this example, we modify the registerHook function for door creation to utilize only the player's source and the property ID.
Return Values
true or nil: Allow the door to be created
false: Cancel the door creation
Last updated