diff --git a/scripts/client/animation.js b/scripts/client/animation.js index 0540b992..003b0353 100644 --- a/scripts/client/animation.js +++ b/scripts/client/animation.js @@ -19,7 +19,7 @@ function makePedPlayAnimation(pedId, animationSlot, positionOffset) { let freezePlayer = false; switch (animationData.moveType) { - case VRR_ANIMMOVE_FORWARD: { + case AGRP_ANIMMOVE_FORWARD: { setElementCollisionsEnabled(ped, false); if (ped.isSyncer) { setElementPosition(ped, getPosInFrontOfPos(getElementPosition(pedId), fixAngle(getElementHeading(pedId)), positionOffset)); @@ -28,7 +28,7 @@ function makePedPlayAnimation(pedId, animationSlot, positionOffset) { break; } - case VRR_ANIMMOVE_BACK: { + case AGRP_ANIMMOVE_BACK: { setElementCollisionsEnabled(pedId, false); if (ped.isSyncer) { setElementPosition(pedId, getPosBehindPos(getElementPosition(pedId), fixAngle(getElementHeading(pedId)), positionOffset)); @@ -37,7 +37,7 @@ function makePedPlayAnimation(pedId, animationSlot, positionOffset) { break; } - case VRR_ANIMMOVE_LEFT: { + case AGRP_ANIMMOVE_LEFT: { setElementCollisionsEnabled(pedId, false); if (ped.isSyncer) { setElementPosition(pedId, getPosToLeftOfPos(getElementPosition(pedId), fixAngle(getElementHeading(pedId)), positionOffset)); @@ -46,7 +46,7 @@ function makePedPlayAnimation(pedId, animationSlot, positionOffset) { break; } - case VRR_ANIMMOVE_RIGHT: { + case AGRP_ANIMMOVE_RIGHT: { setElementCollisionsEnabled(pedId, false); if (ped.isSyncer) { setElementPosition(pedId, getPosToRightOfPos(getElementPosition(pedId), fixAngle(getElementHeading(pedId)), positionOffset)); @@ -60,9 +60,9 @@ function makePedPlayAnimation(pedId, animationSlot, positionOffset) { } } - if (getGame() < VRR_GAME_GTA_IV) { - if (animationData.animType == VRR_ANIMTYPE_NORMAL || animationData.animType == VRR_ANIMTYPE_SURRENDER) { - if (getGame() == VRR_GAME_GTA_VC || getGame() == VRR_GAME_GTA_SA) { + if (getGame() < AGRP_GAME_GTA_IV) { + if (animationData.animType == AGRP_ANIMTYPE_NORMAL || animationData.animType == AGRP_ANIMTYPE_SURRENDER) { + if (getGame() == AGRP_GAME_GTA_VC || getGame() == AGRP_GAME_GTA_SA) { ped.clearAnimations(); } else { ped.clearObjective(); @@ -74,7 +74,7 @@ function makePedPlayAnimation(pedId, animationSlot, positionOffset) { setLocalPlayerControlState(false, false); localPlayer.collisionsEnabled = false; } - } else if (animationData.animType == VRR_ANIMTYPE_BLEND) { + } else if (animationData.animType == AGRP_ANIMTYPE_BLEND) { ped.position = ped.position; ped.blendAnimation(animationData.groupId, animationData.animId, animationData.animSpeed); } @@ -95,7 +95,7 @@ function forcePedAnimation(pedId, animSlot) { let animationData = getAnimationData(animSlot); - if (getGame() < VRR_GAME_GTA_IV) { + if (getGame() < AGRP_GAME_GTA_IV) { ped.position = ped.position; ped.addAnimation(animationData.groupId, animationData.animId); @@ -119,8 +119,8 @@ function makePedStopAnimation(pedId) { return false; } - if (getGame() != VRR_GAME_GTA_IV) { - if (getGame() == VRR_GAME_GTA_VC || getGame() == VRR_GAME_GTA_SA) { + if (getGame() != AGRP_GAME_GTA_IV) { + if (getGame() == AGRP_GAME_GTA_VC || getGame() == AGRP_GAME_GTA_SA) { ped.clearAnimations(); } else { ped.clearObjective(); @@ -128,7 +128,7 @@ function makePedStopAnimation(pedId) { } if (ped == localPlayer) { - if (getGame() != VRR_GAME_GTA_IV) { + if (getGame() != AGRP_GAME_GTA_IV) { localPlayer.collisionsEnabled = true; } setLocalPlayerControlState(true, false); diff --git a/scripts/client/business.js b/scripts/client/business.js index baf52257..a8463221 100644 --- a/scripts/client/business.js +++ b/scripts/client/business.js @@ -41,7 +41,7 @@ function receiveBusinessFromServer(businessId, name, entrancePosition, blipModel if (blipModel == -1) { if (businessData.blipId != -1) { logToConsole(LOG_DEBUG, `[VRR.Business] Business ${businessId}'s blip has been removed by the server`); - if (getGame() == VRR_GAME_GTA_IV) { + if (getGame() == AGRP_GAME_GTA_IV) { natives.removeBlipAndClearIndex(getBusinessData(businessId).blipId); } else { destroyElement(getElementFromId(blipId)); @@ -55,7 +55,7 @@ function receiveBusinessFromServer(businessId, name, entrancePosition, blipModel } else { if (businessData.blipId != -1) { logToConsole(LOG_DEBUG, `[VRR.Business] Business ${businessId}'s blip has been changed by the server`); - if (getGame() == VRR_GAME_GTA_IV) { + if (getGame() == AGRP_GAME_GTA_IV) { natives.setBlipCoordinates(businessData.blipId, businessData.entrancePosition); natives.changeBlipSprite(businessData.blipId, businessData.blipModel); natives.setBlipMarkerLongDistance(businessData.blipId, false); diff --git a/scripts/client/event.js b/scripts/client/event.js index 9343798b..0d80be09 100644 --- a/scripts/client/event.js +++ b/scripts/client/event.js @@ -151,7 +151,7 @@ function onElementStreamIn(event, element) { function onLocalPlayerExitedVehicle(event, vehicle, seat) { logToConsole(LOG_DEBUG, `[VRR.Event] Local player exited vehicle`); - sendNetworkEventToServer("vrr.onPlayerExitVehicle", getVehicleForNetworkEvent(vehicle), seat); + sendNetworkEventToServer("agrp.onPlayerExitVehicle", getVehicleForNetworkEvent(vehicle), seat); if (inVehicleSeat) { parkedVehiclePosition = false; @@ -164,7 +164,7 @@ function onLocalPlayerExitedVehicle(event, vehicle, seat) { function onLocalPlayerEnteredVehicle(event, vehicle, seat) { logToConsole(LOG_DEBUG, `[VRR.Event] Local player entered vehicle`); - sendNetworkEventToServer("vrr.onPlayerEnterVehicle", getVehicleForNetworkEvent(vehicle), seat); + sendNetworkEventToServer("agrp.onPlayerEnterVehicle", getVehicleForNetworkEvent(vehicle), seat); if (areServerElementsSupported()) { //if(inVehicleSeat == 0) { @@ -188,7 +188,7 @@ function onPedInflictDamage(event, damagedEntity, damagerEntity, weaponId, healt if (damagedEntity == localPlayer) { //if(!weaponDamageEnabled[damagerEntity.name]) { preventDefaultEventAction(event); - sendNetworkEventToServer("vrr.weaponDamage", damagerEntity.name, weaponId, pedPiece, healthLoss); + sendNetworkEventToServer("agrp.weaponDamage", damagerEntity.name, weaponId, pedPiece, healthLoss); //} } } diff --git a/scripts/client/gps.js b/scripts/client/gps.js index ee6415e9..8e9d6563 100644 --- a/scripts/client/gps.js +++ b/scripts/client/gps.js @@ -17,8 +17,8 @@ let gpsBlipBlinkTimer = null; function showGPSLocation(position, colour) { logToConsole(LOG_DEBUG, `[VRR.GPS] Showing gps location`); - if(getMultiplayerMod() == VRR_MPMOD_GTAC) { - if(getGame() == VRR_GAME_GTA_SA) { + if (getMultiplayerMod() == AGRP_MPMOD_GTAC) { + if (getGame() == AGRP_GAME_GTA_SA) { // Server-side spheres don't show in GTA SA for some reason. gpsSphere = game.createPickup(1318, position, 1); } else { @@ -26,7 +26,7 @@ function showGPSLocation(position, colour) { gpsSphere.colour = colour; } - if(gpsBlip != null) { + if (gpsBlip != null) { destroyElement(gpsBlip); } @@ -40,16 +40,16 @@ function showGPSLocation(position, colour) { function blinkGPSBlip(times, position, colour) { gpsBlipBlinkTimes = times; - gpsBlipBlinkTimer = setInterval(function() { - if(gpsBlip != null) { + gpsBlipBlinkTimer = setInterval(function () { + if (gpsBlip != null) { destroyElement(gpsBlip); gpsBlip = null; } else { gpsBlip = game.createBlip(position, 0, 2, colour); } - if(gpsBlipBlinkAmount >= gpsBlipBlinkTimes) { - if(gpsBlip != null) { + if (gpsBlipBlinkAmount >= gpsBlipBlinkTimes) { + if (gpsBlip != null) { destroyElement(gpsBlip); gpsBlip = null; } diff --git a/scripts/client/house.js b/scripts/client/house.js index 0eaa47e9..0702b385 100644 --- a/scripts/client/house.js +++ b/scripts/client/house.js @@ -25,8 +25,8 @@ class HouseData { function receiveHouseFromServer(houseId, description, entrancePosition, blipModel, pickupModel, hasInterior) { logToConsole(LOG_DEBUG, `[VRR.House] Received house ${houseId} (${name}) from server`); - if(!areServerElementsSupported()) { - if(getHouseData(houseId) != false) { + if (!areServerElementsSupported()) { + if (getHouseData(houseId) != false) { let houseData = getHouseData(houseId); houseData.description = description; houseData.entrancePosition = entrancePosition; @@ -35,10 +35,10 @@ function receiveHouseFromServer(houseId, description, entrancePosition, blipMode houseData.hasInterior = hasInterior; logToConsole(LOG_DEBUG, `[VRR.House] House ${houseId} already exists. Checking blip ...`); - if(blipModel == -1) { - if(houseData.blipId != -1) { + if (blipModel == -1) { + if (houseData.blipId != -1) { logToConsole(LOG_DEBUG, `[VRR.House] House ${houseId}'s blip has been removed by the server`); - if(getGame() == VRR_GAME_GTA_IV) { + if (getGame() == AGRP_GAME_GTA_IV) { natives.removeBlipAndClearIndex(getHouseData(houseId).blipId); } else { destroyElement(getElementFromId(blipId)); @@ -48,18 +48,18 @@ function receiveHouseFromServer(houseId, description, entrancePosition, blipMode logToConsole(LOG_DEBUG, `[VRR.House] House ${houseId}'s blip is unchanged`); } } else { - if(houseData.blipId != -1) { + if (houseData.blipId != -1) { logToConsole(LOG_DEBUG, `[VRR.House] House ${houseId}'s blip has been changed by the server`); - if(getGame() == VRR_GAME_GTA_IV) { + if (getGame() == AGRP_GAME_GTA_IV) { natives.setBlipCoordinates(houseData.blipId, houseData.entrancePosition); natives.changeBlipSprite(houseData.blipId, houseData.blipModel); natives.setBlipMarkerLongDistance(houseData.blipId, false); natives.setBlipAsShortRange(houseData.blipId, true); - natives.changeBlipNameFromAscii(houseData.blipId, `${houseData.name.substr(0, 24)}${(houseData.name.length > 24) ? " ...": ""}`); + natives.changeBlipNameFromAscii(houseData.blipId, `${houseData.name.substr(0, 24)}${(houseData.name.length > 24) ? " ..." : ""}`); } } else { let blipId = createGameBlip(houseData.blipModel, houseData.entrancePosition, houseData.name); - if(blipId != -1) { + if (blipId != -1) { houseData.blipId = blipId; } logToConsole(LOG_DEBUG, `[VRR.House] House ${houseId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`); @@ -68,9 +68,9 @@ function receiveHouseFromServer(houseId, description, entrancePosition, blipMode } else { logToConsole(LOG_DEBUG, `[VRR.House] House ${houseId} doesn't exist. Adding ...`); let tempHouseData = new HouseData(houseId, description, entrancePosition, blipModel, pickupModel, hasInterior); - if(blipModel != -1) { + if (blipModel != -1) { let blipId = createGameBlip(tempHouseData.blipModel, tempHouseData.entrancePosition, "House"); - if(blipId != -1) { + if (blipId != -1) { tempHouseData.blipId = blipId; } logToConsole(LOG_DEBUG, `[VRR.House] House ${houseId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`); @@ -89,10 +89,10 @@ function receiveHouseFromServer(houseId, description, entrancePosition, blipMode * @param {number} houseId - The ID of the house (initially provided by server) * @return {HouseData} The house's data (class instance) */ - function getHouseData(houseId) { +function getHouseData(houseId) { let houses = getServerData().houses; - for(let i in houses) { - if(houses[i].houseId == houseId) { + for (let i in houses) { + if (houses[i].houseId == houseId) { return houses[i]; } } @@ -103,7 +103,7 @@ function receiveHouseFromServer(houseId, description, entrancePosition, blipMode // =========================================================================== function setAllHouseDataIndexes() { - for(let i in getServerData().houses) { + for (let i in getServerData().houses) { getServerData().houses[i].index = i; } } diff --git a/scripts/client/job.js b/scripts/client/job.js index 407d94df..9e5f0bae 100644 --- a/scripts/client/job.js +++ b/scripts/client/job.js @@ -57,8 +57,8 @@ function setLocalPlayerWorkingState(tempWorking) { function showJobRouteLocation(position, colour) { logToConsole(LOG_DEBUG, `[VRR.Job] Showing job route location`); - if(getMultiplayerMod() == VRR_MPMOD_GTAC) { - if(getGame() == VRR_GAME_GTA_SA) { + if (getMultiplayerMod() == AGRP_MPMOD_GTAC) { + if (getGame() == AGRP_GAME_GTA_SA) { // Server-side spheres don't show in GTA SA for some reason. jobRouteLocationSphere = game.createPickup(1318, position, 1); } else { @@ -66,7 +66,7 @@ function showJobRouteLocation(position, colour) { jobRouteLocationSphere.colour = colour; } - if(jobRouteLocationBlip != null) { + if (jobRouteLocationBlip != null) { destroyElement(jobRouteLocationBlip); } @@ -85,12 +85,12 @@ function enteredJobRouteSphere() { jobBlipBlinkAmount = 0; jobBlipBlinkTimes = 0; - if(jobRouteLocationBlip != null) { + if (jobRouteLocationBlip != null) { destroyElement(jobRouteLocationBlip); jobRouteLocationBlip = null; } - if(jobRouteLocationSphere != null) { + if (jobRouteLocationSphere != null) { destroyElement(jobRouteLocationSphere); jobRouteLocationSphere = null; } @@ -102,16 +102,16 @@ function enteredJobRouteSphere() { function blinkJobRouteLocationBlip(times, position, colour) { jobBlipBlinkTimes = times; - jobBlipBlinkTimer = setInterval(function() { - if(jobRouteLocationBlip != null) { + jobBlipBlinkTimer = setInterval(function () { + if (jobRouteLocationBlip != null) { destroyElement(jobRouteLocationBlip); jobRouteLocationBlip = null; } else { jobRouteLocationBlip = game.createBlip(position, 0, 2, colour); } - if(jobBlipBlinkAmount >= jobBlipBlinkTimes) { - if(jobRouteLocationBlip != null) { + if (jobBlipBlinkAmount >= jobBlipBlinkTimes) { + if (jobRouteLocationBlip != null) { destroyElement(jobRouteLocationBlip); jobRouteLocationBlip = null; } @@ -138,8 +138,8 @@ function hideJobRouteLocation() { function receiveJobFromServer(jobId, jobLocationId, name, position, blipModel, pickupModel) { logToConsole(LOG_DEBUG, `[VRR.Job] Received job ${jobId} (${name}) from server`); - if(getGame() == VRR_GAME_GTA_IV) { - if(getJobData(jobId) != false) { + if (getGame() == AGRP_GAME_GTA_IV) { + if (getJobData(jobId) != false) { let jobData = getJobData(jobId); jobData.jobLocationId = jobLocationId; jobData.name = name; @@ -148,10 +148,10 @@ function receiveJobFromServer(jobId, jobLocationId, name, position, blipModel, p jobData.pickupModel = pickupModel; logToConsole(LOG_DEBUG, `[VRR.Job] Job ${jobId} already exists. Checking blip ...`); - if(blipModel == -1) { - if(jobData.blipId != -1) { + if (blipModel == -1) { + if (jobData.blipId != -1) { logToConsole(LOG_DEBUG, `[VRR.Job] Job ${jobId}'s blip has been removed by the server`); - if(getGame() == VRR_GAME_GTA_IV) { + if (getGame() == AGRP_GAME_GTA_IV) { natives.removeBlipAndClearIndex(getJobData(jobId).blipId); } else { destroyElement(getElementFromId(blipId)); @@ -161,18 +161,18 @@ function receiveJobFromServer(jobId, jobLocationId, name, position, blipModel, p logToConsole(LOG_DEBUG, `[VRR.Job] Job ${jobId}'s blip is unchanged`); } } else { - if(jobData.blipId != -1) { + if (jobData.blipId != -1) { logToConsole(LOG_DEBUG, `[VRR.Job] Job ${jobId}'s blip has been changed by the server`); - if(getGame() == VRR_GAME_GTA_IV) { + if (getGame() == AGRP_GAME_GTA_IV) { natives.setBlipCoordinates(jobData.blipId, jobData.position); natives.changeBlipSprite(jobData.blipId, jobData.blipModel); natives.setBlipMarkerLongDistance(jobData.blipId, false); natives.setBlipAsShortRange(jobData.blipId, true); - natives.changeBlipNameFromAscii(jobData.blipId, `${jobData.name.substr(0, 24)}${(jobData.name.length > 24) ? " ...": ""}`); + natives.changeBlipNameFromAscii(jobData.blipId, `${jobData.name.substr(0, 24)}${(jobData.name.length > 24) ? " ..." : ""}`); } } else { let blipId = createGameBlip(jobData.blipModel, jobData.position, jobData.name); - if(blipId != -1) { + if (blipId != -1) { jobData.blipId = blipId; } logToConsole(LOG_DEBUG, `[VRR.Job] Job ${jobId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`); @@ -181,9 +181,9 @@ function receiveJobFromServer(jobId, jobLocationId, name, position, blipModel, p } else { logToConsole(LOG_DEBUG, `[VRR.Job] Job ${jobId} doesn't exist. Adding ...`); let tempJobData = new JobData(jobId, jobLocationId, name, position, blipModel, pickupModel); - if(blipModel != -1) { + if (blipModel != -1) { let blipId = createGameBlip(blipModel, tempJobData.position, tempJobData.name); - if(blipId != -1) { + if (blipId != -1) { tempJobData.blipId = blipId; } logToConsole(LOG_DEBUG, `[VRR.Job] Job ${jobId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`); @@ -202,9 +202,9 @@ function receiveJobFromServer(jobId, jobLocationId, name, position, blipModel, p * @param {number} job - The ID of the job (initially provided by server) * @return {JobData} The job's data (class instance) */ - function getJobData(jobId) { - for(let i in getServerData().jobs) { - if(getServerData().jobs[i].jobId == jobId) { +function getJobData(jobId) { + for (let i in getServerData().jobs) { + if (getServerData().jobs[i].jobId == jobId) { return getServerData().jobs[i]; } } @@ -215,7 +215,7 @@ function receiveJobFromServer(jobId, jobLocationId, name, position, blipModel, p // =========================================================================== function setAllJobDataIndexes() { - for(let i in getServerData().jobs) { + for (let i in getServerData().jobs) { jobs[i].index = i; } } diff --git a/scripts/client/label.js b/scripts/client/label.js index 107e07fe..6c665b32 100644 --- a/scripts/client/label.js +++ b/scripts/client/label.js @@ -333,37 +333,37 @@ function processLabelRendering() { if (localPlayer != null) { let pickups = getElementsByType(ELEMENT_PICKUP); for (let i in pickups) { - if (pickups[i].getData("vrr.label.type") != null) { + if (pickups[i].getData("agrp.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("agrp.label.price") != null) { + price = makeLargeNumberReadable(pickups[i].getData("agrp.label.price")); } - if (pickups[i].getData("vrr.label.rentprice") != null) { - rentPrice = makeLargeNumberReadable(pickups[i].getData("vrr.label.rentprice")); + if (pickups[i].getData("agrp.label.rentprice") != null) { + rentPrice = makeLargeNumberReadable(pickups[i].getData("agrp.label.rentprice")); } - if (pickups[i].getData("vrr.label.help") != null) { - labelInfoType = pickups[i].getData("vrr.label.help"); + if (pickups[i].getData("agrp.label.help") != null) { + labelInfoType = pickups[i].getData("agrp.label.help"); } - switch (pickups[i].getData("vrr.label.type")) { + switch (pickups[i].getData("agrp.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); + renderPropertyEntranceLabel(pickups[i].getData("agrp.label.name"), pickups[i].position, pickups[i].getData("agrp.label.locked"), true, price, rentPrice, labelInfoType); break; } case VRR_LABEL_HOUSE: { - renderPropertyEntranceLabel(pickups[i].getData("vrr.label.name"), pickups[i].position, pickups[i].getData("vrr.label.locked"), false, price, rentPrice, labelInfoType); + renderPropertyEntranceLabel(pickups[i].getData("agrp.label.name"), pickups[i].position, pickups[i].getData("agrp.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")); + renderJobLabel(pickups[i].getData("agrp.label.name"), pickups[i].position, pickups[i].getData("agrp.label.jobType")); break; } diff --git a/scripts/client/main.js b/scripts/client/main.js index 2a03b89b..26752255 100644 --- a/scripts/client/main.js +++ b/scripts/client/main.js @@ -63,7 +63,7 @@ let mouseCameraEnabled = false; let currentPickup = false; -let vehiclePurchaseState = VRR_VEHBUYSTATE_NONE; +let vehiclePurchaseState = AGRP_VEHBUYSTATE_NONE; let vehiclePurchasing = null; let vehiclePurchasePosition = null; diff --git a/scripts/client/nametag.js b/scripts/client/nametag.js index 699b9bc6..205abc60 100644 --- a/scripts/client/nametag.js +++ b/scripts/client/nametag.js @@ -48,10 +48,10 @@ function updatePlayerNameTag(clientName, characterName, colour, paused, ping) { playerPaused[clientName] = paused; playerPing[clientName] = ping; - if(getGame() == VRR_GAME_GTA_IV) { + if (getGame() == AGRP_GAME_GTA_IV) { let client = getPlayerFromParams(clientName); - if(client != false) { - if(getPlayerPed(client) != null) { + if (client != false) { + if (getPlayerPed(client) != null) { getPlayerPed(client).setNametag(characterName, colour); } } @@ -67,7 +67,7 @@ function updatePlayerPing(clientName, ping) { // =========================================================================== function drawNametag(x, y, health, armour, text, ping, alpha, distance, colour, afk, skin) { - if(nametagFont == null) { + if (nametagFont == null) { return false; } @@ -80,10 +80,10 @@ function drawNametag(x, y, health, armour, text, ping, alpha, distance, colour, // ------------------------------------------- // Health Bar - if(getMultiplayerMod() == VRR_MPMOD_GTAC) { - if(getGame() == VRR_GAME_GTA_III) { + if (getMultiplayerMod() == AGRP_MPMOD_GTAC) { + if (getGame() == AGRP_GAME_GTA_III) { // Mickey Hamfists is ridiculously tall. Raise the nametag for him a bit - if(skin == 109) { + if (skin == 109) { y -= 20; } else { y -= 5; @@ -95,44 +95,43 @@ function drawNametag(x, y, health, armour, text, ping, alpha, distance, colour, y -= 5; } - if(health > 0.0) { - let hx = x-width/2; - let hy = y-10/2; - let colourB = toColour(0, 0, 0, Math.floor(255.0*alpha)); // Background colour (black) + if (health > 0.0) { + let hx = x - width / 2; + let hy = y - 10 / 2; + let colourB = toColour(0, 0, 0, Math.floor(255.0 * alpha)); // Background colour (black) graphics.drawRectangle(null, [hx, hy], [width, 8], colourB, colourB, colourB, colourB); - let colour = toColour(Math.floor(255.0-(health*255.0)), Math.floor(health*255.0), 0, Math.floor(255.0*alpha)); // Health bar colour (varies, depending on health) - graphics.drawRectangle(null, [hx+2, hy+2], [(width-4)*health, 10-6], colour, colour, colour, colour); + let colour = toColour(Math.floor(255.0 - (health * 255.0)), Math.floor(health * 255.0), 0, Math.floor(255.0 * alpha)); // Health bar colour (varies, depending on health) + graphics.drawRectangle(null, [hx + 2, hy + 2], [(width - 4) * health, 10 - 6], colour, colour, colour, colour); } // Armour Bar - if (armour > 0.0) - { + if (armour > 0.0) { // Go up 10 pixels to draw the next part y -= 10; - let hx = x-width/2; - let hy = y-10/2; + let hx = x - width / 2; + let hy = y - 10 / 2; let colourB = toColour(255, 0, 0, 0); // Background colour (black) graphics.drawRectangle(null, [hx, hy], [width, 8], colourB, colourB, colourB, colourB); let colour = toColour(255, 255, 255, 255); // Armour bar colour (white) - graphics.drawRectangle(null, [hx+2, hy+2], [(width-4)*armour, 10-6], colour, colour, colour, colour); + graphics.drawRectangle(null, [hx + 2, hy + 2], [(width - 4) * armour, 10 - 6], colour, colour, colour, colour); } y -= 20; // Nametag - if(nametagFont != null) { + if (nametagFont != null) { let size = nametagFont.measure(text, game.width, 0.0, 0.0, nametagFont.size, false, false); - nametagFont.render(text, [x-size[0]/2, y-size[1]/2], game.width, 0.0, 0.0, nametagFont.size, colour, false, false, false, true); + nametagFont.render(text, [x - size[0] / 2, y - size[1] / 2], game.width, 0.0, 0.0, nametagFont.size, colour, false, false, false, true); } // Go up another 10 pixels for the next part y -= 20; // AFK Status - if(afkStatusFont != null) { - if(afk) { + if (afkStatusFont != null) { + if (afk) { let size = afkStatusFont.measure("PAUSED", game.width, 0.0, 0.0, afkStatusFont.size, false, false); - afkStatusFont.render("PAUSED", [x-size[0]/2, y-size[1]/2], game.width, 0.0, 0.0, afkStatusFont.size, toColour(255, 0, 0, 255), false, false, false, true); + afkStatusFont.render("PAUSED", [x - size[0] / 2, y - size[1] / 2], game.width, 0.0, 0.0, afkStatusFont.size, toColour(255, 0, 0, 255), false, false, false, true); } } } @@ -140,11 +139,11 @@ function drawNametag(x, y, health, armour, text, ping, alpha, distance, colour, // =========================================================================== function updateNametag(element) { - if(!areWorldLabelsSupported()) { + if (!areWorldLabelsSupported()) { return false; } - if(localPlayer != null) { + if (localPlayer != null) { let playerPos = localPlayer.position; let elementPos = element.position; @@ -154,50 +153,50 @@ function updateNametag(element) { let screenPos = getScreenFromWorldPosition(elementPos); if (screenPos[2] >= 0.0) { - let health = element.health/100.0; - if(health > 1.0) { + let health = element.health / 100.0; + if (health > 1.0) { health = 1.0; } - let armour = element.armour/100.0; - if(armour > 1.0) { + let armour = element.armour / 100.0; + if (armour > 1.0) { armour = 1.0; } let distance = playerPos.distance(elementPos); - if(distance <= nametagDistance) { - if(typeof game.processLineOfSight != "undefined") { + if (distance <= nametagDistance) { + if (typeof game.processLineOfSight != "undefined") { let losCheck = game.processLineOfSight(playerPos, elementPos, true, false, false, true, true, false, true, true); - if(losCheck != null) { + if (losCheck != null) { return false; } } - if(element.type == ELEMENT_PLAYER) { + if (element.type == ELEMENT_PLAYER) { let name = element.name; let colour = COLOUR_WHITE; let paused = false; let ping = -1; - if(element.isType(ELEMENT_PLAYER)) { - if(typeof playerNames[element.name] != "undefined") { + if (element.isType(ELEMENT_PLAYER)) { + if (typeof playerNames[element.name] != "undefined") { name = playerNames[element.name]; } - if(typeof playerPaused[element.name] != "undefined") { + if (typeof playerPaused[element.name] != "undefined") { paused = playerPaused[element.name]; } - if(typeof playerColours[element.name] != "undefined") { + if (typeof playerColours[element.name] != "undefined") { colour = playerColours[element.name]; } - if(typeof playerPing[element.name] != "undefined") { + if (typeof playerPing[element.name] != "undefined") { ping = playerPing[element.name]; } } - drawNametag(screenPos[0], screenPos[1], health, armour, name, ping, 1.0-distance/nametagDistance, distance, colour, paused, element.skin); + drawNametag(screenPos[0], screenPos[1], health, armour, name, ping, 1.0 - distance / nametagDistance, distance, colour, paused, element.skin); } } } @@ -207,8 +206,8 @@ function updateNametag(element) { // =========================================================================== function getClientFromPlayer(player) { - getClients().forEach(function(client) { - if(getPlayerPed(client) == player) { + getClients().forEach(function (client) { + if (getPlayerPed(client) == player) { return client; } }); @@ -221,8 +220,8 @@ function processNameTagRendering(event) { // return false; //} - getElementsByType(ELEMENT_PED).forEach(function(ped) { - if(ped != localPlayer) { + getElementsByType(ELEMENT_PED).forEach(function (ped) { + if (ped != localPlayer) { updateNametag(ped); } }); diff --git a/scripts/client/netevents.js b/scripts/client/netevents.js index e09697dc..6e9292dd 100644 --- a/scripts/client/netevents.js +++ b/scripts/client/netevents.js @@ -20,157 +20,157 @@ function addAllNetworkHandlers() { // Chat Box addNetworkEventHandler("m", receiveChatBoxMessageFromServer); // Not prefixed with VRR to make it as small as possible - addNetworkEventHandler("vrr.chatScrollLines", setChatScrollLines); - addNetworkEventHandler("vrr.chatAutoHideDelay", setChatAutoHideDelay); - addNetworkEventHandler("vrr.chatTimeStamps", setChatBoxTimeStampsState); + addNetworkEventHandler("agrp.chatScrollLines", setChatScrollLines); + addNetworkEventHandler("agrp.chatAutoHideDelay", setChatAutoHideDelay); + addNetworkEventHandler("agrp.chatTimeStamps", setChatBoxTimeStampsState); // Messaging (like textdraws and stuff) - addNetworkEventHandler("vrr.smallGameMessage", showSmallGameMessage); + addNetworkEventHandler("agrp.smallGameMessage", showSmallGameMessage); // Job - addNetworkEventHandler("vrr.job", receiveJobFromServer); - addNetworkEventHandler("vrr.working", setLocalPlayerWorkingState); - addNetworkEventHandler("vrr.jobType", setLocalPlayerJobType); - addNetworkEventHandler("vrr.showJobRouteLocation", showJobRouteLocation); - addNetworkEventHandler("vrr.hideJobRouteLocation", hideJobRouteLocation); + addNetworkEventHandler("agrp.job", receiveJobFromServer); + addNetworkEventHandler("agrp.working", setLocalPlayerWorkingState); + addNetworkEventHandler("agrp.jobType", setLocalPlayerJobType); + addNetworkEventHandler("agrp.showJobRouteLocation", showJobRouteLocation); + addNetworkEventHandler("agrp.hideJobRouteLocation", hideJobRouteLocation); // Local player states and values - addNetworkEventHandler("vrr.restoreCamera", restoreLocalCamera); - addNetworkEventHandler("vrr.cameraLookAt", setLocalCameraLookAt); - addNetworkEventHandler("vrr.freeze", setLocalPlayerFrozenState); - addNetworkEventHandler("vrr.control", setLocalPlayerControlState); - addNetworkEventHandler("vrr.fadeCamera", fadeLocalCamera); - addNetworkEventHandler("vrr.removeFromVehicle", removeLocalPlayerFromVehicle); - addNetworkEventHandler("vrr.clearWeapons", clearLocalPlayerWeapons); - addNetworkEventHandler("vrr.giveWeapon", giveLocalPlayerWeapon); - addNetworkEventHandler("vrr.position", setLocalPlayerPosition); - addNetworkEventHandler("vrr.heading", setLocalPlayerHeading); - addNetworkEventHandler("vrr.interior", setLocalPlayerInterior); - addNetworkEventHandler("vrr.spawned", onServerSpawnedLocalPlayer); - addNetworkEventHandler("vrr.money", setLocalPlayerCash); - addNetworkEventHandler("vrr.armour", setLocalPlayerArmour); - addNetworkEventHandler("vrr.localPlayerSkin", setLocalPlayerSkin); - addNetworkEventHandler("vrr.pedSpeak", makeLocalPlayerPedSpeak); - addNetworkEventHandler("vrr.infiniteRun", setLocalPlayerInfiniteRun); - addNetworkEventHandler("vrr.playerCop", setLocalPlayerAsCopState); - addNetworkEventHandler("vrr.health", setLocalPlayerHealth); - addNetworkEventHandler("vrr.wantedLevel", setLocalPlayerWantedLevel); - addNetworkEventHandler("vrr.playerPedId", sendLocalPlayerNetworkIdToServer); - addNetworkEventHandler("vrr.ped", setLocalPlayerPedPartsAndProps); - addNetworkEventHandler("vrr.spawn", serverRequestedLocalPlayerSpawn); - addNetworkEventHandler("vrr.clearPedState", clearLocalPedState); - addNetworkEventHandler("vrr.drunkEffect", setLocalPlayerDrunkEffect); - addNetworkEventHandler("vrr.deleteLocalPlayerPed", deleteLocalPlayerPed); + addNetworkEventHandler("agrp.restoreCamera", restoreLocalCamera); + addNetworkEventHandler("agrp.cameraLookAt", setLocalCameraLookAt); + addNetworkEventHandler("agrp.freeze", setLocalPlayerFrozenState); + addNetworkEventHandler("agrp.control", setLocalPlayerControlState); + addNetworkEventHandler("agrp.fadeCamera", fadeLocalCamera); + addNetworkEventHandler("agrp.removeFromVehicle", removeLocalPlayerFromVehicle); + addNetworkEventHandler("agrp.clearWeapons", clearLocalPlayerWeapons); + addNetworkEventHandler("agrp.giveWeapon", giveLocalPlayerWeapon); + addNetworkEventHandler("agrp.position", setLocalPlayerPosition); + addNetworkEventHandler("agrp.heading", setLocalPlayerHeading); + addNetworkEventHandler("agrp.interior", setLocalPlayerInterior); + addNetworkEventHandler("agrp.spawned", onServerSpawnedLocalPlayer); + addNetworkEventHandler("agrp.money", setLocalPlayerCash); + addNetworkEventHandler("agrp.armour", setLocalPlayerArmour); + addNetworkEventHandler("agrp.localPlayerSkin", setLocalPlayerSkin); + addNetworkEventHandler("agrp.pedSpeak", makeLocalPlayerPedSpeak); + addNetworkEventHandler("agrp.infiniteRun", setLocalPlayerInfiniteRun); + addNetworkEventHandler("agrp.playerCop", setLocalPlayerAsCopState); + addNetworkEventHandler("agrp.health", setLocalPlayerHealth); + addNetworkEventHandler("agrp.wantedLevel", setLocalPlayerWantedLevel); + addNetworkEventHandler("agrp.playerPedId", sendLocalPlayerNetworkIdToServer); + addNetworkEventHandler("agrp.ped", setLocalPlayerPedPartsAndProps); + addNetworkEventHandler("agrp.spawn", serverRequestedLocalPlayerSpawn); + addNetworkEventHandler("agrp.clearPedState", clearLocalPedState); + addNetworkEventHandler("agrp.drunkEffect", setLocalPlayerDrunkEffect); + addNetworkEventHandler("agrp.deleteLocalPlayerPed", deleteLocalPlayerPed); // Vehicle - addNetworkEventHandler("vrr.vehicle", receiveVehicleFromServer); - addNetworkEventHandler("vrr.veh.lights", setVehicleLights); - addNetworkEventHandler("vrr.veh.engine", setVehicleEngine); - addNetworkEventHandler("vrr.veh.repair", repairVehicle); + addNetworkEventHandler("agrp.vehicle", receiveVehicleFromServer); + addNetworkEventHandler("agrp.veh.lights", setVehicleLights); + addNetworkEventHandler("agrp.veh.engine", setVehicleEngine); + addNetworkEventHandler("agrp.veh.repair", repairVehicle); // Radio - addNetworkEventHandler("vrr.radioStream", playStreamingRadio); - addNetworkEventHandler("vrr.audioFileStream", playAudioFile); - addNetworkEventHandler("vrr.stopRadioStream", stopStreamingRadio); - addNetworkEventHandler("vrr.radioVolume", setStreamingRadioVolume); + addNetworkEventHandler("agrp.radioStream", playStreamingRadio); + addNetworkEventHandler("agrp.audioFileStream", playAudioFile); + addNetworkEventHandler("agrp.stopRadioStream", stopStreamingRadio); + addNetworkEventHandler("agrp.radioVolume", setStreamingRadioVolume); // Key Bindings - addNetworkEventHandler("vrr.delKeyBind", unBindAccountKey); - addNetworkEventHandler("vrr.addKeyBind", bindAccountKey); - addNetworkEventHandler("vrr.clearKeyBinds", clearKeyBinds); + addNetworkEventHandler("agrp.delKeyBind", unBindAccountKey); + addNetworkEventHandler("agrp.addKeyBind", bindAccountKey); + addNetworkEventHandler("agrp.clearKeyBinds", clearKeyBinds); // Weapon Damage - addNetworkEventHandler("vrr.weaponDamageEnabled", setPlayerWeaponDamageEnabled); - addNetworkEventHandler("vrr.weaponDamageEvent", setPlayerWeaponDamageEvent); + addNetworkEventHandler("agrp.weaponDamageEnabled", setPlayerWeaponDamageEnabled); + addNetworkEventHandler("agrp.weaponDamageEvent", setPlayerWeaponDamageEvent); // GUI - addNetworkEventHandler("vrr.showRegistration", showRegistrationGUI); - addNetworkEventHandler("vrr.showNewCharacter", showNewCharacterGUI); - addNetworkEventHandler("vrr.showLogin", showLoginGUI); - addNetworkEventHandler("vrr.2fa", showTwoFactorAuthGUI); - addNetworkEventHandler("vrr.showResetPasswordCodeInput", resetPasswordCodeInputGUI); - addNetworkEventHandler("vrr.showResetPasswordEmailInput", resetPasswordEmailInputGUI); - addNetworkEventHandler("vrr.showChangePassword", showChangePasswordGUI); - addNetworkEventHandler("vrr.showCharacterSelect", showCharacterSelectGUI); - addNetworkEventHandler("vrr.switchCharacterSelect", switchCharacterSelectGUI); - addNetworkEventHandler("vrr.showError", showErrorGUI); - addNetworkEventHandler("vrr.showInfo", showInfoGUI); - addNetworkEventHandler("vrr.showPrompt", showYesNoPromptGUI); - addNetworkEventHandler("vrr.loginSuccess", loginSuccess); - addNetworkEventHandler("vrr.characterSelectSuccess", characterSelectSuccess); - addNetworkEventHandler("vrr.loginFailed", loginFailed); - addNetworkEventHandler("vrr.registrationSuccess", registrationSuccess); - addNetworkEventHandler("vrr.registrationFailed", registrationFailed); - addNetworkEventHandler("vrr.newCharacterFailed", newCharacterFailed); - addNetworkEventHandler("vrr.changePassword", showChangePasswordGUI); - addNetworkEventHandler("vrr.showLocaleChooser", showLocaleChooserGUI); - addNetworkEventHandler("vrr.guiColour", setGUIColours); + addNetworkEventHandler("agrp.showRegistration", showRegistrationGUI); + addNetworkEventHandler("agrp.showNewCharacter", showNewCharacterGUI); + addNetworkEventHandler("agrp.showLogin", showLoginGUI); + addNetworkEventHandler("agrp.2fa", showTwoFactorAuthGUI); + addNetworkEventHandler("agrp.showResetPasswordCodeInput", resetPasswordCodeInputGUI); + addNetworkEventHandler("agrp.showResetPasswordEmailInput", resetPasswordEmailInputGUI); + addNetworkEventHandler("agrp.showChangePassword", showChangePasswordGUI); + addNetworkEventHandler("agrp.showCharacterSelect", showCharacterSelectGUI); + addNetworkEventHandler("agrp.switchCharacterSelect", switchCharacterSelectGUI); + addNetworkEventHandler("agrp.showError", showErrorGUI); + addNetworkEventHandler("agrp.showInfo", showInfoGUI); + addNetworkEventHandler("agrp.showPrompt", showYesNoPromptGUI); + addNetworkEventHandler("agrp.loginSuccess", loginSuccess); + addNetworkEventHandler("agrp.characterSelectSuccess", characterSelectSuccess); + addNetworkEventHandler("agrp.loginFailed", loginFailed); + addNetworkEventHandler("agrp.registrationSuccess", registrationSuccess); + addNetworkEventHandler("agrp.registrationFailed", registrationFailed); + addNetworkEventHandler("agrp.newCharacterFailed", newCharacterFailed); + addNetworkEventHandler("agrp.changePassword", showChangePasswordGUI); + addNetworkEventHandler("agrp.showLocaleChooser", showLocaleChooserGUI); + addNetworkEventHandler("agrp.guiColour", setGUIColours); // Business - addNetworkEventHandler("vrr.business", receiveBusinessFromServer); + addNetworkEventHandler("agrp.business", receiveBusinessFromServer); // House - addNetworkEventHandler("vrr.house", receiveHouseFromServer); + addNetworkEventHandler("agrp.house", receiveHouseFromServer); // GPS - addNetworkEventHandler("vrr.showGPSBlip", showGPSLocation); + addNetworkEventHandler("agrp.showGPSBlip", showGPSLocation); // Locale - addNetworkEventHandler("vrr.locale", setLocale); - addNetworkEventHandler("vrr.localeChooser", toggleLocaleChooserGUI); + addNetworkEventHandler("agrp.locale", setLocale); + addNetworkEventHandler("agrp.localeChooser", toggleLocaleChooserGUI); // Misc - addNetworkEventHandler("vrr.mouseCursor", toggleMouseCursor); - addNetworkEventHandler("vrr.mouseCamera", toggleMouseCamera); - addNetworkEventHandler("vrr.clearPeds", clearLocalPlayerOwnedPeds); - addNetworkEventHandler("vrr.clearPickups", clearLocalPlayerOwnedPickups); - addNetworkEventHandler("vrr.passenger", enterVehicleAsPassenger); - addNetworkEventHandler("vrr.logo", setServerLogoRenderState); - addNetworkEventHandler("vrr.ambience", setCityAmbienceState); - addNetworkEventHandler("vrr.runCode", runClientCode); - addNetworkEventHandler("vrr.minuteDuration", setMinuteDuration); - addNetworkEventHandler("vrr.snow", setSnowState); - addNetworkEventHandler("vrr.enterPropertyKey", setEnterPropertyKey); - addNetworkEventHandler("vrr.skinSelect", toggleSkinSelect); - addNetworkEventHandler("vrr.hotbar", updatePlayerHotBar); - addNetworkEventHandler("vrr.showItemActionDelay", showItemActionDelay); - addNetworkEventHandler("vrr.set2DRendering", set2DRendering); - addNetworkEventHandler("vrr.mouseCameraForce", setMouseCameraState); - addNetworkEventHandler("vrr.logLevel", setLogLevel); - addNetworkEventHandler("vrr.hideAllGUI", hideAllGUI); - addNetworkEventHandler("vrr.nametag", updatePlayerNameTag); - addNetworkEventHandler("vrr.nametagDistance", setNameTagDistance); - addNetworkEventHandler("vrr.ping", updatePlayerPing); - addNetworkEventHandler("vrr.anim", makePedPlayAnimation); - addNetworkEventHandler("vrr.stopAnim", makePedStopAnimation); - addNetworkEventHandler("vrr.forceAnim", forcePedAnimation); - addNetworkEventHandler("vrr.clientInfo", serverRequestedClientInfo); - addNetworkEventHandler("vrr.interiorLights", updateInteriorLightsState); - addNetworkEventHandler("vrr.cutsceneInterior", setCutsceneInterior); - addNetworkEventHandler("vrr.syncElement", forceSyncElementProperties); - addNetworkEventHandler("vrr.elementPosition", setElementPosition); - addNetworkEventHandler("vrr.elementCollisions", setElementCollisionsEnabled); - addNetworkEventHandler("vrr.vehBuyState", setVehiclePurchaseState); - addNetworkEventHandler("vrr.holdObject", makePedHoldObject); + addNetworkEventHandler("agrp.mouseCursor", toggleMouseCursor); + addNetworkEventHandler("agrp.mouseCamera", toggleMouseCamera); + addNetworkEventHandler("agrp.clearPeds", clearLocalPlayerOwnedPeds); + addNetworkEventHandler("agrp.clearPickups", clearLocalPlayerOwnedPickups); + addNetworkEventHandler("agrp.passenger", enterVehicleAsPassenger); + addNetworkEventHandler("agrp.logo", setServerLogoRenderState); + addNetworkEventHandler("agrp.ambience", setCityAmbienceState); + addNetworkEventHandler("agrp.runCode", runClientCode); + addNetworkEventHandler("agrp.minuteDuration", setMinuteDuration); + addNetworkEventHandler("agrp.snow", setSnowState); + addNetworkEventHandler("agrp.enterPropertyKey", setEnterPropertyKey); + addNetworkEventHandler("agrp.skinSelect", toggleSkinSelect); + addNetworkEventHandler("agrp.hotbar", updatePlayerHotBar); + addNetworkEventHandler("agrp.showItemActionDelay", showItemActionDelay); + addNetworkEventHandler("agrp.set2DRendering", set2DRendering); + addNetworkEventHandler("agrp.mouseCameraForce", setMouseCameraState); + addNetworkEventHandler("agrp.logLevel", setLogLevel); + addNetworkEventHandler("agrp.hideAllGUI", hideAllGUI); + addNetworkEventHandler("agrp.nametag", updatePlayerNameTag); + addNetworkEventHandler("agrp.nametagDistance", setNameTagDistance); + addNetworkEventHandler("agrp.ping", updatePlayerPing); + addNetworkEventHandler("agrp.anim", makePedPlayAnimation); + addNetworkEventHandler("agrp.stopAnim", makePedStopAnimation); + addNetworkEventHandler("agrp.forceAnim", forcePedAnimation); + addNetworkEventHandler("agrp.clientInfo", serverRequestedClientInfo); + addNetworkEventHandler("agrp.interiorLights", updateInteriorLightsState); + addNetworkEventHandler("agrp.cutsceneInterior", setCutsceneInterior); + addNetworkEventHandler("agrp.syncElement", forceSyncElementProperties); + addNetworkEventHandler("agrp.elementPosition", setElementPosition); + addNetworkEventHandler("agrp.elementCollisions", setElementCollisionsEnabled); + addNetworkEventHandler("agrp.vehBuyState", setVehiclePurchaseState); + addNetworkEventHandler("agrp.holdObject", makePedHoldObject); } // =========================================================================== function sendResourceReadySignalToServer() { - sendNetworkEventToServer("vrr.clientReady"); + sendNetworkEventToServer("agrp.clientReady"); } // =========================================================================== function sendResourceStartedSignalToServer() { - sendNetworkEventToServer("vrr.clientStarted"); + sendNetworkEventToServer("agrp.clientStarted"); } // =========================================================================== function sendResourceStoppedSignalToServer() { if (isConnected) { - sendNetworkEventToServer("vrr.clientStopped"); + sendNetworkEventToServer("agrp.clientStopped"); } } @@ -227,19 +227,19 @@ function onServerSpawnedLocalPlayer(state) { // =========================================================================== function tellServerPlayerUsedKeyBind(key) { - sendNetworkEventToServer("vrr.useKeyBind", key); + sendNetworkEventToServer("agrp.useKeyBind", key); } // =========================================================================== function tellServerPlayerArrivedAtJobRouteLocation() { - sendNetworkEventToServer("vrr.arrivedAtJobRouteLocation"); + sendNetworkEventToServer("agrp.arrivedAtJobRouteLocation"); } // =========================================================================== function tellServerItemActionDelayComplete() { - sendNetworkEventToServer("vrr.itemActionDelayComplete"); + sendNetworkEventToServer("agrp.itemActionDelayComplete"); } // =========================================================================== @@ -249,13 +249,13 @@ function sendServerClientInfo() { if (typeof CLIENT_VERSION_MAJOR != "undefined") { clientVersion = `${CLIENT_VERSION_MAJOR}.${CLIENT_VERSION_MINOR}.${CLIENT_VERSION_PATCH}.${CLIENT_VERSION_BUILD}`; } - sendNetworkEventToServer("vrr.clientInfo", clientVersion, game.width, game.height); + sendNetworkEventToServer("agrp.clientInfo", clientVersion, game.width, game.height); } // =========================================================================== function sendServerNewAFKStatus(state) { - sendNetworkEventToServer("vrr.afk", state); + sendNetworkEventToServer("agrp.afk", state); } // =========================================================================== @@ -354,7 +354,7 @@ function makePedHoldObject(pedId, modelIndex) { // =========================================================================== function sendLocalPlayerNetworkIdToServer() { - sendNetworkEventToServer("vrr.playerPedId", natives.getNetworkIdFromPed(localPlayer)); + sendNetworkEventToServer("agrp.playerPedId", natives.getNetworkIdFromPed(localPlayer)); } // =========================================================================== @@ -413,7 +413,7 @@ function serverRequestedLocalPlayerSpawn(skinId, position) { // =========================================================================== function sendLocaleSelectToServer(localeId) { - sendNetworkEventToServer("vrr.localeSelect", localeId); + sendNetworkEventToServer("agrp.localeSelect", localeId); } // =========================================================================== diff --git a/scripts/client/npc.js b/scripts/client/npc.js index 5d823bf6..28c8e5a2 100644 --- a/scripts/client/npc.js +++ b/scripts/client/npc.js @@ -9,10 +9,10 @@ function processNPCMovement(npc) { //if(npc.isSyncer == true) { - if(getEntityData(npc, "vrr.lookAtClosestPlayer") == true) { - let closestPlayer = getClosestPlayer(getElementPosition(npc.id)); - setPedLookAt(npc, getElementPosition(closestPlayer.id)); - } + if (getEntityData(npc, "agrp.lookAtClosestPlayer") == true) { + let closestPlayer = getClosestPlayer(getElementPosition(npc.id)); + setPedLookAt(npc, getElementPosition(closestPlayer.id)); + } //} } diff --git a/scripts/client/startup.js b/scripts/client/startup.js index ce4b5c04..a5868717 100644 --- a/scripts/client/startup.js +++ b/scripts/client/startup.js @@ -25,8 +25,8 @@ function initClientScripts() { // =========================================================================== function setUpInitialGame() { - if(getGame() == VRR_GAME_GTA_III) { - logToConsole(LOG_DEBUG|LOG_WARN, "Setting up initial game stuff for GTA III ..."); + if (getGame() == AGRP_GAME_GTA_III) { + logToConsole(LOG_DEBUG | LOG_WARN, "Setting up initial game stuff for GTA III ..."); // Turn off unlimited sprint game.SET_PLAYER_NEVER_GETS_TIRED(game.GET_PLAYER_ID(), 0); @@ -44,8 +44,8 @@ function setUpInitialGame() { // 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 ..."); + } else if (getGame() == AGRP_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); @@ -87,8 +87,8 @@ function setUpInitialGame() { // 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 ..."); + } else if (getGame() == AGRP_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_SILENCED_SKILL, 400); @@ -124,7 +124,7 @@ function setUpInitialGame() { // Disables taxi/vigilante/etc and other start mission triggers game.onMission = true; - } else if(getGame() == VRR_GAME_GTA_IV) { + } else if (getGame() == AGRP_GAME_GTA_IV) { natives.allowEmergencyServices(false); natives.setCreateRandomCops(true); natives.setMaxWantedLevel(0); @@ -186,7 +186,7 @@ function setUpInitialGame() { // Some last steps //natives.loadAllObjectsNow(); - } else if(getGame() == VRR_GAME_MAFIA_ONE) { + } else if (getGame() == AGRP_GAME_MAFIA_ONE) { game.mapEnabled = false; game.setTrafficEnabled(false); } diff --git a/scripts/client/sync.js b/scripts/client/sync.js index 4c727cec..86d46bf3 100644 --- a/scripts/client/sync.js +++ b/scripts/client/sync.js @@ -8,37 +8,37 @@ // =========================================================================== function processSync(event, deltaTime) { - if(localPlayer != null) { - if(!areServerElementsSupported()) { - sendNetworkEventToServer("vrr.plr.pos", (localPlayer.vehicle != null) ? localPlayer.vehicle.position : localPlayer.position); - sendNetworkEventToServer("vrr.plr.rot", (localPlayer.vehicle != null) ? localPlayer.vehicle.heading : localPlayer.heading); + if (localPlayer != null) { + if (!areServerElementsSupported()) { + sendNetworkEventToServer("agrp.plr.pos", (localPlayer.vehicle != null) ? localPlayer.vehicle.position : localPlayer.position); + sendNetworkEventToServer("agrp.plr.rot", (localPlayer.vehicle != null) ? localPlayer.vehicle.heading : localPlayer.heading); //if(localPlayer.vehicle != null) { - // sendNetworkEventToServer("vrr.veh.pos", getVehicleForNetworkEvent(localPlayer.vehicle), localPlayer.vehicle.position); - // sendNetworkEventToServer("vrr.veh.rot", getVehicleForNetworkEvent(localPlayer.vehicle), localPlayer.vehicle.heading); + // sendNetworkEventToServer("agrp.veh.pos", getVehicleForNetworkEvent(localPlayer.vehicle), localPlayer.vehicle.position); + // sendNetworkEventToServer("agrp.veh.rot", getVehicleForNetworkEvent(localPlayer.vehicle), localPlayer.vehicle.heading); //} } - if(localPlayer.health <= 0) { - if(!calledDeathEvent) { + if (localPlayer.health <= 0) { + if (!calledDeathEvent) { logToConsole(LOG_DEBUG, `Local player died`); localPlayer.clearWeapons(); calledDeathEvent = true; - sendNetworkEventToServer("vrr.playerDeath"); + sendNetworkEventToServer("agrp.playerDeath"); } } } - if(localPlayer.health <= 0) { - if(!calledDeathEvent) { + if (localPlayer.health <= 0) { + if (!calledDeathEvent) { logToConsole(LOG_DEBUG, `Local player died`); localPlayer.clearWeapons(); calledDeathEvent = true; - sendNetworkEventToServer("vrr.playerDeath"); + sendNetworkEventToServer("agrp.playerDeath"); } } - if(streamingRadioElement) { + if (streamingRadioElement) { streamingRadio.position = getElementPosition(streamingRadioElement.id); //streamingRadio.volume = getStreamingRadioVolumeForPosition(streamingRadio.position); } @@ -53,20 +53,20 @@ function setVehicleEngine(vehicleId, state) { // =========================================================================== function setVehicleLights(vehicleId, state) { - if(getGame() != VRR_GAME_MAFIA_ONE) { - if(!state) { + if (getGame() != VRR_GAME_MAFIA_ONE) { + if (!state) { getElementFromId(vehicleId).lightStatus = 2; } else { getElementFromId(vehicleId).lightStatus = 1; } - } else if(getGame() == VRR_GAME_GTA_IV) { - if(!state) { + } else if (getGame() == VRR_GAME_GTA_IV) { + if (!state) { natives.forceCarLights(natives.getVehicleFromNetworkId(vehicleId, 0)); } else { natives.forceCarLights(natives.getVehicleFromNetworkId(vehicleId, 1)); } } else { - if(!state) { + if (!state) { getElementFromId(vehicleId).lights = false; } else { getElementFromId(vehicleId).lights = true; @@ -83,72 +83,72 @@ function repairVehicle(syncId) { // =========================================================================== function syncVehicleProperties(vehicle) { - if(!areServerElementsSupported()) { + if (!areServerElementsSupported()) { return false; } - if(doesEntityDataExist(vehicle, "vrr.lights")) { - let lightStatus = getEntityData(vehicle, "vrr.lights"); - if(!lightStatus) { + if (doesEntityDataExist(vehicle, "agrp.lights")) { + let lightStatus = getEntityData(vehicle, "agrp.lights"); + if (!lightStatus) { vehicle.lightStatus = 2; } else { vehicle.lightStatus = 1; } } - if(doesEntityDataExist(vehicle, "vrr.invincible")) { - let invincible = getEntityData(vehicle, "vrr.invincible"); + if (doesEntityDataExist(vehicle, "agrp.invincible")) { + let invincible = getEntityData(vehicle, "agrp.invincible"); element.setProofs(invincible, invincible, invincible, invincible, invincible); } - if(doesEntityDataExist(vehicle, "vrr.panelStatus")) { - let panelsStatus = getEntityData(vehicle, "vrr.panelStatus"); - for(let i in panelsStatus) { + if (doesEntityDataExist(vehicle, "agrp.panelStatus")) { + let panelsStatus = getEntityData(vehicle, "agrp.panelStatus"); + for (let i in panelsStatus) { vehicle.setPanelStatus(i, panelsStatus[i]); } } - if(doesEntityDataExist(vehicle, "vrr.wheelStatus")) { - let wheelsStatus = getEntityData(vehicle, "vrr.wheelStatus"); - for(let i in wheelsStatus) { + if (doesEntityDataExist(vehicle, "agrp.wheelStatus")) { + let wheelsStatus = getEntityData(vehicle, "agrp.wheelStatus"); + for (let i in wheelsStatus) { vehicle.setWheelStatus(i, wheelsStatus[i]); } } - if(doesEntityDataExist(vehicle, "vrr.lightStatus")) { - let lightStatus = getEntityData(vehicle, "vrr.lightStatus"); - for(let i in lightStatus) { + if (doesEntityDataExist(vehicle, "agrp.lightStatus")) { + let lightStatus = getEntityData(vehicle, "agrp.lightStatus"); + for (let i in lightStatus) { vehicle.setLightStatus(i, lightStatus[i]); } } - if(doesEntityDataExist(vehicle, "vrr.suspensionHeight")) { - let suspensionHeight = getEntityData(vehicle, "vrr.suspensionHeight"); + if (doesEntityDataExist(vehicle, "agrp.suspensionHeight")) { + let suspensionHeight = getEntityData(vehicle, "agrp.suspensionHeight"); vehicle.setSuspensionHeight(suspensionHeight); } - if(getGame() == VRR_GAME_GTA_SA) { + if (getGame() == VRR_GAME_GTA_SA) { //let allUpgrades = getGameConfig().vehicleUpgrades[getGame()]; //for(let i in allUpgrades) { // vehicle.removeUpgrade(i); //} - if(doesEntityDataExist(vehicle, "vrr.upgrades")) { - let upgrades = getEntityData(vehicle, "vrr.upgrades"); - for(let i in upgrades) { - if(upgrades[i] != 0) { + if (doesEntityDataExist(vehicle, "agrp.upgrades")) { + let upgrades = getEntityData(vehicle, "agrp.upgrades"); + for (let i in upgrades) { + if (upgrades[i] != 0) { vehicle.addUpgrade(upgrades[i]); } } } } - if(getGame() == VRR_GAME_GTA_SA || getGame() == VRR_GAME_GTA_IV) { - if(doesEntityDataExist(vehicle, "vrr.livery")) { - let livery = getEntityData(vehicle, "vrr.livery"); - if(getGame() == VRR_GAME_GTA_SA) { + if (getGame() == VRR_GAME_GTA_SA || getGame() == VRR_GAME_GTA_IV) { + if (doesEntityDataExist(vehicle, "agrp.livery")) { + let livery = getEntityData(vehicle, "agrp.livery"); + if (getGame() == VRR_GAME_GTA_SA) { vehicle.setPaintJob(livery); - } else if(getGame() == VRR_GAME_GTA_IV) { + } else if (getGame() == VRR_GAME_GTA_IV) { vehicle.livery = livery; } } @@ -158,13 +158,13 @@ function syncVehicleProperties(vehicle) { // =========================================================================== function syncCivilianProperties(civilian) { - if(!areServerElementsSupported()) { + if (!areServerElementsSupported()) { return false; } - if(getGame() == VRR_GAME_GTA_III) { - if(doesEntityDataExist(civilian, "vrr.scale")) { - let scaleFactor = getEntityData(civilian, "vrr.scale"); + if (getGame() == VRR_GAME_GTA_III) { + if (doesEntityDataExist(civilian, "agrp.scale")) { + let scaleFactor = getEntityData(civilian, "agrp.scale"); let tempMatrix = civilian.matrix; tempMatrix.setScale(toVector3(scaleFactor.x, scaleFactor.y, scaleFactor.z)); let tempPosition = civilian.position; @@ -174,79 +174,79 @@ function syncCivilianProperties(civilian) { } } - if(getGame() == VRR_GAME_GTA_SA) { - if(doesEntityDataExist(civilian, "vrr.fightStyle")) { - let fightStyle = getEntityData(civilian, "vrr.fightStyle"); + if (getGame() == VRR_GAME_GTA_SA) { + if (doesEntityDataExist(civilian, "agrp.fightStyle")) { + let fightStyle = getEntityData(civilian, "agrp.fightStyle"); civilian.setFightStyle(fightStyle[0], fightStyle[1]); } } - if(getGame() == VRR_GAME_GTA_III) { - if(doesEntityDataExist(civilian, "vrr.walkStyle")) { - let walkStyle = getEntityData(civilian, "vrr.walkStyle"); + if (getGame() == VRR_GAME_GTA_III) { + if (doesEntityDataExist(civilian, "agrp.walkStyle")) { + let walkStyle = getEntityData(civilian, "agrp.walkStyle"); civilian.walkStyle = walkStyle; } } - if(getGame() == VRR_GAME_GTA_IV) { - if(doesEntityDataExist(civilian, "vrr.bodyPropHair")) { - let bodyPropHair = getEntityData(civilian, "vrr.bodyPropHair"); + if (getGame() == VRR_GAME_GTA_IV) { + if (doesEntityDataExist(civilian, "agrp.bodyPropHair")) { + let bodyPropHair = getEntityData(civilian, "agrp.bodyPropHair"); civilian.changeBodyProp(0, bodyPropHair[0], bodyPropHair[1]); } - if(doesEntityDataExist(civilian, "vrr.bodyPropHead")) { - let bodyPropHead = getEntityData(civilian, "vrr.bodyPropHead"); + if (doesEntityDataExist(civilian, "agrp.bodyPropHead")) { + let bodyPropHead = getEntityData(civilian, "agrp.bodyPropHead"); civilian.changeBodyProp(1, bodyPropHead[0], bodyPropHead[1]); } - if(doesEntityDataExist(civilian, "vrr.bodyPropEyes")) { - let bodyPropEyes = getEntityData(civilian, "vrr.bodyPropEyes"); + if (doesEntityDataExist(civilian, "agrp.bodyPropEyes")) { + let bodyPropEyes = getEntityData(civilian, "agrp.bodyPropEyes"); civilian.changeBodyProp(1, bodyPropEyes[0], bodyPropEyes[1]); } - if(doesEntityDataExist(civilian, "vrr.bodyPropLeftHand")) { - let bodyPropLeftHand = getEntityData(civilian, "vrr.bodyPropLeftHand"); + if (doesEntityDataExist(civilian, "agrp.bodyPropLeftHand")) { + let bodyPropLeftHand = getEntityData(civilian, "agrp.bodyPropLeftHand"); civilian.changeBodyProp(1, bodyPropLeftHand[0], bodyPropLeftHand[1]); } - if(doesEntityDataExist(civilian, "vrr.bodyPropRightHand")) { - let bodyPropRightHand = getEntityData(civilian, "vrr.bodyPropRightHand"); + if (doesEntityDataExist(civilian, "agrp.bodyPropRightHand")) { + let bodyPropRightHand = getEntityData(civilian, "agrp.bodyPropRightHand"); civilian.changeBodyProp(1, bodyPropRightHand[0], bodyPropRightHand[1]); } - if(doesEntityDataExist(civilian, "vrr.bodyPropLeftWrist")) { - let bodyPropLeftWrist = getEntityData(civilian, "vrr.bodyPropLeftWrist"); + if (doesEntityDataExist(civilian, "agrp.bodyPropLeftWrist")) { + let bodyPropLeftWrist = getEntityData(civilian, "agrp.bodyPropLeftWrist"); civilian.changeBodyProp(1, bodyPropLeftWrist[0], bodyPropLeftWrist[1]); } - if(doesEntityDataExist(civilian, "vrr.bodyPropRightWrist")) { - let bodyPropRightWrist = getEntityData(civilian, "vrr.bodyPropRightWrist"); + if (doesEntityDataExist(civilian, "agrp.bodyPropRightWrist")) { + let bodyPropRightWrist = getEntityData(civilian, "agrp.bodyPropRightWrist"); civilian.changeBodyProp(1, bodyPropRightWrist[0], bodyPropRightWrist[1]); } - if(doesEntityDataExist(civilian, "vrr.bodyPropRightWrist")) { - let bodyPropRightWrist = getEntityData(civilian, "vrr.bodyPropRightWrist"); + if (doesEntityDataExist(civilian, "agrp.bodyPropRightWrist")) { + let bodyPropRightWrist = getEntityData(civilian, "agrp.bodyPropRightWrist"); civilian.changeBodyProp(1, bodyPropRightWrist[0], bodyPropRightWrist[1]); } - if(doesEntityDataExist(civilian, "vrr.bodyPropHip")) { - let bodyPropHip = getEntityData(civilian, "vrr.bodyPropHip"); + if (doesEntityDataExist(civilian, "agrp.bodyPropHip")) { + let bodyPropHip = getEntityData(civilian, "agrp.bodyPropHip"); civilian.changeBodyProp(1, bodyPropHip[0], bodyPropHip[1]); } - if(doesEntityDataExist(civilian, "vrr.bodyPropLeftFoot")) { - let bodyPropLeftFoot = getEntityData(civilian, "vrr.bodyPropLeftFoot"); + if (doesEntityDataExist(civilian, "agrp.bodyPropLeftFoot")) { + let bodyPropLeftFoot = getEntityData(civilian, "agrp.bodyPropLeftFoot"); civilian.changeBodyProp(1, bodyPropLeftFoot[0], bodyPropLeftFoot[1]); } - if(doesEntityDataExist(civilian, "vrr.bodyPropRightFoot")) { - let bodyPropRightFoot = getEntityData(civilian, "vrr.bodyPropRightFoot"); + if (doesEntityDataExist(civilian, "agrp.bodyPropRightFoot")) { + let bodyPropRightFoot = getEntityData(civilian, "agrp.bodyPropRightFoot"); civilian.changeBodyProp(1, bodyPropRightFoot[0], bodyPropRightFoot[1]); } } - if(doesEntityDataExist(civilian, "vrr.anim")) { - let animationSlot = getEntityData(civilian, "vrr.anim"); + if (doesEntityDataExist(civilian, "agrp.anim")) { + let animationSlot = getEntityData(civilian, "agrp.anim"); let animationData = getAnimationData(animationSlot); civilian.addAnimation(animationData.groupId, animationData.animId); } @@ -255,13 +255,13 @@ function syncCivilianProperties(civilian) { // =========================================================================== function syncPlayerProperties(player) { - if(!areServerElementsSupported()) { + if (!areServerElementsSupported()) { return false; } - if(getGame() == VRR_GAME_GTA_III) { - if(doesEntityDataExist(player, "vrr.scale")) { - let scaleFactor = getEntityData(player, "vrr.scale"); + if (getGame() == VRR_GAME_GTA_III) { + if (doesEntityDataExist(player, "agrp.scale")) { + let scaleFactor = getEntityData(player, "agrp.scale"); let tempMatrix = player.matrix; tempMatrix.setScale(toVector3(scaleFactor.x, scaleFactor.y, scaleFactor.z)); let tempPosition = player.position; @@ -271,95 +271,95 @@ function syncPlayerProperties(player) { } } - if(getGame() == VRR_GAME_GTA_SA) { - if(doesEntityDataExist(player, "vrr.fightStyle")) { - let fightStyle = getEntityData(player, "vrr.fightStyle"); + if (getGame() == VRR_GAME_GTA_SA) { + if (doesEntityDataExist(player, "agrp.fightStyle")) { + let fightStyle = getEntityData(player, "agrp.fightStyle"); player.setFightStyle(fightStyle[0], fightStyle[1]); } } //if(getGame() == VRR_GAME_GTA_SA) { - // if(doesEntityDataExist(player, "vrr.walkStyle")) { - // let walkStyle = getEntityData(player, "vrr.walkStyle"); + // if(doesEntityDataExist(player, "agrp.walkStyle")) { + // let walkStyle = getEntityData(player, "agrp.walkStyle"); // player.walkStyle = walkStyle; // } //} - if(getGame() == VRR_GAME_GTA_IV) { - if(doesEntityDataExist(player, "vrr.bodyPartHair")) { - let bodyPartHead = getEntityData(player, "vrr.bodyPartHair"); + if (getGame() == VRR_GAME_GTA_IV) { + if (doesEntityDataExist(player, "agrp.bodyPartHair")) { + let bodyPartHead = getEntityData(player, "agrp.bodyPartHair"); player.changeBodyPart(0, bodyPartHead[0], bodyPartHair[1]); } - if(doesEntityDataExist(player, "vrr.bodyPartHead")) { - let bodyPartHead = getEntityData(player, "vrr.bodyPartHead"); + if (doesEntityDataExist(player, "agrp.bodyPartHead")) { + let bodyPartHead = getEntityData(player, "agrp.bodyPartHead"); player.changeBodyPart(1, bodyPartHead[0], bodyPartHead[1]); } - if(doesEntityDataExist(player, "vrr.bodyPartUpper")) { - let bodyPartUpper = getEntityData(player, "vrr.bodyPartUpper"); + if (doesEntityDataExist(player, "agrp.bodyPartUpper")) { + let bodyPartUpper = getEntityData(player, "agrp.bodyPartUpper"); player.changeBodyPart(1, bodyPartUpper[0], bodyPartUpper[1]); } - if(doesEntityDataExist(player, "vrr.bodyPartLower")) { - let bodyPartLower = getEntityData(player, "vrr.bodyPartLower"); + if (doesEntityDataExist(player, "agrp.bodyPartLower")) { + let bodyPartLower = getEntityData(player, "agrp.bodyPartLower"); player.changeBodyPart(1, bodyPartLower[0], bodyPartLower[1]); } } - if(getGame() == VRR_GAME_GTA_IV) { - if(doesEntityDataExist(player, "vrr.bodyPropHair")) { - let bodyPropHair = getEntityData(player, "vrr.bodyPropHair"); + if (getGame() == VRR_GAME_GTA_IV) { + if (doesEntityDataExist(player, "agrp.bodyPropHair")) { + let bodyPropHair = getEntityData(player, "agrp.bodyPropHair"); player.changeBodyProp(0, bodyPropHair[0], bodyPropHair[1]); } - if(doesEntityDataExist(player, "vrr.bodyPropHead")) { - let bodyPropHead = getEntityData(player, "vrr.bodyPropHead"); + if (doesEntityDataExist(player, "agrp.bodyPropHead")) { + let bodyPropHead = getEntityData(player, "agrp.bodyPropHead"); player.changeBodyProp(1, bodyPropHead[0], bodyPropHead[1]); } - if(doesEntityDataExist(player, "vrr.bodyPropEyes")) { - let bodyPropEyes = getEntityData(player, "vrr.bodyPropEyes"); + if (doesEntityDataExist(player, "agrp.bodyPropEyes")) { + let bodyPropEyes = getEntityData(player, "agrp.bodyPropEyes"); player.changeBodyProp(1, bodyPropEyes[0], bodyPropEyes[1]); } - if(doesEntityDataExist(player, "vrr.bodyPropLeftHand")) { - let bodyPropLeftHand = getEntityData(player, "vrr.bodyPropLeftHand"); + if (doesEntityDataExist(player, "agrp.bodyPropLeftHand")) { + let bodyPropLeftHand = getEntityData(player, "agrp.bodyPropLeftHand"); player.changeBodyProp(1, bodyPropLeftHand[0], bodyPropLeftHand[1]); } - if(doesEntityDataExist(player, "vrr.bodyPropRightHand")) { - let bodyPropRightHand = getEntityData(player, "vrr.bodyPropRightHand"); + if (doesEntityDataExist(player, "agrp.bodyPropRightHand")) { + let bodyPropRightHand = getEntityData(player, "agrp.bodyPropRightHand"); player.changeBodyProp(1, bodyPropRightHand[0], bodyPropRightHand[1]); } - if(doesEntityDataExist(player, "vrr.bodyPropLeftWrist")) { - let bodyPropLeftWrist = getEntityData(player, "vrr.bodyPropLeftWrist"); + if (doesEntityDataExist(player, "agrp.bodyPropLeftWrist")) { + let bodyPropLeftWrist = getEntityData(player, "agrp.bodyPropLeftWrist"); player.changeBodyProp(1, bodyPropLeftWrist[0], bodyPropLeftWrist[1]); } - if(doesEntityDataExist(player, "vrr.bodyPropRightWrist")) { - let bodyPropRightWrist = getEntityData(player, "vrr.bodyPropRightWrist"); + if (doesEntityDataExist(player, "agrp.bodyPropRightWrist")) { + let bodyPropRightWrist = getEntityData(player, "agrp.bodyPropRightWrist"); player.changeBodyProp(1, bodyPropRightWrist[0], bodyPropRightWrist[1]); } - if(doesEntityDataExist(player, "vrr.bodyPropRightWrist")) { - let bodyPropRightWrist = getEntityData(player, "vrr.bodyPropRightWrist"); + if (doesEntityDataExist(player, "agrp.bodyPropRightWrist")) { + let bodyPropRightWrist = getEntityData(player, "agrp.bodyPropRightWrist"); player.changeBodyProp(1, bodyPropRightWrist[0], bodyPropRightWrist[1]); } - if(doesEntityDataExist(player, "vrr.bodyPropHip")) { - let bodyPropHip = getEntityData(player, "vrr.bodyPropHip"); + if (doesEntityDataExist(player, "agrp.bodyPropHip")) { + let bodyPropHip = getEntityData(player, "agrp.bodyPropHip"); player.changeBodyProp(1, bodyPropHip[0], bodyPropHip[1]); } - if(doesEntityDataExist(player, "vrr.bodyPropLeftFoot")) { - let bodyPropLeftFoot = getEntityData(player, "vrr.bodyPropLeftFoot"); + if (doesEntityDataExist(player, "agrp.bodyPropLeftFoot")) { + let bodyPropLeftFoot = getEntityData(player, "agrp.bodyPropLeftFoot"); player.changeBodyProp(1, bodyPropLeftFoot[0], bodyPropLeftFoot[1]); } - if(doesEntityDataExist(player, "vrr.bodyPropRightFoot")) { - let bodyPropRightFoot = getEntityData(player, "vrr.bodyPropRightFoot"); + if (doesEntityDataExist(player, "agrp.bodyPropRightFoot")) { + let bodyPropRightFoot = getEntityData(player, "agrp.bodyPropRightFoot"); player.changeBodyProp(1, bodyPropRightFoot[0], bodyPropRightFoot[1]); } } @@ -368,18 +368,18 @@ function syncPlayerProperties(player) { // =========================================================================== function syncElementProperties(element) { - if(!areServerElementsSupported()) { + if (!areServerElementsSupported()) { return false; } - if(doesEntityDataExist(element, "vrr.interior")) { - if(typeof element.interior != "undefined") { - element.interior = getEntityData(element, "vrr.interior"); + if (doesEntityDataExist(element, "agrp.interior")) { + if (typeof element.interior != "undefined") { + element.interior = getEntityData(element, "agrp.interior"); } } - if(getGame() == VRR_GAME_MAFIA_ONE) { - switch(element.type) { + if (getGame() == VRR_GAME_MAFIA_ONE) { + switch (element.type) { case ELEMENT_VEHICLE: syncVehicleProperties(element); break; @@ -396,7 +396,7 @@ function syncElementProperties(element) { break; } } else { - switch(element.type) { + switch (element.type) { case ELEMENT_VEHICLE: syncVehicleProperties(element); break; @@ -419,7 +419,7 @@ function syncElementProperties(element) { // =========================================================================== function receiveHouseFromServer(houseId, entrancePosition, blipModel, pickupModel, hasInterior) { - if(getGame() == VRR_GAME_GTA_IV) { + if (getGame() == VRR_GAME_GTA_IV) { } } @@ -427,11 +427,11 @@ function receiveHouseFromServer(houseId, entrancePosition, blipModel, pickupMode // =========================================================================== function setLocalPlayerPedPartsAndProps(parts, props) { - for(let i in parts) { + for (let i in parts) { localPlayer.changeBodyPart(parts[i][0], parts[i][1], parts[i][2]); } - for(let j in props) { + for (let j in props) { localPlayer.changeBodyProp(props[j][0], props[j][1]); } } diff --git a/scripts/client/utilities.js b/scripts/client/utilities.js index 62dd8eea..af7f5043 100644 --- a/scripts/client/utilities.js +++ b/scripts/client/utilities.js @@ -95,7 +95,7 @@ function runClientCode(code, returnTo) { try { returnValue = eval("(" + code + ")"); } catch (error) { - sendNetworkEventToServer("vrr.runCodeFail", returnTo, error.toString()); + sendNetworkEventToServer("agrp.runCodeFail", returnTo, error.toString()); return false; } let returnValueString = returnValue; @@ -104,7 +104,7 @@ function runClientCode(code, returnTo) { } else { returnValueString = "null/undefined"; } - sendNetworkEventToServer("vrr.runCodeSuccess", returnTo, returnValueString); + sendNetworkEventToServer("agrp.runCodeSuccess", returnTo, returnValueString); } // =========================================================================== @@ -212,8 +212,8 @@ function setLocalPlayerInterior(interior) { if (areServerElementsSupported() && isGameFeatureSupported("interior")) { let vehicles = getElementsByType(ELEMENT_VEHICLE); for (let i in vehicles) { - if (getEntityData(vehicles[i], "vrr.interior")) { - vehicles[i].interior = getEntityData(vehicles[i], "vrr.interior"); + if (getEntityData(vehicles[i], "agrp.interior")) { + vehicles[i].interior = getEntityData(vehicles[i], "agrp.interior"); } } } @@ -407,8 +407,8 @@ function processWantedLevelReset() { function processLocalPlayerVehicleControlState() { if (areServerElementsSupported()) { if (inVehicle && localPlayer.vehicle != null) { - if (doesEntityDataExist(localPlayer.vehicle, "vrr.engine")) { - if (getEntityData(localPlayer.vehicle, "vrr.engine") == false) { + if (doesEntityDataExist(localPlayer.vehicle, "agrp.engine")) { + if (getEntityData(localPlayer.vehicle, "agrp.engine") == false) { localPlayer.vehicle.engine = false; if (!localPlayer.vehicle.engine) { if (typeof localPlayer.vehicle.velocity != "undefined") { @@ -591,7 +591,7 @@ function processNearbyPickups() { //if(pickups[i].interior == localPlayer.interior && pickups[i].dimension == localPlayer.dimension) { if (currentPickup != pickups[i]) { currentPickup = pickups[i]; - sendNetworkEventToServer("vrr.pickup", pickups[i].id); + sendNetworkEventToServer("agrp.pickup", pickups[i].id); } //} } diff --git a/scripts/client/vehicle.js b/scripts/client/vehicle.js index 3011f195..40eba8c9 100644 --- a/scripts/client/vehicle.js +++ b/scripts/client/vehicle.js @@ -32,11 +32,11 @@ class VehicleData { function receiveVehicleFromServer(vehicleId, position, model, colour1, colour2, colour3 = 0, colour4 = 0, locked = false, lights = false, engine = false, licensePlate = "") { logToConsole(LOG_DEBUG, `[VRR.Vehicle] Received vehicle ${vehicleId} (${getVehicleNameFromModel(model, getGame())}) from server`); - if(getGame() != VRR_GAME_GTA_IV) { + if (getGame() != VRR_GAME_GTA_IV) { return false; } - if(getVehicleData(vehicleId) != false) { + if (getVehicleData(vehicleId) != false) { let vehicleData = getVehicleData(vehicleId); //vehicleData.position = position; //vehicleData.heading = heading; @@ -63,20 +63,20 @@ function receiveVehicleFromServer(vehicleId, position, model, colour1, colour2, // =========================================================================== function processVehiclePurchasing() { - if(vehiclePurchaseState == VRR_VEHBUYSTATE_TESTDRIVE) { - if(getLocalPlayerVehicle() == false) { + if (vehiclePurchaseState == VRR_VEHBUYSTATE_TESTDRIVE) { + if (getLocalPlayerVehicle() == false) { vehiclePurchaseState = VRR_VEHBUYSTATE_EXITVEH; - sendNetworkEventToServer("vrr.vehBuyState", VRR_VEHBUYSTATE_EXITVEH); + sendNetworkEventToServer("agrp.vehBuyState", VRR_VEHBUYSTATE_EXITVEH); return false; } else { - if(vehiclePurchasing == getLocalPlayerVehicle()) { - if(getDistance(getLocalPlayerVehicle().position, vehiclePurchasePosition) >= 25) { + if (vehiclePurchasing == getLocalPlayerVehicle()) { + if (getDistance(getLocalPlayerVehicle().position, vehiclePurchasePosition) >= 25) { vehiclePurchaseState = VRR_VEHBUYSTATE_FARENOUGH; - sendNetworkEventToServer("vrr.vehBuyState", VRR_VEHBUYSTATE_FARENOUGH); + sendNetworkEventToServer("agrp.vehBuyState", VRR_VEHBUYSTATE_FARENOUGH); } } else { vehiclePurchaseState = VRR_VEHBUYSTATE_WRONGVEH; - sendNetworkEventToServer("vrr.vehBuyState", VRR_VEHBUYSTATE_WRONGVEH); + sendNetworkEventToServer("agrp.vehBuyState", VRR_VEHBUYSTATE_WRONGVEH); } } } @@ -95,7 +95,7 @@ function processVehicleBurning() { function setVehiclePurchaseState(state, vehicleId, position) { vehiclePurchaseState = state; - if(vehicleId != null) { + if (vehicleId != null) { vehiclePurchasing = getElementFromId(vehicleId); } else { vehiclePurchasing = null; @@ -110,9 +110,9 @@ function setVehiclePurchaseState(state, vehicleId, position) { * @param {number} vehicleId - The ID of the job (initially provided by server) * @return {VehicleData} The vehicle's data (class instance) */ - function getVehicleData(vehicleId) { - for(let i in getServerData().vehicles) { - if(getServerData().vehicles[i].vehicleId == vehicleId) { +function getVehicleData(vehicleId) { + for (let i in getServerData().vehicles) { + if (getServerData().vehicles[i].vehicleId == vehicleId) { return getServerData().vehicles[i]; } } @@ -123,7 +123,7 @@ function setVehiclePurchaseState(state, vehicleId, position) { // =========================================================================== function setAllVehicleDataIndexes() { - for(let i in getServerData().vehicles) { + for (let i in getServerData().vehicles) { getServerData().vehicles[i].index = i; } } diff --git a/scripts/server/anticheat.js b/scripts/server/anticheat.js index 9cf7fafb..256bf227 100644 --- a/scripts/server/anticheat.js +++ b/scripts/server/anticheat.js @@ -15,10 +15,10 @@ function initAntiCheatScript() { // =========================================================================== function clearPlayerStateToEnterExitProperty(client) { - if(getPlayerData(client).pedState != VRR_PEDSTATE_READY) { - if(getPlayerData(client).pedState == VRR_PEDSTATE_ENTERINGVEHICLE) { + if (getPlayerData(client).pedState != AGRP_PEDSTATE_READY) { + if (getPlayerData(client).pedState == AGRP_PEDSTATE_ENTERINGVEHICLE) { sendPlayerClearPedState(client); - getPlayerData(client).pedState = VRR_PEDSTATE_READY; + getPlayerData(client).pedState = AGRP_PEDSTATE_READY; } else { return false; } @@ -28,7 +28,7 @@ function clearPlayerStateToEnterExitProperty(client) { // =========================================================================== function isPlayerExemptFromAntiCheat(client) { - if(hasBitFlag(getPlayerData(client).accountData.flags.moderation, getModerationFlagValue("ExemptFromAntiCheat"))) { + if (hasBitFlag(getPlayerData(client).accountData.flags.moderation, getModerationFlagValue("ExemptFromAntiCheat"))) { return true; } @@ -38,7 +38,7 @@ function isPlayerExemptFromAntiCheat(client) { // =========================================================================== function canPlayerUsePoliceJob(client) { - if(getPlayerData(client).accountData.flags.moderation & getServerBitFlags().moderationFlags.policeBanned) { + if (getPlayerData(client).accountData.flags.moderation & getServerBitFlags().moderationFlags.policeBanned) { return false; } @@ -48,7 +48,7 @@ function canPlayerUsePoliceJob(client) { // =========================================================================== function canClientUseFireJob(client) { - if(getPlayerData(client).accountData.flags.moderation & getServerBitFlags().moderationFlags.fireBanned) { + if (getPlayerData(client).accountData.flags.moderation & getServerBitFlags().moderationFlags.fireBanned) { return false; } @@ -58,7 +58,7 @@ function canClientUseFireJob(client) { // =========================================================================== function canClientUseAmmunations(client) { - if(getPlayerData(client).accountData.flags.moderation & getServerBitFlags().moderationFlags.AmmuBanned) { + if (getPlayerData(client).accountData.flags.moderation & getServerBitFlags().moderationFlags.AmmuBanned) { return false; } @@ -68,7 +68,7 @@ function canClientUseAmmunations(client) { // =========================================================================== function canClientUseGuns(client) { - if(getPlayerData(client).accountData.flags.moderation & getServerBitFlags().moderationFlags.GunBanned) { + if (getPlayerData(client).accountData.flags.moderation & getServerBitFlags().moderationFlags.GunBanned) { return false; } diff --git a/scripts/server/ban.js b/scripts/server/ban.js index 9c983e05..07e9b8b5 100644 --- a/scripts/server/ban.js +++ b/scripts/server/ban.js @@ -8,18 +8,18 @@ // =========================================================================== // Ban Types -const VRR_BANTYPE_NONE = 0; -const VRR_BANTYPE_ACCOUNT = 1; -const VRR_BANTYPE_SUBACCOUNT = 2; -const VRR_BANTYPE_IPADDRESS = 3; -const VRR_BANTYPE_SUBNET = 4; +const AGRP_BANTYPE_NONE = 0; +const AGRP_BANTYPE_ACCOUNT = 1; +const AGRP_BANTYPE_SUBACCOUNT = 2; +const AGRP_BANTYPE_IPADDRESS = 3; +const AGRP_BANTYPE_SUBNET = 4; // =========================================================================== class BanData { constructor(dbAssoc = false) { this.databaseId = 0; - this.type = VRR_BANTYPE_NONE; + this.type = AGRP_BANTYPE_NONE; this.detail = ""; this.ipAddress = ""; this.name = ""; @@ -174,7 +174,7 @@ function banAccount(accountId, adminAccountId, reason) { let dbConnection = connectToDatabase(); if (dbConnection) { let safeReason = dbConnection.escapetoString(reason); - let dbQuery = queryDatabase(dbConnection, `INSERT INTO ban_main (ban_type, ban_detail, ban_who_banned, ban_reason) VALUES (${VRR_BANTYPE_ACCOUNT}, ${accountId}, ${adminAccountId}, '${safeReason}');`); + let dbQuery = queryDatabase(dbConnection, `INSERT INTO ban_main (ban_type, ban_detail, ban_who_banned, ban_reason) VALUES (${AGRP_BANTYPE_ACCOUNT}, ${accountId}, ${adminAccountId}, '${safeReason}');`); freeDatabaseQuery(dbQuery); dbConnection.close(); return true; @@ -189,7 +189,7 @@ function banSubAccount(subAccountId, adminAccountId, reason) { let dbConnection = connectToDatabase(); if (dbConnection) { let safeReason = dbConnection.escapetoString(reason); - let dbQuery = queryDatabase(dbConnection, `INSERT INTO ban_main (ban_type, ban_detail, ban_who_banned, ban_reason) VALUES (${VRR_BANTYPE_SUBACCOUNT}, ${subAccountId}, ${adminAccountId}, '${safeReason}');`); + let dbQuery = queryDatabase(dbConnection, `INSERT INTO ban_main (ban_type, ban_detail, ban_who_banned, ban_reason) VALUES (${AGRP_BANTYPE_SUBACCOUNT}, ${subAccountId}, ${adminAccountId}, '${safeReason}');`); freeDatabaseQuery(dbQuery); dbConnection.close(); return true; @@ -204,7 +204,7 @@ function banIPAddress(ipAddress, adminAccountId, reason) { let dbConnection = connectToDatabase(); if (dbConnection) { let safeReason = dbConnection.escapetoString(reason); - let dbQuery = queryDatabase(dbConnection, `INSERT INTO ban_main (ban_type, ban_detail, ban_who_banned, ban_reason) VALUES (${VRR_BANTYPE_IPADDRESS}, INET_ATON(${ipAddress}), ${adminAccountId}, '${safeReason}');`); + let dbQuery = queryDatabase(dbConnection, `INSERT INTO ban_main (ban_type, ban_detail, ban_who_banned, ban_reason) VALUES (${AGRP_BANTYPE_IPADDRESS}, INET_ATON(${ipAddress}), ${adminAccountId}, '${safeReason}');`); freeDatabaseQuery(dbQuery); dbConnection.close(); return true; @@ -219,7 +219,7 @@ function banSubNet(ipAddressStart, ipAddressEnd, adminAccountId, reason) { let dbConnection = connectToDatabase(); if (dbConnection) { let safeReason = dbConnection.escapetoString(reason); - let dbQuery = queryDatabase(dbConnection, `INSERT INTO ban_main (ban_type, ban_ip_start, ban_ip_end, ban_who_banned, ban_reason) VALUES (${VRR_BANTYPE_SUBNET}, INET_ATON(${ipAddressStart}), INET_ATON(${ipAddressEnd}), ${adminAccountId}, '${safeReason}');`); + let dbQuery = queryDatabase(dbConnection, `INSERT INTO ban_main (ban_type, ban_ip_start, ban_ip_end, ban_who_banned, ban_reason) VALUES (${AGRP_BANTYPE_SUBNET}, INET_ATON(${ipAddressStart}), INET_ATON(${ipAddressEnd}), ${adminAccountId}, '${safeReason}');`); freeDatabaseQuery(dbQuery); dbConnection.close(); return true; @@ -233,7 +233,7 @@ function banSubNet(ipAddressStart, ipAddressEnd, adminAccountId, reason) { function unbanAccount(accountId, adminAccountId) { let dbConnection = connectToDatabase(); if (dbConnection) { - let dbQuery = queryDatabase(dbConnection, `UPDATE ban_main SET ban_who_removed=${adminAccountId}, ban_removed=1 WHERE ban_type=${VRR_BANTYPE_ACCOUNT} AND ban_detail=${accountId}`); + let dbQuery = queryDatabase(dbConnection, `UPDATE ban_main SET ban_who_removed=${adminAccountId}, ban_removed=1 WHERE ban_type=${AGRP_BANTYPE_ACCOUNT} AND ban_detail=${accountId}`); freeDatabaseQuery(dbQuery); dbConnection.close(); return true; @@ -247,7 +247,7 @@ function unbanAccount(accountId, adminAccountId) { function unbanSubAccount(subAccountId, adminAccountId) { let dbConnection = connectToDatabase(); if (dbConnection) { - let dbQuery = queryDatabase(dbConnection, `UPDATE ban_main SET ban_who_removed=${adminAccountId}, ban_removed=1 WHERE ban_type=${VRR_BANTYPE_SUBACCOUNT} AND ban_detail=${subAccountId}`); + let dbQuery = queryDatabase(dbConnection, `UPDATE ban_main SET ban_who_removed=${adminAccountId}, ban_removed=1 WHERE ban_type=${AGRP_BANTYPE_SUBACCOUNT} AND ban_detail=${subAccountId}`); freeDatabaseQuery(dbQuery); dbConnection.close(); return true; @@ -261,7 +261,7 @@ function unbanSubAccount(subAccountId, adminAccountId) { function unbanIPAddress(ipAddress, adminAccountId) { let dbConnection = connectToDatabase(); if (dbConnection) { - let dbQuery = queryDatabase(dbConnection, `UPDATE ban_main SET ban_who_removed=${adminAccountId}, ban_removed=1 WHERE ban_type=${VRR_BANTYPE_IPADDRESS} AND ban_detail=INET_ATON(${ipAddress})`); + let dbQuery = queryDatabase(dbConnection, `UPDATE ban_main SET ban_who_removed=${adminAccountId}, ban_removed=1 WHERE ban_type=${AGRP_BANTYPE_IPADDRESS} AND ban_detail=INET_ATON(${ipAddress})`); freeDatabaseQuery(dbQuery); dbConnection.close(); return true; @@ -275,7 +275,7 @@ function unbanIPAddress(ipAddress, adminAccountId) { function unbanSubNet(ipAddressStart, ipAddressEnd, adminAccountId) { let dbConnection = connectToDatabase(); if (dbConnection) { - let dbQuery = queryDatabase(dbConnection, `UPDATE ban_main SET ban_who_removed=${adminAccountId}, ban_removed=1 WHERE ban_type=${VRR_BANTYPE_SUBNET} AND ban_ip_start=INET_ATON(${ipAddressStart}) AND ban_ip_end=INET_ATON(${ipAddressEnd})`); + let dbQuery = queryDatabase(dbConnection, `UPDATE ban_main SET ban_who_removed=${adminAccountId}, ban_removed=1 WHERE ban_type=${AGRP_BANTYPE_SUBNET} AND ban_ip_start=INET_ATON(${ipAddressStart}) AND ban_ip_end=INET_ATON(${ipAddressEnd})`); freeDatabaseQuery(dbQuery); dbConnection.close(); return true; @@ -287,7 +287,7 @@ function unbanSubNet(ipAddressStart, ipAddressEnd, adminAccountId) { // =========================================================================== function isAccountBanned(accountId) { - let bans = getServerData().bans.filter(ban => ban.type === VRR_BANTYPE_ACCOUNT && ban.detail === accountId); + let bans = getServerData().bans.filter(ban => ban.type === AGRP_BANTYPE_ACCOUNT && ban.detail === accountId); if (bans.length > 0) { return true; } @@ -298,7 +298,7 @@ function isAccountBanned(accountId) { // =========================================================================== function isSubAccountBanned(subAccountId) { - let bans = getServerData().bans.filter(ban => ban.type === VRR_BANTYPE_SUBACCOUNT && ban.detail === subAccountId); + let bans = getServerData().bans.filter(ban => ban.type === AGRP_BANTYPE_SUBACCOUNT && ban.detail === subAccountId); if (bans.length > 0) { return true; } @@ -309,7 +309,7 @@ function isSubAccountBanned(subAccountId) { // =========================================================================== function isIpAddressBanned(ipAddress) { - let bans = getServerData().bans.filter(ban => ban.type === VRR_BANTYPE_IPADDRESS && ban.detail === ipAddress); + let bans = getServerData().bans.filter(ban => ban.type === AGRP_BANTYPE_IPADDRESS && ban.detail === ipAddress); if (bans.length > 0) { return true; } diff --git a/scripts/server/bank.js b/scripts/server/bank.js index 052eaa19..5bf0a416 100644 --- a/scripts/server/bank.js +++ b/scripts/server/bank.js @@ -14,7 +14,7 @@ function isPlayerAtBank(client) { let businessId = getPlayerBusiness(client); if (getBusinessData(client) != false) { - if (getBusinessData(businessId).entranceType == VRR_BIZ_ENTRANCE_TYPE_BANK) { + if (getBusinessData(businessId).entranceType == AGRP_BIZ_ENTRANCE_TYPE_BANK) { return true; } } diff --git a/scripts/server/business.js b/scripts/server/business.js index 2c85135a..da9182d0 100644 --- a/scripts/server/business.js +++ b/scripts/server/business.js @@ -452,7 +452,7 @@ function setBusinessNameCommand(command, params, client) { let oldBusinessName = getBusinessData(businessId).name; getBusinessData(businessId).name = newBusinessName; - setEntityData(getBusinessData(businessId).entrancePickup, "vrr.label.name", getBusinessData(businessId).name, true); + setEntityData(getBusinessData(businessId).entrancePickup, "agrp.label.name", getBusinessData(businessId).name, true); getBusinessData(businessId).needsSaved = true; messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} renamed business {businessBlue}${oldBusinessName}{MAINCOLOUR} to {businessBlue}${newBusinessName}`); } @@ -1442,7 +1442,7 @@ function setBusinessBuyPriceCommand(command, params, client) { } getBusinessData(businessId).buyPrice = amount; - setEntityData(getBusinessData(businessId).entrancePickup, "vrr.label.price", getBusinessData(businessId).buyPrice, true); + setEntityData(getBusinessData(businessId).entrancePickup, "agrp.label.price", getBusinessData(businessId).buyPrice, true); getBusinessData(businessId).needsSaved = true; messagePlayerSuccess(client, `{MAINCOLOUR}You set business {businessBlue}${getBusinessData(businessId).name}'s {MAINCOLOUR}for-sale price to {ALTCOLOUR}$${makeLargeNumberReadable(amount)}`); @@ -2860,50 +2860,50 @@ function updateBusinessPickupLabelData(businessId) { } if (getBusinessData(businessId).exitPickup != null) { - setEntityData(getBusinessData(businessId).exitPickup, "vrr.owner.type", VRR_PICKUP_BUSINESS_EXIT, false); - setEntityData(getBusinessData(businessId).exitPickup, "vrr.owner.id", businessId, false); - setEntityData(getBusinessData(businessId).exitPickup, "vrr.label.type", VRR_LABEL_EXIT, true); + setEntityData(getBusinessData(businessId).exitPickup, "agrp.owner.type", VRR_PICKUP_BUSINESS_EXIT, false); + setEntityData(getBusinessData(businessId).exitPickup, "agrp.owner.id", businessId, false); + setEntityData(getBusinessData(businessId).exitPickup, "agrp.label.type", VRR_LABEL_EXIT, true); } if (getBusinessData(businessId).entrancePickup != null) { - setEntityData(getBusinessData(businessId).entrancePickup, "vrr.owner.type", VRR_PICKUP_BUSINESS_ENTRANCE, false); - setEntityData(getBusinessData(businessId).entrancePickup, "vrr.owner.id", businessId, false); - setEntityData(getBusinessData(businessId).entrancePickup, "vrr.label.type", VRR_LABEL_BUSINESS, true); - setEntityData(getBusinessData(businessId).entrancePickup, "vrr.label.name", getBusinessData(businessId).name, true); - setEntityData(getBusinessData(businessId).entrancePickup, "vrr.label.locked", getBusinessData(businessId).locked, true); - setEntityData(getBusinessData(businessId).entrancePickup, "vrr.label.help", VRR_PROPLABEL_INFO_NONE, true); + setEntityData(getBusinessData(businessId).entrancePickup, "agrp.owner.type", VRR_PICKUP_BUSINESS_ENTRANCE, false); + setEntityData(getBusinessData(businessId).entrancePickup, "agrp.owner.id", businessId, false); + setEntityData(getBusinessData(businessId).entrancePickup, "agrp.label.type", VRR_LABEL_BUSINESS, true); + setEntityData(getBusinessData(businessId).entrancePickup, "agrp.label.name", getBusinessData(businessId).name, true); + setEntityData(getBusinessData(businessId).entrancePickup, "agrp.label.locked", getBusinessData(businessId).locked, true); + setEntityData(getBusinessData(businessId).entrancePickup, "agrp.label.help", VRR_PROPLABEL_INFO_NONE, true); switch (getBusinessData(businessId).labelHelpType) { case VRR_PROPLABEL_INFO_ENTERVEHICLE: { - setEntityData(getBusinessData(businessId).entrancePickup, "vrr.label.help", VRR_PROPLABEL_INFO_ENTERVEHICLE, true); + setEntityData(getBusinessData(businessId).entrancePickup, "agrp.label.help", VRR_PROPLABEL_INFO_ENTERVEHICLE, true); break; } case VRR_PROPLABEL_INFO_ENTER: { - setEntityData(getBusinessData(businessId).entrancePickup, "vrr.label.help", VRR_PROPLABEL_INFO_ENTER, true); + setEntityData(getBusinessData(businessId).entrancePickup, "agrp.label.help", VRR_PROPLABEL_INFO_ENTER, true); break; } case VRR_PROPLABEL_INFO_REPAIR: { - setEntityData(getBusinessData(businessId).entrancePickup, "vrr.label.help", VRR_PROPLABEL_INFO_REPAIR, true); + setEntityData(getBusinessData(businessId).entrancePickup, "agrp.label.help", VRR_PROPLABEL_INFO_REPAIR, true); break; } default: { if (getBusinessData(businessId).hasInterior) { - setEntityData(getBusinessData(businessId).entrancePickup, "vrr.label.help", VRR_PROPLABEL_INFO_ENTER, true); + setEntityData(getBusinessData(businessId).entrancePickup, "agrp.label.help", VRR_PROPLABEL_INFO_ENTER, true); } else { if (doesBusinessHaveAnyItemsToBuy(businessId)) { - setEntityData(getBusinessData(businessId).entrancePickup, "vrr.label.help", VRR_PROPLABEL_INFO_BUY, true); + setEntityData(getBusinessData(businessId).entrancePickup, "agrp.label.help", VRR_PROPLABEL_INFO_BUY, true); } else { - removeEntityData(getBusinessData(businessId).entrancePickup, "vrr.label.help"); + removeEntityData(getBusinessData(businessId).entrancePickup, "agrp.label.help"); } } break; } } - setEntityData(getBusinessData(businessId).entrancePickup, "vrr.label.price", getBusinessData(businessId).buyPrice, true); + setEntityData(getBusinessData(businessId).entrancePickup, "agrp.label.price", getBusinessData(businessId).buyPrice, true); } } diff --git a/scripts/server/chat.js b/scripts/server/chat.js index ab21b15e..2ba4fed0 100644 --- a/scripts/server/chat.js +++ b/scripts/server/chat.js @@ -363,7 +363,7 @@ function clanChat(client, messageText) { // =========================================================================== function canPlayerUseMegaphone(client) { - if (getPlayerFirstItemSlotByUseType(client, VRR_ITEM_USE_TYPE_MEGAPHONE) != -1) { + if (getPlayerFirstItemSlotByUseType(client, AGRP_ITEM_USE_TYPE_MEGAPHONE) != -1) { if (isPlayerActiveItemEnabled(client)) { return true; } diff --git a/scripts/server/client.js b/scripts/server/client.js index a310cdbd..c76ea40a 100644 --- a/scripts/server/client.js +++ b/scripts/server/client.js @@ -8,9 +8,9 @@ // =========================================================================== // Return-To types (for when a player is teleported) -const VRR_RETURNTO_TYPE_NONE = 0; // "Return to" data is invalid -const VRR_RETURNTO_TYPE_ADMINGET = 1; // "Return to" data is from admin teleporting -const VRR_RETURNTO_TYPE_SKINSELECT = 2; // "Return to" data is from skin select +const AGRP_RETURNTO_TYPE_NONE = 0; // "Return to" data is invalid +const AGRP_RETURNTO_TYPE_ADMINGET = 1; // "Return to" data is from admin teleporting +const AGRP_RETURNTO_TYPE_SKINSELECT = 2; // "Return to" data is from skin select // =========================================================================== @@ -38,9 +38,9 @@ class ClientData { this.sessionId = 0; // Security - this.passwordResetState = VRR_RESETPASS_STATE_NONE; + this.passwordResetState = AGRP_RESETPASS_STATE_NONE; this.passwordResetCode = ""; - this.twoFactorAuthenticationState = VRR_2FA_STATE_NONE; + this.twoFactorAuthenticationState = AGRP_2FA_STATE_NONE; this.twoFactorAuthenticationCode = 0; // Job Stuff @@ -64,11 +64,11 @@ class ClientData { // Items this.tempLockerCache = new Array(9).fill(-1); - this.tempLockerType = VRR_TEMP_LOCKER_TYPE_NONE; + this.tempLockerType = AGRP_TEMP_LOCKER_TYPE_NONE; this.hotBarItems = new Array(9).fill(-1); this.activeHotBarSlot = -1; this.toggleUseItem = false; - this.itemActionState = VRR_ITEM_ACTION_NONE; + this.itemActionState = AGRP_ITEM_ACTION_NONE; this.itemActionItem = -1; this.paintBallItemCache = []; @@ -103,7 +103,7 @@ class ClientData { this.returnToDimension = null; this.returnToHouse = null; this.returnToBusiness = null; - this.returnToType = VRR_RETURNTO_TYPE_NONE; + this.returnToType = AGRP_RETURNTO_TYPE_NONE; // Animation this.currentAnimation = -1; @@ -118,7 +118,7 @@ class ClientData { this.usingSkinSelect = false; this.keyBinds = []; this.incomingDamageMultiplier = 1; - this.weaponDamageEvent = VRR_WEAPON_DAMAGE_EVENT_NORMAL; + this.weaponDamageEvent = AGRP_WEAPON_DAMAGE_EVENT_NORMAL; this.lastJobVehicle = null; this.health = 100; this.locale = 0; @@ -127,8 +127,8 @@ class ClientData { this.interiorCutscene = -1; this.playerBlip = null; this.alcoholLevel = 0; - this.pedState = VRR_PEDSTATE_NONE; - this.promptType = VRR_PROMPT_NONE; + this.pedState = AGRP_PEDSTATE_NONE; + this.promptType = AGRP_PROMPT_NONE; this.privateMessageReplyTo = null; this.inPaintBall = false; diff --git a/scripts/server/config.js b/scripts/server/config.js index e326cace..422be5fc 100644 --- a/scripts/server/config.js +++ b/scripts/server/config.js @@ -193,18 +193,18 @@ let globalConfig = { geoIPCityDatabaseFilePath: "geoip-city.mmdb", randomTipInterval: 600000, weaponEquippableTypes: [ - VRR_ITEM_USE_TYPE_WEAPON, - VRR_ITEM_USE_TYPE_TAZER, - VRR_ITEM_USE_TYPE_EXTINGUISHER, - VRR_ITEM_USE_TYPE_SPRAYPAINT, - VRR_ITEM_USE_TYPE_PEPPERSPRAY, + AGRP_ITEM_USE_TYPE_WEAPON, + AGRP_ITEM_USE_TYPE_TAZER, + AGRP_ITEM_USE_TYPE_EXTINGUISHER, + AGRP_ITEM_USE_TYPE_SPRAYPAINT, + AGRP_ITEM_USE_TYPE_PEPPERSPRAY, ], onFootOnlyItems: [ - VRR_ITEM_USE_TYPE_VEHREPAIR, - VRR_ITEM_USE_TYPE_VEHCOLOUR, - VRR_ITEM_USE_TYPE_VEHUPGRADE_PART, - VRR_ITEM_USE_TYPE_VEHLIVERY, - VRR_ITEM_USE_TYPE_VEHTIRE, + AGRP_ITEM_USE_TYPE_VEHREPAIR, + AGRP_ITEM_USE_TYPE_VEHCOLOUR, + AGRP_ITEM_USE_TYPE_VEHUPGRADE_PART, + AGRP_ITEM_USE_TYPE_VEHLIVERY, + AGRP_ITEM_USE_TYPE_VEHTIRE, ], vehicleInactiveRespawnDelay: 1800000, // 20 minutes chatSectionHeaderLength: 96, diff --git a/scripts/server/discord.js b/scripts/server/discord.js index adc9fde7..85d57abb 100644 --- a/scripts/server/discord.js +++ b/scripts/server/discord.js @@ -8,9 +8,9 @@ // =========================================================================== // Discord Webhook Types -const VRR_DISCORD_WEBHOOK_NONE = 0; -const VRR_DISCORD_WEBHOOK_LOG = 1; -const VRR_DISCORD_WEBHOOK_ADMIN = 2; +const AGRP_DISCORD_WEBHOOK_NONE = 0; +const AGRP_DISCORD_WEBHOOK_LOG = 1; +const AGRP_DISCORD_WEBHOOK_ADMIN = 2; // =========================================================================== @@ -109,7 +109,7 @@ function messageDiscordChatChannel(messageString) { } messageString = removeColoursInMessage(messageString); - triggerDiscordWebHook(messageString, getServerId(), VRR_DISCORD_WEBHOOK_LOG); + triggerDiscordWebHook(messageString, getServerId(), AGRP_DISCORD_WEBHOOK_LOG); } // =========================================================================== @@ -128,7 +128,7 @@ function messageDiscordEventChannel(messageString) { } messageString = removeColoursInMessage(messageString); - triggerDiscordWebHook(messageString, getServerId(), VRR_DISCORD_WEBHOOK_LOG); + triggerDiscordWebHook(messageString, getServerId(), AGRP_DISCORD_WEBHOOK_LOG); } // =========================================================================== @@ -147,12 +147,12 @@ function messageDiscordAdminChannel(messageString) { } messageString = removeColoursInMessage(messageString); - triggerDiscordWebHook(messageString, getServerId(), VRR_DISCORD_WEBHOOK_ADMIN); + triggerDiscordWebHook(messageString, getServerId(), AGRP_DISCORD_WEBHOOK_ADMIN); } // =========================================================================== -function triggerDiscordWebHook(messageString, serverId = getServerId(), type = VRR_DISCORD_WEBHOOK_LOG) { +function triggerDiscordWebHook(messageString, serverId = getServerId(), type = AGRP_DISCORD_WEBHOOK_LOG) { if (!getGlobalConfig().discord.webhook.enabled) { return false; } diff --git a/scripts/server/economy.js b/scripts/server/economy.js index 4632aef8..c975bfe9 100644 --- a/scripts/server/economy.js +++ b/scripts/server/economy.js @@ -187,19 +187,19 @@ function repossessFirstAsset(client) { // =========================================================================== function getAllVehiclesOwnedByPlayer(client) { - return getServerData().vehicles.filter((v) => v.ownerType == VRR_VEHOWNER_PLAYER && v.ownerId == getPlayerCurrentSubAccount(client).databaseId); + return getServerData().vehicles.filter((v) => v.ownerType == AGRP_VEHOWNER_PLAYER && v.ownerId == getPlayerCurrentSubAccount(client).databaseId); } // =========================================================================== function getAllBusinessesOwnedByPlayer(client) { - return getServerData().businesses.filter((b) => b.ownerType == VRR_BIZ_OWNER_PLAYER && b.ownerId == getPlayerCurrentSubAccount(client).databaseId); + return getServerData().businesses.filter((b) => b.ownerType == AGRP_BIZ_OWNER_PLAYER && b.ownerId == getPlayerCurrentSubAccount(client).databaseId); } // =========================================================================== function getAllHousesOwnedByPlayer(client) { - return getServerData().houses.filter((h) => h.ownerType == VRR_HOUSE_OWNER_PLAYER && h.ownerId == getPlayerCurrentSubAccount(client).databaseId); + return getServerData().houses.filter((h) => h.ownerType == AGRP_HOUSE_OWNER_PLAYER && h.ownerId == getPlayerCurrentSubAccount(client).databaseId); } // =========================================================================== diff --git a/scripts/server/fishing.js b/scripts/server/fishing.js index d74fe1dd..cd67c601 100644 --- a/scripts/server/fishing.js +++ b/scripts/server/fishing.js @@ -8,37 +8,37 @@ // =========================================================================== // Fishing Catch Types (Probably not going to be used, in favor of items and their use type) -const VRR_FISHING_CATCH_TYPE_NONE = 1; -const VRR_FISHING_CATCH_TYPE_FISH = 1; -const VRR_FISHING_CATCH_TYPE_JUNK = 2; +const AGRP_FISHING_CATCH_TYPE_NONE = 1; +const AGRP_FISHING_CATCH_TYPE_FISH = 1; +const AGRP_FISHING_CATCH_TYPE_JUNK = 2; // =========================================================================== let fishingCollectables = [ // Fish - ["Salmon", VRR_FISHING_CATCH_TYPE_FISH], - ["Tuna", VRR_FISHING_CATCH_TYPE_FISH], - ["Crab", VRR_FISHING_CATCH_TYPE_FISH], - ["Trout", VRR_FISHING_CATCH_TYPE_FISH], - ["Sea Bass", VRR_FISHING_CATCH_TYPE_FISH], - ["Shark", VRR_FISHING_CATCH_TYPE_FISH], - ["Turtle", VRR_FISHING_CATCH_TYPE_FISH], - ["Manta Ray", VRR_FISHING_CATCH_TYPE_FISH], - ["Cat Fish", VRR_FISHING_CATCH_TYPE_FISH], - ["Blue Marlin", VRR_FISHING_CATCH_TYPE_FISH], + ["Salmon", AGRP_FISHING_CATCH_TYPE_FISH], + ["Tuna", AGRP_FISHING_CATCH_TYPE_FISH], + ["Crab", AGRP_FISHING_CATCH_TYPE_FISH], + ["Trout", AGRP_FISHING_CATCH_TYPE_FISH], + ["Sea Bass", AGRP_FISHING_CATCH_TYPE_FISH], + ["Shark", AGRP_FISHING_CATCH_TYPE_FISH], + ["Turtle", AGRP_FISHING_CATCH_TYPE_FISH], + ["Manta Ray", AGRP_FISHING_CATCH_TYPE_FISH], + ["Cat Fish", AGRP_FISHING_CATCH_TYPE_FISH], + ["Blue Marlin", AGRP_FISHING_CATCH_TYPE_FISH], // Junk - ["Rusty Can", VRR_FISHING_CATCH_TYPE_JUNK], - ["Old Pants", VRR_FISHING_CATCH_TYPE_JUNK], - ["Old Shoes", VRR_FISHING_CATCH_TYPE_JUNK], - ["Garbage", VRR_FISHING_CATCH_TYPE_JUNK], - ["Baby Diaper", VRR_FISHING_CATCH_TYPE_JUNK], - ["Old Tire", VRR_FISHING_CATCH_TYPE_JUNK], - ["Old Car Battery", VRR_FISHING_CATCH_TYPE_JUNK], - ["Horse Hoove", VRR_FISHING_CATCH_TYPE_JUNK], - ["Soggy Log", VRR_FISHING_CATCH_TYPE_JUNK], - ["Soggy Dildo", VRR_FISHING_CATCH_TYPE_JUNK], - ["Clump of Seaweed", VRR_FISHING_CATCH_TYPE_JUNK], + ["Rusty Can", AGRP_FISHING_CATCH_TYPE_JUNK], + ["Old Pants", AGRP_FISHING_CATCH_TYPE_JUNK], + ["Old Shoes", AGRP_FISHING_CATCH_TYPE_JUNK], + ["Garbage", AGRP_FISHING_CATCH_TYPE_JUNK], + ["Baby Diaper", AGRP_FISHING_CATCH_TYPE_JUNK], + ["Old Tire", AGRP_FISHING_CATCH_TYPE_JUNK], + ["Old Car Battery", AGRP_FISHING_CATCH_TYPE_JUNK], + ["Horse Hoove", AGRP_FISHING_CATCH_TYPE_JUNK], + ["Soggy Log", AGRP_FISHING_CATCH_TYPE_JUNK], + ["Soggy Dildo", AGRP_FISHING_CATCH_TYPE_JUNK], + ["Clump of Seaweed", AGRP_FISHING_CATCH_TYPE_JUNK], ]; // =========================================================================== @@ -56,7 +56,7 @@ function castFishingLineCommand(client) { return false; } - if (doesPlayerHaveItemOfUseTypeEquipped(client, VRR_ITEM_USE_TYPE_FISHINGROD)) { + if (doesPlayerHaveItemOfUseTypeEquipped(client, AGRP_ITEM_USE_TYPE_FISHINGROD)) { messagePlayerError(client, getLocaleString(client, "NeedFishingRod")); return false; } @@ -80,7 +80,7 @@ function resetFishingLineCommand(client) { return false; } - if (doesPlayerHaveItemOfUseTypeEquipped(client, VRR_ITEM_USE_TYPE_FISHINGROD)) { + if (doesPlayerHaveItemOfUseTypeEquipped(client, AGRP_ITEM_USE_TYPE_FISHINGROD)) { messagePlayerError(client, getLocaleString(client, "CantFishHere")); return false; } diff --git a/scripts/server/forensics.js b/scripts/server/forensics.js index b4c57b5b..e46da43c 100644 --- a/scripts/server/forensics.js +++ b/scripts/server/forensics.js @@ -8,13 +8,13 @@ // =========================================================================== // Forensic Types -const VRR_FORENSICS_NONE = 0; -const VRR_FORENSICS_BULLET = 1; // Bullet. The actual tip that hits a target. Has rifling and ballistics information of the weapon. -const VRR_FORENSICS_BLOOD = 2; // Blood. Automatically applied to ground and bullets that hit and outfit worn when somebody is shot -const VRR_FORENSICS_BODY = 3; // Body. A dead body lol -const VRR_FORENSICS_HAIR = 4; // Hair. -const VRR_FORENSICS_SWEAT = 5; // Sweat. Automatically applied to clothing when worn -const VRR_FORENSICS_SALIVA = 6; // Saliva. Automatically applied to drinks when drank and unfinished food items when eaten -const VRR_FORENSICS_BULLETCASINGS = 7; // Bullet casings. Automatically dropped when fired from a weapon except when used in a vehicle (driveby) +const AGRP_FORENSICS_NONE = 0; +const AGRP_FORENSICS_BULLET = 1; // Bullet. The actual tip that hits a target. Has rifling and ballistics information of the weapon. +const AGRP_FORENSICS_BLOOD = 2; // Blood. Automatically applied to ground and bullets that hit and outfit worn when somebody is shot +const AGRP_FORENSICS_BODY = 3; // Body. A dead body lol +const AGRP_FORENSICS_HAIR = 4; // Hair. +const AGRP_FORENSICS_SWEAT = 5; // Sweat. Automatically applied to clothing when worn +const AGRP_FORENSICS_SALIVA = 6; // Saliva. Automatically applied to drinks when drank and unfinished food items when eaten +const AGRP_FORENSICS_BULLETCASINGS = 7; // Bullet casings. Automatically dropped when fired from a weapon except when used in a vehicle (driveby) // =========================================================================== \ No newline at end of file diff --git a/scripts/server/gate.js b/scripts/server/gate.js index 29f5e511..17051d59 100644 --- a/scripts/server/gate.js +++ b/scripts/server/gate.js @@ -8,14 +8,14 @@ // =========================================================================== // Gate Owner Types -const VRR_GATEOWNER_NONE = 0; // Not owned -const VRR_GATEOWNER_PLAYER = 1; // Owner is a player (character/subaccount) -const VRR_GATEOWNER_JOB = 2; // Owned by a job -const VRR_GATEOWNER_CLAN = 3; // Owned by a clan -const VRR_GATEOWNER_FACTION = 4; // Owned by a faction -const VRR_GATEOWNER_PUBLIC = 5; // Public gate. Technically not owned. This probably won't be used. -const VRR_GATEOWNER_BUSINESS = 6; // Owned by a business. Back lots, unloading areas, and other stuff like that -const VRR_GATEOWNER_HOUSE = 7; // Owned by a house. Like for mansions with closed private areas. +const AGRP_GATEOWNER_NONE = 0; // Not owned +const AGRP_GATEOWNER_PLAYER = 1; // Owner is a player (character/subaccount) +const AGRP_GATEOWNER_JOB = 2; // Owned by a job +const AGRP_GATEOWNER_CLAN = 3; // Owned by a clan +const AGRP_GATEOWNER_FACTION = 4; // Owned by a faction +const AGRP_GATEOWNER_PUBLIC = 5; // Public gate. Technically not owned. This probably won't be used. +const AGRP_GATEOWNER_BUSINESS = 6; // Owned by a business. Back lots, unloading areas, and other stuff like that +const AGRP_GATEOWNER_HOUSE = 7; // Owned by a house. Like for mansions with closed private areas. // =========================================================================== @@ -27,7 +27,7 @@ class GateData { this.enabled = false; this.position = toVector3(0.0, 0.0, 0.0); this.locked = true; - this.ownerType = VRR_GATEOWNER_NONE; + this.ownerType = AGRP_GATEOWNER_NONE; this.ownerId = 0; if (dbAssoc) { @@ -54,17 +54,17 @@ function initGateScript() { function doesPlayerHaveGateKeys(client, vehicle) { let gateData = getGateData(vehicle); - if (gateData.ownerType == VRR_GATEOWNER_PUBLIC) { + if (gateData.ownerType == AGRP_GATEOWNER_PUBLIC) { return true; } - if (gateData.ownerType == VRR_GATEOWNER_PLAYER) { + if (gateData.ownerType == AGRP_GATEOWNER_PLAYER) { if (gateData.ownerId == getPlayerCurrentSubAccount(client).databaseId) { return true; } } - if (gateData.ownerType == VRR_GATEOWNER_CLAN) { + if (gateData.ownerType == AGRP_GATEOWNER_CLAN) { if (doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageClans"))) { return true; } @@ -76,7 +76,7 @@ function doesPlayerHaveGateKeys(client, vehicle) { } } - if (gateData.ownerType == VRR_GATEOWNER_FACTION) { + if (gateData.ownerType == AGRP_GATEOWNER_FACTION) { if (doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageFactions"))) { return true; } @@ -88,7 +88,7 @@ function doesPlayerHaveGateKeys(client, vehicle) { } } - if (gateData.ownerType == VRR_GATEOWNER_JOB) { + if (gateData.ownerType == AGRP_GATEOWNER_JOB) { if (doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageJobs"))) { return true; } @@ -98,7 +98,7 @@ function doesPlayerHaveGateKeys(client, vehicle) { } } - if (gateData.ownerType == VRR_GATEOWNER_BUSINESS) { + if (gateData.ownerType == AGRP_GATEOWNER_BUSINESS) { if (doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageBusinesses"))) { return true; } @@ -108,7 +108,7 @@ function doesPlayerHaveGateKeys(client, vehicle) { } } - if (gateData.ownerType == VRR_GATEOWNER_HOUSE) { + if (gateData.ownerType == AGRP_GATEOWNER_HOUSE) { if (doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageHouses"))) { return true; } diff --git a/scripts/server/gps.js b/scripts/server/gps.js index df4d54e1..42e54977 100644 --- a/scripts/server/gps.js +++ b/scripts/server/gps.js @@ -8,36 +8,36 @@ // =========================================================================== // GPS State Types -const VRR_GPS_TYPE_NONE = 0; // None (invalid) -const VRR_GPS_TYPE_BUSINESS = 1; // Business -const VRR_GPS_TYPE_POLICE = 2; // Police Station -const VRR_GPS_TYPE_HOSPITAL = 3; // Hospital -const VRR_GPS_TYPE_JOB = 4; // Job -const VRR_GPS_TYPE_GAMELOC = 5; // Game Location +const AGRP_GPS_TYPE_NONE = 0; // None (invalid) +const AGRP_GPS_TYPE_BUSINESS = 1; // Business +const AGRP_GPS_TYPE_POLICE = 2; // Police Station +const AGRP_GPS_TYPE_HOSPITAL = 3; // Hospital +const AGRP_GPS_TYPE_JOB = 4; // Job +const AGRP_GPS_TYPE_GAMELOC = 5; // Game Location // =========================================================================== function gpsCommand(command, params, client) { messagePlayerNormal(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderBusinessList"))); - let locationType = VRR_GPS_TYPE_NONE; - let useType = VRR_ITEM_USE_TYPE_NONE; + let locationType = AGRP_GPS_TYPE_NONE; + let useType = AGRP_ITEM_USE_TYPE_NONE; let blipColour = "white"; switch (toLowerCase(params)) { case "police": blipColour = "businessBlue" - locationType = VRR_GPS_TYPE_POLICE; + locationType = AGRP_GPS_TYPE_POLICE; break; case "hospital": blipColour = "businessBlue" - locationType = VRR_GPS_TYPE_HOSPITAL; + locationType = AGRP_GPS_TYPE_HOSPITAL; break; case "job": blipColour = "businessBlue" - locationType = VRR_GPS_TYPE_JOB; + locationType = AGRP_GPS_TYPE_JOB; break; case "skin": @@ -45,8 +45,8 @@ function gpsCommand(command, params, client) { case "clothes": case "player": blipColour = "businessBlue" - locationType = VRR_GPS_TYPE_BUSINESS; - useType = VRR_ITEM_USE_TYPE_SKIN; + locationType = AGRP_GPS_TYPE_BUSINESS; + useType = AGRP_ITEM_USE_TYPE_SKIN; break; case "gun": @@ -56,29 +56,29 @@ function gpsCommand(command, params, client) { case "wep": case "weps": blipColour = "businessBlue" - locationType = VRR_GPS_TYPE_BUSINESS; - useType = VRR_ITEM_USE_TYPE_WEAPON; + locationType = AGRP_GPS_TYPE_BUSINESS; + useType = AGRP_ITEM_USE_TYPE_WEAPON; break; case "food": case "eat": blipColour = "businessBlue" - locationType = VRR_GPS_TYPE_BUSINESS; - useType = VRR_ITEM_USE_TYPE_FOOD; + locationType = AGRP_GPS_TYPE_BUSINESS; + useType = AGRP_ITEM_USE_TYPE_FOOD; break; case "drink": blipColour = "businessBlue" - locationType = VRR_GPS_TYPE_BUSINESS; - useType = VRR_ITEM_USE_TYPE_DRINK; + locationType = AGRP_GPS_TYPE_BUSINESS; + useType = AGRP_ITEM_USE_TYPE_DRINK; break; case "alcohol": case "booze": case "bar": blipColour = "businessBlue" - locationType = VRR_GPS_TYPE_BUSINESS; - useType = VRR_ITEM_USE_TYPE_ALCOHOL; + locationType = AGRP_GPS_TYPE_BUSINESS; + useType = AGRP_ITEM_USE_TYPE_ALCOHOL; break; case "repair": @@ -87,8 +87,8 @@ function gpsCommand(command, params, client) { case "spray": case "fix": blipColour = "businessBlue" - locationType = VRR_GPS_TYPE_BUSINESS; - useType = VRR_ITEM_USE_TYPE_VEHREPAIR; + locationType = AGRP_GPS_TYPE_BUSINESS; + useType = AGRP_ITEM_USE_TYPE_VEHREPAIR; break; case "vehiclecolour": @@ -96,14 +96,14 @@ function gpsCommand(command, params, client) { case "carcolour": case "colour": blipColour = "businessBlue" - locationType = VRR_GPS_TYPE_BUSINESS; - useType = VRR_ITEM_USE_TYPE_VEHCOLOUR; + locationType = AGRP_GPS_TYPE_BUSINESS; + useType = AGRP_ITEM_USE_TYPE_VEHCOLOUR; break; default: { let itemTypeId = getItemTypeFromParams(params); if (getItemTypeData(itemTypeId) != false) { - locationType = VRR_GPS_TYPE_BUSINESS; + locationType = AGRP_GPS_TYPE_BUSINESS; blipColour = "businessBlue"; useType = getItemTypeData(itemTypeId).useType; } else { @@ -115,12 +115,12 @@ function gpsCommand(command, params, client) { } } - if (locationType == VRR_GPS_TYPE_NONE) { + if (locationType == AGRP_GPS_TYPE_NONE) { messagePlayerError(client, getLocaleString(client, "InvalidGPSLocation")); return false; } - if (locationType == VRR_GPS_TYPE_BUSINESS) { + if (locationType == AGRP_GPS_TYPE_BUSINESS) { let businessId = getClosestBusinessWithBuyableItemOfUseType(useType); if (!businessId) { messagePlayerError(client, getLocaleString(client, "NoBusinessWithItemType")); @@ -137,7 +137,7 @@ function gpsCommand(command, params, client) { messagePlayerSuccess(client, "Look for the blinking icon on your mini map"); } - if (locationType == VRR_GPS_TYPE_GAMELOC) { + if (locationType == AGRP_GPS_TYPE_GAMELOC) { hideAllBlipsForPlayerGPS(client); blinkGenericGPSBlipForPlayer(client, position, 0, getColourByType(blipColour), 10); messagePlayerSuccess(client, "Look for the blinking icon on your mini map"); diff --git a/scripts/server/gui.js b/scripts/server/gui.js index 0067e72c..b4b9cfb8 100644 --- a/scripts/server/gui.js +++ b/scripts/server/gui.js @@ -266,7 +266,7 @@ function playerToggledGUI(client) { // =========================================================================== function showPlayerTwoFactorAuthenticationGUI(client) { - sendNetworkEventToPlayer("vrr.2fa", client); + sendNetworkEventToPlayer("agrp.2fa", client); } // =========================================================================== \ No newline at end of file diff --git a/scripts/server/house.js b/scripts/server/house.js index fe48b52e..72ae4f9a 100644 --- a/scripts/server/house.js +++ b/scripts/server/house.js @@ -264,7 +264,7 @@ function setHouseDescriptionCommand(command, params, client) { let oldDescription = getHouseData(houseId).description; getHouseData(houseId).description = newHouseDescription; - setEntityData(getHouseData(houseId).entrancePickup, "vrr.label.name", getHouseData(houseId).description, true); + setEntityData(getHouseData(houseId).entrancePickup, "agrp.label.name", getHouseData(houseId).description, true); getHouseData(houseId).needsSaved = true; @@ -1100,8 +1100,8 @@ function createHouseEntranceBlip(houseId) { setElementStreamOutDistance(entranceBlip, getGlobalConfig().houseBlipStreamOutDistance); } - setEntityData(entranceBlip, "vrr.owner.type", VRR_BLIP_HOUSE_ENTRANCE, false); - setEntityData(entranceBlip, "vrr.owner.id", houseId, false); + setEntityData(entranceBlip, "agrp.owner.type", VRR_BLIP_HOUSE_ENTRANCE, false); + setEntityData(entranceBlip, "agrp.owner.id", houseId, false); houseData.entranceBlip = entranceBlip; } @@ -1206,8 +1206,8 @@ function createHouseExitBlip(houseId) { setElementStreamOutDistance(exitBlip, getGlobalConfig().houseBlipStreamOutDistance); } setElementTransient(exitBlip, false); - setEntityData(exitBlip, "vrr.owner.type", VRR_BLIP_HOUSE_EXIT, false); - setEntityData(exitBlip, "vrr.owner.id", houseId, false); + setEntityData(exitBlip, "agrp.owner.type", VRR_BLIP_HOUSE_EXIT, false); + setEntityData(exitBlip, "agrp.owner.id", houseId, false); getHouseData(houseId).exitBlip = exitBlip; } } @@ -1753,26 +1753,26 @@ function updateHousePickupLabelData(houseId) { let houseData = getHouseData(houseId); if (houseData.entrancePickup != null) { - setEntityData(houseData.entrancePickup, "vrr.owner.type", VRR_PICKUP_HOUSE_ENTRANCE, false); - setEntityData(houseData.entrancePickup, "vrr.owner.id", houseId, false); - setEntityData(houseData.entrancePickup, "vrr.label.type", VRR_LABEL_HOUSE, true); - setEntityData(houseData.entrancePickup, "vrr.label.name", houseData.description, true); - setEntityData(houseData.entrancePickup, "vrr.label.locked", houseData.locked, true); + setEntityData(houseData.entrancePickup, "agrp.owner.type", VRR_PICKUP_HOUSE_ENTRANCE, false); + setEntityData(houseData.entrancePickup, "agrp.owner.id", houseId, false); + setEntityData(houseData.entrancePickup, "agrp.label.type", VRR_LABEL_HOUSE, true); + setEntityData(houseData.entrancePickup, "agrp.label.name", houseData.description, true); + setEntityData(houseData.entrancePickup, "agrp.label.locked", houseData.locked, true); if (houseData.buyPrice > 0) { - setEntityData(houseData.entrancePickup, "vrr.label.price", houseData.buyPrice, true); - setEntityData(houseData.entrancePickup, "vrr.label.help", VRR_PROPLABEL_INFO_BUYHOUSE, true); + setEntityData(houseData.entrancePickup, "agrp.label.price", houseData.buyPrice, true); + setEntityData(houseData.entrancePickup, "agrp.label.help", VRR_PROPLABEL_INFO_BUYHOUSE, true); } else { if (houseData.rentPrice > 0) { - setEntityData(houseData.entrancePickup, "vrr.label.rentprice", houseData.rentPrice, true); - setEntityData(houseData.entrancePickup, "vrr.label.help", VRR_PROPLABEL_INFO_RENTHOUSE, true); + setEntityData(houseData.entrancePickup, "agrp.label.rentprice", houseData.rentPrice, true); + setEntityData(houseData.entrancePickup, "agrp.label.help", VRR_PROPLABEL_INFO_RENTHOUSE, true); } } } if (houseData.exitPickup != null) { - setEntityData(houseData.exitPickup, "vrr.owner.type", VRR_PICKUP_HOUSE_EXIT, false); - setEntityData(houseData.exitPickup, "vrr.owner.id", houseId, false); - setEntityData(houseData.exitPickup, "vrr.label.type", VRR_LABEL_EXIT, true); + setEntityData(houseData.exitPickup, "agrp.owner.type", VRR_PICKUP_HOUSE_EXIT, false); + setEntityData(houseData.exitPickup, "agrp.owner.id", houseId, false); + setEntityData(houseData.exitPickup, "agrp.label.type", VRR_LABEL_EXIT, true); } } diff --git a/scripts/server/insurance.js b/scripts/server/insurance.js index 35aee21f..7471795e 100644 --- a/scripts/server/insurance.js +++ b/scripts/server/insurance.js @@ -8,33 +8,33 @@ // =========================================================================== // Insurance Account Owner Types -const VRR_INS_ACCT_OWNER_NONE = 0; // None -const VRR_INS_ACCT_OWNER_PLAYER = 1; // Player owns insurance company -const VRR_INS_ACCT_OWNER_BIZ = 2; // Business owns insurance company -const VRR_INS_ACCT_OWNER_CLAN = 3; // Clan owns insurance company +const AGRP_INS_ACCT_OWNER_NONE = 0; // None +const AGRP_INS_ACCT_OWNER_PLAYER = 1; // Player owns insurance company +const AGRP_INS_ACCT_OWNER_BIZ = 2; // Business owns insurance company +const AGRP_INS_ACCT_OWNER_CLAN = 3; // Clan owns insurance company // =========================================================================== // Insurance Account Entity Types -const VRR_INS_ACCT_ENTITY_NONE = 0; // None -const VRR_INS_ACCT_ENTITY_PLAYER_HEALTH = 1; // Health Insurance -const VRR_INS_ACCT_ENTITY_PLAYER_LIFE = 2; // Life Insurance -const VRR_INS_ACCT_ENTITY_VEH = 3; // Vehicle Insurance -const VRR_INS_ACCT_ENTITY_BIZ = 4; // Business Insurance -const VRR_INS_ACCT_ENTITY_HOUSE = 5; // House Insurance +const AGRP_INS_ACCT_ENTITY_NONE = 0; // None +const AGRP_INS_ACCT_ENTITY_PLAYER_HEALTH = 1; // Health Insurance +const AGRP_INS_ACCT_ENTITY_PLAYER_LIFE = 2; // Life Insurance +const AGRP_INS_ACCT_ENTITY_VEH = 3; // Vehicle Insurance +const AGRP_INS_ACCT_ENTITY_BIZ = 4; // Business Insurance +const AGRP_INS_ACCT_ENTITY_HOUSE = 5; // House Insurance // =========================================================================== // Insurance Account History Types -const VRR_INS_ACCT_HISTORY_NONE = 0; // None -const VRR_INS_ACCT_HISTORY_PLAYER_MEDICAL = 1; // Medical insurance was used (player disease/injury) -const VRR_INS_ACCT_HISTORY_PLAYER_DEATH = 2; // Life insurance was used (player death) -const VRR_INS_ACCT_HISTORY_VEH_DAMAGE = 3; // Vehicle was damaged, but not destroyed -const VRR_INS_ACCT_HISTORY_VEH_WRECKED = 4; // Vehicle was completely destroyed -const VRR_INS_ACCT_HISTORY_VEH_THEFT = 5; // Vehicle was stolen -const VRR_INS_ACCT_HISTORY_BIZ_DAMAGE = 6; // Business was damaged (broken items/window/door) -const VRR_INS_ACCT_HISTORY_BIZ_THEFT = 7; // Business was stolen from -const VRR_INS_ACCT_HISTORY_HOUSE_DAMAGE = 8; // House was damaged -const VRR_INS_ACCT_HISTORY_HOUSE_THEFT = 9; // House was stolen from +const AGRP_INS_ACCT_HISTORY_NONE = 0; // None +const AGRP_INS_ACCT_HISTORY_PLAYER_MEDICAL = 1; // Medical insurance was used (player disease/injury) +const AGRP_INS_ACCT_HISTORY_PLAYER_DEATH = 2; // Life insurance was used (player death) +const AGRP_INS_ACCT_HISTORY_VEH_DAMAGE = 3; // Vehicle was damaged, but not destroyed +const AGRP_INS_ACCT_HISTORY_VEH_WRECKED = 4; // Vehicle was completely destroyed +const AGRP_INS_ACCT_HISTORY_VEH_THEFT = 5; // Vehicle was stolen +const AGRP_INS_ACCT_HISTORY_BIZ_DAMAGE = 6; // Business was damaged (broken items/window/door) +const AGRP_INS_ACCT_HISTORY_BIZ_THEFT = 7; // Business was stolen from +const AGRP_INS_ACCT_HISTORY_HOUSE_DAMAGE = 8; // House was damaged +const AGRP_INS_ACCT_HISTORY_HOUSE_THEFT = 9; // House was stolen from // =========================================================================== \ No newline at end of file diff --git a/scripts/server/item/handcuff.js b/scripts/server/item/handcuff.js index 3d9ce657..fd1220c5 100644 --- a/scripts/server/item/handcuff.js +++ b/scripts/server/item/handcuff.js @@ -10,27 +10,27 @@ // =========================================================================== function isPlayerHandCuffed(client) { - return (getPlayerData(client).pedState == VRR_PEDSTATE_BINDED); + return (getPlayerData(client).pedState == AGRP_PEDSTATE_BINDED); } // =========================================================================== function handCuffPlayer(client) { - getPlayerData(client).pedState = VRR_PEDSTATE_BINDED; + getPlayerData(client).pedState = AGRP_PEDSTATE_BINDED; setPlayerControlState(client, false); } // =========================================================================== function unHandCuffPlayer(client) { - getPlayerData(client).pedState = VRR_PEDSTATE_READY; + getPlayerData(client).pedState = AGRP_PEDSTATE_READY; setPlayerControlState(client, true); } // =========================================================================== function isPlayerSurrendered(client) { - return true; //(getPlayerData(client).pedState == VRR_PEDSTATE_TAZED || getPlayerData(client).pedState == VRR_PEDSTATE_HANDSUP); + return true; //(getPlayerData(client).pedState == AGRP_PEDSTATE_TAZED || getPlayerData(client).pedState == AGRP_PEDSTATE_HANDSUP); } // =========================================================================== \ No newline at end of file diff --git a/scripts/server/item/phone.js b/scripts/server/item/phone.js index 6cea52b2..89eddb9b 100644 --- a/scripts/server/item/phone.js +++ b/scripts/server/item/phone.js @@ -9,7 +9,7 @@ function getItemWithPhoneNumber(phoneNumber) { for (let i in getServerData().items) { - if (getItemTypeData(getItemData(i).itemTypeIndex).useType == VRR_ITEM_USE_TYPE_PHONE) { + if (getItemTypeData(getItemData(i).itemTypeIndex).useType == AGRP_ITEM_USE_TYPE_PHONE) { if (getItemData(i).value == phoneNumber) { return i; } @@ -30,15 +30,15 @@ function ringPhoneForNearbyPlayers(itemIndex) { /* if(isPhoneItemEnabled(itemIndex)) { switch(getItemData(itemIndex).ownerType) { - case VRR_ITEM_OWNER_GROUND: + case AGRP_ITEM_OWNER_GROUND: playRingtoneForPlayersInRange(getItemData(itemIndex).position, getItemData(i).extra); break; - case VRR_ITEM_OWNER_VEHTRUNK: + case AGRP_ITEM_OWNER_VEHTRUNK: playRingtoneForPlayersInRange(getVehiclePosition(getItemData(itemIndex).ownerId), getItemData(i).extra); break; - case VRR_ITEM_OWNER_VEHDASH: + case AGRP_ITEM_OWNER_VEHDASH: playRingtoneForPlayersInRange(getVehiclePosition(getItemData(itemIndex).ownerId), getItemData(i).extra); break; } diff --git a/scripts/server/item/rope.js b/scripts/server/item/rope.js index 1427023e..546bdeb7 100644 --- a/scripts/server/item/rope.js +++ b/scripts/server/item/rope.js @@ -10,20 +10,20 @@ // =========================================================================== function isPlayerTied(client) { - return (getPlayerData(client).pedState == VRR_PEDSTATE_BINDED); + return (getPlayerData(client).pedState == AGRP_PEDSTATE_BINDED); } // =========================================================================== function ropeTiePlayer(client) { - getPlayerData(client).pedState = VRR_PEDSTATE_BINDED; + getPlayerData(client).pedState = AGRP_PEDSTATE_BINDED; setPlayerControlState(client, false); } // =========================================================================== function ropeUnTiePlayer(client) { - getPlayerData(client).pedState = VRR_PEDSTATE_READY; + getPlayerData(client).pedState = AGRP_PEDSTATE_READY; setPlayerControlState(client, true); } diff --git a/scripts/server/item/tazer.js b/scripts/server/item/tazer.js index 6e756d24..24e384bd 100644 --- a/scripts/server/item/tazer.js +++ b/scripts/server/item/tazer.js @@ -10,21 +10,21 @@ // =========================================================================== function isPlayerTazed(client) { - return (getPlayerData(client).pedState == VRR_PEDSTATE_TAZED); + return (getPlayerData(client).pedState == AGRP_PEDSTATE_TAZED); } // =========================================================================== function tazePlayer(client) { - getPlayerData(client).pedState = VRR_PEDSTATE_TAZED; + getPlayerData(client).pedState = AGRP_PEDSTATE_TAZED; setPlayerControlState(client, false); let animationId = getAnimationFromParams("tazed"); - if(animationId != false) { + if (animationId != false) { forcePlayerPlayAnimation(client, animationId); } - setTimeout(function() { + setTimeout(function () { unTazePlayer(client); doActionToNearbyPlayers(client, `The tazer effect wears off`); }, getGlobalConfig().tazerEffectDuration); @@ -33,7 +33,7 @@ function tazePlayer(client) { // =========================================================================== function unTazePlayer(client) { - getPlayerData(client).pedState = VRR_PEDSTATE_READY; + getPlayerData(client).pedState = AGRP_PEDSTATE_READY; setPlayerControlState(client, true); setPlayerPosition(client, getPlayerData(client).currentAnimationPositionReturnTo); diff --git a/scripts/server/item/walkie-talkie.js b/scripts/server/item/walkie-talkie.js index c16b008c..ee9dd527 100644 --- a/scripts/server/item/walkie-talkie.js +++ b/scripts/server/item/walkie-talkie.js @@ -8,7 +8,7 @@ // =========================================================================== function getPlayerActiveWalkieTalkieFrequency(client) { - let walkieTalkieSlot = getPlayerFirstItemSlotByUseType(client, VRR_ITEM_USE_TYPE_WALKIETALKIE); + let walkieTalkieSlot = getPlayerFirstItemSlotByUseType(client, AGRP_ITEM_USE_TYPE_WALKIETALKIE); if (walkieTalkieSlot != -1) { if (getItemData(getPlayerData(client).hotBarItems[walkieTalkieSlot])) { @@ -31,7 +31,7 @@ function walkieTalkieTransmit(radioFrequency, messageText, transmittingPlayer) { // if(isPlayerSpawned(clients[i])) { // if(!isSamePlayer(transmittingPlayer, clients[i])) { // if(getPlayerActiveWalkieTalkieFrequency(clients[i]) == radioFrequency) { - // if(getItemData(getPlayerData(clients[i]).hotBarItems[getPlayerFirstItemSlotByUseType(clients[i], VRR_ITEM_USE_TYPE_WALKIETALKIE)]).enabled) { + // if(getItemData(getPlayerData(clients[i]).hotBarItems[getPlayerFirstItemSlotByUseType(clients[i], AGRP_ITEM_USE_TYPE_WALKIETALKIE)]).enabled) { // walkieTalkieIncomingToNearbyPlayers(clients[i], messageText); // } // } @@ -42,7 +42,7 @@ function walkieTalkieTransmit(radioFrequency, messageText, transmittingPlayer) { let items = getServerData().items; for (let i in items) { if (items[i].enabled) { - if (getItemTypeData(items[i].itemTypeIndex).useType == VRR_ITEM_USE_TYPE_WALKIETALKIE) { + if (getItemTypeData(items[i].itemTypeIndex).useType == AGRP_ITEM_USE_TYPE_WALKIETALKIE) { if (items[i].value == radioFrequency) { walkieTalkieIncomingToNearbyPlayers(null, messageText, getItemPosition(i)); } @@ -125,7 +125,7 @@ function walkieTalkieChatCommand(command, params, client) { return false; } - let walkieTalkieSlot = getPlayerFirstItemSlotByUseType(client, VRR_ITEM_USE_TYPE_WALKIETALKIE); + let walkieTalkieSlot = getPlayerFirstItemSlotByUseType(client, AGRP_ITEM_USE_TYPE_WALKIETALKIE); if (!getItemData(getPlayerData(client).hotBarItems[walkieTalkieSlot]).enabled) { messagePlayerError(client, "Please turn on a walkie talkie first!"); return false; diff --git a/scripts/server/job/police.js b/scripts/server/job/police.js index cce5a85b..0f94c5a7 100644 --- a/scripts/server/job/police.js +++ b/scripts/server/job/police.js @@ -8,22 +8,22 @@ // =========================================================================== function policeTazerCommand(command, params, client) { - if(!canPlayerUseJobs(client)) { + if (!canPlayerUseJobs(client)) { messagePlayerError(client, "You are not allowed to use jobs."); return false; } - if(!canPlayerUsePoliceJob(client)) { + if (!canPlayerUsePoliceJob(client)) { messagePlayerError(client, "You are not allowed to use the police job."); return false; } - if(!isPlayerWorking(client)) { + if (!isPlayerWorking(client)) { messagePlayerError(client, "You are not working! Use /startwork first."); return false; } - if(!doesPlayerHaveJobType(client, VRR_JOB_POLICE)) { + if (!doesPlayerHaveJobType(client, AGRP_JOB_POLICE)) { messagePlayerError(client, "You don't have a police job."); return false; } @@ -34,22 +34,22 @@ function policeTazerCommand(command, params, client) { // =========================================================================== function policeCuffCommand(command, params, client) { - if(!canPlayerUseJobs(client)) { + if (!canPlayerUseJobs(client)) { messagePlayerError(client, "You are not allowed to use jobs."); return false; } - if(!canPlayerUsePoliceJob(client)) { + if (!canPlayerUsePoliceJob(client)) { messagePlayerError(client, "You are not allowed to use the police job."); return false; } - if(!isPlayerWorking(client)) { + if (!isPlayerWorking(client)) { messagePlayerError(client, "You are not working! Use /startwork first."); return false; } - if(!doesPlayerHaveJobType(client, VRR_JOB_POLICE)) { + if (!doesPlayerHaveJobType(client, AGRP_JOB_POLICE)) { messagePlayerError(client, "You don't have a police job."); return false; } @@ -60,22 +60,22 @@ function policeCuffCommand(command, params, client) { // =========================================================================== function policeArrestCommand(command, params, client) { - if(!canPlayerUseJobs(client)) { + if (!canPlayerUseJobs(client)) { messagePlayerError(client, "You are not allowed to use jobs."); return false; } - if(!canPlayerUsePoliceJob(client)) { + if (!canPlayerUsePoliceJob(client)) { messagePlayerError(client, "You are not allowed to use the police job."); return false; } - if(!isPlayerWorking(client)) { + if (!isPlayerWorking(client)) { messagePlayerError(client, "You are not working! Use /startwork first."); return false; } - if(!doesPlayerHaveJobType(client, VRR_JOB_POLICE)) { + if (!doesPlayerHaveJobType(client, AGRP_JOB_POLICE)) { messagePlayerError(client, "You don't have a police job."); return false; } @@ -86,22 +86,22 @@ function policeArrestCommand(command, params, client) { // =========================================================================== function policeSearchCommand(command, params, client) { - if(!canPlayerUseJobs(client)) { + if (!canPlayerUseJobs(client)) { messagePlayerError(client, "You are not allowed to use jobs."); return false; } - if(!canPlayerUsePoliceJob(client)) { + if (!canPlayerUsePoliceJob(client)) { messagePlayerError(client, "You are not allowed to use the police job."); return false; } - if(!isPlayerWorking(client)) { + if (!isPlayerWorking(client)) { messagePlayerError(client, "You are not working! Use /startwork first."); return false; } - if(!doesPlayerHaveJobType(client, VRR_JOB_POLICE)) { + if (!doesPlayerHaveJobType(client, AGRP_JOB_POLICE)) { messagePlayerError(client, "You don't have a police job."); return false; } @@ -112,22 +112,22 @@ function policeSearchCommand(command, params, client) { // =========================================================================== function policeDragCommand(command, params, client) { - if(!canPlayerUseJobs(client)) { + if (!canPlayerUseJobs(client)) { messagePlayerError(client, "You are not allowed to use jobs."); return false; } - if(!canPlayerUsePoliceJob(client)) { + if (!canPlayerUsePoliceJob(client)) { messagePlayerError(client, "You are not allowed to use the police job."); return false; } - if(!isPlayerWorking(client)) { + if (!isPlayerWorking(client)) { messagePlayerError(client, "You are not working! Use /startwork first."); return false; } - if(!doesPlayerHaveJobType(client, VRR_JOB_POLICE)) { + if (!doesPlayerHaveJobType(client, AGRP_JOB_POLICE)) { messagePlayerError(client, "You don't have a police job."); return false; } @@ -138,22 +138,22 @@ function policeDragCommand(command, params, client) { // =========================================================================== function policeDetainCommand(command, params, client) { - if(!canPlayerUseJobs(client)) { + if (!canPlayerUseJobs(client)) { messagePlayerError(client, "You are not allowed to use jobs."); return false; } - if(!canPlayerUsePoliceJob(client)) { + if (!canPlayerUsePoliceJob(client)) { messagePlayerError(client, "You are not allowed to use the police job."); return false; } - if(!isPlayerWorking(client)) { + if (!isPlayerWorking(client)) { messagePlayerError(client, "You are not working! Use /startwork first."); return false; } - if(!doesPlayerHaveJobType(client, VRR_JOB_POLICE)) { + if (!doesPlayerHaveJobType(client, AGRP_JOB_POLICE)) { messagePlayerError(client, "You don't have a police job."); return false; } diff --git a/scripts/server/job/taxi.js b/scripts/server/job/taxi.js index 9985958f..55f28099 100644 --- a/scripts/server/job/taxi.js +++ b/scripts/server/job/taxi.js @@ -8,22 +8,22 @@ // =========================================================================== function taxiSetFareCommand(command, params, client) { - if(!canPlayerUseJobs(client)) { + if (!canPlayerUseJobs(client)) { messagePlayerError(client, "You are not allowed to use jobs."); return false; } - if(!canPlayerUseTaxiJob(client)) { + if (!canPlayerUseTaxiJob(client)) { messagePlayerError(client, "You are not allowed to use the taxi job."); return false; } - if(!isPlayerWorking(client)) { + if (!isPlayerWorking(client)) { messagePlayerError(client, "You are not working! Use /startwork first."); return false; } - if(!doesPlayerHaveJobType(client, VRR_JOB_TAXI)) { + if (!doesPlayerHaveJobType(client, AGRP_JOB_TAXI)) { messagePlayerError(client, "You don't have a taxi job."); return false; } diff --git a/scripts/server/keybind.js b/scripts/server/keybind.js index abe1699a..dfc3529f 100644 --- a/scripts/server/keybind.js +++ b/scripts/server/keybind.js @@ -9,7 +9,7 @@ // =========================================================================== class KeyBindData { - constructor(dbAssoc = false, key = 0, commandString = "", keyState = VRR_KEYSTATE_UP) { + constructor(dbAssoc = false, key = 0, commandString = "", keyState = AGRP_KEYSTATE_UP) { this.databaseId = 0; this.key = key; this.account = 0; @@ -20,7 +20,7 @@ class KeyBindData { this.index = -1; this.needsSaved = false; - if(dbAssoc) { + if (dbAssoc) { this.databaseId = dbAssoc["acct_hotkey_id"]; this.key = toInteger(dbAssoc["acct_hotkey_key"]); this.account = toInteger(dbAssoc["acct_hotkey_acct"]); @@ -48,19 +48,19 @@ function addKeyBindCommand(command, params, client) { let tempCommand = getParam(params, " ", 2); let tempParams = (splitParams.length > 2) ? splitParams.slice(2).join(" ") : ""; - if(!keyId) { + if (!keyId) { messagePlayerError(client, "The key ID or name you input is invalid!"); messagePlayerTip(client, "Use simple key names, letters, or numbers. Don't add spaces."); messagePlayerInfo(client, `Examples: {ALTCOLOUR}1, 2, a, b, numplus, num1, f1, f2, pageup, delete, insert, rightshift, leftctrl`); return false; } - if(!keyId) { + if (!keyId) { messagePlayerError(client, "That key name/id is invalid!"); return false; } - if(areParamsEmpty(tempCommand)) { + if (areParamsEmpty(tempCommand)) { messagePlayerSyntax(client, getCommandSyntaxText(command)); return false; } @@ -74,14 +74,14 @@ function addKeyBindCommand(command, params, client) { function removeKeyBindCommand(command, params, client) { let keyId = getKeyIdFromParams(getParam(params, " ", 1)); - if(!keyId) { + if (!keyId) { messagePlayerError(client, "The key ID or name you input is invalid!"); messagePlayerTip(client, "Use simple key names, letters, or numbers. Don't add spaces."); messagePlayerInfo(client, `Examples: {ALTCOLOUR}1, 2, a, b, numplus, num1, f1, f2, pageup, delete, insert, rightshift, leftctrl`); return false; } - if(!keyId) { + if (!keyId) { messagePlayerError(client, "That key name/id is invalid!"); return false; } @@ -94,14 +94,14 @@ function removeKeyBindCommand(command, params, client) { function addPlayerKeyBind(client, keys, command, params, tempKey = false) { let keyBindData = new KeyBindData(false, keys, `${command} ${params}`); - if(tempKey == true) { + if (tempKey == true) { keyBindData.databaseId = -1; } getPlayerData(client).keyBinds.push(keyBindData); - sendAddAccountKeyBindToClient(client, keys, (keys.length > 1) ? VRR_KEYSTATE_COMBO : VRR_KEYSTATE_UP); + sendAddAccountKeyBindToClient(client, keys, (keys.length > 1) ? AGRP_KEYSTATE_COMBO : AGRP_KEYSTATE_UP); - if(!doesPlayerHaveKeyBindsDisabled(client) && doesPlayerHaveKeyBindForCommand(client, "enter")) { + if (!doesPlayerHaveKeyBindsDisabled(client) && doesPlayerHaveKeyBindForCommand(client, "enter")) { let keyId = getPlayerKeyBindForCommand(client, "enter"); logToConsole(LOG_DEBUG, `[VRR.Event] Sending custom enter property key ID (${keyId.key}, ${toUpperCase(getKeyNameFromId(keyId.key))}) to ${getPlayerDisplayForConsole(client)}`); sendPlayerEnterPropertyKey(client, keyId.key); @@ -125,7 +125,7 @@ function removePlayerKeyBind(client, keyId) { getPlayerData(client).keyBinds = getPlayerData(client).keyBinds.filter(keyBind => keyBind.key != keyId); sendRemoveAccountKeyBindToClient(client, keyId); - if(!doesPlayerHaveKeyBindsDisabled(client) && doesPlayerHaveKeyBindForCommand(client, "enter")) { + if (!doesPlayerHaveKeyBindsDisabled(client) && doesPlayerHaveKeyBindForCommand(client, "enter")) { let keyId = getPlayerKeyBindForCommand(client, "enter"); logToConsole(LOG_DEBUG, `[VRR.Event] Sending custom enter property key ID (${keyId.key}, ${toUpperCase(getKeyNameFromId(keyId.key))}) to ${getPlayerDisplayForConsole(client)}`); sendPlayerEnterPropertyKey(client, keyId.key); @@ -137,8 +137,8 @@ function removePlayerKeyBind(client, keyId) { // =========================================================================== function doesPlayerHaveKeyBindForCommand(client, command) { - for(let i in getPlayerData(client).keyBinds) { - if(toLowerCase(getPlayerData(client).keyBinds[i].commandString.split(" ")[0]) == toLowerCase(command)) { + for (let i in getPlayerData(client).keyBinds) { + if (toLowerCase(getPlayerData(client).keyBinds[i].commandString.split(" ")[0]) == toLowerCase(command)) { return true; } } @@ -148,8 +148,8 @@ function doesPlayerHaveKeyBindForCommand(client, command) { // =========================================================================== function getPlayerKeyBindForCommand(client, command) { - for(let i in getPlayerData(client).keyBinds) { - if(toLowerCase(getPlayerData(client).keyBinds[i].commandString.split(" ")[0]) == toLowerCase(command)) { + for (let i in getPlayerData(client).keyBinds) { + if (toLowerCase(getPlayerData(client).keyBinds[i].commandString.split(" ")[0]) == toLowerCase(command)) { return getPlayerData(client).keyBinds[i]; } } @@ -159,8 +159,8 @@ function getPlayerKeyBindForCommand(client, command) { // =========================================================================== function doesPlayerHaveKeyBindForKey(client, key) { - for(let i in getPlayerData(client).keyBinds) { - if(getPlayerData(client).keyBinds[i].key == key) { + for (let i in getPlayerData(client).keyBinds) { + if (getPlayerData(client).keyBinds[i].key == key) { return true; } } @@ -176,8 +176,8 @@ function doesPlayerHaveKeyBindsDisabled(client) { // =========================================================================== function getPlayerKeyBindForKey(client, key) { - for(let i in getPlayerData(client).keyBinds) { - if(getPlayerData(client).keyBinds[i].key == key) { + for (let i in getPlayerData(client).keyBinds) { + if (getPlayerData(client).keyBinds[i].key == key) { return getPlayerData(client).keyBinds[i]; } } @@ -187,22 +187,22 @@ function getPlayerKeyBindForKey(client, key) { // =========================================================================== function playerUsedKeyBind(client, key) { - if(!isPlayerLoggedIn(client)) { + if (!isPlayerLoggedIn(client)) { return false; } - if(!isPlayerSpawned(client)) { + if (!isPlayerSpawned(client)) { return false; } logToConsole(LOG_DEBUG, `[VRR.KeyBind] ${getPlayerDisplayForConsole(client)} used keybind ${toUpperCase(getKeyNameFromId(key))} (${key})`); - if(!doesPlayerHaveKeyBindsDisabled(client) && doesPlayerHaveKeyBindForKey(client, key)) { + if (!doesPlayerHaveKeyBindsDisabled(client) && doesPlayerHaveKeyBindForKey(client, key)) { let keyBindData = getPlayerKeyBindForKey(client, key); - if(keyBindData.enabled) { + if (keyBindData.enabled) { let splitCommandString = keyBindData.commandString.split(" "); let tempCommand = splitCommandString[0]; let tempParams = ""; - if(splitCommandString.length > 1) { + if (splitCommandString.length > 1) { tempParams = splitCommandString.slice(1).join(" "); } getCommand(toLowerCase(tempCommand)).handlerFunction(tempCommand, tempParams, client); @@ -215,7 +215,7 @@ function playerUsedKeyBind(client, key) { function sendAccountKeyBindsToClient(client) { sendClearKeyBindsToClient(client); - for(let i in getPlayerData(client).keyBinds) { + for (let i in getPlayerData(client).keyBinds) { sendAddAccountKeyBindToClient(client, getPlayerData(client).keyBinds[i].key, getPlayerData(client).keyBinds[i].keyState); } } @@ -223,13 +223,13 @@ function sendAccountKeyBindsToClient(client) { // =========================================================================== function showKeyBindListCommand(command, params, client) { - let keybindList = getPlayerData(client).keyBinds.map(function(x) { return `{ALTCOLOUR}${toUpperCase(getKeyNameFromId(x.key))}: {MAINCOLOUR}${x.commandString}`; }); + let keybindList = getPlayerData(client).keyBinds.map(function (x) { return `{ALTCOLOUR}${toUpperCase(getKeyNameFromId(x.key))}: {MAINCOLOUR}${x.commandString}`; }); let chunkedList = splitArrayIntoChunks(keybindList, 6); messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderKeyBindsList"))); - for(let i in chunkedList) { + for (let i in chunkedList) { messagePlayerInfo(client, chunkedList[i].join(", ")); } } diff --git a/scripts/server/misc.js b/scripts/server/misc.js index 2e1f27a1..6228a3fa 100644 --- a/scripts/server/misc.js +++ b/scripts/server/misc.js @@ -168,8 +168,8 @@ function enterExitPropertyCommand(command, params, client) { return false; } - let ownerType = getEntityData(getPlayerData(client).currentPickup, "vrr.owner.type"); - let ownerId = getEntityData(getPlayerData(client).currentPickup, "vrr.owner.id"); + let ownerType = getEntityData(getPlayerData(client).currentPickup, "agrp.owner.type"); + let ownerId = getEntityData(getPlayerData(client).currentPickup, "agrp.owner.id"); switch (ownerType) { case VRR_PICKUP_BUSINESS_ENTRANCE: diff --git a/scripts/server/native/connected.js b/scripts/server/native/connected.js index b43b0898..99d71e81 100644 --- a/scripts/server/native/connected.js +++ b/scripts/server/native/connected.js @@ -181,7 +181,7 @@ function getVehicleHeading(vehicle) { function setVehicleHeading(vehicle, heading) { if (getGame() == VRR_GAME_GTA_IV) { - return sendNetworkEventToPlayer("vrr.vehPosition", null, getVehicleForNetworkEvent(vehicle), heading); + return sendNetworkEventToPlayer("agrp.vehPosition", null, getVehicleForNetworkEvent(vehicle), heading); } return vehicle.heading = heading; } @@ -255,7 +255,7 @@ function removePlayerFromVehicle(client) { function setPlayerSkin(client, skinIndex) { logToConsole(LOG_DEBUG, `Setting ${getPlayerDisplayForConsole(client)}'s skin to ${getGameConfig().skins[getGame()][skinIndex][0]} (Index: ${skinIndex}, Name: ${getGameConfig().skins[getGame()][skinIndex][1]})`); if (getGame() == VRR_GAME_GTA_IV) { - triggerNetworkEvent("vrr.localPlayerSkin", client, getGameConfig().skins[getGame()][skinIndex][0]); + triggerNetworkEvent("agrp.localPlayerSkin", client, getGameConfig().skins[getGame()][skinIndex][0]); } else { getPlayerPed(client).modelIndex = getGameConfig().skins[getGame()][skinIndex][0]; } @@ -547,15 +547,15 @@ function repairVehicle(vehicle) { // =========================================================================== function setVehicleLights(vehicle, lights) { - setEntityData(vehicle, "vrr.lights", lights, true); - sendNetworkEventToPlayer("vrr.veh.lights", null, vehicle.id, lights); + setEntityData(vehicle, "agrp.lights", lights, true); + sendNetworkEventToPlayer("agrp.veh.lights", null, vehicle.id, lights); } // =========================================================================== function setVehicleEngine(vehicle, engine) { vehicle.engine = engine; - setEntityData(vehicle, "vrr.engine", engine, true); + setEntityData(vehicle, "agrp.engine", engine, true); } // =========================================================================== @@ -688,7 +688,7 @@ function setPlayerFightStyle(client, fightStyleId) { return false; } - setEntityData(getPlayerElement(client), "vrr.fightStyle", [getGameConfig().fightStyles[getGame()][fightStyleId][1][0], getGameConfig().fightStyles[getGame()][fightStyleId][1][1]]); + setEntityData(getPlayerElement(client), "agrp.fightStyle", [getGameConfig().fightStyles[getGame()][fightStyleId][1][0], getGameConfig().fightStyles[getGame()][fightStyleId][1][1]]); forcePlayerToSyncElementProperties(null, getPlayerElement(client)); } @@ -707,7 +707,7 @@ function getPlayerElement(client) { // =========================================================================== function setElementPosition(element, position) { - sendNetworkEventToPlayer("vrr.elementPosition", null, element.id, position); + sendNetworkEventToPlayer("agrp.elementPosition", null, element.id, position); } // =========================================================================== @@ -725,14 +725,14 @@ function getElementHeading(element) { // =========================================================================== function setElementInterior(element, interior) { - setEntityData(element, "vrr.interior", interior, true); + setEntityData(element, "agrp.interior", interior, true); forcePlayerToSyncElementProperties(null, element); } // =========================================================================== function setElementCollisionsEnabled(element, state) { - sendNetworkEventToPlayer("vrr.elementCollisions", null, element.id, state); + sendNetworkEventToPlayer("agrp.elementCollisions", null, element.id, state); } // =========================================================================== @@ -1142,13 +1142,13 @@ function setVehicleHealth(vehicle, health) { function givePlayerWeapon(client, weaponId, ammo, active = true) { logToConsole(LOG_DEBUG, `[VRR.Client] Sending signal to ${getPlayerDisplayForConsole(client)} to give weapon (Weapon: ${weaponId}, Ammo: ${ammo})`); - sendNetworkEventToPlayer("vrr.giveWeapon", client, weaponId, ammo, active); + sendNetworkEventToPlayer("agrp.giveWeapon", client, weaponId, ammo, active); } // =========================================================================== function setPlayerWantedLevel(client, wantedLevel) { - sendNetworkEventToPlayer("vrr.wantedLevel", client, wantedLevel); + sendNetworkEventToPlayer("agrp.wantedLevel", client, wantedLevel); return true; } @@ -1287,7 +1287,7 @@ function serverBanIP(ip) { // =========================================================================== function setVehicleTrunkState(vehicle, trunkState) { - sendNetworkEventToPlayer("vrr.veh.trunk", null, getVehicleForNetworkEvent(vehicle), trunkState); + sendNetworkEventToPlayer("agrp.veh.trunk", null, getVehicleForNetworkEvent(vehicle), trunkState); } // =========================================================================== @@ -1388,7 +1388,7 @@ function deletePlayerPed(client) { if (areServerElementsSupported()) { destroyElement(client.player); } else { - sendNetworkEventToPlayer("vrr.deleteLocalPlayerPed", client); + sendNetworkEventToPlayer("agrp.deleteLocalPlayerPed", client); } } diff --git a/scripts/server/paintball.js b/scripts/server/paintball.js index 206b2607..cc47740f 100644 --- a/scripts/server/paintball.js +++ b/scripts/server/paintball.js @@ -12,7 +12,7 @@ let paintBallItems = []; // =========================================================================== let paintBallItemNames = { - [VRR_GAME_GTA_III]: [ + [AGRP_GAME_GTA_III]: [ "Colt 45", "Uzi", "Shotgun", @@ -20,7 +20,7 @@ let paintBallItemNames = { "Sniper Rifle", ], - [VRR_GAME_GTA_VC]: [ + [AGRP_GAME_GTA_VC]: [ "Colt 45", "Pump Shotgun", "Ingram", @@ -29,7 +29,7 @@ let paintBallItemNames = { "Sniper Rifle", ], - [VRR_GAME_GTA_SA]: [ + [AGRP_GAME_GTA_SA]: [ "Desert Eagle", "Shotgun", "MP5", @@ -37,7 +37,7 @@ let paintBallItemNames = { "Sniper Rifle", ], - [VRR_GAME_GTA_IV]: [ + [AGRP_GAME_GTA_IV]: [ "Glock 9mm", "Micro Uzi", "Stubby Shotgun", @@ -62,7 +62,7 @@ function startPaintBall(client) { } storePlayerItemsInTempLocker(client); - getPlayerData(client).tempLockerType = VRR_TEMP_LOCKER_TYPE_PAINTBALL; + getPlayerData(client).tempLockerType = AGRP_TEMP_LOCKER_TYPE_PAINTBALL; getPlayerData(client).inPaintBall = true; getPlayerData(client).paintBallBusiness = getPlayerBusiness(client); @@ -85,7 +85,7 @@ function stopPaintBall(client) { function givePlayerPaintBallItems(client) { logToConsole(LOG_DEBUG, `[VRR.PaintBall]: Giving ${getPlayerDisplayForConsole(client)} paintball items ...`); for (let i in paintBallItems) { - let itemId = createItem(paintBallItems[i], value, VRR_ITEM_OWNER_PLAYER, getPlayerCurrentSubAccount(client).databaseId); + let itemId = createItem(paintBallItems[i], value, AGRP_ITEM_OWNER_PLAYER, getPlayerCurrentSubAccount(client).databaseId); getItemData(itemId).needsSaved = false; getItemData(itemId).databaseId = -1; // Make sure it doesnt save let freeSlot = getPlayerFirstEmptyHotBarSlot(client); diff --git a/scripts/server/radio.js b/scripts/server/radio.js index 25a79e04..09a98b0a 100644 --- a/scripts/server/radio.js +++ b/scripts/server/radio.js @@ -117,8 +117,8 @@ function playStreamingRadioCommand(command, params, client) { } } } else { - if (doesEntityDataExist(client, "vrr.inHouse")) { - let houseId = getEntityData(client, "vrr.inHouse"); + if (doesEntityDataExist(client, "agrp.inHouse")) { + let houseId = getEntityData(client, "agrp.inHouse"); if (radioStationId == 0) { getHouseData(houseId).streamingRadioStation = -1; getHouseData(houseId).needsSaved = true; @@ -127,7 +127,7 @@ function playStreamingRadioCommand(command, params, client) { let clients = getClients(); for (let i in clients) { - if (getEntityData(clients[i], "vrr.inHouse") == houseId) { + if (getEntityData(clients[i], "agrp.inHouse") == houseId) { playRadioStreamForPlayer(clients[i], ""); } } @@ -139,7 +139,7 @@ function playStreamingRadioCommand(command, params, client) { let clients = getClients(); for (let i in clients) { - if (getEntityData(clients[i], "vrr.inHouse") == houseId) { + if (getEntityData(clients[i], "agrp.inHouse") == houseId) { playRadioStreamForPlayer(clients[i], getRadioStationData(radioStationId - 1).url, true, getPlayerStreamingRadioVolume(clients[i])); } } diff --git a/scripts/server/staff.js b/scripts/server/staff.js index 96dd1bb5..0e9d1df6 100644 --- a/scripts/server/staff.js +++ b/scripts/server/staff.js @@ -880,7 +880,7 @@ function getPlayerCommand(command, params, client) { getPlayerData(targetClient).returnToHeading = getPlayerPosition(targetClient); getPlayerData(targetClient).returnToDimension = getPlayerDimension(targetClient); getPlayerData(targetClient).returnToInterior = getPlayerInterior(targetClient); - getPlayerData(targetClient).returnToType = VRR_RETURNTO_TYPE_ADMINGET; + getPlayerData(targetClient).returnToType = AGRP_RETURNTO_TYPE_ADMINGET; setPlayerPosition(targetClient, getPosBehindPos(getPlayerPosition(client), getPlayerHeading(client), 2)); setPlayerHeading(targetClient, getPlayerHeading(client)); @@ -932,7 +932,7 @@ function returnPlayerCommand(command, params, client) { getPlayerData(targetClient).returnToInterior = null; getPlayerData(targetClient).returnToHouse = null; getPlayerData(targetClient).returnToBusiness = null; - getPlayerData(targetClient).returnToType = VRR_RETURNTO_TYPE_NONE; + getPlayerData(targetClient).returnToType = AGRP_RETURNTO_TYPE_NONE; messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} returned {ALTCOLOUR}${getPlayerName(targetClient)}{MAINCOLOUR} to their previous position.`); messagePlayerAlert(targetClient, `An admin has returned you to your previous location`); diff --git a/scripts/server/subaccount.js b/scripts/server/subaccount.js index 3b304ccf..ef397eaa 100644 --- a/scripts/server/subaccount.js +++ b/scripts/server/subaccount.js @@ -474,11 +474,11 @@ function selectCharacter(client, characterId = -1) { logToConsole(LOG_DEBUG, `[VRR.SubAccount] Spawning ${getPlayerDisplayForConsole(client)} as character ID ${getPlayerData(client).currentSubAccount} with skin ${skin} (${spawnPosition.x}, ${spawnPosition.y}, ${spawnPosition.z})`); //setPlayerCameraLookAt(client, getPosBehindPos(spawnPosition, spawnHeading, 5), spawnPosition); - getPlayerData(client).pedState = VRR_PEDSTATE_SPAWNING; + getPlayerData(client).pedState = AGRP_PEDSTATE_SPAWNING; - if (getGame() <= VRR_GAME_GTA_SA) { + if (getGame() <= AGRP_GAME_GTA_SA) { spawnPlayer(client, spawnPosition, spawnHeading, getGameConfig().skins[getGame()][skin][0], spawnInterior, spawnDimension); - } else if (getGame() == VRR_GAME_GTA_IV) { + } else if (getGame() == AGRP_GAME_GTA_IV) { spawnPlayer(client, spawnPosition, spawnHeading, getGameConfig().skins[getGame()][skin][0], spawnInterior, spawnDimension); //clearPlayerWeapons(client); //setPlayerSkin(client, skin); @@ -487,7 +487,7 @@ function selectCharacter(client, characterId = -1) { //setPlayerInterior(client, spawnInterior); //setPlayerDimension(client, spawnDimension); //restorePlayerCamera(client); - } else if (getGame() == VRR_GAME_MAFIA_ONE) { + } else if (getGame() == AGRP_GAME_MAFIA_ONE) { //spawnPlayer(client, spawnPosition, spawnHeading, getGameConfig().skins[getGame()][skin][0]); logToConsole(LOG_DEBUG, `[VRR.SubAccount] Spawning ${getPlayerDisplayForConsole(client)} as ${getGameConfig().skins[getGame()][skin][1]} (${getGameConfig().skins[getGame()][skin][0]})`); spawnPlayer(client, getGameConfig().skins[getGame()][skin][0], spawnPosition, spawnHeading); diff --git a/scripts/server/timers.js b/scripts/server/timers.js index 12278e9e..4901d903 100644 --- a/scripts/server/timers.js +++ b/scripts/server/timers.js @@ -244,7 +244,7 @@ function checkPayDays() { } for (let i in getServerData().businesses) { - if (getBusinessData(i).ownerType != VRR_BIZ_OWNER_NONE && getBusinessData(i).ownerType != VRR_BIZ_OWNER_PUBLIC && getBusinessData(i).ownerType != VRR_BIZ_OWNER_FACTION) { + if (getBusinessData(i).ownerType != AGRP_BIZ_OWNER_NONE && getBusinessData(i).ownerType != AGRP_BIZ_OWNER_PUBLIC && getBusinessData(i).ownerType != AGRP_BIZ_OWNER_FACTION) { getBusinessData(i).till += 1000; } } diff --git a/scripts/server/utilities.js b/scripts/server/utilities.js index fdc0dfe5..cb5267cc 100644 --- a/scripts/server/utilities.js +++ b/scripts/server/utilities.js @@ -260,8 +260,8 @@ function checkPlayerPedStates() { if (getPlayerData(clients[i])) { if (getPlayerData(clients[i]).pedState) { if (isPlayerInAnyVehicle(clients[i])) { - if (getPlayerData(clients[i]).pedState == VRR_PEDSTATE_EXITINGVEHICLE) { - getPlayerData(clients[i]).pedState == VRR_PEDSTATE_READY; + if (getPlayerData(clients[i]).pedState == AGRP_PEDSTATE_EXITINGVEHICLE) { + getPlayerData(clients[i]).pedState == AGRP_PEDSTATE_READY; } } } @@ -458,7 +458,7 @@ function isClientInitialized(client) { // =========================================================================== function getPedForNetworkEvent(ped) { - if (getGame() == VRR_GAME_GTA_IV) { + if (getGame() == AGRP_GAME_GTA_IV) { return ped; } else { return ped.id; diff --git a/scripts/shared/const.js b/scripts/shared/const.js index 581fe89d..2875f0a9 100644 --- a/scripts/shared/const.js +++ b/scripts/shared/const.js @@ -8,10 +8,10 @@ // =========================================================================== // Label Types -const VRR_LABEL_JOB = 1; -const VRR_LABEL_BUSINESS = 2; -const VRR_LABEL_HOUSE = 3; -const VRR_LABEL_EXIT = 4; +const AGRP_LABEL_JOB = 1; +const AGRP_LABEL_BUSINESS = 2; +const AGRP_LABEL_HOUSE = 3; +const AGRP_LABEL_EXIT = 4; // Log Levels const LOG_ALL = -1; @@ -23,115 +23,115 @@ const LOG_VERBOSE = 8; const LOG_DEBUG = 16; // Weapon Damage Event Types -const VRR_WEAPON_DAMAGE_EVENT_NONE = 0; -const VRR_WEAPON_DAMAGE_EVENT_NORMAL = 1; -const VRR_WEAPON_DAMAGE_EVENT_TAZER = 2; -const VRR_WEAPON_DAMAGE_EVENT_EXTINGUISH = 3; -const VRR_WEAPON_DAMAGE_EVENT_MACE = 4; +const AGRP_WEAPON_DAMAGE_EVENT_NONE = 0; +const AGRP_WEAPON_DAMAGE_EVENT_NORMAL = 1; +const AGRP_WEAPON_DAMAGE_EVENT_TAZER = 2; +const AGRP_WEAPON_DAMAGE_EVENT_EXTINGUISH = 3; +const AGRP_WEAPON_DAMAGE_EVENT_MACE = 4; // Games -const VRR_GAME_GTA_III = 1; -const VRR_GAME_GTA_VC = 2; -const VRR_GAME_GTA_SA = 3; -const VRR_GAME_GTA_IV = 5; -const VRR_GAME_GTA_IV_EFLC = 6; -const VRR_GAME_GTA_V = 50; -const VRR_GAME_MAFIA_ONE = 10; -const VRR_GAME_MAFIA_TWO = 11; -const VRR_GAME_MAFIA_THREE = 12; -const VRR_GAME_MAFIA_ONE_DE = 13; +const AGRP_GAME_GTA_III = 1; +const AGRP_GAME_GTA_VC = 2; +const AGRP_GAME_GTA_SA = 3; +const AGRP_GAME_GTA_IV = 5; +const AGRP_GAME_GTA_IV_EFLC = 6; +const AGRP_GAME_GTA_V = 50; +const AGRP_GAME_MAFIA_ONE = 10; +const AGRP_GAME_MAFIA_TWO = 11; +const AGRP_GAME_MAFIA_THREE = 12; +const AGRP_GAME_MAFIA_ONE_DE = 13; // Key States -const VRR_KEYSTATE_NONE = 0; -const VRR_KEYSTATE_UP = 1; -const VRR_KEYSTATE_DOWN = 2; -const VRR_KEYSTATE_HOLDSHORT = 3; -const VRR_KEYSTATE_HOLDLONG = 4; -const VRR_KEYSTATE_COMBO = 4; +const AGRP_KEYSTATE_NONE = 0; +const AGRP_KEYSTATE_UP = 1; +const AGRP_KEYSTATE_DOWN = 2; +const AGRP_KEYSTATE_HOLDSHORT = 3; +const AGRP_KEYSTATE_HOLDLONG = 4; +const AGRP_KEYSTATE_COMBO = 4; // Business Label Info Types -const VRR_PROPLABEL_INFO_NONE = 0; -const VRR_PROPLABEL_INFO_BUY = 1; -const VRR_PROPLABEL_INFO_ENTER = 2; -const VRR_PROPLABEL_INFO_ENTERVEHICLE = 3; -const VRR_PROPLABEL_INFO_REFUEL = 4; -const VRR_PROPLABEL_INFO_REPAIR = 5; -const VRR_PROPLABEL_INFO_BUYHOUSE = 6; -const VRR_PROPLABEL_INFO_RENTHOUSE = 7; -const VRR_PROPLABEL_INFO_BUYBIZ = 8; +const AGRP_PROPLABEL_INFO_NONE = 0; +const AGRP_PROPLABEL_INFO_BUY = 1; +const AGRP_PROPLABEL_INFO_ENTER = 2; +const AGRP_PROPLABEL_INFO_ENTERVEHICLE = 3; +const AGRP_PROPLABEL_INFO_REFUEL = 4; +const AGRP_PROPLABEL_INFO_REPAIR = 5; +const AGRP_PROPLABEL_INFO_BUYHOUSE = 6; +const AGRP_PROPLABEL_INFO_RENTHOUSE = 7; +const AGRP_PROPLABEL_INFO_BUYBIZ = 8; // Animation Types -const VRR_ANIMTYPE_NONE = 0; -const VRR_ANIMTYPE_NORMAL = 1; -const VRR_ANIMTYPE_BLEND = 2; -const VRR_ANIMTYPE_SHARED = 3; // Forces this animation to play in sync with another ped's mirrored anim (handshake, kiss, gang signs, etc) -const VRR_ANIMTYPE_SPECIALACTION = 4; // This animtype uses a special action (only in SA) -const VRR_ANIMTYPE_SURRENDER = 5; // This animtype is used to surrender (like handsup or cower) -const VRR_ANIMTYPE_FORCED = 6; // This animtype is forced (can't use stopanim to get out of it) -const VRR_ANIMTYPE_FREEZE = 7; // This animtype is forced (can't use stopanim to get out of it) +const AGRP_ANIMTYPE_NONE = 0; +const AGRP_ANIMTYPE_NORMAL = 1; +const AGRP_ANIMTYPE_BLEND = 2; +const AGRP_ANIMTYPE_SHARED = 3; // Forces this animation to play in sync with another ped's mirrored anim (handshake, kiss, gang signs, etc) +const AGRP_ANIMTYPE_SPECIALACTION = 4; // This animtype uses a special action (only in SA) +const AGRP_ANIMTYPE_SURRENDER = 5; // This animtype is used to surrender (like handsup or cower) +const AGRP_ANIMTYPE_FORCED = 6; // This animtype is forced (can't use stopanim to get out of it) +const AGRP_ANIMTYPE_FREEZE = 7; // This animtype is forced (can't use stopanim to get out of it) // Animation Move Types -const VRR_ANIMMOVE_NONE = 0; -const VRR_ANIMMOVE_FORWARD = 1; -const VRR_ANIMMOVE_BACK = 2; -const VRR_ANIMMOVE_LEFT = 3; -const VRR_ANIMMOVE_RIGHT = 4; +const AGRP_ANIMMOVE_NONE = 0; +const AGRP_ANIMMOVE_FORWARD = 1; +const AGRP_ANIMMOVE_BACK = 2; +const AGRP_ANIMMOVE_LEFT = 3; +const AGRP_ANIMMOVE_RIGHT = 4; // Multiplayer Modifications -const VRR_MPMOD_NONE = 0; -const VRR_MPMOD_GTAC = 1; -const VRR_MPMOD_MAFIAC = 2; -const VRR_MPMOD_OAKWOOD = 3; -const VRR_MPMOD_RAGEMP = 4; +const AGRP_MPMOD_NONE = 0; +const AGRP_MPMOD_GTAC = 1; +const AGRP_MPMOD_MAFIAC = 2; +const AGRP_MPMOD_OAKWOOD = 3; +const AGRP_MPMOD_RAGEMP = 4; // Business/House Game Script States -//const VRR_GAMESCRIPT_NONE = 0; -//const VRR_GAMESCRIPT_DENY = 1; -//const VRR_GAMESCRIPT_ALLOW = 2; -//const VRR_GAMESCRIPT_FORCE = 3; +//const AGRP_GAMESCRIPT_NONE = 0; +//const AGRP_GAMESCRIPT_DENY = 1; +//const AGRP_GAMESCRIPT_ALLOW = 2; +//const AGRP_GAMESCRIPT_FORCE = 3; // Vehicle Purchase States -const VRR_VEHBUYSTATE_NONE = 0; -const VRR_VEHBUYSTATE_TESTDRIVE = 1; -const VRR_VEHBUYSTATE_EXITVEH = 2; -const VRR_VEHBUYSTATE_FARENOUGH = 3; -const VRR_VEHBUYSTATE_WRONGVEH = 4; +const AGRP_VEHBUYSTATE_NONE = 0; +const AGRP_VEHBUYSTATE_TESTDRIVE = 1; +const AGRP_VEHBUYSTATE_EXITVEH = 2; +const AGRP_VEHBUYSTATE_FARENOUGH = 3; +const AGRP_VEHBUYSTATE_WRONGVEH = 4; // Islands -const VRR_ISLAND_NONE = 0; // None -const VRR_ISLAND_PORTLAND = 0; // Portland Island -const VRR_ISLAND_STAUNTON = 1; // Staunton Island -const VRR_ISLAND_SHORESIDEVALE = 2; // Shoreside Vale -const VRR_ISLAND_VICEWEST = 0; // Western Island of VC -const VRR_ISLAND_VICEEAST = 1; // Eastern Island of VC -const VRR_ISLAND_LOSSANTOS = 0; // Los Santos -const VRR_ISLAND_LASVENTURAS = 1; // Las Venturas -const VRR_ISLAND_SANFIERRO = 2; // San Fierro -const VRR_ISLAND_REDCOUNTYNORTH = 4; // Red County North (spans all the way from Palamino/shore on the east east to border of Flint County on the west) -const VRR_ISLAND_BONECOUNTYNORTH = 5; // Bone County North (usually called Tierra Robada) -const VRR_ISLAND_BONECOUNTYSOUTH = 6; // Bone County South +const AGRP_ISLAND_NONE = 0; // None +const AGRP_ISLAND_PORTLAND = 0; // Portland Island +const AGRP_ISLAND_STAUNTON = 1; // Staunton Island +const AGRP_ISLAND_SHORESIDEVALE = 2; // Shoreside Vale +const AGRP_ISLAND_VICEWEST = 0; // Western Island of VC +const AGRP_ISLAND_VICEEAST = 1; // Eastern Island of VC +const AGRP_ISLAND_LOSSANTOS = 0; // Los Santos +const AGRP_ISLAND_LASVENTURAS = 1; // Las Venturas +const AGRP_ISLAND_SANFIERRO = 2; // San Fierro +const AGRP_ISLAND_REDCOUNTYNORTH = 4; // Red County North (spans all the way from Palamino/shore on the east east to border of Flint County on the west) +const AGRP_ISLAND_BONECOUNTYNORTH = 5; // Bone County North (usually called Tierra Robada) +const AGRP_ISLAND_BONECOUNTYSOUTH = 6; // Bone County South // Body Parts for Skin Select (IV for now, but might do other games when I can add accessory objects) -const VRR_SKINSELECT_NONE = 0; -const VRR_SKINSELECT_SKIN = 1; -const VRR_SKINSELECT_HAT = 2; -const VRR_SKINSELECT_HAIR = 3; -const VRR_SKINSELECT_EYES = 5; -const VRR_SKINSELECT_UPPER = 6; -const VRR_SKINSELECT_LOWER = 7; -const VRR_SKINSELECT_SHOES = 8; -const VRR_SKINSELECT_LEFTWRIST = 9; -const VRR_SKINSELECT_RIGHTWRIST = 10; -const VRR_SKINSELECT_LEFTHAND = 11; -const VRR_SKINSELECT_RIGHTHAND = 12; -const VRR_SKINSELECT_HEAD = 13; +const AGRP_SKINSELECT_NONE = 0; +const AGRP_SKINSELECT_SKIN = 1; +const AGRP_SKINSELECT_HAT = 2; +const AGRP_SKINSELECT_HAIR = 3; +const AGRP_SKINSELECT_EYES = 5; +const AGRP_SKINSELECT_UPPER = 6; +const AGRP_SKINSELECT_LOWER = 7; +const AGRP_SKINSELECT_SHOES = 8; +const AGRP_SKINSELECT_LEFTWRIST = 9; +const AGRP_SKINSELECT_RIGHTWRIST = 10; +const AGRP_SKINSELECT_LEFTHAND = 11; +const AGRP_SKINSELECT_RIGHTHAND = 12; +const AGRP_SKINSELECT_HEAD = 13; // Action States for NPCs -const VRR_NPC_ACTION_NONE = 0; -const VRR_NPC_ACTION_ANIM = 1; -const VRR_NPC_ACTION_WALKTO = 2; -const VRR_NPC_ACTION_RUNTO = 3; -const VRR_NPC_ACTION_SPRINTTO = 4; -const VRR_NPC_ACTION_FOLLOW = 5; -const VRR_NPC_ACTION_DEFEND = 6; -const VRR_NPC_ACTION_GUARD_AREA = 7; +const AGRP_NPC_ACTION_NONE = 0; +const AGRP_NPC_ACTION_ANIM = 1; +const AGRP_NPC_ACTION_WALKTO = 2; +const AGRP_NPC_ACTION_RUNTO = 3; +const AGRP_NPC_ACTION_SPRINTTO = 4; +const AGRP_NPC_ACTION_FOLLOW = 5; +const AGRP_NPC_ACTION_DEFEND = 6; +const AGRP_NPC_ACTION_GUARD_AREA = 7; diff --git a/scripts/shared/gamedata.js b/scripts/shared/gamedata.js index c75179c5..7b4ba6a5 100644 --- a/scripts/shared/gamedata.js +++ b/scripts/shared/gamedata.js @@ -12,9 +12,9 @@ class AnimationData { this.name = name; this.groupId = (typeof data.groupId != "undefined") ? data.groupId : 0; this.animId = (typeof data.animId != "undefined") ? data.animId : 0; - this.animType = (typeof data.animType != "undefined") ? data.animType : VRR_ANIMTYPE_NORMAL; + this.animType = (typeof data.animType != "undefined") ? data.animType : AGRP_ANIMTYPE_NORMAL; this.animSpeed = (typeof data.animSpeed != "undefined") ? data.animSpeed : 0.0; - this.moveType = (typeof data.moveType != "undefined") ? data.moveType : VRR_ANIMMOVE_NONE; + this.moveType = (typeof data.moveType != "undefined") ? data.moveType : AGRP_ANIMMOVE_NONE; // GTA IV this.infiniteLoop = (typeof data.infiniteLoop != "undefined") ? data.infiniteLoop : false; @@ -29,156 +29,156 @@ class AnimationData { let supportedFeatures = { // Invalid, GTAIII, GTAVC, GTASA, Invalid, GTAIV, Invalid, Invalid, Invalid, M1, M2, M3, M1DE time: { - [VRR_GAME_GTA_III]: true, - [VRR_GAME_GTA_VC]: true, - [VRR_GAME_GTA_SA]: true, - [VRR_GAME_GTA_IV]: true, - [VRR_GAME_GTA_IV_EFLC]: true, - [VRR_GAME_MAFIA_ONE]: false, - [VRR_GAME_MAFIA_TWO]: false, - [VRR_GAME_MAFIA_THREE]: false + [AGRP_GAME_GTA_III]: true, + [AGRP_GAME_GTA_VC]: true, + [AGRP_GAME_GTA_SA]: true, + [AGRP_GAME_GTA_IV]: true, + [AGRP_GAME_GTA_IV_EFLC]: true, + [AGRP_GAME_MAFIA_ONE]: false, + [AGRP_GAME_MAFIA_TWO]: false, + [AGRP_GAME_MAFIA_THREE]: false }, weather: { - [VRR_GAME_GTA_III]: true, - [VRR_GAME_GTA_VC]: true, - [VRR_GAME_GTA_SA]: true, - [VRR_GAME_GTA_IV]: true, - [VRR_GAME_GTA_IV_EFLC]: true, - [VRR_GAME_MAFIA_ONE]: false, - [VRR_GAME_MAFIA_TWO]: false, - [VRR_GAME_MAFIA_THREE]: false + [AGRP_GAME_GTA_III]: true, + [AGRP_GAME_GTA_VC]: true, + [AGRP_GAME_GTA_SA]: true, + [AGRP_GAME_GTA_IV]: true, + [AGRP_GAME_GTA_IV_EFLC]: true, + [AGRP_GAME_MAFIA_ONE]: false, + [AGRP_GAME_MAFIA_TWO]: false, + [AGRP_GAME_MAFIA_THREE]: false }, serverElements: { - [VRR_GAME_GTA_III]: true, - [VRR_GAME_GTA_VC]: true, - [VRR_GAME_GTA_SA]: true, - [VRR_GAME_GTA_IV]: false, - [VRR_GAME_GTA_IV_EFLC]: false, - [VRR_GAME_MAFIA_ONE]: true, - [VRR_GAME_MAFIA_TWO]: true, - [VRR_GAME_MAFIA_THREE]: true + [AGRP_GAME_GTA_III]: true, + [AGRP_GAME_GTA_VC]: true, + [AGRP_GAME_GTA_SA]: true, + [AGRP_GAME_GTA_IV]: false, + [AGRP_GAME_GTA_IV_EFLC]: false, + [AGRP_GAME_MAFIA_ONE]: true, + [AGRP_GAME_MAFIA_TWO]: true, + [AGRP_GAME_MAFIA_THREE]: true }, snow: { - [VRR_GAME_GTA_III]: true, - [VRR_GAME_GTA_VC]: true, - [VRR_GAME_GTA_SA]: true, - [VRR_GAME_GTA_IV]: false, - [VRR_GAME_GTA_IV_EFLC]: false, - [VRR_GAME_MAFIA_ONE]: false, - [VRR_GAME_MAFIA_TWO]: false, - [VRR_GAME_MAFIA_THREE]: false + [AGRP_GAME_GTA_III]: true, + [AGRP_GAME_GTA_VC]: true, + [AGRP_GAME_GTA_SA]: true, + [AGRP_GAME_GTA_IV]: false, + [AGRP_GAME_GTA_IV_EFLC]: false, + [AGRP_GAME_MAFIA_ONE]: false, + [AGRP_GAME_MAFIA_TWO]: false, + [AGRP_GAME_MAFIA_THREE]: false }, customCamera: { - [VRR_GAME_GTA_III]: true, - [VRR_GAME_GTA_VC]: true, - [VRR_GAME_GTA_SA]: true, - [VRR_GAME_GTA_IV]: true, - [VRR_GAME_GTA_IV_EFLC]: true, - [VRR_GAME_MAFIA_ONE]: false, - [VRR_GAME_MAFIA_TWO]: false, - [VRR_GAME_MAFIA_THREE]: false + [AGRP_GAME_GTA_III]: true, + [AGRP_GAME_GTA_VC]: true, + [AGRP_GAME_GTA_SA]: true, + [AGRP_GAME_GTA_IV]: true, + [AGRP_GAME_GTA_IV_EFLC]: true, + [AGRP_GAME_MAFIA_ONE]: false, + [AGRP_GAME_MAFIA_TWO]: false, + [AGRP_GAME_MAFIA_THREE]: false }, fadeCamera: { - [VRR_GAME_GTA_III]: true, - [VRR_GAME_GTA_VC]: true, - [VRR_GAME_GTA_SA]: true, - [VRR_GAME_GTA_IV]: true, - [VRR_GAME_GTA_IV_EFLC]: true, - [VRR_GAME_MAFIA_ONE]: false, - [VRR_GAME_MAFIA_TWO]: false, - [VRR_GAME_MAFIA_TWO]: false, - [VRR_GAME_MAFIA_THREE]: false + [AGRP_GAME_GTA_III]: true, + [AGRP_GAME_GTA_VC]: true, + [AGRP_GAME_GTA_SA]: true, + [AGRP_GAME_GTA_IV]: true, + [AGRP_GAME_GTA_IV_EFLC]: true, + [AGRP_GAME_MAFIA_ONE]: false, + [AGRP_GAME_MAFIA_TWO]: false, + [AGRP_GAME_MAFIA_TWO]: false, + [AGRP_GAME_MAFIA_THREE]: false }, pickups: { - [VRR_GAME_GTA_III]: true, - [VRR_GAME_GTA_VC]: true, - [VRR_GAME_GTA_SA]: true, - [VRR_GAME_GTA_IV]: false, - [VRR_GAME_GTA_IV_EFLC]: false, - [VRR_GAME_MAFIA_ONE]: false, - [VRR_GAME_MAFIA_TWO]: false, - [VRR_GAME_MAFIA_THREE]: false + [AGRP_GAME_GTA_III]: true, + [AGRP_GAME_GTA_VC]: true, + [AGRP_GAME_GTA_SA]: true, + [AGRP_GAME_GTA_IV]: false, + [AGRP_GAME_GTA_IV_EFLC]: false, + [AGRP_GAME_MAFIA_ONE]: false, + [AGRP_GAME_MAFIA_TWO]: false, + [AGRP_GAME_MAFIA_THREE]: false }, worldLabels: { - [VRR_GAME_GTA_III]: true, - [VRR_GAME_GTA_VC]: true, - [VRR_GAME_GTA_SA]: true, - [VRR_GAME_GTA_IV]: false, - [VRR_GAME_GTA_IV_EFLC]: false, - [VRR_GAME_MAFIA_ONE]: false, - [VRR_GAME_MAFIA_TWO]: false, - [VRR_GAME_MAFIA_THREE]: false + [AGRP_GAME_GTA_III]: true, + [AGRP_GAME_GTA_VC]: true, + [AGRP_GAME_GTA_SA]: true, + [AGRP_GAME_GTA_IV]: false, + [AGRP_GAME_GTA_IV_EFLC]: false, + [AGRP_GAME_MAFIA_ONE]: false, + [AGRP_GAME_MAFIA_TWO]: false, + [AGRP_GAME_MAFIA_THREE]: false }, blips: { - [VRR_GAME_GTA_III]: true, - [VRR_GAME_GTA_VC]: true, - [VRR_GAME_GTA_SA]: true, - [VRR_GAME_GTA_IV]: false, - [VRR_GAME_GTA_IV_EFLC]: false, - [VRR_GAME_MAFIA_ONE]: false, - [VRR_GAME_MAFIA_TWO]: false, - [VRR_GAME_MAFIA_THREE]: false + [AGRP_GAME_GTA_III]: true, + [AGRP_GAME_GTA_VC]: true, + [AGRP_GAME_GTA_SA]: true, + [AGRP_GAME_GTA_IV]: false, + [AGRP_GAME_GTA_IV_EFLC]: false, + [AGRP_GAME_MAFIA_ONE]: false, + [AGRP_GAME_MAFIA_TWO]: false, + [AGRP_GAME_MAFIA_THREE]: false }, attachedBlips: { - [VRR_GAME_GTA_III]: true, - [VRR_GAME_GTA_VC]: true, - [VRR_GAME_GTA_SA]: true, - [VRR_GAME_GTA_IV]: false, - [VRR_GAME_GTA_IV_EFLC]: false, - [VRR_GAME_MAFIA_ONE]: false, - [VRR_GAME_MAFIA_TWO]: false, - [VRR_GAME_MAFIA_THREE]: false + [AGRP_GAME_GTA_III]: true, + [AGRP_GAME_GTA_VC]: true, + [AGRP_GAME_GTA_SA]: true, + [AGRP_GAME_GTA_IV]: false, + [AGRP_GAME_GTA_IV_EFLC]: false, + [AGRP_GAME_MAFIA_ONE]: false, + [AGRP_GAME_MAFIA_TWO]: false, + [AGRP_GAME_MAFIA_THREE]: false }, fightStyles: { - [VRR_GAME_GTA_III]: false, - [VRR_GAME_GTA_VC]: false, - [VRR_GAME_GTA_SA]: true, - [VRR_GAME_GTA_IV]: false, - [VRR_GAME_GTA_IV_EFLC]: false, - [VRR_GAME_MAFIA_ONE]: false, - [VRR_GAME_MAFIA_TWO]: false, - [VRR_GAME_MAFIA_THREE]: false + [AGRP_GAME_GTA_III]: false, + [AGRP_GAME_GTA_VC]: false, + [AGRP_GAME_GTA_SA]: true, + [AGRP_GAME_GTA_IV]: false, + [AGRP_GAME_GTA_IV_EFLC]: false, + [AGRP_GAME_MAFIA_ONE]: false, + [AGRP_GAME_MAFIA_TWO]: false, + [AGRP_GAME_MAFIA_THREE]: false }, markers: { - [VRR_GAME_GTA_III]: true, - [VRR_GAME_GTA_VC]: true, - [VRR_GAME_GTA_SA]: true, - [VRR_GAME_GTA_IV]: false, - [VRR_GAME_GTA_IV_EFLC]: false, - [VRR_GAME_MAFIA_ONE]: false, - [VRR_GAME_MAFIA_TWO]: false, - [VRR_GAME_MAFIA_THREE]: false + [AGRP_GAME_GTA_III]: true, + [AGRP_GAME_GTA_VC]: true, + [AGRP_GAME_GTA_SA]: true, + [AGRP_GAME_GTA_IV]: false, + [AGRP_GAME_GTA_IV_EFLC]: false, + [AGRP_GAME_MAFIA_ONE]: false, + [AGRP_GAME_MAFIA_TWO]: false, + [AGRP_GAME_MAFIA_THREE]: false }, vehicleColours: { - [VRR_GAME_GTA_III]: true, - [VRR_GAME_GTA_VC]: true, - [VRR_GAME_GTA_SA]: true, - [VRR_GAME_GTA_IV]: false, - [VRR_GAME_GTA_IV]: false, - [VRR_GAME_GTA_IV_EFLC]: false, - [VRR_GAME_MAFIA_ONE]: false, - [VRR_GAME_MAFIA_TWO]: false, - [VRR_GAME_MAFIA_THREE]: false + [AGRP_GAME_GTA_III]: true, + [AGRP_GAME_GTA_VC]: true, + [AGRP_GAME_GTA_SA]: true, + [AGRP_GAME_GTA_IV]: false, + [AGRP_GAME_GTA_IV]: false, + [AGRP_GAME_GTA_IV_EFLC]: false, + [AGRP_GAME_MAFIA_ONE]: false, + [AGRP_GAME_MAFIA_TWO]: false, + [AGRP_GAME_MAFIA_THREE]: false }, objects: { - [VRR_GAME_GTA_III]: true, - [VRR_GAME_GTA_VC]: true, - [VRR_GAME_GTA_SA]: true, - [VRR_GAME_GTA_IV]: false, - [VRR_GAME_GTA_IV_EFLC]: false, - [VRR_GAME_MAFIA_ONE]: false, - [VRR_GAME_MAFIA_TWO]: false, - [VRR_GAME_MAFIA_THREE]: false + [AGRP_GAME_GTA_III]: true, + [AGRP_GAME_GTA_VC]: true, + [AGRP_GAME_GTA_SA]: true, + [AGRP_GAME_GTA_IV]: false, + [AGRP_GAME_GTA_IV_EFLC]: false, + [AGRP_GAME_MAFIA_ONE]: false, + [AGRP_GAME_MAFIA_TWO]: false, + [AGRP_GAME_MAFIA_THREE]: false }, interior: { - [VRR_GAME_GTA_III]: false, - [VRR_GAME_GTA_VC]: true, - [VRR_GAME_GTA_SA]: true, - [VRR_GAME_GTA_IV]: false, - [VRR_GAME_GTA_IV_EFLC]: false, - [VRR_GAME_MAFIA_ONE]: false, - [VRR_GAME_MAFIA_TWO]: false, - [VRR_GAME_MAFIA_THREE]: false + [AGRP_GAME_GTA_III]: false, + [AGRP_GAME_GTA_VC]: true, + [AGRP_GAME_GTA_SA]: true, + [AGRP_GAME_GTA_IV]: false, + [AGRP_GAME_GTA_IV_EFLC]: false, + [AGRP_GAME_MAFIA_ONE]: false, + [AGRP_GAME_MAFIA_TWO]: false, + [AGRP_GAME_MAFIA_THREE]: false } }; @@ -186,23 +186,23 @@ let supportedFeatures = { // Connected MP mods only let extraContentResource = { - [VRR_GAME_GTA_III]: "agrp-gta3", - [VRR_GAME_GTA_VC]: "agrp-gtavc", - [VRR_GAME_GTA_SA]: "agrp-gtasa", - [VRR_GAME_GTA_IV]: "agrp-gtaiv", - [VRR_GAME_GTA_IV_EFLC]: "agrp-gtaiv", - [VRR_GAME_MAFIA_ONE]: "agrp-mafia1", - [VRR_GAME_MAFIA_TWO]: "agrp-mafia2", - [VRR_GAME_MAFIA_TWO]: "agrp-mafia3", - [VRR_GAME_MAFIA_ONE_DE]: "agrp-mafia1de", - [VRR_GAME_GTA_V]: "agrp-gtav", + [AGRP_GAME_GTA_III]: "agrp-gta3", + [AGRP_GAME_GTA_VC]: "agrp-gtavc", + [AGRP_GAME_GTA_SA]: "agrp-gtasa", + [AGRP_GAME_GTA_IV]: "agrp-gtaiv", + [AGRP_GAME_GTA_IV_EFLC]: "agrp-gtaiv", + [AGRP_GAME_MAFIA_ONE]: "agrp-mafia1", + [AGRP_GAME_MAFIA_TWO]: "agrp-mafia2", + [AGRP_GAME_MAFIA_TWO]: "agrp-mafia3", + [AGRP_GAME_MAFIA_ONE_DE]: "agrp-mafia1de", + [AGRP_GAME_GTA_V]: "agrp-gtav", }; // =========================================================================== let gameData = { weaponNames: { - [VRR_GAME_GTA_III]: [ // GTA III + [AGRP_GAME_GTA_III]: [ // GTA III "Fist", "Bat", "Pistol", @@ -216,7 +216,7 @@ let gameData = { "Molotov", "Grenade" ], - [VRR_GAME_GTA_VC]: [ // GTA VC + [AGRP_GAME_GTA_VC]: [ // GTA VC "Fist", "Brass Knuckles", "Screwdriver", @@ -252,7 +252,7 @@ let gameData = { "M60", "Minigun" ], - [VRR_GAME_GTA_SA]: [ // GTA San Andreas + [AGRP_GAME_GTA_SA]: [ // GTA San Andreas "Fist", "Brass Knuckles", "Golf Club", @@ -304,7 +304,7 @@ let gameData = { "Jetpack", "Skateboard" ], - [VRR_GAME_GTA_IV]: [ // GTA IV + [AGRP_GAME_GTA_IV]: [ // GTA IV "Fist", "Bat", "Pool Cue", @@ -352,7 +352,7 @@ let gameData = { "EFLC Weapon 24", "Camera", ], - [VRR_GAME_GTA_IV_EFLC]: [ // GTA IV (EFLC) + [AGRP_GAME_GTA_IV_EFLC]: [ // GTA IV (EFLC) "Fist", "Bat", "Pool Cue", @@ -400,7 +400,7 @@ let gameData = { "EFLC Weapon 24", "Camera", ], - [VRR_GAME_MAFIA_ONE]: { // Mafia 1 + [AGRP_GAME_MAFIA_ONE]: { // Mafia 1 2: "Knuckle Duster", 3: "Knife", 4: "Baseball Bat", @@ -423,12 +423,12 @@ let gameData = { 31: "Sword", 32: "Dogs Head", }, - [VRR_GAME_GTA_V]: { // GTA V + [AGRP_GAME_GTA_V]: { // GTA V } }, weatherNames: { - [VRR_GAME_GTA_III]: [ // GTA III + [AGRP_GAME_GTA_III]: [ // GTA III "Clear", "Overcast", "Thunderstorm", @@ -440,7 +440,7 @@ let gameData = { "Overcast/Cloudy", "Grey/Cloudy" ], - [VRR_GAME_GTA_VC]: [ // GTA Vice City + [AGRP_GAME_GTA_VC]: [ // GTA Vice City "Partly Cloudy", "Overcast", "Thunderstorm", @@ -452,7 +452,7 @@ let gameData = { "Overcast/Cloudy", "Grey/Cloudy" ], - [VRR_GAME_GTA_SA]: [ // GTA San Andreas + [AGRP_GAME_GTA_SA]: [ // GTA San Andreas "Blue Skies", "Blue Skies", "Blue Skies", @@ -475,7 +475,7 @@ let gameData = { "Sandstorm", "Greenish/Foggy" ], - [VRR_GAME_GTA_IV]: [ // GTA IV + [AGRP_GAME_GTA_IV]: [ // GTA IV "Extra Sunny", "Sunny", "Sunny/Windy", @@ -487,7 +487,7 @@ let gameData = { "Extra Sunny", "Sunny/Windy", ], - [VRR_GAME_GTA_IV_EFLC]: [ // GTA IV EFLC + [AGRP_GAME_GTA_IV_EFLC]: [ // GTA IV EFLC "Extra Sunny", "Sunny", "Sunny/Windy", @@ -499,21 +499,21 @@ let gameData = { "Extra Sunny", "Sunny/Windy", ], - [VRR_GAME_GTA_V]: [ + [AGRP_GAME_GTA_V]: [ ], }, gameNames: { - [VRR_GAME_GTA_III]: "GTA III", - [VRR_GAME_GTA_VC]: "GTA Vice City", - [VRR_GAME_GTA_SA]: "GTA San Andreas", - [VRR_GAME_GTA_IV]: "GTA IV", - [VRR_GAME_GTA_IV_EFLC]: "GTA IV: Episodes from Liberty City", - [VRR_GAME_MAFIA_ONE]: "Mafia: The City of Lost Heaven", - [VRR_GAME_MAFIA_TWO]: "Mafia II", - [VRR_GAME_MAFIA_THREE]: "Mafia III", - [VRR_GAME_MAFIA_ONE_DE]: "Mafia Definitive Edition", - [VRR_GAME_GTA_V]: "GTA V", + [AGRP_GAME_GTA_III]: "GTA III", + [AGRP_GAME_GTA_VC]: "GTA Vice City", + [AGRP_GAME_GTA_SA]: "GTA San Andreas", + [AGRP_GAME_GTA_IV]: "GTA IV", + [AGRP_GAME_GTA_IV_EFLC]: "GTA IV: Episodes from Liberty City", + [AGRP_GAME_MAFIA_ONE]: "Mafia: The City of Lost Heaven", + [AGRP_GAME_MAFIA_TWO]: "Mafia II", + [AGRP_GAME_MAFIA_THREE]: "Mafia III", + [AGRP_GAME_MAFIA_ONE_DE]: "Mafia Definitive Edition", + [AGRP_GAME_GTA_V]: "GTA V", }, vehicleWheelStateNames: [ "normal", @@ -539,7 +539,7 @@ let gameData = { "rear right" ], vehicleRadioStationNames: { - [VRR_GAME_GTA_III]: [ // GTA III + [AGRP_GAME_GTA_III]: [ // GTA III "Head Radio", "Double Cleff FM", "Jah Radio", @@ -549,7 +549,7 @@ let gameData = { "Chatterbox 109", "MP3 Player" ], - [VRR_GAME_GTA_VC]: [ // GTA Vice City + [AGRP_GAME_GTA_VC]: [ // GTA Vice City "Wildstyle", "Flash FM", "K CHAT", @@ -561,7 +561,7 @@ let gameData = { "Wave 103", "MP3 Player" ], - [VRR_GAME_GTA_SA]: [ // GTA San Andreas + [AGRP_GAME_GTA_SA]: [ // GTA San Andreas "K-ROSE", "K-DST", "Bounce FM", @@ -574,7 +574,7 @@ let gameData = { "WCTR", "User Track Player" ], - [VRR_GAME_GTA_V]: [ // GTA San Andreas + [AGRP_GAME_GTA_V]: [ // GTA San Andreas "K-ROSE", "K-DST", "Bounce FM", @@ -589,7 +589,7 @@ let gameData = { ], }, skins: { - [VRR_GAME_GTA_III]: [ + [AGRP_GAME_GTA_III]: [ [0, "Claude", false], [1, "Police Officer", false], [2, "SWAT Officer", false], @@ -713,7 +713,7 @@ let gameData = { [125, "Busker 3", false], [125, "Busker 4", false], ], - [VRR_GAME_GTA_VC]: [ + [AGRP_GAME_GTA_VC]: [ [0, "Tommy Vercetti", false], [1, "Police Officer", false], [2, "SWAT Officer", false], @@ -902,7 +902,7 @@ let gameData = { [186, "Kent Paul", true], [187, "Big Head Taxi Driver", false], ], - [VRR_GAME_GTA_SA]: [ + [AGRP_GAME_GTA_SA]: [ [0, "Carl 'CJ' Johnson", false], [1, "The Truth", true], [2, "Maccer", true], @@ -1204,7 +1204,7 @@ let gameData = { [312, "Army Guy", true], [313, "Barry Big Bear Thorne (Fat)", true], ], - [VRR_GAME_GTA_IV]: [ + [AGRP_GAME_GTA_IV]: [ [-2020305438, "Male Multiplayer", false], [-641875910, "Female Multiplayer", false], [-1370810922, "MODEL_SUPERLOD", false], @@ -1551,7 +1551,7 @@ let gameData = { [-1139941790, "Tough Guy", true], [809067472, "Male Tourist", true] ], - [VRR_GAME_MAFIA_ONE]: [ + [AGRP_GAME_MAFIA_ONE]: [ ["Tommy.i3d", "Tommy Angelo", true], ["TommyBOXER.i3d", "Tommy Angelo", true], ["TommyCOAT.i3d", "Tommy Angelo", false], @@ -1849,7 +1849,7 @@ let gameData = { ["Sarah2LOW.i3d", "Sarah", true], ["Serv01.i3d", "Maid", true], ], - [VRR_GAME_GTA_V]: [ + [AGRP_GAME_GTA_V]: [ ["a_c_boar", 0xCE5FF074, false], ["a_c_cat_01", 0x573201B8, false], ["a_c_chickenhawk", 0xAAB71F62, false], @@ -2592,7 +2592,7 @@ let gameData = { ] }, vehicles: { - [VRR_GAME_GTA_III]: [ + [AGRP_GAME_GTA_III]: [ [90, "Landstalker"], [91, "Idaho"], [92, "Stinger"], @@ -2655,7 +2655,7 @@ let gameData = { [149, "Toyz Van"], [150, "Ghost"], ], - [VRR_GAME_GTA_VC]: [ // GTA VC + [AGRP_GAME_GTA_VC]: [ // GTA VC [130, "Landstalker"], [131, "Idaho"], [132, "Stinger"], @@ -2764,7 +2764,7 @@ let gameData = { [235, "Bloodring Banger 2"], [236, "VCPD Cheetah"], ], - [VRR_GAME_GTA_SA]: [ // GTA San Andreas + [AGRP_GAME_GTA_SA]: [ // GTA San Andreas [400, "Landstalker"], [401, "Bravura"], [402, "Buffalo"], @@ -2978,7 +2978,7 @@ let gameData = { [610, "Farm Plow"], [611, "Utility Trailer"], ], - [VRR_GAME_GTA_IV]: [ // GTA IV + [AGRP_GAME_GTA_IV]: [ // GTA IV [1264341792, "Admiral"], [1560980623, "Airtug"], [1171614426, "Ambulance"], @@ -3107,7 +3107,7 @@ let gameData = { [800869680, "Subway"], [-1953988645, "El Train"], ], - [VRR_GAME_MAFIA_ONE]: [ // Mafia 1 + [AGRP_GAME_MAFIA_ONE]: [ // Mafia 1 ["fordtTud00.i3d", "Blue Bolt Ace Tudor"], ["fordtTud01.i3d", "Dark Blue Bolt Ace Tudor"], ["fordtTud02.i3d", "Brown Bolt Ace Tudor"], @@ -3260,7 +3260,7 @@ let gameData = { ["TruckBxx00.i3d", "Bolt Truck(Atlantic Import)"], ["truckBx00.i3d", "Bolt Truck"], ], - [VRR_GAME_GTA_V]: [ + [AGRP_GAME_GTA_V]: [ ["adder", 3078201489], ["airbus", 1283517198], ["airtug", 1560980623], @@ -4004,7 +4004,7 @@ let gameData = { ] }, objects: { - [VRR_GAME_GTA_III]: [ + [AGRP_GAME_GTA_III]: [ [172, "BaseballBat"], [173, "Colt45"], [178, "Uzi"], @@ -4033,7 +4033,7 @@ let gameData = { [1349, "StraightRoadBarrier"] [1337, "YellowBarrel"], ], - [VRR_GAME_GTA_VC]: [ // GTA VC + [AGRP_GAME_GTA_VC]: [ // GTA VC [259, "BrassKnuckles"], [260, "Screwdriver"], [261, "GolfClub"], @@ -4081,7 +4081,7 @@ let gameData = { [597, "SodaBottle"], [502, "GenericPackage2"] ], - [VRR_GAME_GTA_SA]: [ // GTA SA + [AGRP_GAME_GTA_SA]: [ // GTA SA [331, "BrassKnuckles"], [333, "GolfClub"], [334, "Nitestick"], @@ -4138,27 +4138,27 @@ let gameData = { [1544, "BottleSoda"], [2601, "CanSoda"], ], - [VRR_GAME_GTA_IV]: [ + [AGRP_GAME_GTA_IV]: [ [0, "GenericPackage"], ], - [VRR_GAME_GTA_V]: [ + [AGRP_GAME_GTA_V]: [ [0, "GenericPackage"], ], - [VRR_GAME_MAFIA_ONE]: [ + [AGRP_GAME_MAFIA_ONE]: [ [0, "GenericPackage"], ], - [VRR_GAME_MAFIA_TWO]: [ + [AGRP_GAME_MAFIA_TWO]: [ [0, "GenericPackage"], ], - [VRR_GAME_MAFIA_THREE]: [ + [AGRP_GAME_MAFIA_THREE]: [ [0, "GenericPackage"], ], - [VRR_GAME_MAFIA_ONE_DE]: [ + [AGRP_GAME_MAFIA_ONE_DE]: [ [0, "GenericPackage"], ], }, weaponModels: { - [VRR_GAME_GTA_III]: [ // GTA III + [AGRP_GAME_GTA_III]: [ // GTA III 0, // Fist 172, // Baseball Bat 173, // Colt 45 @@ -4172,7 +4172,7 @@ let gameData = { 174, // Molotov Cocktail 170 // Grenade ], - [VRR_GAME_GTA_VC]: [ // GTA Vice City + [AGRP_GAME_GTA_VC]: [ // GTA Vice City 0, 259, 260, @@ -4211,12 +4211,12 @@ let gameData = { -1, 292 ], - [VRR_GAME_GTA_V]: [ + [AGRP_GAME_GTA_V]: [ ] }, locations: { - [VRR_GAME_GTA_III]: [ // GTA III + [AGRP_GAME_GTA_III]: [ // GTA III // Police Stations ["Portland Police Station", [1143.875, -675.1875, 14.97], 0.0, [1127.95, -666.06, 14.413]], ["Staunton Island Police Station", [340.25, -1123.375, 25.98], 0.0, null], @@ -4276,7 +4276,7 @@ let gameData = { ["Hepburn Heights Projects", [913.98, -227.83, 4.413], 0.001, null], ], - [VRR_GAME_GTA_VC]: [ // GTA VC + [AGRP_GAME_GTA_VC]: [ // GTA VC // Police Stations ["Washington Beach Police Station", [399.77, -468.90, 11.73], 0.0, null], ["Vice Point Police Station", [508.96, 512.07, 12.10], 0.0, null], @@ -4325,7 +4325,7 @@ let gameData = { ["Ocean Beach Pay-n-spray", [-18.51, -1256.76, 10.463], -1.556, null], ], - [VRR_GAME_GTA_SA]: [ // GTA SA + [AGRP_GAME_GTA_SA]: [ // GTA SA // Police Stations ["Los Santos Police Department", [1545.53, -1675.64, 13.561], -1.575, null], ["San Fierro Police Department", [-1605.16, 720.79, 11.90], 0.0, null], @@ -4384,7 +4384,7 @@ let gameData = { ["Market Station", [814.26, -1345.38, 13.532], -1.624, null], ], - [VRR_GAME_GTA_IV]: [ // GTA IV + [AGRP_GAME_GTA_IV]: [ // GTA IV // Police Stations ["Broker Police Station", [894.99, -357.39, 18.185], 2.923, null], ["South Bohan Police Station", [435.40, 1592.29, 17.353], 3.087, null], @@ -4496,7 +4496,7 @@ let gameData = { // More will be added soon! ], - [VRR_GAME_MAFIA_ONE]: [ + [AGRP_GAME_MAFIA_ONE]: [ ["Works Quarter Fire Station", [-1883.96, -4.89, -348.49], null], ["Salieri's Bar", [-1774.59, -5.62, 3.29], null], ["Little Italy Gas Station", [-1781.84, -4.83, -204.96], null], @@ -4509,7 +4509,7 @@ let gameData = { ], // Mafia 1 }, weaponSlots: { - [VRR_GAME_GTA_III]: [ + [AGRP_GAME_GTA_III]: [ 0, 1, 2, @@ -4523,7 +4523,7 @@ let gameData = { 10, 11 ], - [VRR_GAME_GTA_VC]: [ + [AGRP_GAME_GTA_VC]: [ 0, 0, 1, @@ -4562,7 +4562,7 @@ let gameData = { -1, 9, ], - [VRR_GAME_GTA_SA]: [ + [AGRP_GAME_GTA_SA]: [ 0, 1, 1, @@ -4616,7 +4616,7 @@ let gameData = { ] }, fightStyles: { - [VRR_GAME_GTA_SA]: [ // GTA SA + [AGRP_GAME_GTA_SA]: [ // GTA SA ["Default", [4, 6]], ["Boxing", [5, 6]], ["Kung Fu", [6, 6]], @@ -4625,7 +4625,7 @@ let gameData = { ], }, walkStyles: { - [VRR_GAME_GTA_III]: [ // GTA III + [AGRP_GAME_GTA_III]: [ // GTA III "Man", "Ped", "Player", @@ -4656,7 +4656,7 @@ let gameData = { }, animations: { // [name, groupId, animId, animType, deltaTime, null, null, null, null, moveType], - [VRR_GAME_GTA_III]: [ // GTA III + [AGRP_GAME_GTA_III]: [ // GTA III new AnimationData("talk", { groupId: 0, animId: 11 }), new AnimationData("chat", { groupId: 0, animId: 11 }), @@ -4671,14 +4671,14 @@ let gameData = { new AnimationData("aimdown", { groupId: 0, animId: 160 }), new AnimationData("aimcrouch", { groupId: 0, animId: 165 }), new AnimationData("throw", { groupId: 0, animId: 166 }), - new AnimationData("handsup", { groupId: 0, animId: 167, animType: VRR_ANIMTYPE_SURRENDER }), + new AnimationData("handsup", { groupId: 0, animId: 167, animType: AGRP_ANIMTYPE_SURRENDER }), new AnimationData("sit", { groupId: 0, animId: 111 }), - new AnimationData("sitleft", { groupId: 0, animId: 111, moveType: VRR_ANIMMOVE_LEFT }), - new AnimationData("sitback", { groupId: 0, animId: 111, moveType: VRR_ANIMMOVE_BACK }), - new AnimationData("sitright", { groupId: 0, animId: 111, moveType: VRR_ANIMMOVE_RIGHT }), - new AnimationData("sitforward", { groupId: 0, animId: 111, moveType: VRR_ANIMMOVE_FORWARD }), - new AnimationData("sitarmright", { groupId: 0, animId: 120, moveType: VRR_ANIMMOVE_BACK }), - new AnimationData("tazed", { groupId: 0, animId: 13, animType: VRR_ANIMTYPE_FORCED }), + new AnimationData("sitleft", { groupId: 0, animId: 111, moveType: AGRP_ANIMMOVE_LEFT }), + new AnimationData("sitback", { groupId: 0, animId: 111, moveType: AGRP_ANIMMOVE_BACK }), + new AnimationData("sitright", { groupId: 0, animId: 111, moveType: AGRP_ANIMMOVE_RIGHT }), + new AnimationData("sitforward", { groupId: 0, animId: 111, moveType: AGRP_ANIMMOVE_FORWARD }), + new AnimationData("sitarmright", { groupId: 0, animId: 120, moveType: AGRP_ANIMMOVE_BACK }), + new AnimationData("tazed", { groupId: 0, animId: 13, animType: AGRP_ANIMTYPE_FORCED }), new AnimationData("walk", { groupId: 0, animId: 0 }), new AnimationData("jog", { groupId: 0, animId: 1 }), new AnimationData("tired", { groupId: 0, animId: 9 }), @@ -4694,13 +4694,13 @@ let gameData = { new AnimationData("roundhouse", { groupId: 0, animId: 75 }), new AnimationData("highkick", { groupId: 0, animId: 71 }), new AnimationData("phonetalk", { groupId: 0, animId: 172 }), - new AnimationData("handcuffed", { groupId: 0, animId: 8, animType: VRR_ANIMTYPE_FORCED }), + new AnimationData("handcuffed", { groupId: 0, animId: 8, animType: AGRP_ANIMTYPE_FORCED }), ], - [VRR_GAME_GTA_VC]: [ // GTA VC + [AGRP_GAME_GTA_VC]: [ // GTA VC new AnimationData("talk", { groupId: 0, animId: 11 }), new AnimationData("chat", { groupId: 0, animId: 11 }), new AnimationData("hailtaxi", { groupId: 0, animId: 12 }), - new AnimationData("handsup", { groupId: 0, animId: 161, animType: VRR_ANIMTYPE_SURRENDER }), + new AnimationData("handsup", { groupId: 0, animId: 161, animType: AGRP_ANIMTYPE_SURRENDER }), new AnimationData("flipoff", { groupId: 0, animId: 163 }), new AnimationData("phoneout", { groupId: 0, animId: 164 }), new AnimationData("phonein", { groupId: 0, animId: 165 }), @@ -4720,11 +4720,11 @@ let gameData = { new AnimationData("dance6", { groupId: 28, animId: 231 }), new AnimationData("dance7", { groupId: 28, animId: 232 }), new AnimationData("pressbutton", { groupId: 0, animId: 62 }), - new AnimationData("sitright", { groupId: 0, animId: 169, moveType: VRR_ANIMMOVE_RIGHT }), - new AnimationData("sitleft", { groupId: 0, animId: 169, moveType: VRR_ANIMMOVE_LEFT }), - new AnimationData("sitforward", { groupId: 0, animId: 169, moveType: VRR_ANIMMOVE_FORWARD }), - new AnimationData("sitback", { groupId: 0, animId: 169, moveType: VRR_ANIMMOVE_BACK }), - new AnimationData("tazed", { groupId: 0, animId: 13, animType: VRR_ANIMTYPE_FORCED }), + new AnimationData("sitright", { groupId: 0, animId: 169, moveType: AGRP_ANIMMOVE_RIGHT }), + new AnimationData("sitleft", { groupId: 0, animId: 169, moveType: AGRP_ANIMMOVE_LEFT }), + new AnimationData("sitforward", { groupId: 0, animId: 169, moveType: AGRP_ANIMMOVE_FORWARD }), + new AnimationData("sitback", { groupId: 0, animId: 169, moveType: AGRP_ANIMMOVE_BACK }), + new AnimationData("tazed", { groupId: 0, animId: 13, animType: AGRP_ANIMTYPE_FORCED }), new AnimationData("fightidle1", { groupId: 0, animId: 45 }), new AnimationData("highkick1", { groupId: 0, animId: 50 }), new AnimationData("kneekick", { groupId: 0, animId: 51 }), @@ -4747,14 +4747,14 @@ let gameData = { new AnimationData("pose", { groupId: 0, animId: 172 }), new AnimationData("holdrifle", { groupId: 0, animId: 10 }), new AnimationData("tired", { groupId: 0, animId: 9 }), - new AnimationData("handcuffed", { groupId: 0, animId: 9, animType: VRR_ANIMTYPE_FORCED }), + new AnimationData("handcuffed", { groupId: 0, animId: 9, animType: AGRP_ANIMTYPE_FORCED }), new AnimationData("walk", { groupId: 0, animId: 0 }), new AnimationData("jog", { groupId: 0, animId: 1 }), new AnimationData("headscratch", { groupId: 0, animId: 152 }), new AnimationData("lookaround", { groupId: 0, animId: 153 }), ], - [VRR_GAME_GTA_SA]: [ // GTA SA + [AGRP_GAME_GTA_SA]: [ // GTA SA new AnimationData("knockback", { groupId: 0, animId: 105 }), new AnimationData("idle1", { groupId: 0, animId: 135 }), new AnimationData("cower", { groupId: 0, animId: 141 }), @@ -4771,51 +4771,51 @@ let gameData = { new AnimationData("gestureyes", { groupId: 0, animId: 167 }), new AnimationData("wave2", { groupId: 0, animId: 168 }), new AnimationData("snort", { groupId: 0, animId: 169 }), - new AnimationData("sitright", { groupId: 0, animId: 150, moveType: VRR_ANIMMOVE_RIGHT }), - new AnimationData("sitleft", { groupId: 0, animId: 150, moveType: VRR_ANIMMOVE_LEFT }), - new AnimationData("sitforward", { groupId: 0, animId: 150, moveType: VRR_ANIMMOVE_FORWARD }), - new AnimationData("sitback", { groupId: 0, animId: 150, moveType: VRR_ANIMMOVE_BACK }), - new AnimationData("tazed", { groupId: 0, animId: 15, moveType: VRR_ANIMTYPE_FORCED }), + new AnimationData("sitright", { groupId: 0, animId: 150, moveType: AGRP_ANIMMOVE_RIGHT }), + new AnimationData("sitleft", { groupId: 0, animId: 150, moveType: AGRP_ANIMMOVE_LEFT }), + new AnimationData("sitforward", { groupId: 0, animId: 150, moveType: AGRP_ANIMMOVE_FORWARD }), + new AnimationData("sitback", { groupId: 0, animId: 150, moveType: AGRP_ANIMMOVE_BACK }), + new AnimationData("tazed", { groupId: 0, animId: 15, moveType: AGRP_ANIMTYPE_FORCED }), /* - ["talk", "PED", "IDLE_CHAT", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - ["fucku", "PED", "FUCKU", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - ["taichi", "PARK", "Tai_Chi_Loop", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - ["slapass", "SWEET", "sweet_ass_slap", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - ["wave", "ON_LOOKERS", "wave_loop", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - ["vomit", "EAT_Vomit_P", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - ["cower", "ped", "cower", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - ["laugh", "RAPPING", "Laugh_01", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - ["plant", "BOMBER", "BOM_Plant", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - ["smoke1", "SMOKING","M_smklean_loop", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - ["smoke2", "SMOKING","F_smklean_loop", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - ["smoke3", "SMOKING","M_smkstnd_loop", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - ["sit1", "ped","SEAT_idle", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - ["sit2", "BEACH", "ParkSit_M_loop", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - ["sit3", "BEACH", "ParkSit_W_loop", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - ["sit4", "BEACH", "SitnWait_loop_W", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - ["scratch", "MISC","Scratchballs_01", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - ["standup", "ped", "SEAT_up", VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null], - //["faceshocked", 0, 150, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - //["facesurprised", 0, 150, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - //["faceconfused", 0, 150, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - //["faceangry", 0, 159, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], - //["facetalk1", 0, 160, VRR_ANIMTYPE_NORMAL, 0.0, null, null, null, null, VRR_ANIMMOVE_NONE], + ["talk", "PED", "IDLE_CHAT", AGRP_ANIMTYPE_NORMAL, 0.0, null, null, null, null], + ["fucku", "PED", "FUCKU", AGRP_ANIMTYPE_NORMAL, 0.0, null, null, null, null], + ["taichi", "PARK", "Tai_Chi_Loop", AGRP_ANIMTYPE_NORMAL, 0.0, null, null, null, null], + ["slapass", "SWEET", "sweet_ass_slap", AGRP_ANIMTYPE_NORMAL, 0.0, null, null, null, null], + ["wave", "ON_LOOKERS", "wave_loop", AGRP_ANIMTYPE_NORMAL, 0.0, null, null, null, null], + ["vomit", "EAT_Vomit_P", AGRP_ANIMTYPE_NORMAL, 0.0, null, null, null, null], + ["cower", "ped", "cower", AGRP_ANIMTYPE_NORMAL, 0.0, null, null, null, null], + ["laugh", "RAPPING", "Laugh_01", AGRP_ANIMTYPE_NORMAL, 0.0, null, null, null, null], + ["plant", "BOMBER", "BOM_Plant", AGRP_ANIMTYPE_NORMAL, 0.0, null, null, null, null], + ["smoke1", "SMOKING","M_smklean_loop", AGRP_ANIMTYPE_NORMAL, 0.0, null, null, null, null], + ["smoke2", "SMOKING","F_smklean_loop", AGRP_ANIMTYPE_NORMAL, 0.0, null, null, null, null], + ["smoke3", "SMOKING","M_smkstnd_loop", AGRP_ANIMTYPE_NORMAL, 0.0, null, null, null, null], + ["sit1", "ped","SEAT_idle", AGRP_ANIMTYPE_NORMAL, 0.0, null, null, null, null], + ["sit2", "BEACH", "ParkSit_M_loop", AGRP_ANIMTYPE_NORMAL, 0.0, null, null, null, null], + ["sit3", "BEACH", "ParkSit_W_loop", AGRP_ANIMTYPE_NORMAL, 0.0, null, null, null, null], + ["sit4", "BEACH", "SitnWait_loop_W", AGRP_ANIMTYPE_NORMAL, 0.0, null, null, null, null], + ["scratch", "MISC","Scratchballs_01", AGRP_ANIMTYPE_NORMAL, 0.0, null, null, null, null], + ["standup", "ped", "SEAT_up", AGRP_ANIMTYPE_NORMAL, 0.0, null, null, null, null], + //["faceshocked", 0, 150, AGRP_ANIMTYPE_NORMAL, 0.0, null, null, null, null, AGRP_ANIMMOVE_NONE], + //["facesurprised", 0, 150, AGRP_ANIMTYPE_NORMAL, 0.0, null, null, null, null, AGRP_ANIMMOVE_NONE], + //["faceconfused", 0, 150, AGRP_ANIMTYPE_NORMAL, 0.0, null, null, null, null, AGRP_ANIMMOVE_NONE], + //["faceangry", 0, 159, AGRP_ANIMTYPE_NORMAL, 0.0, null, null, null, null, AGRP_ANIMMOVE_NONE], + //["facetalk1", 0, 160, AGRP_ANIMTYPE_NORMAL, 0.0, null, null, null, null, AGRP_ANIMMOVE_NONE], */ ], - [VRR_GAME_GTA_IV]: [ // GTA IV + [AGRP_GAME_GTA_IV]: [ // GTA IV new AnimationData("dance1", { groupId: "DAN_LOOP_A", animId: "DANCING", animSpeed: 16.0, infiniteLoop: true, infiniteLoopNoMovement: false, dontReturnToStartCoords: true, freezeLastFrame: false }), ], }, meleeWeapons: { - [VRR_GAME_GTA_III]: [1], - [VRR_GAME_GTA_VC]: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], - [VRR_GAME_GTA_SA]: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], - [VRR_GAME_GTA_IV]: [1, 2, 3], - [VRR_GAME_GTA_IV_EFLC]: [1, 2, 3], + [AGRP_GAME_GTA_III]: [1], + [AGRP_GAME_GTA_VC]: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], + [AGRP_GAME_GTA_SA]: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], + [AGRP_GAME_GTA_IV]: [1, 2, 3], + [AGRP_GAME_GTA_IV_EFLC]: [1, 2, 3], }, blipSprites: { - [VRR_GAME_GTA_III]: { // GTA III + [AGRP_GAME_GTA_III]: { // GTA III PoliceStation: 8, FireStation: 9, Hospital: 12, @@ -4843,7 +4843,7 @@ let gameData = { Home: 17, Tony: 19, }, - [VRR_GAME_GTA_VC]: { // GTA VC + [AGRP_GAME_GTA_VC]: { // GTA VC PoliceStation: 0, FireStation: 0, Hospital: 0, @@ -4862,7 +4862,7 @@ let gameData = { Tools: 18, Bar: 11, }, - [VRR_GAME_GTA_SA]: { // GTA SA + [AGRP_GAME_GTA_SA]: { // GTA SA PoliceStation: 30, FireStation: 20, Hospital: 22, @@ -4892,7 +4892,7 @@ let gameData = { Race: 53, Job: 56, }, - [VRR_GAME_GTA_IV]: { // GTA IV + [AGRP_GAME_GTA_IV]: { // GTA IV PoliceStation: 60, FireStation: 61, Hospital: 62, @@ -4932,7 +4932,7 @@ let gameData = { }, }, pickupModels: { - [VRR_GAME_GTA_III]: { // GTA 3 + [AGRP_GAME_GTA_III]: { // GTA 3 PoliceStation: 1361, FireStation: 1361, Hospital: 1361, @@ -4950,7 +4950,7 @@ let gameData = { Exit: 1361, Job: 1361, }, - [VRR_GAME_GTA_VC]: { // GTA Vice City + [AGRP_GAME_GTA_VC]: { // GTA Vice City PoliceStation: 375, FireStation: 406, Hospital: 366, @@ -4972,7 +4972,7 @@ let gameData = { KillFrenzy: 383, Pill: 367, }, - [VRR_GAME_GTA_SA]: { // GTA San Andreas + [AGRP_GAME_GTA_SA]: { // GTA San Andreas PoliceStation: 1247, FireStation: 1318, Hospital: 1240, @@ -4996,7 +4996,7 @@ let gameData = { RampageSkull: 1254, TwoPlayerRampage: 1313, }, - [VRR_GAME_GTA_IV]: { // GTA IV + [AGRP_GAME_GTA_IV]: { // GTA IV PoliceStation: -1, FireStation: -1, Hospital: -1, @@ -5016,7 +5016,7 @@ let gameData = { } }, pickupTypes: { - [VRR_GAME_GTA_III]: { // GTA 3 + [AGRP_GAME_GTA_III]: { // GTA 3 business: 255, house: 255, bank: 255, @@ -5024,7 +5024,7 @@ let gameData = { info: 255, job: 255, }, - [VRR_GAME_GTA_VC]: { // GTA Vice City + [AGRP_GAME_GTA_VC]: { // GTA Vice City business: 255, house: 255, bank: 255, @@ -5032,7 +5032,7 @@ let gameData = { info: 255, job: 255, }, - [VRR_GAME_GTA_SA]: { // GTA San Andreas + [AGRP_GAME_GTA_SA]: { // GTA San Andreas business: 1, house: 1, bank: 1, @@ -5040,7 +5040,7 @@ let gameData = { info: 1, job: 1, }, - [VRR_GAME_GTA_IV]: { // GTA IV + [AGRP_GAME_GTA_IV]: { // GTA IV business: -1, house: -1, bank: -1, @@ -5052,17 +5052,17 @@ let gameData = { // THIS IS SCREEN HEIGHT, NOT ACTUAL DOOR POSITION IN THE WORLD propertyLabelHeight: { - [VRR_GAME_GTA_III]: 85, - [VRR_GAME_GTA_VC]: 85, - [VRR_GAME_GTA_SA]: 85, - [VRR_GAME_GTA_IV]: 85, - [VRR_GAME_GTA_IV_EFLC]: 85, - VRR_GAME_GTA_MAFIA_ONE: 85, - VRR_GAME_GTA_MAFIA_TWO: 85, - VRR_GAME_GTA_MAFIA_THREE: 85, + [AGRP_GAME_GTA_III]: 85, + [AGRP_GAME_GTA_VC]: 85, + [AGRP_GAME_GTA_SA]: 85, + [AGRP_GAME_GTA_IV]: 85, + [AGRP_GAME_GTA_IV_EFLC]: 85, + AGRP_GAME_GTA_MAFIA_ONE: 85, + AGRP_GAME_GTA_MAFIA_TWO: 85, + AGRP_GAME_GTA_MAFIA_THREE: 85, }, defaultBusinessItems: { - [VRR_GAME_GTA_III]: { // GTA III + [AGRP_GAME_GTA_III]: { // GTA III ClothingStore: [ ["Outfit", 500, 2] ], @@ -5192,7 +5192,7 @@ let gameData = { ["Vehicle Secondary Colour Kit", 500, 2], ], }, - [VRR_GAME_GTA_VC]: { // GTA VC + [AGRP_GAME_GTA_VC]: { // GTA VC ClothingStore: [ ["Outfit", 500, 2] ], @@ -5334,7 +5334,7 @@ let gameData = { ["Vehicle Secondary Colour Kit", 500, 2], ], }, - [VRR_GAME_GTA_SA]: { // GTA SA + [AGRP_GAME_GTA_SA]: { // GTA SA ClothingStore: [ ["Outfit", 500, 2] ], @@ -5502,7 +5502,7 @@ let gameData = { ["Hydraulics", 500, 2], ], }, - [VRR_GAME_GTA_IV]: { // GTA IV + [AGRP_GAME_GTA_IV]: { // GTA IV ClothingStore: [ ["Outfit", 500, 2] ], @@ -5640,7 +5640,7 @@ let gameData = { ["Vehicle Secondary Colour Kit", 500, 2], ], }, - [VRR_GAME_MAFIA_ONE]: { // Mafia 1 + [AGRP_GAME_MAFIA_ONE]: { // Mafia 1 ClothingStore: [ ["Outfit", 500, 2] ], @@ -5777,7 +5777,7 @@ let gameData = { } }, interiors: { - [VRR_GAME_GTA_III]: { + [AGRP_GAME_GTA_III]: { Apartment1: [toVector3(891.87, -308.28, 8.72), 0, false, -1], JailCell: [toVector3(328.40, -1093.31, 25.98), 0, false, -1], Church: [toVector3(13.87, -1122.43, 26.12), 0, false, -1], @@ -5786,7 +5786,7 @@ let gameData = { JoeyGarage: [toVector3(1189.40, -867.69, 15.18), 0, false, -1], Warehouse: [toVector3(1497.46, -680.18, 12.14), 0, false, -1], }, - [VRR_GAME_GTA_VC]: { // GTA VC + [AGRP_GAME_GTA_VC]: { // GTA VC Mall: [toVector3(379.62, 1007.00, 19.22), 4, false, -1], MalibuClub: [toVector3(489.83, -76.49, 11.48), 17, false, -1], PoliceStation: [toVector3(396.38, -472.96, 12.34), 12, false, -1], @@ -5809,7 +5809,7 @@ let gameData = { BusinessOfficeLobby: [toVector3(-573.64, 794.53, 22.88), 0, false, -1], }, - [VRR_GAME_GTA_SA]: { // GTA SA + [AGRP_GAME_GTA_SA]: { // GTA SA LSPD: [toVector3(247.113, 62.929, 1003.64), 2, false, -1], LVPD: [toVector3(288.82, 167.39, 1007.17), 3, false, -1], SFPD: [toVector3(246.40, 110.84, 1003.22), 10, false, -1], @@ -5909,7 +5909,7 @@ let gameData = { Courthouse: [toVector3(1219.51, -1792.69, 2431.34), 0, true, -1], }, - [VRR_GAME_GTA_IV]: { // GTA IV + [AGRP_GAME_GTA_IV]: { // GTA IV Office2: [toVector3(-1153.30, 417.37, 5.578), 0, false, -1], House1: [toVector3(-426.16, 1466.52, 38.971), 0, false, -1], House2: [toVector3(-969.77, 883.27, 18.817), 0, false, -1], @@ -5939,23 +5939,23 @@ let gameData = { Prison: [toVector3(-1082.69, -364.05, 7.404), 0, false, -1], Ship: [toVector3(-336.53, -1494.56, 9.945), 0, false, -1], }, - [VRR_GAME_GTA_IV_EFLC]: { // GTA IV EFLC + [AGRP_GAME_GTA_IV_EFLC]: { // GTA IV EFLC }, - [VRR_GAME_MAFIA_ONE]: { // Mafia 1 + [AGRP_GAME_MAFIA_ONE]: { // Mafia 1 }, - [VRR_GAME_MAFIA_TWO]: { // Mafia 2 + [AGRP_GAME_MAFIA_TWO]: { // Mafia 2 }, - [VRR_GAME_MAFIA_THREE]: { // Mafia 3 + [AGRP_GAME_MAFIA_THREE]: { // Mafia 3 }, - [VRR_GAME_MAFIA_ONE_DE]: { // Mafia 1 Definitive Edition + [AGRP_GAME_MAFIA_ONE_DE]: { // Mafia 1 Definitive Edition }, }, skinChangePosition: { - [VRR_GAME_GTA_SA]: [toVector3(258.14, -41.76, 1002.023), 1.322, 14], + [AGRP_GAME_GTA_SA]: [toVector3(258.14, -41.76, 1002.023), 1.322, 14], }, policeStations: { - [VRR_GAME_GTA_III]: [ // GTA 3 + [AGRP_GAME_GTA_III]: [ // GTA 3 { position: toVector3(1143.875, -675.1875, 14.97), heading: 1.5, @@ -5975,7 +5975,7 @@ let gameData = { name: "Shoreside Vale", }, ], - [VRR_GAME_GTA_VC]: [ // GTA VC + [AGRP_GAME_GTA_VC]: [ // GTA VC { position: toVector3(399.77, -468.90, 11.73), heading: 0.0, @@ -6001,7 +6001,7 @@ let gameData = { name: "Little Havana", }, ], - [VRR_GAME_GTA_SA]: [ // GTA SA + [AGRP_GAME_GTA_SA]: [ // GTA SA { position: toVector3(1545.53, -1675.64, 13.561), heading: -1.575, @@ -6033,7 +6033,7 @@ let gameData = { name: "Dillimore", }, ], - [VRR_GAME_GTA_IV]: [ // GTA IV + [AGRP_GAME_GTA_IV]: [ // GTA IV { position: toVector3(894.99, -357.39, 18.185), @@ -6104,7 +6104,7 @@ let gameData = { ], }, fireStations: { - [VRR_GAME_GTA_III]: [ // GTA 3 + [AGRP_GAME_GTA_III]: [ // GTA 3 { position: toVector3(1103.70, -52.45, 7.49), heading: 1.5, @@ -6124,16 +6124,16 @@ let gameData = { name: "Shoreside Vale", }, ], - [VRR_GAME_GTA_VC]: [ // GTA VC + [AGRP_GAME_GTA_VC]: [ // GTA VC ], - [VRR_GAME_GTA_SA]: [ // GTA SA + [AGRP_GAME_GTA_SA]: [ // GTA SA ], - VRR_GAME_GTA_UG: [ // GTA UG + AGRP_GAME_GTA_UG: [ // GTA UG ], - [VRR_GAME_GTA_IV]: [ // GTA IV + [AGRP_GAME_GTA_IV]: [ // GTA IV { position: toVector3(953.13, 95.90, 35.004), heading: 1.595, @@ -6167,7 +6167,7 @@ let gameData = { ], }, hospitals: { - [VRR_GAME_GTA_III]: [ // GTA 3 + [AGRP_GAME_GTA_III]: [ // GTA 3 { position: toVector3(1144.25, -596.875, 14.97), heading: 1.5, @@ -6187,7 +6187,7 @@ let gameData = { name: "Shoreside Vale", }, ], - [VRR_GAME_GTA_VC]: [ // GTA VC + [AGRP_GAME_GTA_VC]: [ // GTA VC { position: toVector3(-883.56, -469.39, 13.11), heading: -1.5, @@ -6213,7 +6213,7 @@ let gameData = { name: "Vice Point Hospital", }, ], - [VRR_GAME_GTA_SA]: [ // GTA SA + [AGRP_GAME_GTA_SA]: [ // GTA SA { position: toVector3(1172.96, -1323.42, 15.40), heading: 1.5, @@ -6245,7 +6245,7 @@ let gameData = { name: "Fort Carson Medical Center", }, ], - [VRR_GAME_GTA_IV]: [ // GTA IV + [AGRP_GAME_GTA_IV]: [ // GTA IV { position: toVector3(1199.59, 196.78, 33.554), heading: 1.633, @@ -6271,7 +6271,7 @@ let gameData = { name: "Acter Medical Center", }, ], - [VRR_GAME_MAFIA_ONE]: [ + [AGRP_GAME_MAFIA_ONE]: [ // Mafia 1 { position: toVector3(-759.00, 11.40, 747.31), @@ -6282,7 +6282,7 @@ let gameData = { ], }, payAndSprays: { - [VRR_GAME_GTA_III]: [ // GTA 3 + [AGRP_GAME_GTA_III]: [ // GTA 3 { position: toVector3(925.4, -360.3, 10.83), blip: false, @@ -6301,7 +6301,7 @@ let gameData = { ], }, ammunations: { - [VRR_GAME_GTA_III]: [ // GTA 3 + [AGRP_GAME_GTA_III]: [ // GTA 3 { position: toVector3(1068.3, -400.9, 15.24), blip: false, @@ -6315,7 +6315,7 @@ let gameData = { ], }, fuelStations: { - [VRR_GAME_GTA_III]: [ // GTA 3 + [AGRP_GAME_GTA_III]: [ // GTA 3 { position: toVector3(1161.9, -76.73, 7.27), blip: false, @@ -6324,28 +6324,28 @@ let gameData = { ], }, taxiModels: { - [VRR_GAME_GTA_III]: [ // GTA III + [AGRP_GAME_GTA_III]: [ // GTA III 110, 128, 148 ], - [VRR_GAME_GTA_VC]: [ // GTA VC + [AGRP_GAME_GTA_VC]: [ // GTA VC 150, 160, 216 ], - [VRR_GAME_GTA_SA]: [// GTA SA + [AGRP_GAME_GTA_SA]: [// GTA SA 420, 438 ], - [VRR_GAME_GTA_IV]: [ // GTA IV + [AGRP_GAME_GTA_IV]: [ // GTA IV -1932515764, -956048545, 1208856469 ], }, vehicleComponents: { - [VRR_GAME_GTA_SA]: [ // GTA SA + [AGRP_GAME_GTA_SA]: [ // GTA SA [1000, "Pro Spoiler"], [1001, "Win Spoiler"], [1002, "Drag Spoiler"], @@ -6541,7 +6541,7 @@ let gameData = { ] }, fishingLocations: { - [VRR_GAME_GTA_SA]: [ // GTA San Andreas + [AGRP_GAME_GTA_SA]: [ // GTA San Andreas toVector3(403.8266, -2088.7598, 7.8359), toVector3(398.7553, -2088.7490, 7.8359), toVector3(396.2197, -2088.6692, 7.8359), @@ -6555,29 +6555,29 @@ let gameData = { ], }, mainWorldDimension: { - [VRR_GAME_GTA_III]: 0, // GTA 3 - [VRR_GAME_GTA_VC]: 0, // GTA VC - [VRR_GAME_GTA_SA]: 0, // GTA SA - [VRR_GAME_GTA_IV]: 0, // GTA IV - [VRR_GAME_GTA_IV_EFLC]: 0, // GTA IV EFLC - [VRR_GAME_MAFIA_ONE]: 0, // Mafia 1 - [VRR_GAME_MAFIA_TWO]: 0, // Mafia 2 - [VRR_GAME_MAFIA_THREE]: 0, // Mafia 3 - [VRR_GAME_MAFIA_ONE_DE]: 0, // Mafia Definitive Edition + [AGRP_GAME_GTA_III]: 0, // GTA 3 + [AGRP_GAME_GTA_VC]: 0, // GTA VC + [AGRP_GAME_GTA_SA]: 0, // GTA SA + [AGRP_GAME_GTA_IV]: 0, // GTA IV + [AGRP_GAME_GTA_IV_EFLC]: 0, // GTA IV EFLC + [AGRP_GAME_MAFIA_ONE]: 0, // Mafia 1 + [AGRP_GAME_MAFIA_TWO]: 0, // Mafia 2 + [AGRP_GAME_MAFIA_THREE]: 0, // Mafia 3 + [AGRP_GAME_MAFIA_ONE_DE]: 0, // Mafia Definitive Edition }, mainWorldInterior: { - [VRR_GAME_GTA_III]: 0, // GTA 3 - [VRR_GAME_GTA_VC]: 0, // GTA VC - [VRR_GAME_GTA_SA]: 0, // GTA SA - [VRR_GAME_GTA_IV]: 0, // GTA IV - [VRR_GAME_GTA_IV_EFLC]: 0, // GTA IV EFLC - [VRR_GAME_MAFIA_ONE]: 0, // Mafia 1 - [VRR_GAME_MAFIA_TWO]: 0, // Mafia 2 - [VRR_GAME_MAFIA_THREE]: 0, // Mafia 3 - [VRR_GAME_MAFIA_ONE_DE]: 0, // Mafia Definitive Edition + [AGRP_GAME_GTA_III]: 0, // GTA 3 + [AGRP_GAME_GTA_VC]: 0, // GTA VC + [AGRP_GAME_GTA_SA]: 0, // GTA SA + [AGRP_GAME_GTA_IV]: 0, // GTA IV + [AGRP_GAME_GTA_IV_EFLC]: 0, // GTA IV EFLC + [AGRP_GAME_MAFIA_ONE]: 0, // Mafia 1 + [AGRP_GAME_MAFIA_TWO]: 0, // Mafia 2 + [AGRP_GAME_MAFIA_THREE]: 0, // Mafia 3 + [AGRP_GAME_MAFIA_ONE_DE]: 0, // Mafia Definitive Edition }, properties: { - [VRR_GAME_GTA_VC]: { + [AGRP_GAME_GTA_VC]: { ApartmentBuilding1: { businesses: [ ["Manager's Office", 0, 0, toVector3(217.12, -1271.71, 12.09), toVector3(115.48, -823.76, 10.463), 6, null], diff --git a/scripts/shared/utilities.js b/scripts/shared/utilities.js index 6b7fb705..cde433d3 100644 --- a/scripts/shared/utilities.js +++ b/scripts/shared/utilities.js @@ -1411,7 +1411,7 @@ function getPercentage(num, per) { // =========================================================================== function getMultiplayerMod() { - return (getGame() >= 10) ? VRR_MPMOD_MAFIAC : VRR_MPMOD_GTAC; + return (getGame() >= 10) ? AGRP_MPMOD_MAFIAC : AGRP_MPMOD_GTAC; } // =========================================================================== @@ -1423,7 +1423,7 @@ function isSnowSupported(gameId) { // =========================================================================== function isGTAIV() { - return (getGame() == VRR_GAME_GTA_IV); + return (getGame() == AGRP_GAME_GTA_IV); } // =========================================================================== @@ -1758,7 +1758,7 @@ function getPosInFrontOfPos(pos, angle, distance) { let y = pos.y; let z = pos.z; - if (getGame() != VRR_GAME_MAFIA_ONE) { + if (getGame() != AGRP_GAME_MAFIA_ONE) { x = (pos.x + ((Math.cos(angle + (Math.PI / 2))) * distance)); y = (pos.y + ((Math.sin(angle + (Math.PI / 2))) * distance)); } else { @@ -1782,7 +1782,7 @@ function getPosBehindPos(pos, angle, distance) { let y = pos.y; let z = pos.z; - if (getGame() < VRR_GAME_MAFIA_ONE) { + if (getGame() < AGRP_GAME_MAFIA_ONE) { y = (pos.y + ((Math.sin(angle - (Math.PI / 2))) * distance)); } else { angle = radToDeg(angle); @@ -2286,7 +2286,7 @@ function ArrayBufferToString(buffer) { // =========================================================================== function getElementTypeName(typeId) { - if (getGame() == VRR_GAME_MAFIA_ONE) { + if (getGame() == AGRP_GAME_MAFIA_ONE) { switch (typeId) { case ELEMENT_VEHICLE: return "Vehicle"; diff --git a/third-party/mexui/mexui.js b/third-party/mexui/mexui.js index 186c3bf8..3279f25c 100644 --- a/third-party/mexui/mexui.js +++ b/third-party/mexui/mexui.js @@ -65,7 +65,7 @@ mexui.bindEvents = function () { }); { - var eventName = (game.game == VRR_GAME_GTA_SA || game.game == VRR_GAME_MAFIA_ONE) ? 'onDrawnHUD' : 'onBeforeDrawHUD'; + var eventName = (game.game == AGRP_GAME_GTA_SA || game.game == AGRP_GAME_MAFIA_ONE) ? 'onDrawnHUD' : 'onBeforeDrawHUD'; addEventHandler(eventName, function (event) { mexui.render(); });