mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-02 22:17:39 +00:00
config -> ResourceConfig for readability and the resource config in NUI is now being referenced consistently from state so it can be referenced at runtime and not compile time. Also removes the need to copy the config before using `cp`
32 lines
808 B
TypeScript
32 lines
808 B
TypeScript
import { Server } from 'esx.js';
|
|
import { ResourceConfig } from '../../typings/config';
|
|
|
|
// Setup and export config loaded at runtime
|
|
export const config: ResourceConfig = JSON.parse(
|
|
LoadResourceFile(GetCurrentResourceName(), 'config.json'),
|
|
);
|
|
|
|
import './db';
|
|
import './sv_twitter';
|
|
import './sv_main';
|
|
import './sv_contacts';
|
|
import './sv_marketplace';
|
|
import './sv_bank';
|
|
import './sv_notes';
|
|
import './sv_photo';
|
|
import './sv_messages';
|
|
import './sv_match';
|
|
import './sv_call';
|
|
import './players/sv_player_events';
|
|
import { mainLogger } from './sv_logger';
|
|
|
|
export let ESX: Server = null;
|
|
|
|
emit('esx:getSharedObject', (obj: Server) => (ESX = obj));
|
|
|
|
on('onServerResourceStart', (resource: string) => {
|
|
if (resource === GetCurrentResourceName()) {
|
|
mainLogger.info('Sucessfully started');
|
|
}
|
|
});
|