mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-03 06:28:51 +00:00
feat(resources/cl_utils): NuiCallback
This commit is contained in:
1 parent
4e7e6b3e92
commit
b42ee97450
1 file changed
+7
@@ -52,3 +52,10 @@ export default class ClientUtils {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export const NuiCallback = (event: string, callback: Function) => {
|
||||
RegisterRawNuiCallback(event, (data: any) => {
|
||||
const parsed = JSON.parse(data?.body);
|
||||
callback(parsed);
|
||||
});
|
||||
};
|
||||
Reference in new issue
Block a user