AddEventHandler.... not needed <3

This commit is contained in:
WLVF committed 2022-09-01 04:11:48 -04:00
1 parent 803727e4e0
commit 7f153e72b2
14 files changed
+33 -66

No files matched your search

+2 -4
View File
@@ -5,14 +5,12 @@ NDCore.Functions.VersionChecker("ND_Doorlocks", GetCurrentResourceName(), "https
local updatedDoors = {}
RegisterNetEvent("ND_Doorlocks:syncDoor")
AddEventHandler("ND_Doorlocks:syncDoor", function(doorID, state)
RegisterNetEvent("ND_Doorlocks:syncDoor", function(doorID, state)
updatedDoors[doorID] = state
TriggerClientEvent("ND_Doorlocks:syncDoor", -1, doorID, state)
end)
RegisterNetEvent("ND_Doorlocks:getDoors")
AddEventHandler("ND_Doorlocks:getDoors", function()
RegisterNetEvent("ND_Doorlocks:getDoors", function()
local player = source
TriggerClientEvent("ND_Doorlocks:returnDoors", player, updatedDoors)
end)