Formatting

This commit is contained in:
Vortrex
2022-05-20 17:35:33 -05:00
parent be6e9be8f1
commit 4f77b58e5b

View File

@@ -25,25 +25,40 @@ function initClientScripts() {
// =========================================================================== // ===========================================================================
function setUpInitialGame() { function setUpInitialGame() {
switch(getGame()) { if(getGame() == VRR_GAME_GTA_III) {
case [VRR_GAME_GTA_III]: { logToConsole(LOG_DEBUG|LOG_WARN, "Setting up initial game stuff for GTA III ...");
game.SET_PLAYER_NEVER_GETS_TIRED(game.GET_PLAYER_ID(), 0);
game.setGameStat(STAT_PROGRESSMADE, 9999);
game.setGameStat(STAT_TOTALPROGRESSINGAME, 9999);
//game.SET_CAR_DENSITY_MULTIPLIER(3.0); // No visual effect. Needs tweaking and testing.
//game.SET_PED_DENSITY_MULTIPLIER(3.0); // No visual effect. Needs tweaking and testing.
game.onMission = true; // Disables taxi/vigilante/etc and other start mission triggers
SetStandardControlsEnabled(true); // Provided by mouse camera script (mousecam.js)
break;
}
case [VRR_GAME_GTA_VC]: { // Turn off unlimited sprint
game.SET_PLAYER_NEVER_GETS_TIRED(game.GET_PLAYER_ID(), 0); game.SET_PLAYER_NEVER_GETS_TIRED(game.GET_PLAYER_ID(), 0);
// Set completed game progress
game.setGameStat(STAT_PROGRESSMADE, 9999); game.setGameStat(STAT_PROGRESSMADE, 9999);
game.setGameStat(STAT_TOTALPROGRESSINGAME, 9999); game.setGameStat(STAT_TOTALPROGRESSINGAME, 9999);
// Traffic and ped density
//game.SET_CAR_DENSITY_MULTIPLIER(3.0); // No visual effect. Needs tweaking and testing. //game.SET_CAR_DENSITY_MULTIPLIER(3.0); // No visual effect. Needs tweaking and testing.
//game.SET_PED_DENSITY_MULTIPLIER(3.0); // No visual effect. Needs tweaking and testing. //game.SET_PED_DENSITY_MULTIPLIER(3.0); // No visual effect. Needs tweaking and testing.
// Disables taxi/vigilante/etc and other start mission triggers
game.onMission = true;
// Provided by mouse camera script (mousecam.js)
SetStandardControlsEnabled(true);
} else if(getGame() == VRR_GAME_GTA_VC) {
logToConsole(LOG_DEBUG|LOG_WARN, "Setting up initial game stuff for GTA Vice City ...");
// Turn off unlimited sprint
game.SET_PLAYER_NEVER_GETS_TIRED(game.GET_PLAYER_ID(), 0);
// Set completed game progress
game.setGameStat(STAT_PROGRESSMADE, 99999);
game.setGameStat(STAT_TOTALPROGRESSINGAME, 99999);
// Traffic and ped density
//game.SET_CAR_DENSITY_MULTIPLIER(3.0); // No visual effect. Needs tweaking and testing.
//game.SET_PED_DENSITY_MULTIPLIER(3.0); // No visual effect. Needs tweaking and testing.
// Load all anim libs
game.REQUEST_ANIMATION("bikev"); game.REQUEST_ANIMATION("bikev");
game.REQUEST_ANIMATION("bikeh"); game.REQUEST_ANIMATION("bikeh");
game.REQUEST_ANIMATION("biked"); game.REQUEST_ANIMATION("biked");
@@ -66,13 +81,15 @@ function setUpInitialGame() {
game.REQUEST_ANIMATION("lance"); game.REQUEST_ANIMATION("lance");
game.REQUEST_ANIMATION("skate"); game.REQUEST_ANIMATION("skate");
game.LOAD_ALL_MODELS_NOW(); //game.LOAD_ALL_MODELS_NOW();
game.onMission = true; // Disables taxi/vigilante/etc and other start mission triggers // Disables taxi/vigilante/etc and other start mission triggers
SetStandardControlsEnabled(true); // Provided by mouse camera script (mousecam.js) game.onMission = true;
break;
}
case [VRR_GAME_GTA_SA]: { // Provided by mouse camera script (mousecam.js)
SetStandardControlsEnabled(true);
} else if(getGame() == VRR_GAME_GTA_SA) {
logToConsole(LOG_DEBUG|LOG_WARN, "Setting up initial game stuff for GTA San Andreas ...");
// Turn weapon skills down a bit
game.setGameStat(STAT_WEAPONTYPE_PISTOL_SKILL, 400); game.setGameStat(STAT_WEAPONTYPE_PISTOL_SKILL, 400);
game.setGameStat(STAT_WEAPONTYPE_PISTOL_SILENCED_SKILL, 400); game.setGameStat(STAT_WEAPONTYPE_PISTOL_SILENCED_SKILL, 400);
game.setGameStat(STAT_WEAPONTYPE_DESERT_EAGLE_SKILL, 400); game.setGameStat(STAT_WEAPONTYPE_DESERT_EAGLE_SKILL, 400);
@@ -83,7 +100,11 @@ function setUpInitialGame() {
game.setGameStat(STAT_WEAPONTYPE_MP5_SKILL, 400); game.setGameStat(STAT_WEAPONTYPE_MP5_SKILL, 400);
game.setGameStat(STAT_WEAPONTYPE_AK47_SKILL, 400); game.setGameStat(STAT_WEAPONTYPE_AK47_SKILL, 400);
game.setGameStat(STAT_WEAPONTYPE_M4_SKILL, 400); game.setGameStat(STAT_WEAPONTYPE_M4_SKILL, 400);
// Pro driving skill
game.setGameStat(STAT_DRIVING_SKILL, 9999); game.setGameStat(STAT_DRIVING_SKILL, 9999);
// Only visual for CJ, but affects all peds fight speed, bicycle hop, etc
game.setGameStat(STAT_FAT, 9999); game.setGameStat(STAT_FAT, 9999);
game.setGameStat(STAT_ENERGY, 9999); game.setGameStat(STAT_ENERGY, 9999);
game.setGameStat(STAT_CYCLE_SKILL, 9999); game.setGameStat(STAT_CYCLE_SKILL, 9999);
@@ -98,12 +119,12 @@ function setUpInitialGame() {
game.setGameStat(STAT_UNDERWATER_STAMINA, 9999); game.setGameStat(STAT_UNDERWATER_STAMINA, 9999);
game.setGameStat(STAT_BODY_MUSCLE, 9999); game.setGameStat(STAT_BODY_MUSCLE, 9999);
game.setDefaultInteriors(false); // Disables default yellow cone at doors for entering places in singleplayer // Disables default yellow cone at doors for entering places in singleplayer
game.onMission = true; // Disables taxi/vigilante/etc and other start mission triggers game.setDefaultInteriors(false);
break;
}
case [VRR_GAME_GTA_IV]: { // Disables taxi/vigilante/etc and other start mission triggers
game.onMission = true;
} else if(getGame() == VRR_GAME_GTA_IV) {
natives.allowEmergencyServices(false); natives.allowEmergencyServices(false);
natives.setCreateRandomCops(true); natives.setCreateRandomCops(true);
natives.setMaxWantedLevel(0); natives.setMaxWantedLevel(0);
@@ -165,25 +186,11 @@ function setUpInitialGame() {
// Some last steps // Some last steps
//natives.loadAllObjectsNow(); //natives.loadAllObjectsNow();
break; } else if(getGame() == VRR_GAME_MAFIA_ONE) {
}
case VRR_GAME_MAFIA_ONE: {
game.mapEnabled = false; game.mapEnabled = false;
game.setTrafficEnabled(false); game.setTrafficEnabled(false);
break;
} }
} }
}
// ===========================================================================
function initClient() {
loadLocaleConfig();
loadAllLocaleStrings();
setUpInitialGame();
}
// =========================================================================== // ===========================================================================