Mafia Connected support
This commit is contained in:
@@ -63,21 +63,21 @@ function loadSkinSelectMessageFontBottom() {
|
||||
function processSkinSelectKeyPress(keyCode) {
|
||||
if(usingSkinSelector) {
|
||||
if(keyCode == SDLK_RIGHT) {
|
||||
if(allowedSkins[gta.game].length-1 == skinSelectorIndex) {
|
||||
if(allowedSkins[game.game].length-1 == skinSelectorIndex) {
|
||||
skinSelectorIndex = 0;
|
||||
} else {
|
||||
skinSelectorIndex++;
|
||||
}
|
||||
localPlayer.skin = allowedSkins[gta.game][skinSelectorIndex][0];
|
||||
skinSelectMessageTextTop = allowedSkins[gta.game][skinSelectorIndex][1];
|
||||
localPlayer.skin = allowedSkins[game.game][skinSelectorIndex][0];
|
||||
skinSelectMessageTextTop = allowedSkins[game.game][skinSelectorIndex][1];
|
||||
} else if(keyCode == SDLK_LEFT) {
|
||||
if(skinSelectorIndex <= 0) {
|
||||
skinSelectorIndex = allowedSkins[gta.game].length-1;
|
||||
skinSelectorIndex = allowedSkins[game.game].length-1;
|
||||
} else {
|
||||
skinSelectorIndex--;
|
||||
}
|
||||
localPlayer.skin = allowedSkins[gta.game][skinSelectorIndex][0];
|
||||
skinSelectMessageTextTop = allowedSkins[gta.game][skinSelectorIndex][1];
|
||||
localPlayer.skin = allowedSkins[game.game][skinSelectorIndex][0];
|
||||
skinSelectMessageTextTop = allowedSkins[game.game][skinSelectorIndex][1];
|
||||
} else if(keyCode == SDLK_RETURN) {
|
||||
triggerNetworkEvent("vrr.skinSelected", skinSelectorIndex);
|
||||
} else if(keyCode == SDLK_BACKSPACE) {
|
||||
@@ -91,16 +91,18 @@ function processSkinSelectKeyPress(keyCode) {
|
||||
function processSkinSelectRendering() {
|
||||
if(usingSkinSelector) {
|
||||
if(skinSelectMessageFontTop != null && skinSelectMessageFontBottom != null) {
|
||||
if(gta.game != GAME_GTA_VC) {
|
||||
skinSelectMessageFontTop.render(skinSelectMessageTextTop, [0, gta.height-100], gta.width, 0.5, 0.0, skinSelectMessageFontTop.size, skinSelectMessageColourTop, true, true, false, true);
|
||||
skinSelectMessageFontBottom.render(skinSelectMessageTextBottom, [0, gta.height-65], gta.width, 0.5, 0.0, skinSelectMessageFontBottom.size, skinSelectMessageColourBottom, true, true, false, true);
|
||||
}
|
||||
//if(gta.game != GAME_GTA_VC) {
|
||||
skinSelectMessageFontTop.render(skinSelectMessageTextTop, [0, game.height-100], game.width, 0.5, 0.0, skinSelectMessageFontTop.size, skinSelectMessageColourTop, true, true, false, true);
|
||||
skinSelectMessageFontBottom.render(skinSelectMessageTextBottom, [0, game.height-65], game.width, 0.5, 0.0, skinSelectMessageFontBottom.size, skinSelectMessageColourBottom, true, true, false, true);
|
||||
//}
|
||||
}
|
||||
|
||||
localPlayer.position = skinSelectPosition;
|
||||
localPlayer.heading = skinSelectHeading;
|
||||
if(gta.game == GAME_GTA_III || gta.game == GAME_GTA_VC) {
|
||||
localPlayer.clearObjective();
|
||||
if(getMultiplayerMod() == VRR_MPMOD_GTAC) {
|
||||
if(gta.game == GAME_GTA_III || gta.game == GAME_GTA_VC) {
|
||||
localPlayer.clearObjective();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -110,14 +112,18 @@ function processSkinSelectRendering() {
|
||||
function toggleSkinSelect(state) {
|
||||
if(state) {
|
||||
skinSelectorIndex = 0;
|
||||
if(localPlayer.skin != allowedSkins[gta.game][skinSelectorIndex][0]) {
|
||||
localPlayer.skin = allowedSkins[gta.game][skinSelectorIndex][0];
|
||||
if(localPlayer.skin != allowedSkins[game.game][skinSelectorIndex][0]) {
|
||||
localPlayer.skin = allowedSkins[game.game][skinSelectorIndex][0];
|
||||
}
|
||||
usingSkinSelector = true;
|
||||
let tempPosition = localPlayer.position;
|
||||
tempPosition.z += 0.5;
|
||||
let frontCameraPosition = getPosInFrontOfPos(tempPosition, localPlayer.heading, 3);
|
||||
gta.setCameraLookAt(frontCameraPosition, localPlayer.position, true);
|
||||
|
||||
if(isCustomCameraSupported()) {
|
||||
game.setCameraLookAt(frontCameraPosition, localPlayer.position, true);
|
||||
}
|
||||
|
||||
gui.showCursor(true, false);
|
||||
localPlayer.invincible = true;
|
||||
localPlayer.setProofs(true, true, true, true, true);
|
||||
|
||||
Reference in New Issue
Block a user