From e44c5b78d0a0ae12630c65a9b3a6431c5dd6d6a3 Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Fri, 4 Feb 2022 10:39:42 -0600 Subject: [PATCH] Use proper skin ID when showing char select GUI --- scripts/server/subaccount.js | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/scripts/server/subaccount.js b/scripts/server/subaccount.js index 1d3b613b..b0e14ecb 100644 --- a/scripts/server/subaccount.js +++ b/scripts/server/subaccount.js @@ -237,7 +237,7 @@ function showCharacterSelectToClient(client) { let tempSubAccount = getPlayerData(client).subAccounts[0]; let ClanName = (tempSubAccount.clan != 0) ? getClanData(getClanIdFromDatabaseId(tempSubAccount.clan)).name : "None"; let lastPlayedText = (tempSubAccount.lastLogin != 0) ? `${msToTime(getCurrentUnixTimestamp()-tempSubAccount.lastLogin)} ago` : "Never"; - showPlayerCharacterSelectGUI(client, tempSubAccount.firstName, tempSubAccount.lastName, tempSubAccount.cash, ClanName, lastPlayedText, tempSubAccount.skin); + showPlayerCharacterSelectGUI(client, tempSubAccount.firstName, tempSubAccount.lastName, tempSubAccount.cash, ClanName, lastPlayedText, getGameData().skins[getGame()][tempSubAccount.skin][0]); //spawnPlayer(client, getServerConfig().characterSelectPedPosition, getServerConfig().characterSelectPedHeading, getPlayerCurrentSubAccount(client).skin, getServerConfig().characterSelectInterior, getServerConfig().characterSelectDimension); //setTimeout(function() { @@ -321,7 +321,7 @@ function checkPreviousCharacter(client) { let clanName = (tempSubAccount.clan != 0) ? getClanData(getClanIdFromDatabaseId(tempSubAccount.clan)).name : "None"; let lastPlayedText = (tempSubAccount.lastLogin != 0) ? `${msToTime(getCurrentUnixTimestamp()-tempSubAccount.lastLogin)} ago` : "Never"; - showPlayerCharacterSelectGUI(client, tempSubAccount.firstName, tempSubAccount.lastName, tempSubAccount.cash, clanName, lastPlayedText, tempSubAccount.skin); + showPlayerCharacterSelectGUI(client, tempSubAccount.firstName, tempSubAccount.lastName, tempSubAccount.cash, clanName, lastPlayedText, getGameData().skins[getGame()][tempSubAccount.skin][0]); logToConsole(LOG_DEBUG, `[VRR.SubAccount] Setting ${getPlayerDisplayForConsole(client)}'s character to ID ${getPlayerData(client).currentSubAccount}`); } @@ -342,7 +342,7 @@ function checkNextCharacter(client) { let clanName = (tempSubAccount.clan != 0) ? getClanData(getClanIdFromDatabaseId(tempSubAccount.clan)).name : "None"; let lastPlayedText = (tempSubAccount.lastLogin != 0) ? `${msToTime(getCurrentUnixTimestamp()-tempSubAccount.lastLogin)} ago` : "Never"; - showPlayerCharacterSelectGUI(client, tempSubAccount.firstName, tempSubAccount.lastName, tempSubAccount.cash, clanName, lastPlayedText, tempSubAccount.skin); + showPlayerCharacterSelectGUI(client, tempSubAccount.firstName, tempSubAccount.lastName, tempSubAccount.cash, clanName, lastPlayedText, getGameData().skins[getGame()][tempSubAccount.skin][0]); logToConsole(LOG_DEBUG, `[VRR.SubAccount] Setting ${getPlayerDisplayForConsole(client)}'s character to ID ${getPlayerData(client).currentSubAccount}`); } @@ -564,13 +564,6 @@ function forceFightStyleCommand(command, params, client) { return false; } - if(!isPlayerAtGym(client)) { - if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("BasicModeration"))) { - messagePlayerError(client, `You need to be at a gym!`); - return false - } - } - getPlayerCurrentSubAccount(client).fightStyle = fightStyleId; setPlayerFightStyle(client, fightStyleId); messagePlayerSuccess(client, `You set ${getCharacterFullName(targetClient)}'s fight style to ${getGameData().fightStyles[getServerGame()][fightStyleId][0]}`)