Skip to content

Commit

Permalink
fix: AddEventHandlers to RegisterNetEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
artur-michalak committed May 12, 2024
1 parent e4ef778 commit 51be3c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,12 @@ end)

exports('SetDoorState', SetDoorState)

AddEventHandler('QBCore:Server:OnPlayerLoaded', function()
RegisterNetEvent('QBCore:Server:OnPlayerLoaded', function()
addPlayer(source --[[@as integer]])
end)

---@param src integer
AddEventHandler('QBCore:Server:OnPlayerUnload', function(src)
RegisterNetEvent('QBCore:Server:OnPlayerUnload', function(src)
removePlayer(src)
end)

Expand Down

0 comments on commit 51be3c9

Please sign in to comment.