mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-01 02:38:53 +00:00
104479eaab
- Resources updated to use `@es_extended/imports.lua` instead of calling ESX manually - Replaced all xPlayer loops with ESX.GetExtendedPlayers() - Reverted NUI chunking for esx_menu_default - Performance improvements for several resources - Added events and checks for the player to be loaded for several resources - Changed all PlayerData tables to use ESX.PlayerData
17 lines
454 B
Lua
17 lines
454 B
Lua
local seatsTaken = {}
|
|
|
|
RegisterNetEvent('esx_sit:takePlace')
|
|
AddEventHandler('esx_sit:takePlace', function(objectCoords)
|
|
seatsTaken[objectCoords] = true
|
|
end)
|
|
|
|
RegisterNetEvent('esx_sit:leavePlace')
|
|
AddEventHandler('esx_sit:leavePlace', function(objectCoords)
|
|
if seatsTaken[objectCoords] then
|
|
seatsTaken[objectCoords] = nil
|
|
end
|
|
end)
|
|
|
|
ESX.RegisterServerCallback('esx_sit:getPlace', function(source, cb, objectCoords)
|
|
cb(seatsTaken[objectCoords])
|
|
end) |