Fix: Player ready stuff (#241)

This commit is contained in:
Christopher Gjelten authored and GitHub committed 2021-05-23 15:34:17 +02:00
1 parent a103ef9b2f
commit e05f543cb0
7 files changed
+18 -40

No files matched your search

+6
View File
@@ -25,6 +25,12 @@ function fetchOnInitialize() {
sendMessage('PHONE', PhoneEvents.SET_CONFIG, config);
}
if (config.general.enableMultiChar) {
onNet(PhoneEvents.ON_INIT, () => {
fetchOnInitialize();
});
}
RegisterKeyMapping('phone', 'Open Phone', 'keyboard', 'f1');
const getCurrentGameTime = () => {
@@ -1,8 +1,9 @@
import { getSource } from '../utils/miscUtils';
import PlayerService from './player.service';
import { config } from '../server';
import { config, ESX } from '../server';
import { PlayerAddData } from './player.interfaces';
import { playerLogger } from './player.utils';
import { XPlayer } from 'esx.js/@types/server';
/**
* Essentially this whole file acts as a controller layer
@@ -178,6 +178,8 @@ class _PlayerService {
playerLogger.info(`New NPWD Player added through event (${src}) (${identifier})`);
playerLogger.debug(player);
emitNet(PhoneEvents.ON_INIT, src);
}
/**