Fixes for IV

This commit is contained in:
Vortrex
2022-02-26 22:30:39 -06:00
parent a15b29e977
commit 8e225ed480
6 changed files with 43 additions and 16 deletions

View File

@@ -196,7 +196,11 @@ function removePlayerFromVehicle(client) {
function setPlayerSkin(client, skinIndex) {
logToConsole(LOG_DEBUG, `Setting ${getPlayerDisplayForConsole(client)}'s skin to ${getGameData().skins[getGame()][skinIndex][0]} (Index: ${skinIndex}, Name: ${getGameData().skins[getGame()][skinIndex][1]})`);
client.player.modelIndex = getGameData().skins[getGame()][skinIndex][0];
if(getGame() == VRR_GAME_GTA_IV) {
triggerNetworkEvent("vrr.localPlayerSkin", client, getGameData().skins[getGame()][skinIndex][0]);
} else {
client.player.modelIndex = getGameData().skins[getGame()][skinIndex][0];
}
}
// ===========================================================================

View File

@@ -371,9 +371,11 @@ function selectCharacter(client, characterId = -1) {
//setPlayerCameraLookAt(client, getPosBehindPos(spawnPosition, spawnHeading, 5), spawnPosition);
getPlayerData(client).pedState = VRR_PEDSTATE_SPAWNING;
if(getGame() < VRR_GAME_MAFIA_ONE) {
if(getGame() < VRR_GAME_GTA_IV) {
spawnPlayer(client, spawnPosition, spawnHeading, getGameData().skins[getGame()][skin][0], spawnInterior, spawnDimension);
} else {
} else if(getGame() == VRR_GAME_GTA_IV) {
spawnPlayer(client, spawnPosition, spawnHeading, getGameData().skins[getGame()][skin][0], spawnInterior, spawnDimension);
} else if(getGame() >= VRR_GAME_MAFIA_ONE) {
spawnPlayer(client, getGameData().skins[getGame()][skin][0], spawnPosition, spawnHeading);
}