Skip to content

Commit

Permalink
refactor(server): run ox_doorlock.sql at start
Browse files Browse the repository at this point in the history
  • Loading branch information
thelindat committed Jul 19, 2023
1 parent c8e8536 commit 429cffe
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,7 @@ local function isAuthorised(playerId, door, lockpick)
return authorised
end

MySQL.query([[CREATE TABLE IF NOT EXISTS `ox_doorlock` (
`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(50) NOT NULL,
`data` LONGTEXT NOT NULL,
PRIMARY KEY (`id`) USING BTREE
)]])
MySQL.query(LoadResourceFile(cache.resource, 'sql/ox_doorlock.sql'))

MySQL.ready(function()
while Config.DoorList do Wait(100) end
Expand Down

0 comments on commit 429cffe

Please sign in to comment.