Test skin stuff for IV
This commit is contained in:
@@ -292,8 +292,19 @@ function setLocalPlayerInfiniteRun(state) {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function setLocalPlayerSkin(skinId) {
|
function setLocalPlayerSkin(skinId) {
|
||||||
|
logToConsole(LOG_INFO, skinId);
|
||||||
if(getGame() == VRR_GAME_GTA_IV) {
|
if(getGame() == VRR_GAME_GTA_IV) {
|
||||||
natives.changePlayerModel(natives.getPlayerId(), skinId);
|
if(natives.isModelInCdimage(skinId)) {
|
||||||
|
natives.requestModel(skinId);
|
||||||
|
natives.loadAllObjectsNow();
|
||||||
|
if(natives.hasModelLoaded(skinId)) {
|
||||||
|
natives.changePlayerModel(natives.getPlayerId(), skinId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//natives.requestModel(skinId);
|
||||||
|
//natives.changePlayerModel(natives.getPlayerId(), skinId);
|
||||||
|
|
||||||
//localPlayer.skin = allowedSkins[skinSelectorIndex][0];
|
//localPlayer.skin = allowedSkins[skinSelectorIndex][0];
|
||||||
//localPlayer.modelIndex = allowedSkins[skinSelectorIndex][0];
|
//localPlayer.modelIndex = allowedSkins[skinSelectorIndex][0];
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -54,9 +54,14 @@ function processSkinSelectKeyPress(keyCode) {
|
|||||||
logToConsole(LOG_DEBUG, `Switching to skin ${allowedSkins[skinSelectorIndex][1]} (Index: ${skinSelectorIndex}, Skin: ${allowedSkins[skinSelectorIndex][0]})`);
|
logToConsole(LOG_DEBUG, `Switching to skin ${allowedSkins[skinSelectorIndex][1]} (Index: ${skinSelectorIndex}, Skin: ${allowedSkins[skinSelectorIndex][0]})`);
|
||||||
skinSelectMessageTextTop = allowedSkins[skinSelectorIndex][1];
|
skinSelectMessageTextTop = allowedSkins[skinSelectorIndex][1];
|
||||||
if(getGame() == VRR_GAME_GTA_IV) {
|
if(getGame() == VRR_GAME_GTA_IV) {
|
||||||
//natives.changePlayerModel(natives.getPlayerId(), allowedSkins[skinSelectorIndex][0]);
|
let skinId = allowedSkins[skinSelectorIndex][1];
|
||||||
//localPlayer.skin = allowedSkins[skinSelectorIndex][0];
|
if(natives.isModelInCdimage(skinId)) {
|
||||||
//localPlayer.modelIndex = allowedSkins[skinSelectorIndex][0];
|
natives.requestModel(skinId);
|
||||||
|
natives.loadAllObjectsNow();
|
||||||
|
if(natives.hasModelLoaded(skinId)) {
|
||||||
|
natives.changePlayerModel(natives.getPlayerId(), skinId);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
localPlayer.skin = allowedSkins[skinSelectorIndex][0];
|
localPlayer.skin = allowedSkins[skinSelectorIndex][0];
|
||||||
}
|
}
|
||||||
@@ -69,9 +74,14 @@ function processSkinSelectKeyPress(keyCode) {
|
|||||||
logToConsole(LOG_DEBUG, `Switching to skin ${allowedSkins[skinSelectorIndex][1]} (Index: ${skinSelectorIndex}, Skin: ${allowedSkins[skinSelectorIndex][0]})`);
|
logToConsole(LOG_DEBUG, `Switching to skin ${allowedSkins[skinSelectorIndex][1]} (Index: ${skinSelectorIndex}, Skin: ${allowedSkins[skinSelectorIndex][0]})`);
|
||||||
skinSelectMessageTextTop = allowedSkins[skinSelectorIndex][1];
|
skinSelectMessageTextTop = allowedSkins[skinSelectorIndex][1];
|
||||||
if(getGame() == VRR_GAME_GTA_IV) {
|
if(getGame() == VRR_GAME_GTA_IV) {
|
||||||
//natives.changePlayerModel(natives.getPlayerId(), allowedSkins[skinSelectorIndex][0]);
|
let skinId = allowedSkins[skinSelectorIndex][1];
|
||||||
//localPlayer.skin = allowedSkins[skinSelectorIndex][0];
|
if(natives.isModelInCdimage(skinId)) {
|
||||||
//localPlayer.modelIndex = allowedSkins[skinSelectorIndex][0];
|
natives.requestModel(skinId);
|
||||||
|
natives.loadAllObjectsNow();
|
||||||
|
if(natives.hasModelLoaded(skinId)) {
|
||||||
|
natives.changePlayerModel(natives.getPlayerId(), skinId);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
localPlayer.skin = allowedSkins[skinSelectorIndex][0];
|
localPlayer.skin = allowedSkins[skinSelectorIndex][0];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user