Use divider style

This commit is contained in:
Vortrex
2021-04-18 19:14:19 -05:00
parent 2309b3c678
commit 56364d231c

View File

@@ -943,7 +943,7 @@ function getClosestPoliceStation(position) {
return getServerData().policeStations[getServerGame()][closest]; return getServerData().policeStations[getServerGame()][closest];
} }
// ------------------------------------------------------------------------- // ===========================================================================
function getPlayerDisplayForConsole(client) { function getPlayerDisplayForConsole(client) {
if(isNull(client)) { if(isNull(client)) {
@@ -952,7 +952,7 @@ function getPlayerDisplayForConsole(client) {
return `${client.name}[${client.index}]`; return `${client.name}[${client.index}]`;
} }
// ------------------------------------------------------------------------- // ===========================================================================
function getPlayerNameForNameTag(client) { function getPlayerNameForNameTag(client) {
if(isPlayerSpawned(client)) { if(isPlayerSpawned(client)) {
@@ -961,35 +961,31 @@ function getPlayerNameForNameTag(client) {
return client.name; return client.name;
} }
// ------------------------------------------------------------------------- // ===========================================================================
function isPlayerSpawned(client) { function isPlayerSpawned(client) {
if(isConsole(client)) { return getPlayerData(client).spawned;
return false;
} }
return ((client.player != null || getPlayerData(client).syncPosition != null) && getPlayerData(client).spawned); // ===========================================================================
}
// -------------------------------------------------------------------------
function getLockedUnlockedTextFromBool(boolVal) { function getLockedUnlockedTextFromBool(boolVal) {
return (boolVal) ? "locked" : "unlocked"; return (boolVal) ? "locked" : "unlocked";
} }
// ------------------------------------------------------------------------- // ===========================================================================
function getLockedUnlockedEmojiFromBool(boolVal) { function getLockedUnlockedEmojiFromBool(boolVal) {
return (boolVal) ? "🔒" : "🔓"; return (boolVal) ? "🔒" : "🔓";
} }
// ------------------------------------------------------------------------- // ===========================================================================
function getPlayerIsland(client) { function getPlayerIsland(client) {
return getIsland(getPlayerPosition(client)); return getIsland(getPlayerPosition(client));
} }
// ------------------------------------------------------------------------- // ===========================================================================
function isAtPayAndSpray(position) { function isAtPayAndSpray(position) {
for(let i in payAndSprays[getServerGame()]) { for(let i in payAndSprays[getServerGame()]) {
@@ -1001,7 +997,7 @@ function isAtPayAndSpray(position) {
return false; return false;
} }
// ------------------------------------------------------------------------- // ===========================================================================
async function waitUntil(condition) { async function waitUntil(condition) {
return new Promise((resolve) => { return new Promise((resolve) => {
@@ -1016,7 +1012,7 @@ async function waitUntil(condition) {
}); });
} }
// ------------------------------------------------------------------------- // ===========================================================================
function resetClientStuff(client) { function resetClientStuff(client) {
logToConsole(LOG_DEBUG, `[Asshat.Utilities] Resetting client data for ${getPlayerDisplayForConsole(client)}`); logToConsole(LOG_DEBUG, `[Asshat.Utilities] Resetting client data for ${getPlayerDisplayForConsole(client)}`);
@@ -1038,7 +1034,7 @@ function resetClientStuff(client) {
getPlayerData(client).lastVehicle = null; getPlayerData(client).lastVehicle = null;
} }
// ------------------------------------------------------------------------- // ===========================================================================
function getPlayerFromCharacterId(subAccountId) { function getPlayerFromCharacterId(subAccountId) {
let clients = getClients(); let clients = getClients();
@@ -1053,7 +1049,7 @@ function getPlayerFromCharacterId(subAccountId) {
return false; return false;
} }
// ------------------------------------------------------------------------- // ===========================================================================
function doesWordStartWithVowel(word) { function doesWordStartWithVowel(word) {
switch(word.substr(0,1).toLowerCase()) { switch(word.substr(0,1).toLowerCase()) {
@@ -1071,7 +1067,7 @@ function doesWordStartWithVowel(word) {
return false; return false;
} }
// ------------------------------------------------------------------------- // ===========================================================================
function getProperDeterminerForName(word) { function getProperDeterminerForName(word) {
switch(word.substr(0,1).toLowerCase()) { switch(word.substr(0,1).toLowerCase()) {
@@ -1086,13 +1082,13 @@ function getProperDeterminerForName(word) {
} }
} }
// ------------------------------------------------------------------------- // ===========================================================================
function getPluralForm(name) { function getPluralForm(name) {
return name; return name;
} }
// ------------------------------------------------------------------------- // ===========================================================================
function removeColoursFromString(str) { function removeColoursFromString(str) {
let matchRegex = /#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})\b/gi; let matchRegex = /#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})\b/gi;
@@ -1104,7 +1100,7 @@ function removeColoursFromString(str) {
return [str, matchedHexes]; return [str, matchedHexes];
} }
// ------------------------------------------------------------------------- // ===========================================================================
function checkPlayerPedStates() { function checkPlayerPedStates() {
let clients = getClients(); let clients = getClients();
@@ -1121,7 +1117,7 @@ function checkPlayerPedStates() {
} }
} }
// ------------------------------------------------------------------------- // ===========================================================================
function showConnectCameraToPlayer(client) { function showConnectCameraToPlayer(client) {
fadeCamera(client, true, 1); fadeCamera(client, true, 1);
@@ -1130,6 +1126,12 @@ function showConnectCameraToPlayer(client) {
// =========================================================================== // ===========================================================================
function showCharacterSelectCameraToPlayer(client) {
setPlayerCameraLookAt(client, getServerConfig().characterSelectCameraPosition, getServerConfig().characterSelectCameraPosition);
}
// ===========================================================================
function generateRandomString(length) { function generateRandomString(length) {
var result = ''; var result = '';
var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';