Merge branch 'nightly'
This commit is contained in:
52
scripts/client/business.js
Normal file
52
scripts/client/business.js
Normal file
@@ -0,0 +1,52 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// ===========================================================================
|
||||
// FILE: business.js
|
||||
// DESC: Provides business functions and usage
|
||||
// TYPE: Client (JavaScript)
|
||||
// ===========================================================================
|
||||
|
||||
class BusinessData {
|
||||
constructor(index, name, entrancePosition, blipModel, pickupModel, hasInterior, hasItems) {
|
||||
this.index = index;
|
||||
this.name = name;
|
||||
this.entrancePosition = entrancePosition;
|
||||
this.blipModel = blipModel;
|
||||
this.pickupModel = pickupModel;
|
||||
this.hasInterior = hasInterior;
|
||||
this.hasItems = hasItems;
|
||||
this.blipId = -1;
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function receiveBusinessFromServer(businessId, name, entrancePosition, blipModel, pickupModel, hasInterior, hasItems) {
|
||||
if(getGame() == VRR_GAME_GTA_IV) {
|
||||
if(getBusinessData(businessId) != false) {
|
||||
if(blipModel == -1) {
|
||||
natives.removeBlipAndClearIndex(getBusinessData(businessId).blipId);
|
||||
businesses.splice(getBusinessData(businessId).index, 1);
|
||||
} else {
|
||||
natives.setBlipCoordinates(getBusinessData(businessId).blipId, getBusinessData(businessId).entrancePosition);
|
||||
natives.changeBlipSprite(getBusinessData(businessId).blipId, getBusinessData(businessId).blipModel);
|
||||
natives.changeBlipNameFromAscii(getBusinessData(businessId).blipId, `${name.substr(0, 24)}${(name.length > 24) ? " ...": ""}`);
|
||||
}
|
||||
} else {
|
||||
if(blipModel != -1) {
|
||||
let blipId = natives.addBlipForCoord(entrancePosition);
|
||||
if(blipId) {
|
||||
let tempBusinessData = new BusinessData(businessId, name, entrancePosition, blipModel, pickupModel, hasInterior, hasItems);
|
||||
tempBusinessData.blipId = blipId;
|
||||
natives.changeBlipSprite(blipId, blipModel);
|
||||
natives.setBlipMarkerLongDistance(blipId, true);
|
||||
natives.changeBlipNameFromAscii(blipId, `${name.substr(0, 24)}${(name.length > 24) ? " ...": ""}`);
|
||||
businesses.push(tempBusinessData);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -249,42 +249,52 @@ function renderJobLabel(name, position, jobType) {
|
||||
function processLabelRendering() {
|
||||
if(renderLabels && areWorldLabelsSupported()) {
|
||||
if(localPlayer != null) {
|
||||
let pickups = getElementsByType(ELEMENT_PICKUP);
|
||||
for(let i in pickups) {
|
||||
if(pickups[i].getData("vrr.label.type") != null) {
|
||||
if(getDistance(localPlayer.position, pickups[i].position) <= renderLabelDistance) {
|
||||
if(!pickups[i].isOnScreen) {
|
||||
let price = "0";
|
||||
let rentPrice = "0";
|
||||
let labelInfoType = VRR_PROPLABEL_INFO_NONE;
|
||||
if(pickups[i].getData("vrr.label.price") != null) {
|
||||
price = makeLargeNumberReadable(pickups[i].getData("vrr.label.price"));
|
||||
}
|
||||
|
||||
if(pickups[i].getData("vrr.label.rentprice") != null) {
|
||||
rentPrice = makeLargeNumberReadable(pickups[i].getData("vrr.label.rentprice"));
|
||||
}
|
||||
|
||||
if(pickups[i].getData("vrr.label.help") != null) {
|
||||
labelInfoType = pickups[i].getData("vrr.label.help");
|
||||
}
|
||||
|
||||
switch(pickups[i].getData("vrr.label.type")) {
|
||||
case VRR_LABEL_BUSINESS:
|
||||
renderPropertyEntranceLabel(pickups[i].getData("vrr.label.name"), pickups[i].position, pickups[i].getData("vrr.label.locked"), true, price, rentPrice, labelInfoType);
|
||||
break;
|
||||
|
||||
case VRR_LABEL_HOUSE:
|
||||
renderPropertyEntranceLabel("House", pickups[i].position, pickups[i].getData("vrr.label.locked"), false, price, rentPrice, labelInfoType);
|
||||
break;
|
||||
|
||||
case VRR_LABEL_JOB:
|
||||
renderJobLabel(pickups[i].getData("vrr.label.name"), pickups[i].position, pickups[i].getData("vrr.label.jobType"));
|
||||
break;
|
||||
|
||||
case VRR_LABEL_EXIT:
|
||||
renderPropertyExitLabel(pickups[i].position);
|
||||
break;
|
||||
if(!areServerElementsSupported()) {
|
||||
//for(let i in businesses) {
|
||||
// if(pickups[i].getData("vrr.label.type") != null) {
|
||||
// if(getDistance(localPlayer.position, pickups[i].position) <= renderLabelDistance) {
|
||||
|
||||
// natives.getScreenViewportId
|
||||
// natives.getGameViewportId
|
||||
// natives.getViewportPositionOfCoord
|
||||
} else {
|
||||
let pickups = getElementsByType(ELEMENT_PICKUP);
|
||||
for(let i in pickups) {
|
||||
if(pickups[i].getData("vrr.label.type") != null) {
|
||||
if(getDistance(localPlayer.position, pickups[i].position) <= renderLabelDistance) {
|
||||
if(!pickups[i].isOnScreen) {
|
||||
let price = "0";
|
||||
let rentPrice = "0";
|
||||
let labelInfoType = VRR_PROPLABEL_INFO_NONE;
|
||||
if(pickups[i].getData("vrr.label.price") != null) {
|
||||
price = makeLargeNumberReadable(pickups[i].getData("vrr.label.price"));
|
||||
}
|
||||
|
||||
if(pickups[i].getData("vrr.label.rentprice") != null) {
|
||||
rentPrice = makeLargeNumberReadable(pickups[i].getData("vrr.label.rentprice"));
|
||||
}
|
||||
|
||||
if(pickups[i].getData("vrr.label.help") != null) {
|
||||
labelInfoType = pickups[i].getData("vrr.label.help");
|
||||
}
|
||||
|
||||
switch(pickups[i].getData("vrr.label.type")) {
|
||||
case VRR_LABEL_BUSINESS:
|
||||
renderPropertyEntranceLabel(pickups[i].getData("vrr.label.name"), pickups[i].position, pickups[i].getData("vrr.label.locked"), true, price, rentPrice, labelInfoType);
|
||||
break;
|
||||
|
||||
case VRR_LABEL_HOUSE:
|
||||
renderPropertyEntranceLabel("House", pickups[i].position, pickups[i].getData("vrr.label.locked"), false, price, rentPrice, labelInfoType);
|
||||
break;
|
||||
|
||||
case VRR_LABEL_JOB:
|
||||
renderJobLabel(pickups[i].getData("vrr.label.name"), pickups[i].position, pickups[i].getData("vrr.label.jobType"));
|
||||
break;
|
||||
|
||||
case VRR_LABEL_EXIT:
|
||||
renderPropertyExitLabel(pickups[i].position);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,4 +69,8 @@ let forceWantedLevel = 0;
|
||||
// Pre-cache all allowed skins
|
||||
let allowedSkins = getAllowedSkins(getGame());
|
||||
|
||||
let businesses = {};
|
||||
let houses = {};
|
||||
let jobs = {};
|
||||
|
||||
// ===========================================================================
|
||||
@@ -85,7 +85,6 @@ function addAllNetworkHandlers() {
|
||||
addNetworkEventHandler("vrr.localPlayerSkin", setLocalPlayerSkin);
|
||||
addNetworkEventHandler("vrr.forcePedAnim", forcePedAnimation);
|
||||
addNetworkEventHandler("vrr.hideAllGUI", hideAllGUI);
|
||||
addNetworkEventHandler("vrr.gameScript", setGameScriptState);
|
||||
addNetworkEventHandler("vrr.clientInfo", serverRequestedClientInfo);
|
||||
addNetworkEventHandler("vrr.interiorLights", updateInteriorLightsState);
|
||||
|
||||
@@ -101,6 +100,13 @@ function addAllNetworkHandlers() {
|
||||
|
||||
addNetworkEventHandler("vrr.logLevel", setLogLevel);
|
||||
addNetworkEventHandler("vrr.infiniteRun", setLocalPlayerInfiniteRun);
|
||||
|
||||
addNetworkEventHandler("vrr.business", receiveBusinessFromServer);
|
||||
addNetworkEventHandler("vrr.house", receiveHouseFromServer);
|
||||
|
||||
addNetworkEventHandler("vrr.holdObject", makePedHoldObject);
|
||||
|
||||
addNetworkEventHandler("vrr.playerPedId", sendLocalPlayerNetworkIdToServer);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -205,18 +211,6 @@ function setEnterPropertyKey(key) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setGameScriptState(scriptName, state) {
|
||||
if(state == VRR_GAMESCRIPT_FORCE) {
|
||||
logToConsole(`[VRR.Server] Starting game script '${scriptName}'`);
|
||||
game.startNewScript(scriptName);
|
||||
} else if(state == VRR_GAMESCRIPT_DENY) {
|
||||
logToConsole(`[VRR.Server] Terminating game script '${scriptName}'`);
|
||||
game.terminateScript(scriptName);
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function serverRequestedClientInfo() {
|
||||
sendServerClientInfo();
|
||||
}
|
||||
@@ -266,6 +260,9 @@ function setElementCollisionsEnabled(elementId, state) {
|
||||
function setLocalPlayerPedPartsAndProps(parts, props) {
|
||||
for(let i in parts) {
|
||||
localPlayer.changeBodyPart(parts[0], parts[1], parts[2]);
|
||||
}
|
||||
|
||||
for(let i in props) {
|
||||
localPlayer.changeBodyProp(props[0], props[1]);
|
||||
}
|
||||
}
|
||||
@@ -311,4 +308,18 @@ function setLocalPlayerSkin(skinId) {
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function makePedHoldObject(pedId, modelIndex) {
|
||||
if(getGame() == VRR_GAME_GTA_IV) {
|
||||
natives.givePedAmbientObject(natives.getPedFromNetworkId(pedId), getGameConfig().objects[getGame()][modelIndex][1])
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function sendLocalPlayerNetworkIdToServer() {
|
||||
sendNetworkEventToServer("vrr.playerPedId", natives.getNetworkIdFromPed(localPlayer));
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -24,6 +24,146 @@ function initClientScripts() {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setUpInitialGame() {
|
||||
if(getGame() == VRR_GAME_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);
|
||||
game.SET_PED_DENSITY_MULTIPLIER(3.0);
|
||||
game.onMission = true;
|
||||
SetStandardControlsEnabled(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
if(getGame() == VRR_GAME_GTA_VC) {
|
||||
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);
|
||||
game.SET_PED_DENSITY_MULTIPLIER(3.0);
|
||||
|
||||
game.REQUEST_ANIMATION("bikev");
|
||||
game.REQUEST_ANIMATION("bikeh");
|
||||
game.REQUEST_ANIMATION("biked");
|
||||
game.REQUEST_ANIMATION("knife");
|
||||
game.REQUEST_ANIMATION("python");
|
||||
game.REQUEST_ANIMATION("shotgun");
|
||||
game.REQUEST_ANIMATION("buddy");
|
||||
game.REQUEST_ANIMATION("tec");
|
||||
game.REQUEST_ANIMATION("uzi");
|
||||
game.REQUEST_ANIMATION("rifle");
|
||||
game.REQUEST_ANIMATION("m60");
|
||||
game.REQUEST_ANIMATION("sniper");
|
||||
game.REQUEST_ANIMATION("grenade");
|
||||
game.REQUEST_ANIMATION("flame");
|
||||
game.REQUEST_ANIMATION("medic");
|
||||
game.REQUEST_ANIMATION("sunbathe");
|
||||
//game.REQUEST_ANIMATION("playidles");
|
||||
game.REQUEST_ANIMATION("riot");
|
||||
game.REQUEST_ANIMATION("strip");
|
||||
game.REQUEST_ANIMATION("lance");
|
||||
game.REQUEST_ANIMATION("skate");
|
||||
|
||||
game.LOAD_ALL_MODELS_NOW();
|
||||
game.onMission = true;
|
||||
SetStandardControlsEnabled(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
if(getGame() == VRR_GAME_GTA_SA) {
|
||||
game.setGameStat(STAT_WEAPONTYPE_PISTOL_SKILL, 400);
|
||||
game.setGameStat(STAT_WEAPONTYPE_PISTOL_SILENCED_SKILL, 400);
|
||||
game.setGameStat(STAT_WEAPONTYPE_DESERT_EAGLE_SKILL, 400);
|
||||
game.setGameStat(STAT_WEAPONTYPE_SHOTGUN_SKILL, 400);
|
||||
game.setGameStat(STAT_WEAPONTYPE_SAWNOFF_SHOTGUN_SKILL, 400);
|
||||
game.setGameStat(STAT_WEAPONTYPE_SPAS12_SHOTGUN_SKILL, 400);
|
||||
game.setGameStat(STAT_WEAPONTYPE_MICRO_UZI_SKILL, 400);
|
||||
game.setGameStat(STAT_WEAPONTYPE_MP5_SKILL, 400);
|
||||
game.setGameStat(STAT_WEAPONTYPE_AK47_SKILL, 400);
|
||||
game.setGameStat(STAT_WEAPONTYPE_M4_SKILL, 400);
|
||||
game.setGameStat(STAT_DRIVING_SKILL, 9999);
|
||||
game.setGameStat(STAT_FAT, 9999);
|
||||
game.setGameStat(STAT_ENERGY, 9999);
|
||||
game.setGameStat(STAT_CYCLE_SKILL, 9999);
|
||||
game.setGameStat(STAT_BIKE_SKILL, 9999);
|
||||
game.setGameStat(STAT_GAMBLING, 9999);
|
||||
game.setGameStat(STAT_PROGRESS_MADE, 9999);
|
||||
game.setGameStat(STAT_RESPECT, 0);
|
||||
game.setGameStat(STAT_RESPECT_TOTAL, 0);
|
||||
game.setGameStat(STAT_SEX_APPEAL, 0);
|
||||
game.setGameStat(STAT_STAMINA, 9999);
|
||||
game.setGameStat(STAT_TOTAL_PROGRESS, 9999);
|
||||
game.setGameStat(STAT_UNDERWATER_STAMINA, 9999);
|
||||
game.setGameStat(STAT_BODY_MUSCLE, 9999);
|
||||
|
||||
game.setDefaultInteriors(false);
|
||||
game.onMission = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
if(getGame() == VRR_GAME_GTA_IV) {
|
||||
natives.allowEmergencyServices(false);
|
||||
natives.setCreateRandomCops(true);
|
||||
natives.setMaxWantedLevel(0);
|
||||
natives.setWantedMultiplier(0.0);
|
||||
natives.allowPlayerToCarryNonMissionObjects(natives.getPlayerId(), true);
|
||||
natives.setPlayerTeam(natives.getPlayerId(), 0);
|
||||
natives.loadAllObjectsNow();
|
||||
natives.setCellphoneRanked(false);
|
||||
natives.setOverrideNoSprintingOnPhoneInMultiplayer(false);
|
||||
natives.setSyncWeatherAndGameTime(false);
|
||||
natives.usePlayerColourInsteadOfTeamColour(true);
|
||||
natives.disablePauseMenu(true);
|
||||
natives.allowReactionAnims(localPlayer, true);
|
||||
natives.allowGameToPauseForStreaming(false);
|
||||
natives.allowStuntJumpsToTrigger(false);
|
||||
natives.setPickupsFixCars(false);
|
||||
|
||||
// HUD and Display
|
||||
natives.displayCash(false);
|
||||
natives.displayAmmo(false);
|
||||
natives.displayHud(false);
|
||||
natives.displayRadar(false);
|
||||
natives.displayAreaName(false);
|
||||
natives.displayPlayerNames(false);
|
||||
natives.setPoliceRadarBlips(false);
|
||||
natives.removeTemporaryRadarBlipsForPickups();
|
||||
natives.displayNonMinigameHelpMessages(false);
|
||||
natives.setDisplayPlayerNameAndIcon(natives.getPlayerId(), false);
|
||||
|
||||
// Item/Money Dropping
|
||||
natives.setMoneyCarriedByAllNewPeds(0);
|
||||
natives.setDeadPedsDropWeapons(false);
|
||||
natives.setPlayersDropMoneyInNetworkGame(false);
|
||||
|
||||
// Population
|
||||
natives.dontSuppressAnyCarModels(5.0);
|
||||
natives.dontSuppressAnyPedModels(5.0);
|
||||
natives.forceGenerateParkedCarsTooCloseToOthers(5.0);
|
||||
natives.setParkedCarDensityMultiplier(5.0);
|
||||
natives.setRandomCarDensityMultiplier(5.0);
|
||||
natives.setPedDensityMultiplier(5.0);
|
||||
natives.setCarDensityMultiplier(5.0);
|
||||
natives.setScenarioPedDensityMultiplier(5.0, 5.0);
|
||||
natives.switchRandomTrains(true);
|
||||
natives.switchRandomBoats(true);
|
||||
natives.switchAmbientPlanes(true);
|
||||
natives.switchMadDrivers(false);
|
||||
|
||||
natives.requestAnims("DANCING");
|
||||
return true;
|
||||
}
|
||||
|
||||
if(getGame() == VRR_GAME_MAFIA_ONE) {
|
||||
game.mapEnabled = false;
|
||||
game.setTrafficEnabled(false);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
initClientScripts();
|
||||
|
||||
// ===========================================================================
|
||||
@@ -14,18 +14,6 @@ function processSync(event, deltaTime) {
|
||||
sendNetworkEventToServer("vrr.player.heading", localPlayer.heading);
|
||||
}
|
||||
|
||||
//if(game.game == VRR_GAME_GTA_SA) {
|
||||
// let lookAtPos = getLocalPlayerLookAtPosition();
|
||||
// sendNetworkEventToServer("vrr.player.lookat", lookAtPos);
|
||||
// setEntityData(localPlayer, "vrr.headLook", lookAtPos);
|
||||
// let peds = getPeds();
|
||||
// for(let i in peds) {
|
||||
// if(doesEntityDataExist(peds[i], "vrr.headLook")) {
|
||||
// peds[i].lookAt(getEntityData(peds[i], "vrr.headLook"), 99999);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
if(localPlayer.health <= 0) {
|
||||
if(!calledDeathEvent) {
|
||||
logToConsole(LOG_DEBUG, `Local player died`);
|
||||
@@ -391,17 +379,11 @@ function syncElementProperties(element) {
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function receiveBlipFromServer(model, position) {
|
||||
if(getGame() == VRR_GAME_GTA_IV) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function receivePickupFromServer(model, position) {
|
||||
function receiveHouseFromServer(houseId, entrancePosition, blipModel, pickupModel, hasInterior) {
|
||||
if(getGame() == VRR_GAME_GTA_IV) {
|
||||
|
||||
}
|
||||
|
||||
@@ -275,9 +275,17 @@ function runClientCode(code, returnTo) {
|
||||
function enterVehicleAsPassenger() {
|
||||
if(localPlayer.vehicle == null) {
|
||||
let tempVehicle = getClosestVehicle(localPlayer.position);
|
||||
if(tempVehicle != null) {
|
||||
localPlayer.enterVehicle(tempVehicle, false);
|
||||
}
|
||||
if(getGame() != VRR_GAME_GTA_IV) {
|
||||
if(tempVehicle != null) {
|
||||
localPlayer.enterVehicle(tempVehicle, false);
|
||||
}
|
||||
} else {
|
||||
for(let i = 0 ; i <= natives.getMaximumNumberOfPassengers(tempVehicle); i++) {
|
||||
if(natives.isCarPassengerSeatFree(tempVehicle, i)) {
|
||||
natives.taskEnterCarAsPassenger(localPlayer, tempVehicle, i, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -404,7 +412,11 @@ function clearLocalPedState() {
|
||||
// ===========================================================================
|
||||
|
||||
function getWeaponSlot(weaponId) {
|
||||
return weaponSlots[game.game][weaponId];
|
||||
if(getGame() == VRR_GAME_GTA_IV) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return weaponSlots[getGame()][weaponId];
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -501,6 +513,10 @@ function setLocalPlayerCash(amount) {
|
||||
if(typeof localPlayer.money != "undefined") {
|
||||
localPlayer.money = toInteger(amount);
|
||||
}
|
||||
|
||||
if(getGame() == VRR_GAME_GTA_IV) {
|
||||
natives.setMultiplayerHudCash(amount);
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -618,12 +634,12 @@ function forceLocalPlayerEquippedWeaponItem() {
|
||||
if(forceWeapon != 0) {
|
||||
if(localPlayer.weapon != forceWeapon) {
|
||||
localPlayer.weapon = forceWeapon;
|
||||
if(getGame() <= VRR_GAME_GTA_IV) {
|
||||
if(getGame() < VRR_GAME_GTA_IV) {
|
||||
localPlayer.setWeaponClipAmmunition(getWeaponSlot(forceWeapon), forceWeaponClipAmmo);
|
||||
localPlayer.setWeaponAmmunition(getWeaponSlot(forceWeapon), forceWeaponAmmo);
|
||||
}
|
||||
} else {
|
||||
if(getGame() <= VRR_GAME_GTA_IV) {
|
||||
if(getGame() < VRR_GAME_GTA_IV) {
|
||||
forceWeaponClipAmmo = localPlayer.getWeaponClipAmmunition(getWeaponSlot(forceWeapon));
|
||||
forceWeaponAmmo = localPlayer.getWeaponAmmunition(getWeaponSlot(forceWeapon));
|
||||
}
|
||||
@@ -748,119 +764,6 @@ function processNearbyPickups() {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setUpInitialGame() {
|
||||
if(getGame() == VRR_GAME_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);
|
||||
game.SET_PED_DENSITY_MULTIPLIER(3.0);
|
||||
game.onMission = true;
|
||||
SetStandardControlsEnabled(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
if(getGame() == VRR_GAME_GTA_VC) {
|
||||
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);
|
||||
game.SET_PED_DENSITY_MULTIPLIER(3.0);
|
||||
|
||||
game.REQUEST_ANIMATION("bikev");
|
||||
game.REQUEST_ANIMATION("bikeh");
|
||||
game.REQUEST_ANIMATION("biked");
|
||||
game.REQUEST_ANIMATION("knife");
|
||||
game.REQUEST_ANIMATION("python");
|
||||
game.REQUEST_ANIMATION("shotgun");
|
||||
game.REQUEST_ANIMATION("buddy");
|
||||
game.REQUEST_ANIMATION("tec");
|
||||
game.REQUEST_ANIMATION("uzi");
|
||||
game.REQUEST_ANIMATION("rifle");
|
||||
game.REQUEST_ANIMATION("m60");
|
||||
game.REQUEST_ANIMATION("sniper");
|
||||
game.REQUEST_ANIMATION("grenade");
|
||||
game.REQUEST_ANIMATION("flame");
|
||||
game.REQUEST_ANIMATION("medic");
|
||||
game.REQUEST_ANIMATION("sunbathe");
|
||||
//game.REQUEST_ANIMATION("playidles");
|
||||
game.REQUEST_ANIMATION("riot");
|
||||
game.REQUEST_ANIMATION("strip");
|
||||
game.REQUEST_ANIMATION("lance");
|
||||
game.REQUEST_ANIMATION("skate");
|
||||
|
||||
game.LOAD_ALL_MODELS_NOW();
|
||||
game.onMission = true;
|
||||
SetStandardControlsEnabled(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
if(getGame() == VRR_GAME_GTA_SA) {
|
||||
game.setGameStat(STAT_WEAPONTYPE_PISTOL_SKILL, 400);
|
||||
game.setGameStat(STAT_WEAPONTYPE_PISTOL_SILENCED_SKILL, 400);
|
||||
game.setGameStat(STAT_WEAPONTYPE_DESERT_EAGLE_SKILL, 400);
|
||||
game.setGameStat(STAT_WEAPONTYPE_SHOTGUN_SKILL, 400);
|
||||
game.setGameStat(STAT_WEAPONTYPE_SAWNOFF_SHOTGUN_SKILL, 400);
|
||||
game.setGameStat(STAT_WEAPONTYPE_SPAS12_SHOTGUN_SKILL, 400);
|
||||
game.setGameStat(STAT_WEAPONTYPE_MICRO_UZI_SKILL, 400);
|
||||
game.setGameStat(STAT_WEAPONTYPE_MP5_SKILL, 400);
|
||||
game.setGameStat(STAT_WEAPONTYPE_AK47_SKILL, 400);
|
||||
game.setGameStat(STAT_WEAPONTYPE_M4_SKILL, 400);
|
||||
game.setGameStat(STAT_DRIVING_SKILL, 9999);
|
||||
game.setGameStat(STAT_FAT, 9999);
|
||||
game.setGameStat(STAT_ENERGY, 9999);
|
||||
game.setGameStat(STAT_CYCLE_SKILL, 9999);
|
||||
game.setGameStat(STAT_BIKE_SKILL, 9999);
|
||||
game.setGameStat(STAT_GAMBLING, 9999);
|
||||
game.setGameStat(STAT_PROGRESS_MADE, 9999);
|
||||
game.setGameStat(STAT_RESPECT, 0);
|
||||
game.setGameStat(STAT_RESPECT_TOTAL, 0);
|
||||
game.setGameStat(STAT_SEX_APPEAL, 0);
|
||||
game.setGameStat(STAT_STAMINA, 9999);
|
||||
game.setGameStat(STAT_TOTAL_PROGRESS, 9999);
|
||||
game.setGameStat(STAT_UNDERWATER_STAMINA, 9999);
|
||||
game.setGameStat(STAT_BODY_MUSCLE, 9999);
|
||||
|
||||
game.setDefaultInteriors(false);
|
||||
game.onMission = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
if(getGame() == VRR_GAME_GTA_IV) {
|
||||
natives.allowEmergencyServices(false);
|
||||
natives.setCreateRandomCops(true);
|
||||
natives.setMaxWantedLevel(0);
|
||||
natives.setWantedMultiplier(0.0);
|
||||
natives.allowPlayerToCarryNonMissionObjects(natives.getPlayerId(), true);
|
||||
natives.setPlayerTeam(natives.getPlayerId(), 0);
|
||||
natives.loadAllObjectsNow();
|
||||
natives.setCellphoneRanked(false);
|
||||
natives.setOverrideNoSprintingOnPhoneInMultiplayer(false);
|
||||
natives.setPlayersDropMoneyInNetworkGame(false);
|
||||
natives.setSyncWeatherAndGameTime(false);
|
||||
natives.usePlayerColourInsteadOfTeamColour(true);
|
||||
natives.setDisplayPlayerNameAndIcon(natives.getPlayerId(), false);
|
||||
natives.removeTemporaryRadarBlipsForPickups();
|
||||
natives.setPickupsFixCars(false);
|
||||
natives.displayCash(false);
|
||||
natives.displayAmmo(false);
|
||||
natives.displayHud(false);
|
||||
natives.displayAreaName(false);
|
||||
natives.setPoliceRadarBlips(false);
|
||||
|
||||
natives.requestAnims("DANCING");
|
||||
return true;
|
||||
}
|
||||
|
||||
if(getGame() == VRR_GAME_MAFIA_ONE) {
|
||||
game.mapEnabled = false;
|
||||
game.setTrafficEnabled(false);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function processGameSpecifics() {
|
||||
if(game.game < VRR_GAME_GTA_IV) {
|
||||
game.clearMessages();
|
||||
|
||||
Reference in New Issue
Block a user