fix(callback): incorrect args in __call method

This commit is contained in:
Linden
2022-03-04 10:35:14 +11:00
parent 2a14391561
commit 5c157db3e5
2 changed files with 2 additions and 2 deletions

View File

@@ -23,7 +23,7 @@ game 'gta5'
--[[ Resource Information ]]-- --[[ Resource Information ]]--
name 'ox_lib' name 'ox_lib'
author 'Linden' author 'Linden'
version '2.0.0' version '2.0.1'
repository 'https://github.com/overextended/ox_lib' repository 'https://github.com/overextended/ox_lib'
description 'A library of shared functions to utilise in other resources.' description 'A library of shared functions to utilise in other resources.'

View File

@@ -43,7 +43,7 @@ function callback.await(event, delay, ...)
end end
return setmetatable(callback, { return setmetatable(callback, {
__call = function(event, delay, cb, ...) __call = function(self, event, delay, cb, ...)
if callbackTimer(event, delay) then if callbackTimer(event, delay) then
event = RegisterNetEvent(triggerCallback(event, ...), function(response) event = RegisterNetEvent(triggerCallback(event, ...), function(response)
cb(table.unpack(response)) cb(table.unpack(response))