Freeze player in skin-select and control state util
This commit is contained in:
@@ -111,20 +111,10 @@ function toggleSkinSelect(state) {
|
|||||||
|
|
||||||
localPlayer.skin = allowedSkins[skinSelectorIndex][0];
|
localPlayer.skin = allowedSkins[skinSelectorIndex][0];
|
||||||
skinSelectMessageTextTop = allowedSkins[skinSelectorIndex][1];
|
skinSelectMessageTextTop = allowedSkins[skinSelectorIndex][1];
|
||||||
gui.showCursor(true, false);
|
setLocalPlayerControlState(false, false);
|
||||||
//localPlayer.invincible = true;
|
|
||||||
//localPlayer.setProofs(true, true, true, true, true);
|
|
||||||
localPlayer.collisionsEnabled = false;
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
usingSkinSelector = false;
|
usingSkinSelector = false;
|
||||||
//game.restoreCamera(true);
|
setLocalPlayerControlState(false, false);
|
||||||
gui.showCursor(false, true);
|
|
||||||
if(localPlayer) {
|
|
||||||
//localPlayer.invincible = false;
|
|
||||||
//localPlayer.setProofs(false, false, false, false, false);
|
|
||||||
localPlayer.collisionsEnabled = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -184,11 +184,12 @@ function setLocalPlayerFrozenState(state) {
|
|||||||
function setLocalPlayerControlState(controlState, cursorState = false) {
|
function setLocalPlayerControlState(controlState, cursorState = false) {
|
||||||
logToConsole(LOG_DEBUG, `[VRR.Utilities] Setting control state to ${controlState} (Cursor: ${cursorState})`);
|
logToConsole(LOG_DEBUG, `[VRR.Utilities] Setting control state to ${controlState} (Cursor: ${cursorState})`);
|
||||||
controlsEnabled = controlState;
|
controlsEnabled = controlState;
|
||||||
//localPlayer.invincible = true;
|
if(getGame() == VRR_GAME_GTA_III || getGame() == VRR_GAME_GTA_VC) {
|
||||||
//if(getGame() != VRR_GAME_GTA_IV) {
|
game.SET_PLAYER_CONTROL(localClient.index, boolToInt(controlState));
|
||||||
// localPlayer.collisionsEnabled = controlState;
|
}
|
||||||
// localPlayer.invincible = false;
|
|
||||||
//}
|
localPlayer.collisionsEnabled = controlState;
|
||||||
|
localPlayer.invincible = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user