Fixes for IV
This commit is contained in:
@@ -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];
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user