mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
feat(resources): remove all esx code, almost
This commit is contained in:
1 parent
6b6080c4b2
commit
c99d0780ae
12 files changed
+121
-84
No files matched your search
@@ -1,8 +1,7 @@
|
||||
import events from '../utils/events';
|
||||
import { ESX } from './server';
|
||||
import { getIdentifier, getSource } from './functions';
|
||||
import { getIdentifier, getPlayerBySource, getSource } from './functions';
|
||||
import { pool } from './db';
|
||||
import { usePhoneNumber } from './functions';
|
||||
import { mainLogger } from './sv_logger';
|
||||
import { MarketplaceListing } from '../../phone/src/common/typings/marketplace';
|
||||
import { reportListingToDiscord } from './discord';
|
||||
@@ -82,15 +81,12 @@ onNet(events.SELLOUT_FETCH_LISTING, async () => {
|
||||
onNet(events.SELLOUT_ADD_LISTING, async (listing: MarketplaceListing) => {
|
||||
const _source = getSource();
|
||||
try {
|
||||
const xPlayer = ESX.GetPlayerFromId(_source);
|
||||
const _identifier = xPlayer.getIdentifier();
|
||||
const name = xPlayer.getName();
|
||||
const player = getPlayerBySource(_source);
|
||||
|
||||
// This is used as username for the reports
|
||||
const playerName = GetPlayerName(_source);
|
||||
const username = GetPlayerName(_source);
|
||||
|
||||
const phoneNumber = await usePhoneNumber(_identifier);
|
||||
await addListing(_identifier, playerName, name, phoneNumber, listing);
|
||||
await addListing(player.identifier, username, player.name, player.phone_number, listing);
|
||||
|
||||
emitNet(events.SELLOUT_ADD_LISTING_SUCCESS, _source);
|
||||
emitNet(events.SELLOUT_ACTION_RESULT, _source, {
|
||||
|
||||
Reference in new issue
Block a user