mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 06:28:51 +00:00
refactor(server/source-handling): Altered how we handle source
These changes are made in case source is not guranteed to remain the same Due to how JS should operate, this shouldn't be an issue but this just ensures that
This commit is contained in:
1 parent
acb8e056c3
commit
1aa6a383ab
12 files changed
+222
-140
No files matched your search
@@ -16,10 +16,10 @@ export async function usePhoneNumber(identifier: string): Promise<string> {
|
||||
return phoneNumber[0].phone_number;
|
||||
}
|
||||
|
||||
export const getSource = () => parseInt(source);
|
||||
export const getSource = () => (global as any).source;
|
||||
|
||||
export async function useIdentifier(): Promise<string> {
|
||||
return ESX.GetPlayerFromId(getSource()).getIdentifier();
|
||||
export function getIdentifier(source: number): string {
|
||||
return ESX.GetPlayerFromId(source).getIdentifier();
|
||||
}
|
||||
|
||||
export async function getIdentifierByPhoneNumber(
|
||||
|
||||
Reference in new issue
Block a user