mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
tweak(player): Altered PLAYER_IS_READY event to emit a bool
This will set the client var to true when NPWD loads a player and false when NPWD unloads a player.
This commit is contained in:
1 parent
558f2388fc
commit
85eb58948d
3 files changed
+21
-11
No files matched your search
@@ -9,7 +9,6 @@ import { NotesEvents } from '../../typings/notes';
|
||||
import { BankEvents } from '../../typings/bank';
|
||||
import { PhotoEvents } from '../../typings/photo';
|
||||
import { CallEvents } from '../../typings/call';
|
||||
import { MatchEvents } from '../../typings/match';
|
||||
import { config } from './client';
|
||||
|
||||
let isPhoneOpen = false;
|
||||
@@ -109,12 +108,9 @@ async function Phone(): Promise<void> {
|
||||
}
|
||||
}
|
||||
|
||||
// triggerd when the player is ready
|
||||
onNet(PhoneEvents.PLAYER_IS_READY, () => {
|
||||
isPlayerReady = true;
|
||||
if (isUiReady) {
|
||||
fetchOnInitialize();
|
||||
}
|
||||
// Set the global depending on the response from event
|
||||
onNet(PhoneEvents.PLAYER_IS_READY, (ready: boolean) => {
|
||||
isPlayerReady = ready;
|
||||
});
|
||||
|
||||
AddEventHandler('onResourceStop', function (resource: string) {
|
||||
|
||||
Reference in new issue
Block a user