Tired of those pesky swinging gates that always seem to scratch up your beautiful car when all you want to do is get home?
With this script, you can say goodbye to gate frustrations! Now, gates can automatically open for you, and you can even restrict access to specific players based on their Citizen ID. Want it open for everyone? No problem – there’s an option to make it a public gate too.
Example Config:
Config = {}
Config.Framework = "qb-core" -- Options include: qb-core, esx, or standalone
Config.HousingScript = "none" -- Options include: loaf-housing, qb-houses, qs-housing, or none for no housing integration
Config.AdminAcePermission = "gate.admin" -- e.g., add_principal identifier.license:xxxxxxx gate.admin (This value only works when you have the framework set as "standalone")
Config.Gates = {
[1] = {
modelLeft = "prop_lrggate_01c_l", -- Left gate model
modelRight = "prop_lrggate_01c_r", -- Right gate model
coordsLeft = vector3(-1799.7, 471.7, 133.3), -- Coordinates for left gate
coordsRight = vector3(-1801.1, 474.3, 133.5), -- Coordinates for right gate
openingDistance = 7.0, -- Distance at which the gate will open
allowedIdentifiers = {
"CID1234", -- QBCore CitizenID
"steam:11000010abcdef12",
"license:1234567890abcdef1234567890abcdef1234",
"discord:123456789012345678"
},
propertyID = "house1", -- Property ID associated with the gate. This can be found in the SQL Database for the respective house. (Value is not used if Housing Script is set to "none")
restricted = true, -- Only opens for authorized users, set to false to allow for public gate access, will open for anyone.
originalHeadingLeft = 118.92, -- Original heading for the left gate
originalHeadingRight = 119.08, -- Original heading for the right gate
rotationAngleLeft = 75.0, -- Rotation amount for the left gate
rotationAngleRight = 93.0 -- Rotation amount for the right gate
},
}
Preview:
Without Open Permissions
With Open Permissions
Code is accessible | No |
Subscription-based | No |
Lines (approximately) | 700 |
Requirements | ESX, QBCore or Standalone |
Support | Yes |