mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
fix(package/callback): fix broken js callbacks (#742)
This commit reverts commit 87818b3710.
This commit is contained in:
@@ -39,10 +39,9 @@ export function triggerClientCallback<T = unknown>(
|
||||
}
|
||||
|
||||
export function onClientCallback(eventName: string, cb: (playerId: number, ...args: any[]) => any) {
|
||||
eventName = `__ox_cb_${eventName}`;
|
||||
|
||||
exports.ox_lib.setValidCallback(eventName, true)
|
||||
onNet(eventName, async (resource: string, key: string, ...args: any[]) => {
|
||||
|
||||
onNet(`__ox_cb_${eventName}`, async (resource: string, key: string, ...args: any[]) => {
|
||||
const src = source;
|
||||
let response: any;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user