Merge pull request #155 from project-error/tweak/remove-esx-code

feat(standalone): Allows for the phone to be free from framework requirements
This commit is contained in:
Taso authored and GitHub committed 2021-03-10 21:50:55 -05:00
commit b8ef6b1695
15 files changed
+349 -146

No files matched your search

+3 -2
View File
@@ -19,7 +19,7 @@ function fetchOnInitialize() {
JSON.stringify({
app: 'PHONE',
method: 'setPhoneReady',
data: true,
data: isPhoneReady,
}),
);
}
@@ -110,7 +110,8 @@ async function Phone(): Promise<void> {
}
}
onNet('esx:playerLoaded', fetchOnInitialize);
// triggerd when the player is ready
onNet(events.PLAYER_IS_READY, fetchOnInitialize);
AddEventHandler('onResourceStop', function (resource: string) {
if (resource === GetCurrentResourceName()) {