tweak(resources/main): getPlayerIdentifirs use

This commit is contained in:
Christopher committed 2021-03-07 20:39:55 +01:00
1 parent 5d456d18c1
commit a424a67f05
2 files changed
+2 -14

No files matched your search

-7
View File
@@ -5,13 +5,6 @@ import { phoneCloseAnim, phoneOpenAnim, removePhoneProp } from './functions';
let isPhoneOpen = false;
let isPhoneReady = false;
while (true) {
if (NetworkIsPlayerActive(PlayerId())) {
emitNet(events.PHONE_IS_READY);
break;
}
}
/* * * * * * * * * * * * *
*
* Phone initialize data
+2 -7
View File
@@ -26,13 +26,8 @@ on('playerJoining', async () => {
let identifier = null;
for (let i = 0; i < GetNumPlayerIdentifiers(pSource); i++) {
const identifiers = GetPlayerIdentifier(pSource, i);
if (identifiers.includes('license')) {
identifier = identifiers.split(':')[1];
}
}
const identifers = getPlayerIdentifiers(pSource);
identifier = identifers[1].split(':')[1];
console.log('PHONE IS READY: ', identifier);