mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-02 14:38:46 +00:00
36 lines
875 B
TypeScript
36 lines
875 B
TypeScript
import { Server } from 'esx.js';
|
|
import { IServerConfig } from '../../typings/config';
|
|
|
|
// Setup and export config loaded at runtime
|
|
export const config: IServerConfig = JSON.parse(
|
|
LoadResourceFile(GetCurrentResourceName(), 'config.json'),
|
|
);
|
|
|
|
// Setup controllers
|
|
import './db';
|
|
import 'players/player.controller';
|
|
import 'calls/calls.controller';
|
|
|
|
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 { 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');
|
|
}
|
|
});
|