diff --git a/scripts/client/animation.js b/scripts/client/animation.js index 26048a48..1d2135d5 100644 --- a/scripts/client/animation.js +++ b/scripts/client/animation.js @@ -22,7 +22,7 @@ function makePedPlayAnimation(pedId, animationSlot, positionOffset) { } let animationData = getAnimationData(animationSlot); - logToConsole(LOG_DEBUG, `[AGRP.Animation] Playing animation ${animationData[0]} for ped ${pedId}`); + logToConsole(LOG_DEBUG, `[V.RP.Animation] Playing animation ${animationData[0]} for ped ${pedId}`); let freezePlayer = false; switch (animationData.moveType) { diff --git a/scripts/client/business.js b/scripts/client/business.js index 6643b880..70a141b0 100644 --- a/scripts/client/business.js +++ b/scripts/client/business.js @@ -36,7 +36,7 @@ function initBusinessScript() { // =========================================================================== function receiveBusinessFromServer(businessId, name, entrancePosition, blipModel, pickupModel, buyPrice, rentPrice, hasInterior, locked, hasItems, entranceFee) { - logToConsole(LOG_DEBUG, `[AGRP.Business] Received business ${businessId} (${name}) from server`); + logToConsole(LOG_DEBUG, `[V.RP.Business] Received business ${businessId} (${name}) from server`); if (!areServerElementsSupported() || getGame() == V_GAME_MAFIA_ONE || getGame() == V_GAME_GTA_IV) { if (getBusinessData(businessId) != false) { @@ -62,10 +62,10 @@ function receiveBusinessFromServer(businessId, name, entrancePosition, blipModel } } - logToConsole(LOG_DEBUG, `[AGRP.Business] Business ${businessId} already exists. Checking blip ...`); + logToConsole(LOG_DEBUG, `[V.RP.Business] Business ${businessId} already exists. Checking blip ...`); if (blipModel == -1) { if (businessData.blipId != -1) { - logToConsole(LOG_DEBUG, `[AGRP.Business] Business ${businessId}'s blip has been removed by the server`); + logToConsole(LOG_DEBUG, `[V.RP.Business] Business ${businessId}'s blip has been removed by the server`); if (getGame() == V_GAME_GTA_IV) { natives.removeBlipAndClearIndex(getBusinessData(businessId).blipId); } else { @@ -75,11 +75,11 @@ function receiveBusinessFromServer(businessId, name, entrancePosition, blipModel //businesses.splice(businessData.index, 1); //setAllBusinessDataIndexes(); } else { - logToConsole(LOG_DEBUG, `[AGRP.Business] Business ${businessId}'s blip is unchanged`); + logToConsole(LOG_DEBUG, `[V.RP.Business] Business ${businessId}'s blip is unchanged`); } } else { if (businessData.blipId != -1) { - logToConsole(LOG_DEBUG, `[AGRP.Business] Business ${businessId}'s blip has been changed by the server`); + logToConsole(LOG_DEBUG, `[V.RP.Business] Business ${businessId}'s blip has been changed by the server`); if (getGame() == V_GAME_GTA_IV) { natives.setBlipCoordinates(businessData.blipId, businessData.entrancePosition); natives.changeBlipSprite(businessData.blipId, businessData.blipModel); @@ -92,20 +92,20 @@ function receiveBusinessFromServer(businessId, name, entrancePosition, blipModel if (blipId != -1) { tempBusinessData.blipId = blipId; } - logToConsole(LOG_DEBUG, `[AGRP.Business] Business ${businessId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`); + logToConsole(LOG_DEBUG, `[V.RP.Business] Business ${businessId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`); } } } else { - logToConsole(LOG_DEBUG, `[AGRP.Business] Business ${businessId} doesn't exist. Adding ...`); + logToConsole(LOG_DEBUG, `[V.RP.Business] Business ${businessId} doesn't exist. Adding ...`); let tempBusinessData = new BusinessData(businessId, name, entrancePosition, blipModel, pickupModel, hasInterior, hasItems); if (blipModel != -1) { let blipId = createGameBlip(tempBusinessData.blipModel, tempBusinessData.entrancePosition, tempBusinessData.name); if (blipId != -1) { tempBusinessData.blipId = blipId; } - logToConsole(LOG_DEBUG, `[AGRP.Business] Business ${businessId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`); + logToConsole(LOG_DEBUG, `[V.RP.Business] Business ${businessId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`); } else { - logToConsole(LOG_DEBUG, `[AGRP.Business] Business ${businessId} has no blip.`); + logToConsole(LOG_DEBUG, `[V.RP.Business] Business ${businessId} has no blip.`); } getServerData().businesses.push(tempBusinessData); setAllBusinessDataIndexes(); diff --git a/scripts/client/chat.js b/scripts/client/chat.js index 3480a592..9ef91638 100644 --- a/scripts/client/chat.js +++ b/scripts/client/chat.js @@ -52,7 +52,7 @@ function unBindChatBoxKeys() { // =========================================================================== function receiveChatBoxMessageFromServer(messageString, colour, hour, minute, second) { - logToConsole(LOG_DEBUG, `[AGRP.Chat]: Received chatbox message from server: ${messageString}`); + logToConsole(LOG_DEBUG, `[V.RP.Chat]: Received chatbox message from server: ${messageString}`); // Just in case it's hidden by auto hide //setChatWindowEnabled(true); @@ -77,16 +77,16 @@ function receiveChatBoxMessageFromServer(messageString, colour, hour, minute, se outputString = `${timeStampString}${messageString}`; } - logToConsole(LOG_DEBUG, `[AGRP.Chat]: Changed colours in string: ${outputString}`); + logToConsole(LOG_DEBUG, `[V.RP.Chat]: Changed colours in string: ${outputString}`); outputString = replaceColoursInMessage(`${outputString}`); if (chatEmojiEnabled == true) { - logToConsole(LOG_DEBUG, `[AGRP.Chat]: Enabled emoji in string: ${outputString}`); + logToConsole(LOG_DEBUG, `[V.RP.Chat]: Enabled emoji in string: ${outputString}`); outputString = replaceEmojiInMessage(outputString); } if (profanityFilterEnabled == true) { - logToConsole(LOG_DEBUG, `[AGRP.Chat]: Removed profanity in string: ${outputString}`); + logToConsole(LOG_DEBUG, `[V.RP.Chat]: Removed profanity in string: ${outputString}`); outputString = replaceProfanityInMessage(outputString); } diff --git a/scripts/client/event.js b/scripts/client/event.js index c42c2b5d..8e158424 100644 --- a/scripts/client/event.js +++ b/scripts/client/event.js @@ -73,7 +73,7 @@ function onResourceStart(event, resource) { } if (resource == thisResource) { - logToConsole(LOG_DEBUG | LOG_WARN, `[AGRP.Event] onResourceStart called - Sending signal to server`); + logToConsole(LOG_DEBUG | LOG_WARN, `[V.RP.Event] onResourceStart called - Sending signal to server`); localPlayerMoneyInterval = setInterval(updateLocalPlayerMoney, 1000 * 5); sendResourceStartedSignalToServer(); } @@ -83,7 +83,7 @@ function onResourceStart(event, resource) { function onResourceStop(event, resource) { if (resource == thisResource) { - logToConsole(LOG_DEBUG | LOG_WARN, `[AGRP.Event] onResourceStop called - Sending signal to server`); + logToConsole(LOG_DEBUG | LOG_WARN, `[V.RP.Event] onResourceStop called - Sending signal to server`); sendResourceStoppedSignalToServer(); } } @@ -92,7 +92,7 @@ function onResourceStop(event, resource) { function onResourceReady(event, resource) { if (resource == thisResource) { - logToConsole(LOG_DEBUG | LOG_WARN, `[AGRP.Event] onResourceReady called - Sending signal to server`); + logToConsole(LOG_DEBUG | LOG_WARN, `[V.RP.Event] onResourceReady called - Sending signal to server`); loadLocaleConfig(); sendResourceReadySignalToServer(); } @@ -101,7 +101,7 @@ function onResourceReady(event, resource) { // =========================================================================== function onProcess(event, deltaTime) { - logToConsole(LOG_VERBOSE, `[AGRP.Event] onProcess`); + logToConsole(LOG_VERBOSE, `[V.RP.Event] onProcess`); if (localPlayer == null) { return false; } @@ -136,7 +136,7 @@ function onKeyUp(event, keyCode, scanCode, keyModifiers) { // =========================================================================== function onDrawnHUD(event) { - logToConsole(LOG_VERBOSE, `[AGRP.Event] HUD drawn`); + logToConsole(LOG_VERBOSE, `[V.RP.Event] HUD drawn`); processMouseCursorRendering(); if (!renderHUD) { @@ -160,7 +160,7 @@ function onDrawnHUD(event) { // =========================================================================== function onPedWasted(event, wastedPed, killerPed, weapon, pedPiece) { - logToConsole(LOG_DEBUG, `[AGRP.Event] Ped ${wastedPed.name} died`); + logToConsole(LOG_DEBUG, `[V.RP.Event] Ped ${wastedPed.name} died`); wastedPed.clearWeapons(); } @@ -173,7 +173,7 @@ function onElementStreamIn(event, element) { // =========================================================================== function onPedExitedVehicle(event, ped, vehicle, seat) { - //logToConsole(LOG_DEBUG, `[AGRP.Event] Local player exited vehicle`); + //logToConsole(LOG_DEBUG, `[V.RP.Event] Local player exited vehicle`); //sendNetworkEventToServer("v.rp.onPlayerExitVehicle", getVehicleForNetworkEvent(vehicle), seat); cruiseControlEnabled = false; @@ -197,7 +197,7 @@ function onPedExitedVehicle(event, ped, vehicle, seat) { // =========================================================================== function onPedExitingVehicle(event, ped, vehicle, seat) { - //logToConsole(LOG_DEBUG, `[AGRP.Event] Local player exited vehicle`); + //logToConsole(LOG_DEBUG, `[V.RP.Event] Local player exited vehicle`); //sendNetworkEventToServer("v.rp.onPlayerExitVehicle", getVehicleForNetworkEvent(vehicle), seat); if (localPlayer != null) { @@ -211,7 +211,7 @@ function onPedExitingVehicle(event, ped, vehicle, seat) { // =========================================================================== function onPedEnteredVehicle(event, ped, vehicle, seat) { - logToConsole(LOG_DEBUG, `[AGRP.Event] Ped entered vehicle`); + logToConsole(LOG_DEBUG, `[V.RP.Event] Ped entered vehicle`); //sendNetworkEventToServer("v.rp.onPlayerEnterVehicle", getVehicleForNetworkEvent(vehicle), seat); cruiseControlEnabled = false; @@ -239,7 +239,7 @@ function onPedEnteredVehicle(event, ped, vehicle, seat) { function onPedInflictDamage(event, damagedEntity, damagerEntity, weaponId, healthLoss, pedPiece) { //let damagerEntityString = (!isNull(damagedEntity)) ? `${damagerEntity.name} (${damagerEntity.name}, ${damagerEntity.type} - ${typeof damagerEntity})` : `Unknown ped`; //let damagedEntityString = (!isNull(damagedEntity)) ? `${damagedEntity.name} (${damagedEntity.name}, ${damagedEntity.type} - ${typeof damagedEntity})` : `Unknown ped`; - //logToConsole(LOG_DEBUG, `[AGRP.Event] ${damagerEntityString} damaged ${damagedEntityString}'s '${pedPiece} with weapon ${weaponId}`); + //logToConsole(LOG_DEBUG, `[V.RP.Event] ${damagerEntityString} damaged ${damagedEntityString}'s '${pedPiece} with weapon ${weaponId}`); if (!isNull(damagedEntity) && !isNull(damagerEntity)) { if (damagedEntity.isType(ELEMENT_PLAYER)) { if (damagedEntity == localPlayer) { diff --git a/scripts/client/gps.js b/scripts/client/gps.js index 600e56e7..a555bb15 100644 --- a/scripts/client/gps.js +++ b/scripts/client/gps.js @@ -16,7 +16,7 @@ let gpsBlipBlinkTimer = null; // =========================================================================== function showGPSLocation(position, colour) { - logToConsole(LOG_DEBUG, `[AGRP.GPS] Showing gps location`); + logToConsole(LOG_DEBUG, `[V.RP.GPS] Showing gps location`); if (getMultiplayerMod() == V_MPMOD_GTAC) { if (getGame() == V_GAME_GTA_SA) { // Server-side spheres don't show in GTA SA for some reason. diff --git a/scripts/client/gui.js b/scripts/client/gui.js index daae9a6e..deb2c848 100644 --- a/scripts/client/gui.js +++ b/scripts/client/gui.js @@ -47,7 +47,7 @@ function initGUIScript() { // =========================================================================== function initGUI() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Initializing GUI ...`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Initializing GUI ...`); initLoginGUI(); initRegisterGUI(); @@ -73,7 +73,7 @@ function initGUI() { closeAllWindows(); guiReady = true; - logToConsole(LOG_DEBUG, `[AGRP.GUI] All GUI created successfully!`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] All GUI created successfully!`); sendNetworkEventToServer("v.rp.guiReady", true); }; @@ -81,7 +81,7 @@ function initGUI() { // =========================================================================== function closeAllWindows() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Closing all GUI windows`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Closing all GUI windows`); infoDialog.window.shown = false; yesNoDialog.window.shown = false; errorDialog.window.shown = false; @@ -208,7 +208,7 @@ function isAnyGUIActive() { // =========================================================================== function setGUIColours(red1, green1, blue1, red2, green2, blue2, red3, green3, blue3) { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Received new GUI colours from server: ${red1}, ${green1}, ${blue1} / ${red2}, ${green2}, ${blue2} / ${red3}, ${green3}, ${blue3}`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Received new GUI colours from server: ${red1}, ${green1}, ${blue1} / ${red2}, ${green2}, ${blue2} / ${red3}, ${green3}, ${blue3}`); primaryColour = [red1, green1, blue1]; secondaryColour = [red2, green2, blue2]; primaryTextColour = [red3, green3, blue3]; @@ -228,45 +228,45 @@ function hideAllGUI() { // =========================================================================== function processGUIKeyPress(keyCode) { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Processing key press: ${keyCode}`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Processing key press: ${keyCode}`); if (!guiReady) { return false; } if (!isAnyGUIActive()) { - logToConsole(LOG_DEBUG, `[AGRP.GUI] GUI is not active. Cancelling keypress processing.`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] GUI is not active. Cancelling keypress processing.`); return false; } if (keyCode == SDLK_RETURN || keyCode == SDLK_RETURN2) { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Key press is submit (${guiSubmitKey})`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Key press is submit (${guiSubmitKey})`); if (guiSubmitKey != false) { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Calling submit key function`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Calling submit key function`); guiSubmitKey.call(); } } else if (keyCode == getKeyIdFromParams("left") || keyCode == getKeyIdFromParams("a")) { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Key press is left (${guiLeftKey})`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Key press is left (${guiLeftKey})`); if (guiLeftKey != false) { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Calling left key function`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Calling left key function`); guiLeftKey.call(); } } else if (keyCode == getKeyIdFromParams("right") || keyCode == getKeyIdFromParams("d")) { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Key press is right (${guiRightKey})`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Key press is right (${guiRightKey})`); if (guiRightKey != false) { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Calling right key function`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Calling right key function`); guiRightKey.call(); } } else if (keyCode == getKeyIdFromParams("down") || keyCode == getKeyIdFromParams("s")) { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Key press is down (${guiDownKey})`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Key press is down (${guiDownKey})`); if (guiDownKey != false) { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Calling down key function`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Calling down key function`); guiDownKey.call(); } } else if (keyCode == getKeyIdFromParams("up") || keyCode == getKeyIdFromParams("w")) { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Key press is up (${guiUpKey})`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Key press is up (${guiUpKey})`); if (guiUpKey != false) { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Calling up key function`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Calling up key function`); guiUpKey.call(); } } diff --git a/scripts/client/gui/2fa.js b/scripts/client/gui/2fa.js index 33fc08a4..225f379a 100644 --- a/scripts/client/gui/2fa.js +++ b/scripts/client/gui/2fa.js @@ -20,7 +20,7 @@ let twoFactorAuth = { // =========================================================================== function initTwoFactorAuthenticationGUI() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating two factor auth GUI ...`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Creating two factor auth GUI ...`); twoFactorAuth.window = mexui.window(game.width / 2 - 150, game.height / 2 - 129, 300, 258, 'LOGIN', { main: { backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha), @@ -94,14 +94,14 @@ function initTwoFactorAuthenticationGUI() { }, }, checkTwoFactorAuth); - logToConsole(LOG_DEBUG, `[AGRP.GUI] Created two factor auth GUI`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Created two factor auth GUI`); } // =========================================================================== function showTwoFactorAuthGUI() { closeAllWindows(); - logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing two-factor authentication window`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing two-factor authentication window`); setChatWindowEnabled(false); mexui.setInput(true); twoFactorAuth.window.shown = true; @@ -112,7 +112,7 @@ function showTwoFactorAuthGUI() { // =========================================================================== function twoFactorAuthFailed(errorMessage) { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports two-factor authentication failed. Reason: ${errorMessage}`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Server reports two-factor authentication failed. Reason: ${errorMessage}`); twoFactorAuth.messageLabel.text = errorMessage; twoFactorAuth.messageLabel.styles.main.textColour = toColour(180, 32, 32, 255); twoFactorAuth.codeInput.text = ""; @@ -121,14 +121,14 @@ function twoFactorAuthFailed(errorMessage) { // =========================================================================== function twoFactorAuthSuccess() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports two-factor authentication was successful`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Server reports two-factor authentication was successful`); closeAllWindows(); } // =========================================================================== function checkTwoFactorAuth() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Checking two-factor authentication with server ...`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Checking two-factor authentication with server ...`); sendNetworkEventToServer("v.rp.2fa", twoFactorAuth.codeInput.lines[0]); } diff --git a/scripts/client/gui/changepass.js b/scripts/client/gui/changepass.js index f2770a23..e0756aac 100644 --- a/scripts/client/gui/changepass.js +++ b/scripts/client/gui/changepass.js @@ -19,7 +19,7 @@ let passwordChange = { // =========================================================================== function initChangePasswordGUI() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating password change GUI ...`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Creating password change GUI ...`); passwordChange.window = mexui.window(game.width / 2 - 130, game.height / 2 - 125, 300, 250, 'Change Password', { main: { backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha), @@ -110,13 +110,13 @@ function initChangePasswordGUI() { borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], buttonAlpha), }, }, checkChangePassword); - logToConsole(LOG_DEBUG, `[AGRP.GUI] Created change password GUI`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Created change password GUI`); } // =========================================================================== function passwordChangeFailed(errorMessage) { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports change password failed. Reason: ${errorMessage}`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Server reports change password failed. Reason: ${errorMessage}`); passwordChange.messageLabel.text = errorMessage; passwordChange.messageLabel.styles.main.textColour = toColour(180, 32, 32, 255); passwordChange.passwordInput.text = ""; @@ -127,14 +127,14 @@ function passwordChangeFailed(errorMessage) { // =========================================================================== function checkChangePassword() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Checking password change with server ...`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Checking password change with server ...`); sendNetworkEventToServer("v.rp.checkChangePassword", passwordChange.passwordInput.lines[0], passwordChange.confirmPasswordInput.lines[0]); } // =========================================================================== function showChangePasswordGUI(errorMessage) { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing change password window`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing change password window`); closeAllWindows(); setChatWindowEnabled(false); mexui.setInput(true); @@ -149,7 +149,7 @@ function showChangePasswordGUI(errorMessage) { // =========================================================================== function passwordChangeSuccess() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports password change was successful`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Server reports password change was successful`); guiSubmitKey = false; closeAllWindows(); } diff --git a/scripts/client/gui/charselect.js b/scripts/client/gui/charselect.js index b5cd2838..bb6b22ee 100644 --- a/scripts/client/gui/charselect.js +++ b/scripts/client/gui/charselect.js @@ -23,7 +23,7 @@ let characterSelect = { // =========================================================================== function initCharacterSelectGUI() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating character select GUI ...`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Creating character select GUI ...`); characterSelect.window = mexui.window(game.width / 2 - 215, game.height / 2 - 83, 430, 190, 'SELECT CHARACTER', { main: { backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha), @@ -150,14 +150,14 @@ function initCharacterSelectGUI() { borderColour: toColour(0, 0, 0, 0), } }); - logToConsole(LOG_DEBUG, `[AGRP.GUI] Created character select GUI`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Created character select GUI`); } // =========================================================================== function showCharacterSelectGUI(firstName, lastName, cash, clan, lastPlayed, skinId) { closeAllWindows(); - logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing character selection window`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing character selection window`); setChatWindowEnabled(false); mexui.setInput(true); characterSelect.nameText.text = `${firstName} ${lastName}`; @@ -178,35 +178,35 @@ function showCharacterSelectGUI(firstName, lastName, cash, clan, lastPlayed, ski function showNewCharacter() { closeAllWindows(); - logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing new character dialog window`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing new character dialog window`); showNewCharacterGUI(); } // =========================================================================== function selectNextCharacter() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Requesting next character info from server for character select window`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Requesting next character info from server for character select window`); sendNetworkEventToServer("v.rp.nextCharacter"); } // =========================================================================== function selectPreviousCharacter() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Requesting previous character info from server for character select window`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Requesting previous character info from server for character select window`); sendNetworkEventToServer("v.rp.previousCharacter"); } // =========================================================================== function selectThisCharacter() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Tell server the current shown character was selected in character select window`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Tell server the current shown character was selected in character select window`); sendNetworkEventToServer("v.rp.selectCharacter"); } // =========================================================================== function switchCharacterSelectGUI(firstName, lastName, cash, clan, lastPlayed, skinId) { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Updating character info with data from server`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Updating character info with data from server`); setChatWindowEnabled(false); characterSelect.window.shown = false; characterSelect.nameText.text = `${firstName} ${lastName}`; @@ -229,7 +229,7 @@ function switchCharacterSelectGUI(firstName, lastName, cash, clan, lastPlayed, s // =========================================================================== function characterSelectSuccess() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports character selection was successful`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Server reports character selection was successful`); closeAllWindows(); } diff --git a/scripts/client/gui/error.js b/scripts/client/gui/error.js index 499c17e3..7ed5aadb 100644 --- a/scripts/client/gui/error.js +++ b/scripts/client/gui/error.js @@ -16,7 +16,7 @@ let errorDialog = { // =========================================================================== function initErrorDialogGUI() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating error GUI ...`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Creating error GUI ...`); errorDialog.window = mexui.window(getScreenWidth() / 2 - 200, getScreenHeight() / 2 - 70, 400, 140, 'ERROR', { main: { backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha), @@ -58,14 +58,14 @@ function initErrorDialogGUI() { borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], 255), }, }, closeErrorDialog); - logToConsole(LOG_DEBUG, `[AGRP.GUI] Created error GUI ...`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Created error GUI ...`); } // =========================================================================== function showErrorGUI(errorMessage, errorTitle, buttonText) { closeAllWindows(); - logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing error window. Error: ${errorTitle} - ${errorMessage}`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing error window. Error: ${errorTitle} - ${errorMessage}`); setChatWindowEnabled(false); mexui.setInput(true); errorDialog.messageLabel.text = errorMessage; @@ -77,7 +77,7 @@ function showErrorGUI(errorMessage, errorTitle, buttonText) { // =========================================================================== function closeErrorDialog() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Closing error dialog`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Closing error dialog`); errorDialog.window.shown = false; mexui.setInput(false); } diff --git a/scripts/client/gui/games/5cardpoker.js b/scripts/client/gui/games/5cardpoker.js index 7e64b238..10fb3e92 100644 --- a/scripts/client/gui/games/5cardpoker.js +++ b/scripts/client/gui/games/5cardpoker.js @@ -13,7 +13,7 @@ let fiveCardPokerGUI = { function initFiveCardPokerGUI() { // Render a five card poker game in MexUI - //logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating five-card poker GUI ...`); + //logToConsole(LOG_DEBUG, `[V.RP.GUI] Creating five-card poker GUI ...`); fiveCardPokerGUI.window = mexui.window(game.width / 2 - 200, game.height - 150, 400, 400, 'Five Card Poker', { main: { backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], 0), @@ -33,7 +33,7 @@ function initFiveCardPokerGUI() { fiveCardPokerGUI.window.shown = false; - logToConsole(LOG_DEBUG, `[AGRP.GUI] Created five card poker GUI`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Created five card poker GUI`); } // =========================================================================== \ No newline at end of file diff --git a/scripts/client/gui/games/blackjack.js b/scripts/client/gui/games/blackjack.js index aa975ad5..01d809c3 100644 --- a/scripts/client/gui/games/blackjack.js +++ b/scripts/client/gui/games/blackjack.js @@ -22,7 +22,7 @@ let dealerCards = []; function initBlackJackGUI() { // Render a blackjack game in MexUI - logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating blackjack GUI ...`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Creating blackjack GUI ...`); blackJackGUI.window = mexui.window(game.width / 2 - 200, game.height - 150, 400, 400, 'Blackjack', { main: { backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], 0), @@ -42,7 +42,7 @@ function initBlackJackGUI() { blackJackGUI.window.shown = false; - logToConsole(LOG_DEBUG, `[AGRP.GUI] Created blackjack GUI`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Created blackjack GUI`); } // =========================================================================== \ No newline at end of file diff --git a/scripts/client/gui/info.js b/scripts/client/gui/info.js index c6d1d4ad..4c33f1e4 100644 --- a/scripts/client/gui/info.js +++ b/scripts/client/gui/info.js @@ -16,7 +16,7 @@ let infoDialog = { // =========================================================================== function initInfoDialogGUI() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating info dialog GUI ...`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Creating info dialog GUI ...`); infoDialog.window = mexui.window(getScreenWidth() / 2 - 200, getScreenHeight() / 2 - 70, 400, 140, 'Information', { main: { backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha), @@ -57,13 +57,13 @@ function initInfoDialogGUI() { borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], 255), }, }, closeInfoDialog); - logToConsole(LOG_DEBUG, `[AGRP.GUI] Created info dialog GUI`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Created info dialog GUI`); } // =========================================================================== function closeInfoDialog() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Closing info dialog`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Closing info dialog`); infoDialog.window.shown = false; mexui.setInput(false); } @@ -72,7 +72,7 @@ function closeInfoDialog() { function showInfoGUI(infoMessage, infoTitle, buttonText) { closeAllWindows(); - logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing info dialog window. Info: ${infoTitle} - ${infoMessage}`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing info dialog window. Info: ${infoTitle} - ${infoMessage}`); mexui.setInput(true); infoDialog.messageLabel.text = infoMessage; infoDialog.okayButton.text = buttonText; diff --git a/scripts/client/gui/inventory.js b/scripts/client/gui/inventory.js index bfc78f74..59c382ea 100644 --- a/scripts/client/gui/inventory.js +++ b/scripts/client/gui/inventory.js @@ -25,7 +25,7 @@ function initInventoryGUI() { // =========================================================================== function closeAllInventoryGUI() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Closing all inventory GUI`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Closing all inventory GUI`); for (let i in inventoryGUI) { inventoryGUI[i].window.shown = false; } @@ -36,7 +36,7 @@ function closeAllInventoryGUI() { function showInventoryGUI(inventoryIndex, items) { closeAllWindows(); - logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing inventory window. Index: ${inventoryIndex}`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing inventory window. Index: ${inventoryIndex}`); inventoryGUI[inventoryIndex].window.shown = true; mexui.setInput(true); } diff --git a/scripts/client/gui/inventorybulk.js b/scripts/client/gui/inventorybulk.js index 97ae538f..35ef51da 100644 --- a/scripts/client/gui/inventorybulk.js +++ b/scripts/client/gui/inventorybulk.js @@ -25,7 +25,7 @@ function initInventoryBulkGUI() { // =========================================================================== function closeAllInventoryBulkGUI() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Closing all bulk inventory GUI`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Closing all bulk inventory GUI`); for (let i in inventoryBulkGUI) { inventoryBulkGUI[i].window.shown = false; } @@ -36,7 +36,7 @@ function closeAllInventoryBulkGUI() { function showInventoryBulkGUI(inventoryIndex, items) { closeAllWindows(); - logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing bulk inventory window. Index: ${inventoryIndex}`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing bulk inventory window. Index: ${inventoryIndex}`); inventoryBulkGUI[inventoryIndex].window.shown = true; mexui.setInput(true); } diff --git a/scripts/client/gui/list.js b/scripts/client/gui/list.js index 4c48951b..079426b6 100644 --- a/scripts/client/gui/list.js +++ b/scripts/client/gui/list.js @@ -18,7 +18,7 @@ let listDialog = { // =========================================================================== function initListGUI() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating list dialog GUI ...`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Creating list dialog GUI ...`); listDialog.window = mexui.window(game.width / 2 - 200, game.height / 2 - 70, 400, 500, 'List', { main: { backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha), @@ -72,14 +72,14 @@ function initListGUI() { } } }); - logToConsole(LOG_DEBUG, `[AGRP.GUI] Created list dialog GUI`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Created list dialog GUI`); } // =========================================================================== function showListGUI() { closeAllWindows(); - logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing list window`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing list window`); setChatWindowEnabled(false); mexui.setInput(true); listDialog.window.shown = true; diff --git a/scripts/client/gui/localechooser.js b/scripts/client/gui/localechooser.js index ab9f0e64..be80c300 100644 --- a/scripts/client/gui/localechooser.js +++ b/scripts/client/gui/localechooser.js @@ -19,7 +19,7 @@ let flagImageGap = toVector2(5, 5); // =========================================================================== function initLocaleChooserGUI() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating locale chooser GUI ...`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Creating locale chooser GUI ...`); localeChooser.window = mexui.window(game.width / 2 - 200, game.height - 150, 60, 60, 'Choose a language', { main: { backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], 0), @@ -39,13 +39,13 @@ function initLocaleChooserGUI() { localeChooser.window.shown = false; - logToConsole(LOG_DEBUG, `[AGRP.GUI] Created locale chooser GUI`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Created locale chooser GUI`); } // =========================================================================== function closeLocaleChooserGUI() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Closing locale chooser window`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Closing locale chooser window`); localeChooser.window.shown = false; for (let i in localeChooser.flagImages) { localeChooser.flagImages[i].shown = false; @@ -63,7 +63,7 @@ function showLocaleChooserGUI(position = toVector2(0.0, 0.0)) { } //closeAllWindows(); - logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing locale chooser window`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing locale chooser window`); mexui.setInput(true); localeChooser.window.shown = true; @@ -85,14 +85,14 @@ function toggleLocaleChooserGUI() { // =========================================================================== function localeChooserSetLocale(localeId) { - logToConsole(LOG_DEBUG | LOG_WARN, `[AGRP.GUI] Asking server to change locale to ${localeId}`); + logToConsole(LOG_DEBUG | LOG_WARN, `[V.RP.GUI] Asking server to change locale to ${localeId}`); sendLocaleSelectToServer(localeId); } // =========================================================================== function resetLocaleChooserOptions() { - logToConsole(LOG_DEBUG | LOG_WARN, `[AGRP.GUI] Resetting locale chooser options`); + logToConsole(LOG_DEBUG | LOG_WARN, `[V.RP.GUI] Resetting locale chooser options`); // let tempLocaleOptions = getServerData().localeOptions; // getAvailableLocaleOptions(); let tempLocaleOptions = getAvailableLocaleOptions(); @@ -116,7 +116,7 @@ function resetLocaleChooserOptions() { localeChooser.flagImages[i].shown = false; - logToConsole(LOG_DEBUG | LOG_WARN, `[AGRP.GUI] Created locale chooser option ${tempLocaleOptions[i].englishName} with image ${imagePath}`); + logToConsole(LOG_DEBUG | LOG_WARN, `[V.RP.GUI] Created locale chooser option ${tempLocaleOptions[i].englishName} with image ${imagePath}`); //localeChooser.activeRingImages.push(activeRingImage); } diff --git a/scripts/client/gui/login.js b/scripts/client/gui/login.js index 2cf4b885..1582430c 100644 --- a/scripts/client/gui/login.js +++ b/scripts/client/gui/login.js @@ -42,7 +42,7 @@ let loginHTML = // =========================================================================== function initLoginGUI() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating login GUI ...`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Creating login GUI ...`); login.window = mexui.window(getScreenWidth() / 2 - 150, getScreenHeight() / 2 - 135, 300, 275, 'LOGIN', { main: { backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha), @@ -143,14 +143,14 @@ function initLoginGUI() { }, }); - logToConsole(LOG_DEBUG, `[AGRP.GUI] Created login GUI`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Created login GUI`); } // =========================================================================== function showLoginGUI() { closeAllWindows(); - logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing login window`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing login window`); setChatWindowEnabled(false); mexui.setInput(true); login.window.shown = true; @@ -164,14 +164,14 @@ function showLoginGUI() { // =========================================================================== function checkLogin() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Checking login with server ...`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Checking login with server ...`); sendNetworkEventToServer("v.rp.checkLogin", login.passwordInput.lines[0]); } // =========================================================================== function loginFailed(errorMessage) { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports login failed`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Server reports login failed`); login.messageLabel.text = errorMessage; login.messageLabel.styles.main.textColour = toColour(180, 32, 32, 255); login.passwordInput.text = ""; @@ -180,7 +180,7 @@ function loginFailed(errorMessage) { // =========================================================================== function loginSuccess() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports login was successful`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Server reports login was successful`); guiSubmitKey = false; closeAllWindows(); } @@ -189,7 +189,7 @@ function loginSuccess() { function switchToPasswordResetGUI() { //closeAllWindows(); - //logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing password reset dialog window`); + //logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing password reset dialog window`); //showResetPasswordGUI(); sendNetworkEventToServer("v.rp.checkResetPassword", ""); return false; diff --git a/scripts/client/gui/newchar.js b/scripts/client/gui/newchar.js index c4719303..d87d88ee 100644 --- a/scripts/client/gui/newchar.js +++ b/scripts/client/gui/newchar.js @@ -19,7 +19,7 @@ let newCharacter = { // =========================================================================== function initNewCharacterGUI() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating new character GUI ...`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Creating new character GUI ...`); newCharacter.window = mexui.window(getScreenWidth() / 2 - 150, getScreenHeight() / 2 - 115, 300, 230, 'NEW CHARACTER', { main: { backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha), @@ -110,13 +110,13 @@ function initNewCharacterGUI() { borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], buttonAlpha), }, }, checkNewCharacter); - logToConsole(LOG_DEBUG, `[AGRP.GUI] Created new character GUI`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Created new character GUI`); } // =========================================================================== function newCharacterFailed(errorMessage) { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports new character creation failed. Reason: ${errorMessage}`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Server reports new character creation failed. Reason: ${errorMessage}`); newCharacter.messageLabel.text = errorMessage; newCharacter.messageLabel.styles.main.textColour = toColour(180, 32, 32, 255); newCharacter.firstNameInput.text = ""; @@ -134,7 +134,7 @@ function newCharacterFailed(errorMessage) { // =========================================================================== function checkNewCharacter() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Checking new character with server ...`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Checking new character with server ...`); if (newCharacter.firstNameInput.lines[0].length < 2) { return false; } @@ -152,7 +152,7 @@ function checkNewCharacter() { // =========================================================================== function showNewCharacterGUI() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing new character window`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing new character window`); closeAllWindows(); setChatWindowEnabled(false); mexui.setInput(true); diff --git a/scripts/client/gui/register.js b/scripts/client/gui/register.js index ce3e448f..56f185df 100644 --- a/scripts/client/gui/register.js +++ b/scripts/client/gui/register.js @@ -20,7 +20,7 @@ let register = { // =========================================================================== function initRegisterGUI() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating register GUI ...`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Creating register GUI ...`); register.window = mexui.window(getScreenWidth() / 2 - 150, getScreenHeight() / 2 - 150, 300, 300, 'Register', { main: { backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha), @@ -130,13 +130,13 @@ function initRegisterGUI() { borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], buttonAlpha), }, }, checkRegistration); - logToConsole(LOG_DEBUG, `[AGRP.GUI] Created register GUI`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Created register GUI`); } // =========================================================================== function registrationFailed(errorMessage) { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports registration failed. Reason: ${errorMessage}`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Server reports registration failed. Reason: ${errorMessage}`); register.messageLabel.text = errorMessage; register.messageLabel.styles.main.textColour = toColour(180, 32, 32, 255); register.passwordInput.text = ""; @@ -147,14 +147,14 @@ function registrationFailed(errorMessage) { // =========================================================================== function checkRegistration() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Checking registration with server ...`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Checking registration with server ...`); sendNetworkEventToServer("v.rp.checkRegistration", register.passwordInput.lines[0], register.confirmPasswordInput.lines[0], register.emailInput.lines[0]); } // =========================================================================== function showRegistrationGUI() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing registration window`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing registration window`); closeAllWindows(); setChatWindowEnabled(false); mexui.setInput(true); @@ -170,7 +170,7 @@ function showRegistrationGUI() { // =========================================================================== function registrationSuccess() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports registration was successful`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Server reports registration was successful`); guiSubmitKey = false; closeAllWindows(); } diff --git a/scripts/client/gui/resetpass.js b/scripts/client/gui/resetpass.js index 3b6cf59f..1cf7dc73 100644 --- a/scripts/client/gui/resetpass.js +++ b/scripts/client/gui/resetpass.js @@ -20,7 +20,7 @@ let passwordReset = { // =========================================================================== function initResetPasswordGUI() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating password reset GUI ...`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Creating password reset GUI ...`); passwordReset.window = mexui.window(getScreenWidth() / 2 - 150, getScreenHeight() / 2 - 135, 300, 275, 'RESET PASSWORD', { main: { backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha), @@ -120,14 +120,14 @@ function initResetPasswordGUI() { }, }); - logToConsole(LOG_DEBUG, `[AGRP.GUI] Created password reset GUI`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Created password reset GUI`); } // =========================================================================== function showResetPasswordGUI() { closeAllWindows(); - logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing password reset window`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing password reset window`); setChatWindowEnabled(false); mexui.setInput(true); passwordReset.window.shown = true; @@ -141,14 +141,14 @@ function showResetPasswordGUI() { // =========================================================================== function checkResetPassword() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Checking password reset with server (${passwordReset.emailInput.lines[0]}) ...`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Checking password reset with server (${passwordReset.emailInput.lines[0]}) ...`); sendNetworkEventToServer("v.rp.checkResetPassword", passwordReset.emailInput.lines[0]); } // =========================================================================== function resetPasswordFailed(errorMessage) { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports password reset failed`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Server reports password reset failed`); passwordReset.messageLabel.text = errorMessage; passwordReset.messageLabel.styles.main.textColour = toColour(180, 32, 32, 255); passwordReset.emailInput.text = ""; @@ -157,7 +157,7 @@ function resetPasswordFailed(errorMessage) { // =========================================================================== function resetPasswordCodeInputGUI() { - logToConsole(LOG_DEBUG | LOG_WARN, `[AGRP.GUI] Server reports password reset email confirmation was successful. Asking for code ...`); + logToConsole(LOG_DEBUG | LOG_WARN, `[V.RP.GUI] Server reports password reset email confirmation was successful. Asking for code ...`); closeAllWindows(); passwordReset.messageLabel.text = getLocaleString("GUIResetPasswordCodeInputLabel"); @@ -172,7 +172,7 @@ function resetPasswordCodeInputGUI() { // =========================================================================== function resetPasswordEmailInputGUI() { - logToConsole(LOG_DEBUG | LOG_WARN, `[AGRP.GUI] Server reports password reset request was approved. Asking for email ...`); + logToConsole(LOG_DEBUG | LOG_WARN, `[V.RP.GUI] Server reports password reset request was approved. Asking for email ...`); closeAllWindows(); passwordReset.messageLabel.text = getLocaleString("GUIResetPasswordConfirmEmailLabel"); diff --git a/scripts/client/gui/yesno.js b/scripts/client/gui/yesno.js index 7eeaeebe..87382f1f 100644 --- a/scripts/client/gui/yesno.js +++ b/scripts/client/gui/yesno.js @@ -18,7 +18,7 @@ let yesNoDialog = { // =========================================================================== function initYesNoDialogGUI() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Created prompt GUI ...`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Created prompt GUI ...`); yesNoDialog.window = mexui.window(game.width / 2 - 200, game.height / 2 - 70, 400, 140, 'Question', { main: { backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha), @@ -73,14 +73,14 @@ function initYesNoDialogGUI() { borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], 255), }, }, yesNoDialogAnswerNo); - logToConsole(LOG_DEBUG, `[AGRP.GUI] Created prompt GUI`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Created prompt GUI`); } // =========================================================================== function showYesNoPromptGUI(promptMessage, promptTitle, yesButtonText, noButtonText) { closeAllWindows(); - logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing prompt window. Prompt: ${promptTitle} - ${promptMessage}`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing prompt window. Prompt: ${promptTitle} - ${promptMessage}`); mexui.setInput(true); yesNoDialog.messageLabel.text = ""; @@ -99,7 +99,7 @@ function showYesNoPromptGUI(promptMessage, promptTitle, yesButtonText, noButtonT // =========================================================================== function yesNoDialogAnswerNo() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Responding with answer NO to server prompt`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Responding with answer NO to server prompt`); sendNetworkEventToServer("v.rp.promptAnswerNo"); closeAllWindows(); } @@ -107,7 +107,7 @@ function yesNoDialogAnswerNo() { // =========================================================================== function yesNoDialogAnswerYes() { - logToConsole(LOG_DEBUG, `[AGRP.GUI] Responding with answer YES to server prompt`); + logToConsole(LOG_DEBUG, `[V.RP.GUI] Responding with answer YES to server prompt`); sendNetworkEventToServer("v.rp.promptAnswerYes"); closeAllWindows(); } diff --git a/scripts/client/house.js b/scripts/client/house.js index c444d9c8..39e2d391 100644 --- a/scripts/client/house.js +++ b/scripts/client/house.js @@ -26,7 +26,7 @@ class HouseData { // =========================================================================== function receiveHouseFromServer(houseId, description, entrancePosition, blipModel, pickupModel, buyPrice, rentPrice, hasInterior, locked) { - logToConsole(LOG_DEBUG, `[AGRP.House] Received house ${houseId} (${name}) from server`); + logToConsole(LOG_DEBUG, `[V.RP.House] Received house ${houseId} (${name}) from server`); if (!areServerElementsSupported() || getGame() == V_GAME_MAFIA_ONE || getGame() == V_GAME_GTA_IV) { if (getHouseData(houseId) != false) { @@ -50,10 +50,10 @@ function receiveHouseFromServer(houseId, description, entrancePosition, blipMode } } - logToConsole(LOG_DEBUG, `[AGRP.House] House ${houseId} already exists. Checking blip ...`); + logToConsole(LOG_DEBUG, `[V.RP.House] House ${houseId} already exists. Checking blip ...`); if (blipModel == -1) { if (houseData.blipId != -1) { - logToConsole(LOG_DEBUG, `[AGRP.House] House ${houseId}'s blip has been removed by the server`); + logToConsole(LOG_DEBUG, `[V.RP.House] House ${houseId}'s blip has been removed by the server`); if (getGame() == V_GAME_GTA_IV) { natives.removeBlipAndClearIndex(getHouseData(houseId).blipId); } else { @@ -61,11 +61,11 @@ function receiveHouseFromServer(houseId, description, entrancePosition, blipMode } houseData.blipId = -1; } else { - logToConsole(LOG_DEBUG, `[AGRP.House] House ${houseId}'s blip is unchanged`); + logToConsole(LOG_DEBUG, `[V.RP.House] House ${houseId}'s blip is unchanged`); } } else { if (houseData.blipId != -1) { - logToConsole(LOG_DEBUG, `[AGRP.House] House ${houseId}'s blip has been changed by the server`); + logToConsole(LOG_DEBUG, `[V.RP.House] House ${houseId}'s blip has been changed by the server`); if (getGame() == V_GAME_GTA_IV) { natives.setBlipCoordinates(houseData.blipId, houseData.entrancePosition); natives.changeBlipSprite(houseData.blipId, houseData.blipModel); @@ -78,20 +78,20 @@ function receiveHouseFromServer(houseId, description, entrancePosition, blipMode if (blipId != -1) { houseData.blipId = blipId; } - logToConsole(LOG_DEBUG, `[AGRP.House] House ${houseId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`); + logToConsole(LOG_DEBUG, `[V.RP.House] House ${houseId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`); } } } else { - logToConsole(LOG_DEBUG, `[AGRP.House] House ${houseId} doesn't exist. Adding ...`); + logToConsole(LOG_DEBUG, `[V.RP.House] House ${houseId} doesn't exist. Adding ...`); let tempHouseData = new HouseData(houseId, description, entrancePosition, blipModel, pickupModel, hasInterior); if (blipModel != -1) { let blipId = createGameBlip(tempHouseData.blipModel, tempHouseData.entrancePosition, "House"); if (blipId != -1) { tempHouseData.blipId = blipId; } - logToConsole(LOG_DEBUG, `[AGRP.House] House ${houseId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`); + logToConsole(LOG_DEBUG, `[V.RP.House] House ${houseId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`); } else { - logToConsole(LOG_DEBUG, `[AGRP.House] House ${houseId} has no blip.`); + logToConsole(LOG_DEBUG, `[V.RP.House] House ${houseId} has no blip.`); } getServerData().houses.push(tempHouseData); setAllHouseDataIndexes(); diff --git a/scripts/client/item.js b/scripts/client/item.js index f5404695..2a89a8d0 100644 --- a/scripts/client/item.js +++ b/scripts/client/item.js @@ -47,7 +47,7 @@ function processItemActionRendering() { // =========================================================================== function updatePlayerHotBar(activeSlot, itemsArray) { - logToConsole(LOG_DEBUG, `[AGRP.Main] Updating hotbar`); + logToConsole(LOG_DEBUG, `[V.RP.Main] Updating hotbar`); } // =========================================================================== diff --git a/scripts/client/job.js b/scripts/client/job.js index a6ed7139..8ceeb52a 100644 --- a/scripts/client/job.js +++ b/scripts/client/job.js @@ -42,21 +42,21 @@ function initJobScript() { // =========================================================================== function setLocalPlayerJobType(tempJobType) { - logToConsole(LOG_DEBUG, `[AGRP.Job] Set local player job type to ${tempJobType}`); + logToConsole(LOG_DEBUG, `[V.RP.Job] Set local player job type to ${tempJobType}`); localPlayerJobType = tempJobType; } // =========================================================================== function setLocalPlayerWorkingState(tempWorking) { - logToConsole(LOG_DEBUG, `[AGRP.Job] Setting working state to ${tempWorking}`); + logToConsole(LOG_DEBUG, `[V.RP.Job] Setting working state to ${tempWorking}`); localPlayerWorking = tempWorking; } // =========================================================================== function showJobRouteLocation(position, colour) { - logToConsole(LOG_DEBUG, `[AGRP.Job] Showing job route location at ${position.x}, ${position.y}, ${position.z}`); + logToConsole(LOG_DEBUG, `[V.RP.Job] Showing job route location at ${position.x}, ${position.y}, ${position.z}`); hideJobRouteLocation(); if (getMultiplayerMod() == V_MPMOD_GTAC) { if (getGame() == V_GAME_GTA_SA) { @@ -80,7 +80,7 @@ function showJobRouteLocation(position, colour) { // =========================================================================== function enteredJobRouteSphere() { - logToConsole(LOG_DEBUG, `[AGRP.Job] Entered job route sphere`); + logToConsole(LOG_DEBUG, `[V.RP.Job] Entered job route sphere`); hideJobRouteLocation(); tellServerPlayerArrivedAtJobRouteLocation(); } @@ -114,7 +114,7 @@ function blinkJobRouteLocationBlip(times, position, colour) { // =========================================================================== function hideJobRouteLocation() { - logToConsole(LOG_DEBUG, `[AGRP.Job] Hiding job route location`); + logToConsole(LOG_DEBUG, `[V.RP.Job] Hiding job route location`); if (jobRouteLocationBlip != null) { destroyElement(jobRouteLocationBlip); @@ -137,7 +137,7 @@ function hideJobRouteLocation() { // =========================================================================== function receiveJobFromServer(jobId, jobLocationId, name, position, blipModel, pickupModel) { - logToConsole(LOG_DEBUG, `[AGRP.Job] Received job ${jobId} (${name}) from server`); + logToConsole(LOG_DEBUG, `[V.RP.Job] Received job ${jobId} (${name}) from server`); if (!areServerElementsSupported() || getGame() == V_GAME_MAFIA_ONE || getGame() == V_GAME_GTA_IV) { if (getJobData(jobId) != false) { @@ -148,10 +148,10 @@ function receiveJobFromServer(jobId, jobLocationId, name, position, blipModel, p jobData.blipModel = blipModel; jobData.pickupModel = pickupModel; - logToConsole(LOG_DEBUG, `[AGRP.Job] Job ${jobId} already exists. Checking blip ...`); + logToConsole(LOG_DEBUG, `[V.RP.Job] Job ${jobId} already exists. Checking blip ...`); if (blipModel == -1) { if (jobData.blipId != -1) { - logToConsole(LOG_DEBUG, `[AGRP.Job] Job ${jobId}'s blip has been removed by the server`); + logToConsole(LOG_DEBUG, `[V.RP.Job] Job ${jobId}'s blip has been removed by the server`); if (getGame() == V_GAME_GTA_IV) { natives.removeBlipAndClearIndex(getJobData(jobId).blipId); } else { @@ -159,11 +159,11 @@ function receiveJobFromServer(jobId, jobLocationId, name, position, blipModel, p } jobData.blipId = -1; } else { - logToConsole(LOG_DEBUG, `[AGRP.Job] Job ${jobId}'s blip is unchanged`); + logToConsole(LOG_DEBUG, `[V.RP.Job] Job ${jobId}'s blip is unchanged`); } } else { if (jobData.blipId != -1) { - logToConsole(LOG_DEBUG, `[AGRP.Job] Job ${jobId}'s blip has been changed by the server`); + logToConsole(LOG_DEBUG, `[V.RP.Job] Job ${jobId}'s blip has been changed by the server`); if (getGame() == V_GAME_GTA_IV) { natives.setBlipCoordinates(jobData.blipId, jobData.position); natives.changeBlipSprite(jobData.blipId, jobData.blipModel); @@ -176,20 +176,20 @@ function receiveJobFromServer(jobId, jobLocationId, name, position, blipModel, p if (blipId != -1) { jobData.blipId = blipId; } - logToConsole(LOG_DEBUG, `[AGRP.Job] Job ${jobId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`); + logToConsole(LOG_DEBUG, `[V.RP.Job] Job ${jobId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`); } } } else { - logToConsole(LOG_DEBUG, `[AGRP.Job] Job ${jobId} doesn't exist. Adding ...`); + logToConsole(LOG_DEBUG, `[V.RP.Job] Job ${jobId} doesn't exist. Adding ...`); let tempJobData = new JobData(jobId, jobLocationId, name, position, blipModel, pickupModel); if (blipModel != -1) { let blipId = createGameBlip(blipModel, tempJobData.position, tempJobData.name); if (blipId != -1) { tempJobData.blipId = blipId; } - logToConsole(LOG_DEBUG, `[AGRP.Job] Job ${jobId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`); + logToConsole(LOG_DEBUG, `[V.RP.Job] Job ${jobId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`); } else { - logToConsole(LOG_DEBUG, `[AGRP.Job] Job ${jobId} has no blip.`); + logToConsole(LOG_DEBUG, `[V.RP.Job] Job ${jobId} has no blip.`); } getServerData().jobs.push(tempJobData); setAllJobDataIndexes(); diff --git a/scripts/client/keybind.js b/scripts/client/keybind.js index dc3f4237..932380b5 100644 --- a/scripts/client/keybind.js +++ b/scripts/client/keybind.js @@ -23,7 +23,7 @@ function initKeyBindScript() { // =========================================================================== function bindAccountKey(key, keyState) { - logToConsole(LOG_DEBUG, `[AGRP.KeyBind]: Binded key ${toUpperCase(getKeyNameFromId(key))} (${key})`); + logToConsole(LOG_DEBUG, `[V.RP.KeyBind]: Binded key ${toUpperCase(getKeyNameFromId(key))} (${key})`); keyBinds.push(toInteger(key)); bindKey(toInteger(key), keyState, function (event) { if (isAnyGUIActive()) { @@ -32,14 +32,14 @@ function bindAccountKey(key, keyState) { if (hasKeyBindDelayElapsed()) { if (canLocalPlayerUseKeyBinds()) { - logToConsole(LOG_DEBUG, `[AGRP.KeyBind]: Using keybind for key ${toUpperCase(getKeyNameFromId(key))} (${key})`); + logToConsole(LOG_DEBUG, `[V.RP.KeyBind]: Using keybind for key ${toUpperCase(getKeyNameFromId(key))} (${key})`); lastKeyBindUse = sdl.ticks; tellServerPlayerUsedKeyBind(key); } else { - logToConsole(LOG_DEBUG, `[AGRP.KeyBind]: Failed to use keybind for key ${toUpperCase(getKeyNameFromId(key))} (${key}) - Not allowed to use keybinds!`); + logToConsole(LOG_DEBUG, `[V.RP.KeyBind]: Failed to use keybind for key ${toUpperCase(getKeyNameFromId(key))} (${key}) - Not allowed to use keybinds!`); } } else { - logToConsole(LOG_DEBUG, `[AGRP.KeyBind]: Failed to use keybind for key ${toUpperCase(getKeyNameFromId(key))} (${key}) - Not enough time has passed since last keybind use!`); + logToConsole(LOG_DEBUG, `[V.RP.KeyBind]: Failed to use keybind for key ${toUpperCase(getKeyNameFromId(key))} (${key}) - Not enough time has passed since last keybind use!`); } }); } @@ -47,7 +47,7 @@ function bindAccountKey(key, keyState) { // =========================================================================== function unBindAccountKey(key) { - logToConsole(LOG_DEBUG, `[AGRP.KeyBind]: Unbinded key ${toUpperCase(getKeyNameFromId(key))} (${key})`); + logToConsole(LOG_DEBUG, `[V.RP.KeyBind]: Unbinded key ${toUpperCase(getKeyNameFromId(key))} (${key})`); unbindKey(key); keyBinds.splice(keyBinds.indexOf(key), 1); return true; diff --git a/scripts/client/label.js b/scripts/client/label.js index 47b3f599..574e2e0f 100644 --- a/scripts/client/label.js +++ b/scripts/client/label.js @@ -97,7 +97,7 @@ function renderPropertyEntranceLabel(name, position, locked, isBusiness, price, screenPosition = getScreenFromWorldPosition(position); } - logToConsole(LOG_VERBOSE, `[AGRP.Label] World [${position.x}, ${position.y}, ${position.z}] to screen [${screenPosition.x}, ${screenPosition.y}, ${screenPosition.z}]`); + logToConsole(LOG_VERBOSE, `[V.RP.Label] World [${position.x}, ${position.y}, ${position.z}] to screen [${screenPosition.x}, ${screenPosition.y}, ${screenPosition.z}]`); if (screenPosition.x < 0 || screenPosition.x > game.width) { return false; diff --git a/scripts/client/locale.js b/scripts/client/locale.js index e314ecd5..36a001d6 100644 --- a/scripts/client/locale.js +++ b/scripts/client/locale.js @@ -46,7 +46,7 @@ function loadLocaleConfig() { function loadAllLocaleStrings() { let localeOptions = getServerData().localeOptions; for (let i in localeOptions) { - logToConsole(LOG_INFO, `[AGRP.Locale] Loading locale strings for ${localeOptions[i].englishName} (${i})`); + logToConsole(LOG_INFO, `[V.RP.Locale] Loading locale strings for ${localeOptions[i].englishName} (${i})`); let localeStringFile = loadTextFile(`locale/${localeOptions[i].stringsFile}`); let localeStringData = JSON.parse(localeStringFile); @@ -60,7 +60,7 @@ function loadAllLocaleStrings() { // =========================================================================== function setLocale(tempLocaleId) { - logToConsole(LOG_DEBUG, `[AGRP.Locale] Setting locale to ${tempLocaleId} (${getServerData().localeOptions[tempLocaleId].englishName})`); + logToConsole(LOG_DEBUG, `[V.RP.Locale] Setting locale to ${tempLocaleId} (${getServerData().localeOptions[tempLocaleId].englishName})`); localLocaleId = tempLocaleId; resetGUIStrings(); } \ No newline at end of file diff --git a/scripts/client/logo.js b/scripts/client/logo.js index 178d709c..adee8658 100644 --- a/scripts/client/logo.js +++ b/scripts/client/logo.js @@ -53,7 +53,7 @@ function processLogoRendering() { // =========================================================================== function setServerLogoRenderState(state) { - logToConsole(LOG_DEBUG, `[AGRP.Main] Server logo ${(state) ? "enabled" : "disabled"}`); + logToConsole(LOG_DEBUG, `[V.RP.Main] Server logo ${(state) ? "enabled" : "disabled"}`); renderLogo = state; } diff --git a/scripts/client/messaging.js b/scripts/client/messaging.js index 20f7f459..669e66c1 100644 --- a/scripts/client/messaging.js +++ b/scripts/client/messaging.js @@ -78,7 +78,7 @@ function processSmallGameMessageRendering() { logToConsole(LOG_VERBOSE, "[V.RP.Messaging]: Processing small game message rendering ..."); if (renderSmallGameMessage) { if (smallGameMessageText != "") { - logToConsole(LOG_VERBOSE, `[AGRP.Messaging]: Rendering small game message: ${smallGameMessageText}`); + logToConsole(LOG_VERBOSE, `[V.RP.Messaging]: Rendering small game message: ${smallGameMessageText}`); if (smallGameMessageFonts[smallGameMessageFontName] != null) { smallGameMessageFonts[smallGameMessageFontName].render(smallGameMessageText, [0, game.height - 90], game.width, 0.5, 0.0, smallGameMessageFonts[smallGameMessageFontName].size, smallGameMessageColour, true, true, false, true); } @@ -89,7 +89,7 @@ function processSmallGameMessageRendering() { // =========================================================================== function showSmallGameMessage(text, colour, duration, fontName) { - logToConsole(LOG_DEBUG, `[AGRP.Messaging] Showing small game message '${text}' using font ${fontName} for ${duration}ms`); + logToConsole(LOG_DEBUG, `[V.RP.Messaging] Showing small game message '${text}' using font ${fontName} for ${duration}ms`); if (smallGameMessageText != "") { clearTimeout(smallGameMessageTimer); } diff --git a/scripts/client/netevents.js b/scripts/client/netevents.js index 71a4fb71..842fb139 100644 --- a/scripts/client/netevents.js +++ b/scripts/client/netevents.js @@ -188,7 +188,7 @@ function sendResourceStoppedSignalToServer() { // =========================================================================== function set2DRendering(hudState, labelState, smallGameMessageState, scoreboardState, hotBarState, itemActionDelayState) { - logToConsole(LOG_DEBUG, `[AGRP.Main] Updating render states (HUD: ${hudState}, Labels: ${labelState}, Bottom Text: ${smallGameMessageState}, Scoreboard: ${scoreboardState}, HotBar: ${hotBarState}, Item Action Delay: ${itemActionDelayState})`); + logToConsole(LOG_DEBUG, `[V.RP.Main] Updating render states (HUD: ${hudState}, Labels: ${labelState}, Bottom Text: ${smallGameMessageState}, Scoreboard: ${scoreboardState}, HotBar: ${hotBarState}, Item Action Delay: ${itemActionDelayState})`); renderHUD = hudState; if (getGame() == V_GAME_GTA_IV) { @@ -213,7 +213,7 @@ function set2DRendering(hudState, labelState, smallGameMessageState, scoreboardS // =========================================================================== function onServerSpawnedLocalPlayer(state) { - logToConsole(LOG_DEBUG, `[AGRP.Main] Setting spawned state to ${state}`); + logToConsole(LOG_DEBUG, `[V.RP.Main] Setting spawned state to ${state}`); isSpawned = state; setUpInitialGame(); if (state) { @@ -336,7 +336,7 @@ function setLocalPlayerInfiniteRun(state) { // =========================================================================== function setLocalPlayerSkin(skinId) { - logToConsole(LOG_INFO, `[AGRP.Server] Setting locale player skin to ${skinId}`); + logToConsole(LOG_INFO, `[V.RP.Server] Setting locale player skin to ${skinId}`); if (getGame() == V_GAME_GTA_IV) { if (natives.isModelInCdimage(skinId)) { natives.requestModel(skinId); diff --git a/scripts/client/utilities.js b/scripts/client/utilities.js index cfc76a4b..f11e1d8b 100644 --- a/scripts/client/utilities.js +++ b/scripts/client/utilities.js @@ -8,14 +8,14 @@ // =========================================================================== function setLocalPlayerFrozenState(state) { - logToConsole(LOG_DEBUG, `[AGRP.Utilities] Setting frozen state to ${state}`); + logToConsole(LOG_DEBUG, `[V.RP.Utilities] Setting frozen state to ${state}`); gui.showCursor(state, !state); } // =========================================================================== function setLocalPlayerControlState(controlState, cursorState = false) { - logToConsole(LOG_DEBUG, `[AGRP.Utilities] Setting control state to ${controlState} (Cursor: ${cursorState})`); + logToConsole(LOG_DEBUG, `[V.RP.Utilities] Setting control state to ${controlState} (Cursor: ${cursorState})`); controlsEnabled = controlState; game.setPlayerControl(controlState); if (getGame() == V_GAME_GTA_III || getGame() == V_GAME_GTA_VC) { @@ -29,7 +29,7 @@ function setLocalPlayerControlState(controlState, cursorState = false) { // =========================================================================== function fadeLocalCamera(state, duration, colour) { - logToConsole(LOG_DEBUG, `[AGRP.Utilities] Fading camera ${(state) ? "in" : "out"} for ${time}ms`); + logToConsole(LOG_DEBUG, `[V.RP.Utilities] Fading camera ${(state) ? "in" : "out"} for ${time}ms`); cameraFadeDuration = duration; cameraFadeStart = sdl.ticks; @@ -48,7 +48,7 @@ function removeLocalPlayerFromVehicle() { // =========================================================================== function restoreLocalCamera() { - logToConsole(LOG_DEBUG, `[AGRP.Utilities] Camera restored`); + logToConsole(LOG_DEBUG, `[V.RP.Utilities] Camera restored`); if (isGameFeatureSupported("customCamera")) { game.restoreCamera(true); } @@ -57,7 +57,7 @@ function restoreLocalCamera() { // =========================================================================== function setLocalCameraLookAt(cameraPosition, cameraLookAt) { - logToConsole(LOG_DEBUG, `[AGRP.Utilities] Set camera to look at [${cameraLookAt.x}, ${cameraLookAt.y}, ${cameraLookAt.z}] from [${cameraPosition.x}, ${cameraPosition.y}, ${cameraPosition.z}]`); + logToConsole(LOG_DEBUG, `[V.RP.Utilities] Set camera to look at [${cameraLookAt.x}, ${cameraLookAt.y}, ${cameraLookAt.z}] from [${cameraPosition.x}, ${cameraPosition.y}, ${cameraPosition.z}]`); if (isCustomCameraSupported()) { game.setCameraLookAt(cameraPosition, cameraLookAt, true); } @@ -66,15 +66,15 @@ function setLocalCameraLookAt(cameraPosition, cameraLookAt) { // =========================================================================== function clearLocalPlayerOwnedPeds() { - logToConsole(LOG_DEBUG, `[AGRP.Utilities] Clearing all self-owned peds ...`); + logToConsole(LOG_DEBUG, `[V.RP.Utilities] Clearing all self-owned peds ...`); clearSelfOwnedPeds(); - logToConsole(LOG_DEBUG, `[AGRP.Utilities] All self-owned peds cleared`); + logToConsole(LOG_DEBUG, `[V.RP.Utilities] All self-owned peds cleared`); }; // =========================================================================== function setCityAmbienceState(state, clearElements = false) { - logToConsole(LOG_DEBUG, `[AGRP.Utilities] Ambient civilians and traffic ${(state) ? "enabled" : "disabled"}`); + logToConsole(LOG_DEBUG, `[V.RP.Utilities] Ambient civilians and traffic ${(state) ? "enabled" : "disabled"}`); game.setTrafficEnabled(state); if (getMultiplayerMod() == V_MPMOD_GTAC) { @@ -134,7 +134,7 @@ function enterVehicleAsPassenger() { // =========================================================================== function giveLocalPlayerWeapon(weaponId, ammo, active) { - logToConsole(LOG_DEBUG, `[AGRP.Utilities] Giving weapon ${weaponId} with ${ammo} ammo`); + logToConsole(LOG_DEBUG, `[V.RP.Utilities] Giving weapon ${weaponId} with ${ammo} ammo`); forceWeapon = weaponId; if (getGame() == V_GAME_MAFIA_ONE) { localPlayer.giveWeapon(weaponId, 0, ammo); @@ -155,7 +155,7 @@ function giveLocalPlayerWeapon(weaponId, ammo, active) { // =========================================================================== function clearLocalPlayerWeapons(clearData) { - logToConsole(LOG_DEBUG, `[AGRP.Utilities] Clearing weapons`); + logToConsole(LOG_DEBUG, `[V.RP.Utilities] Clearing weapons`); localPlayer.clearWeapons(); if (clearData == true) { forceWeapon = 0; @@ -173,7 +173,7 @@ function getClosestVehicle(pos) { // =========================================================================== function setLocalPlayerPosition(position) { - logToConsole(LOG_DEBUG, `[AGRP.Utilities] Setting position to ${position.x}, ${position.y}, ${position.z}`); + logToConsole(LOG_DEBUG, `[V.RP.Utilities] Setting position to ${position.x}, ${position.y}, ${position.z}`); if (typeof localPlayer.velocity != "undefined") { localPlayer.velocity = toVector3(0.0, 0.0, 0.0); } @@ -186,7 +186,7 @@ function setLocalPlayerPosition(position) { // =========================================================================== function setLocalPlayerHeading(heading) { - logToConsole(LOG_DEBUG, `[AGRP.Utilities] Setting heading to ${heading}`); + logToConsole(LOG_DEBUG, `[V.RP.Utilities] Setting heading to ${heading}`); if (typeof localPlayer.heading != "undefined") { localPlayer.heading = heading; } @@ -195,7 +195,7 @@ function setLocalPlayerHeading(heading) { // =========================================================================== function setLocalPlayerInterior(interior) { - logToConsole(LOG_DEBUG, `[AGRP.Utilities] Setting interior to ${interior}`); + logToConsole(LOG_DEBUG, `[V.RP.Utilities] Setting interior to ${interior}`); if (getMultiplayerMod() == V_MPMOD_GTAC) { if (!isGTAIV()) { localPlayer.interior = interior; @@ -224,7 +224,7 @@ function setLocalPlayerInterior(interior) { // =========================================================================== function setSnowState(falling, ground, forceGround) { - logToConsole(LOG_DEBUG, `[AGRP.Utilities] Setting falling snow to ${falling} and ground snow to ${ground}`); + logToConsole(LOG_DEBUG, `[V.RP.Utilities] Setting falling snow to ${falling} and ground snow to ${ground}`); snowing = falling; //snow.force = ground; //if (forceGround == true) { @@ -244,7 +244,7 @@ function setLocalPlayerHealth(health) { // =========================================================================== function playPedSpeech(pedName, speechId) { - logToConsole(LOG_DEBUG, `[AGRP.Utilities] Making ${pedName}'s ped talk (${speechId})`); + logToConsole(LOG_DEBUG, `[V.RP.Utilities] Making ${pedName}'s ped talk (${speechId})`); if (getMultiplayerMod() == V_MPMOD_GTAC) { game.SET_CHAR_SAY(int, int); } @@ -253,7 +253,7 @@ function playPedSpeech(pedName, speechId) { // =========================================================================== function clearLocalPedState() { - logToConsole(LOG_DEBUG, `[AGRP.Utilities] Clearing local ped state`); + logToConsole(LOG_DEBUG, `[V.RP.Utilities] Clearing local ped state`); localPlayer.clearObjective(); } @@ -267,7 +267,7 @@ function getWeaponSlot(weaponId) { function setLocalPlayerDrunkEffect(amount, duration) { if (getMultiplayerMod() == V_MPMOD_GTAC) { - logToConsole(LOG_DEBUG, `[AGRP.Utilities] Drunk effect set to ${amount} for ${duration} ms`); + logToConsole(LOG_DEBUG, `[V.RP.Utilities] Drunk effect set to ${amount} for ${duration} ms`); drunkEffectAmount = 0; drunkEffectDurationTimer = setInterval(function () { drunkEffectAmount = drunkEffectAmount; @@ -319,7 +319,7 @@ function clearSelfOwnedVehicles() { // =========================================================================== function setMouseCameraState(state) { - logToConsole(LOG_DEBUG, `[AGRP.Utilities] ${(state) ? "Enabled" : "Disabled"} mouse camera`); + logToConsole(LOG_DEBUG, `[V.RP.Utilities] ${(state) ? "Enabled" : "Disabled"} mouse camera`); mouseCameraEnabled = state; SetStandardControlsEnabled(!mouseCameraEnabled); } @@ -327,28 +327,28 @@ function setMouseCameraState(state) { // =========================================================================== function toggleMouseCursor() { - logToConsole(LOG_DEBUG, `[AGRP.Utilities] ${(!gui.cursorEnabled) ? "Enabled" : "Disabled"} mouse cursor`); + logToConsole(LOG_DEBUG, `[V.RP.Utilities] ${(!gui.cursorEnabled) ? "Enabled" : "Disabled"} mouse cursor`); gui.showCursor(!gui.cursorEnabled, gui.cursorEnabled); } // =========================================================================== function toggleMouseCursor() { - logToConsole(LOG_DEBUG, `[AGRP.Utilities] ${(!gui.cursorEnabled) ? "Enabled" : "Disabled"} mouse cursor`); + logToConsole(LOG_DEBUG, `[V.RP.Utilities] ${(!gui.cursorEnabled) ? "Enabled" : "Disabled"} mouse cursor`); setMouseCameraState(!mouseCameraEnabled); } // =========================================================================== function setPlayerWeaponDamageEvent(clientName, eventType) { - logToConsole(LOG_DEBUG, `[AGRP.Utilities] Set ${clientName} damage event type to ${eventType}`); + logToConsole(LOG_DEBUG, `[V.RP.Utilities] Set ${clientName} damage event type to ${eventType}`); weaponDamageEvent[clientName] = eventType; } // =========================================================================== function setPlayerWeaponDamageEnabled(clientName, state) { - logToConsole(LOG_DEBUG, `[AGRP.Utilities] ${(state) ? "Enabled" : "Disabled"} damage from ${clientName}`); + logToConsole(LOG_DEBUG, `[V.RP.Utilities] ${(state) ? "Enabled" : "Disabled"} damage from ${clientName}`); weaponDamageEnabled[clientName] = state; } @@ -472,7 +472,7 @@ function getVehicleForNetworkEvent(vehicle) { // =========================================================================== function setMinuteDuration(minuteDuration) { - logToConsole(LOG_DEBUG, `[AGRP.Utilities] Setting minute duration to ${minuteDuration}ms`); + logToConsole(LOG_DEBUG, `[V.RP.Utilities] Setting minute duration to ${minuteDuration}ms`); if (isTimeSupported()) { game.time.minuteDuration = minuteDuration; @@ -617,7 +617,7 @@ function updateLocalPlayerMoney() { // =========================================================================== function setLocalPlayerMoney(amount) { - logToConsole(LOG_DEBUG, `[AGRP.Utilities] Setting local player money`); + logToConsole(LOG_DEBUG, `[V.RP.Utilities] Setting local player money`); localPlayerMoney = amount; updateLocalPlayerMoney(); } diff --git a/scripts/client/vehicle.js b/scripts/client/vehicle.js index a0947feb..010398f7 100644 --- a/scripts/client/vehicle.js +++ b/scripts/client/vehicle.js @@ -30,7 +30,7 @@ class VehicleData { // =========================================================================== function receiveVehicleFromServer(vehicleId, position, model, colour1, colour2, colour3 = 0, colour4 = 0, locked = false, lights = false, engine = false, licensePlate = "") { - logToConsole(LOG_DEBUG, `[AGRP.Vehicle] Received vehicle ${vehicleId} (${getVehicleNameFromModel(model, getGame())}) from server`); + logToConsole(LOG_DEBUG, `[V.RP.Vehicle] Received vehicle ${vehicleId} (${getVehicleNameFromModel(model, getGame())}) from server`); if (getGame() != V_GAME_GTA_IV) { return false; @@ -52,7 +52,7 @@ function receiveVehicleFromServer(vehicleId, position, model, colour1, colour2, let vehicle = natives.getVehicleFromNetworkId(vehicleId.ivNetworkId); } else { - //logToConsole(LOG_DEBUG, `[AGRP.Vehicle] Vehicle ${vehicleId} doesn't exist. Adding ...`); + //logToConsole(LOG_DEBUG, `[V.RP.Vehicle] Vehicle ${vehicleId} doesn't exist. Adding ...`); //let tempVehicleData = new VehicleData(vehicleId, name, position, blipModel, pickupModel); //vehicles.push(tempVehicleData); diff --git a/scripts/server/account.js b/scripts/server/account.js index 95a8e75f..2ec4a350 100644 --- a/scripts/server/account.js +++ b/scripts/server/account.js @@ -284,31 +284,31 @@ function toggleAccountGUICommand(command, params, client) { if (doesPlayerHaveGUIEnabled(client)) { getPlayerData(client).accountData.settings = addBitFlag(getPlayerData(client).accountData.settings, flagValue); messagePlayerNormal(client, getLocaleString(client, "GUIAccountSettingToggle", `{softRed}${toUpperCase(getLocaleString(client, "Off"))}{MAINCOLOUR}`)); - logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} has toggled GUI for their account OFF.`); + logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} has toggled GUI for their account OFF.`); } else { getPlayerData(client).accountData.settings = removeBitFlag(getPlayerData(client).accountData.settings, flagValue); messagePlayerNormal(client, getLocaleString(client, "GUIAccountSettingToggle", `{softGreen}${toUpperCase(getLocaleString(client, "On"))}{MAINCOLOUR}`)); - logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} has toggled GUI for their account ON.`); + logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} has toggled GUI for their account ON.`); } if (!isPlayerLoggedIn(client)) { if (getPlayerData().accountData.databaseId != 0) { if (doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) { showPlayerLoginGUI(client); - logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the login GUI`); + logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the login GUI`); } else { hideAllPlayerGUI(client); messagePlayerNormal(client, getLocaleString(client, "WelcomeBack", getServerName(), getPlayerName(client), "{ALTCOLOUR}/login{MAINCOLOUR}")); - logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled)`); + logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled)`); } } else { if (doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) { showPlayerRegistrationGUI(client); - logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the register GUI`); + logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the register GUI`); } else { hideAllPlayerGUI(client); messagePlayerNormal(client, getLocaleString(client, "WelcomeNewPlayer", getServerName(), getPlayerName(client), "{ALTCOLOUR}/register{MAINCOLOUR}")); - logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the register message (GUI disabled)`); + logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the register message (GUI disabled)`); } } } @@ -323,11 +323,11 @@ function toggleAccountLoginAttemptNotificationsCommand(command, params, client) if (doesPlayerHaveLoginAlertsEnabled(client)) { getPlayerData(client).accountData.settings = removeBitFlag(getPlayerData(client).accountData.settings, flagValue); messagePlayerNormal(client, `⚙️ You turned ${getBoolRedGreenInlineColour(false)}OFF{MAINCOLOUR} notification by email when somebody tries to login to your account`); - logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} has toggled the login attempt email notifications OFF for their account`); + logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} has toggled the login attempt email notifications OFF for their account`); } else { getPlayerData(client).accountData.settings = addBitFlag(getPlayerData(client).accountData.settings, flagValue); messagePlayerNormal(client, `⚙️ You turned ${getBoolRedGreenInlineColour(true)}ON{MAINCOLOUR} notification by email when somebody tries to login to your account`); - logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} has toggled the login attempt email notifications OFF for their account`); + logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} has toggled the login attempt email notifications OFF for their account`); } return true; @@ -341,14 +341,14 @@ function toggleAccountServerLogoCommand(command, params, client) { if (!doesPlayerHaveLogoEnabled(client)) { getPlayerData(client).accountData.settings = removeBitFlag(getPlayerData(client).accountData.settings, flagValue); messagePlayerSuccess(client, getLocaleString(client, "AccountServerLogoSet", `${getBoolRedGreenInlineColour(true)}${getLocaleString(client, "On")}{MAINCOLOUR}`)); - logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} has toggled the server logo ON for their account`); + logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} has toggled the server logo ON for their account`); if (getServerConfig().showLogo) { updatePlayerShowLogoState(client, true); } } else { getPlayerData(client).accountData.settings = addBitFlag(getPlayerData(client).accountData.settings, flagValue); messagePlayerSuccess(client, getLocaleString(client, "AccountServerLogoSet", `${getBoolRedGreenInlineColour(false)}${getLocaleString(client, "Off")}{MAINCOLOUR}`)); - logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} has toggled the server logo OFF for their account`); + logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} has toggled the server logo OFF for their account`); updatePlayerShowLogoState(client, false); } @@ -377,11 +377,11 @@ function toggleAccountTwoFactorAuthCommand(command, params, client) { if (!doesPlayerHaveTwoFactorAuthEnabled(client)) { getPlayerData(client).accountData.settings = addBitFlag(getPlayerData(client).accountData.settings, flagValue); messagePlayerSuccess(client, getLocaleString(client, "TwoFactorAuthSet", `${getBoolRedGreenInlineColour(true)}${getLocaleString(client, "On")}{MAINCOLOUR}`)); - logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} has toggled two-factor authentication ON for their account`); + logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} has toggled two-factor authentication ON for their account`); } else { getPlayerData(client).accountData.settings = removeBitFlag(getPlayerData(client).accountData.settings, flagValue); messagePlayerSuccess(client, getLocaleString(client, "TwoFactorAuthSet", `${getBoolRedGreenInlineColour(false)}${toUpperCase(getLocaleString(client, "Off"))}{MAINCOLOUR}`)); - logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} has toggled two-factor authentication OFF for their account`); + logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} has toggled two-factor authentication OFF for their account`); } return true; } @@ -828,7 +828,7 @@ function saltAccountInfo(name, password) { // =========================================================================== function loginSuccess(client) { - logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} successfully logged in.`); + logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} successfully logged in.`); getPlayerData(client).loggedIn = true; if (getPlayerData(client).loginTimeout != null) { @@ -839,7 +839,7 @@ function loginSuccess(client) { updateConnectionLogOnAuth(client, getPlayerData(client).accountData.databaseId); if (doesPlayerHaveStaffPermission(client, "Developer") || doesPlayerHaveStaffPermission(client, "ManageServer")) { - logToConsole(LOG_WARN, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} has needed permissions and is being given administrator access`); + logToConsole(LOG_WARN, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} has needed permissions and is being given administrator access`); setPlayerNativeAdminState(client, true); } @@ -851,11 +851,11 @@ function loginSuccess(client) { }, 3500); if (doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) { - logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the error GUI (not a tester).`); + logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the error GUI (not a tester).`); showPlayerErrorGUI(client, getLocaleString(client, "NotATester"), getLocaleString(client, "AccessDenied")); return false; } else { - logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the "not a tester" error message (GUI disabled).`); + logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the "not a tester" error message (GUI disabled).`); messagePlayerError(client, getLocaleString(client, "NotATester")); return false; } @@ -866,10 +866,10 @@ function loginSuccess(client) { if (doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) { showPlayerPrompt(client, getLocaleString(client, "NoCharactersGUIMessage"), getLocaleString(client, "NoCharactersGUIWindowTitle"), getLocaleString(client, "Yes"), getLocaleString(client, "No")); getPlayerData(client).promptType = V_PROMPT_CREATEFIRSTCHAR; - logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the no characters prompt GUI`); + logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the no characters prompt GUI`); } else { messagePlayerAlert(client, getLocaleString(client, "NoCharactersChatMessage", `{ALTCOLOUR}/newchar{MAINCOLOUR}`)); - logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the no characters message (GUI disabled)`); + logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the no characters message (GUI disabled)`); } } else { showCharacterSelectToClient(client); @@ -1068,7 +1068,7 @@ function checkLogin(client, password) { } if (isPlayerLoggedIn(client)) { - logToConsole(LOG_WARN, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} attempted to login but is already logged in`); + logToConsole(LOG_WARN, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} attempted to login but is already logged in`); if (doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) { showPlayerLoginSuccessGUI(client); } else { @@ -1079,25 +1079,25 @@ function checkLogin(client, password) { } if (!isPlayerRegistered(client)) { - logToConsole(LOG_WARN, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} attempted to login but is not registered`); + logToConsole(LOG_WARN, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} attempted to login but is not registered`); if (doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) { showPlayerRegistrationGUI(client); - logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the register GUI`); + logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the register GUI`); } else { messagePlayerError(client, "Your name is not registered! Use /register to make an account."); - logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the register message (GUI disabled)`); + logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the register message (GUI disabled)`); } return false; } if (areParamsEmpty(password)) { - logToConsole(LOG_WARN, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} attempted to login but failed (empty password). ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining`); + logToConsole(LOG_WARN, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} attempted to login but failed (empty password). ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining`); if (doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) { showPlayerLoginFailedGUI(client, getLocaleString(client, "LoginFailedInvalidPassword", getPlayerData(client).loginAttemptsRemaining)); - logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the login GUI with ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining alert.`); + logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the login GUI with ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining alert.`); } else { messagePlayerError(client, getLocaleString(client, "LoginFailedNoPassword", getPlayerData(client).loginAttemptsRemaining)); - logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled) with ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining alert.`); + logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled) with ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining alert.`); } // Disabling email login alerts for now. It hangs the server for a couple seconds. Need a way to thread it. @@ -1108,13 +1108,13 @@ function checkLogin(client, password) { } if (!isAccountPasswordCorrect(getPlayerData(client).accountData, hashAccountPassword(getPlayerName(client), password))) { - logToConsole(LOG_WARN, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} attempted to login but failed (wrong password). ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining`); + logToConsole(LOG_WARN, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} attempted to login but failed (wrong password). ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining`); if (doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) { showPlayerLoginFailedGUI(client, getLocaleString(client, "LoginFailedInvalidPassword", getPlayerData(client).loginAttemptsRemaining)); - logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the login GUI with ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining alert.`); + logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the login GUI with ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining alert.`); } else { messagePlayerError(client, getLocaleString(client, "LoginFailedInvalidPassword", getPlayerData(client).loginAttemptsRemaining)); - logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled) with ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining alert.`); + logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled) with ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining alert.`); } // Disabling email login alerts for now. It hangs the server for a couple seconds. Need a way to thread it. @@ -1147,7 +1147,7 @@ function checkLogin(client, password) { // =========================================================================== function checkRegistration(client, password, confirmPassword = "", emailAddress = "") { - logToConsole(LOG_DEBUG, `[AGRP.Account]: Checking registration for ${getPlayerName(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Account]: Checking registration for ${getPlayerName(client)}`); if (isPlayerRegistered(client)) { if (doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) { @@ -1268,11 +1268,11 @@ function checkRegistration(client, password, confirmPassword = "", emailAddress }, 5000); if (doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) { - logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the error GUI (not a tester).`); + logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the error GUI (not a tester).`); showPlayerErrorGUI(client, getLocaleString(client, "NotATester"), getLocaleString(client, "AccessDenied")); return false; } else { - logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the "not a tester" error message (GUI disabled).`); + logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the "not a tester" error message (GUI disabled).`); messagePlayerError(client, getLocaleString(client, "NotATester")); return false; } @@ -1421,7 +1421,7 @@ function savePlayerToDatabase(client) { return false; } - logToConsole(LOG_DEBUG, `[AGRP.Account]: Saving client ${getPlayerName(client)} to database ...`); + logToConsole(LOG_DEBUG, `[V.RP.Account]: Saving client ${getPlayerName(client)} to database ...`); saveAccountToDatabase(getPlayerData(client).accountData); if (getPlayerData(client).currentSubAccount != -1) { @@ -1443,7 +1443,7 @@ function savePlayerToDatabase(client) { saveSubAccountToDatabase(getPlayerCurrentSubAccount(client)); } - logToConsole(LOG_DEBUG, `[AGRP.Account]: Saved client ${getPlayerDisplayForConsole(client)} to database successfully!`); + logToConsole(LOG_DEBUG, `[V.RP.Account]: Saved client ${getPlayerDisplayForConsole(client)} to database successfully!`); return true; } @@ -1477,7 +1477,7 @@ function createDefaultAccountServerData(accountDatabaseId) { // =========================================================================== function loadAccountKeybindsFromDatabase(accountDatabaseID) { - logToConsole(LOG_DEBUG, `[AGRP.Account]: Loading account keybinds for account ${accountDatabaseID} from database ...`); + logToConsole(LOG_DEBUG, `[V.RP.Account]: Loading account keybinds for account ${accountDatabaseID} from database ...`); let tempAccountKeybinds = []; let dbConnection = connectToDatabase(); @@ -1500,21 +1500,21 @@ function loadAccountKeybindsFromDatabase(accountDatabaseID) { for (let i in dbAssoc) { let tempAccountKeyBindData = new KeyBindData(dbAssoc[i]); tempAccountKeybinds.push(tempAccountKeyBindData); - logToConsole(LOG_DEBUG, `[AGRP.Account]: Account keybind '${tempAccountKeyBindData.databaseId}' (Key ${tempAccountKeyBindData.key} '${toUpperCase(getKeyNameFromId(tempAccountKeyBindData.key))}') loaded from database successfully!`); + logToConsole(LOG_DEBUG, `[V.RP.Account]: Account keybind '${tempAccountKeyBindData.databaseId}' (Key ${tempAccountKeyBindData.key} '${toUpperCase(getKeyNameFromId(tempAccountKeyBindData.key))}') loaded from database successfully!`); } } disconnectFromDatabase(dbConnection); } } - logToConsole(LOG_DEBUG, `[AGRP.Account]: ${tempAccountKeybinds.length} account keybinds for account ${accountDatabaseID} loaded from database successfully!`); + logToConsole(LOG_DEBUG, `[V.RP.Account]: ${tempAccountKeybinds.length} account keybinds for account ${accountDatabaseID} loaded from database successfully!`); return tempAccountKeybinds; } // =========================================================================== function loadAccountStaffNotesFromDatabase(accountDatabaseID) { - logToConsole(LOG_DEBUG, `[AGRP.Account]: Loading account staff notes for account ${accountDatabaseID} from database ...`); + logToConsole(LOG_DEBUG, `[V.RP.Account]: Loading account staff notes for account ${accountDatabaseID} from database ...`); let tempAccountStaffNotes = []; let dbConnection = connectToDatabase(); @@ -1527,20 +1527,20 @@ function loadAccountStaffNotesFromDatabase(accountDatabaseID) { for (let i in dbAssoc) { let tempAccountStaffNoteData = new AccountStaffNoteData(dbAssoc[i]); tempAccountStaffNotes.push(tempAccountStaffNoteData); - logToConsole(LOG_DEBUG, `[AGRP.Account]: Account staff note '${tempAccountStaffNoteData.databaseId}' loaded from database successfully!`); + logToConsole(LOG_DEBUG, `[V.RP.Account]: Account staff note '${tempAccountStaffNoteData.databaseId}' loaded from database successfully!`); } } disconnectFromDatabase(dbConnection); } - logToConsole(LOG_DEBUG, `[AGRP.Account]: ${tempAccountStaffNotes.length} account staff notes for account ${accountDatabaseID} loaded from database successfully!`); + logToConsole(LOG_DEBUG, `[V.RP.Account]: ${tempAccountStaffNotes.length} account staff notes for account ${accountDatabaseID} loaded from database successfully!`); return tempAccountStaffNotes; } // =========================================================================== function loadAccountContactsFromDatabase(accountDatabaseID) { - logToConsole(LOG_DEBUG, `[AGRP.Account]: Loading account contacts for account ${accountDatabaseID} from database ...`); + logToConsole(LOG_DEBUG, `[V.RP.Account]: Loading account contacts for account ${accountDatabaseID} from database ...`); let tempAccountContacts = []; let dbConnection = connectToDatabase(); @@ -1553,20 +1553,20 @@ function loadAccountContactsFromDatabase(accountDatabaseID) { for (let i in dbAssoc) { let tempAccountContactData = new AccountContactData(dbAssoc[i]); tempAccountContacts.push(tempAccountContactData); - logToConsole(LOG_DEBUG, `[AGRP.Account]: Account contact '${tempAccountContactData.databaseId}' loaded from database successfully!`); + logToConsole(LOG_DEBUG, `[V.RP.Account]: Account contact '${tempAccountContactData.databaseId}' loaded from database successfully!`); } } disconnectFromDatabase(dbConnection); } - logToConsole(LOG_DEBUG, `[AGRP.Account]: ${tempAccountContacts.length} account contacts for account ${accountDatabaseID} loaded from database successfully!`); + logToConsole(LOG_DEBUG, `[V.RP.Account]: ${tempAccountContacts.length} account contacts for account ${accountDatabaseID} loaded from database successfully!`); return tempAccountContacts; } // =========================================================================== function loadAccountMessagesFromDatabase(accountDatabaseID) { - logToConsole(LOG_DEBUG, `[AGRP.Account]: Loading account messages for account ${accountDatabaseID} from database ...`); + logToConsole(LOG_DEBUG, `[V.RP.Account]: Loading account messages for account ${accountDatabaseID} from database ...`); let tempAccountMessages = []; let dbConnection = connectToDatabase(); @@ -1579,13 +1579,13 @@ function loadAccountMessagesFromDatabase(accountDatabaseID) { for (let i in dbAssoc) { let tempAccountMessageData = new AccountContactData(dbAssoc[i]); tempAccountMessages.push(tempAccountMessageData); - logToConsole(LOG_DEBUG, `[AGRP.Account]: Account contact '${tempAccountMessageData.databaseId}' loaded from database successfully!`); + logToConsole(LOG_DEBUG, `[V.RP.Account]: Account contact '${tempAccountMessageData.databaseId}' loaded from database successfully!`); } } disconnectFromDatabase(dbConnection); } - logToConsole(LOG_DEBUG, `[AGRP.Account]: ${tempAccountMessages.length} account messages for account ${accountDatabaseID} loaded from database successfully!`); + logToConsole(LOG_DEBUG, `[V.RP.Account]: ${tempAccountMessages.length} account messages for account ${accountDatabaseID} loaded from database successfully!`); return tempAccountMessages; } diff --git a/scripts/server/ban.js b/scripts/server/ban.js index 2e26ee6b..6316ada4 100644 --- a/scripts/server/ban.js +++ b/scripts/server/ban.js @@ -65,7 +65,7 @@ function accountBanCommand(command, params, client) { return false; } - logToConsole(LOG_WARN, `[AGRP.Ban]: ${getPlayerDisplayForConsole(targetClient)} (${getPlayerData(targetClient).accountData.name}) account was banned by ${getPlayerDisplayForConsole(client)}. Reason: ${reason}`); + logToConsole(LOG_WARN, `[V.RP.Ban]: ${getPlayerDisplayForConsole(targetClient)} (${getPlayerData(targetClient).accountData.name}) account was banned by ${getPlayerDisplayForConsole(client)}. Reason: ${reason}`); announceAdminAction(`PlayerAccountBanned`, `{ALTCOLOUR}${getPlayerName(targetClient)}{MAINCOLOUR}`); banAccount(getPlayerData(targetClient).accountData.databaseId, getPlayerData(client).accountData.databaseId, reason); @@ -97,7 +97,7 @@ function subAccountBanCommand(command, params, client, fromDiscord) { return false; } - logToConsole(LOG_WARN, `[AGRP.Ban]: ${getPlayerDisplayForConsole(targetClient)} (${getPlayerData(targetClient).accountData.name})'s subaccount was banned by ${getPlayerDisplayForConsole(client)}. Reason: ${reason}`); + logToConsole(LOG_WARN, `[V.RP.Ban]: ${getPlayerDisplayForConsole(targetClient)} (${getPlayerData(targetClient).accountData.name})'s subaccount was banned by ${getPlayerDisplayForConsole(client)}. Reason: ${reason}`); announceAdminAction(`PlayerCharacterBanned`, `{ALTCOLOUR}${getPlayerName(targetClient)}{MAINCOLOUR}`); banSubAccount(getPlayerData(targetClient).currentSubAccountData.databaseId, getPlayerData(client).accountData.databaseId, reason); diff --git a/scripts/server/business.js b/scripts/server/business.js index 6f505908..a307dbdb 100644 --- a/scripts/server/business.js +++ b/scripts/server/business.js @@ -227,21 +227,21 @@ function loadBusinessesFromDatabase() { tempBusinessData.locations = loadBusinessLocationsFromDatabase(tempBusinessData.databaseId); //tempBusinessData.gameScripts = loadBusinessGameScriptsFromDatabase(tempBusinessData.databaseId); tempBusinesses.push(tempBusinessData); - logToConsole(LOG_VERBOSE, `[AGRP.Business]: Business '${tempBusinessData.name}' (ID ${tempBusinessData.databaseId}) loaded from database successfully!`); + logToConsole(LOG_VERBOSE, `[V.RP.Business]: Business '${tempBusinessData.name}' (ID ${tempBusinessData.databaseId}) loaded from database successfully!`); } } disconnectFromDatabase(dbConnection); } - logToConsole(LOG_INFO, `[AGRP.Business]: ${tempBusinesses.length} businesses loaded from database successfully!`); + logToConsole(LOG_INFO, `[V.RP.Business]: ${tempBusinesses.length} businesses loaded from database successfully!`); return tempBusinesses; } // =========================================================================== function loadBusinessLocationsFromDatabase(businessId) { - logToConsole(LOG_VERBOSE, `[AGRP.Business]: Loading business locations for business ${businessId} from database ...`); + logToConsole(LOG_VERBOSE, `[V.RP.Business]: Loading business locations for business ${businessId} from database ...`); let tempBusinessLocations = []; let dbConnection = connectToDatabase(); @@ -255,13 +255,13 @@ function loadBusinessLocationsFromDatabase(businessId) { for (let i in dbAssoc) { let tempBusinessLocationData = new BusinessLocationData(dbAssoc[i]); tempBusinessLocations.push(tempBusinessLocationData); - logToConsole(LOG_VERBOSE, `[AGRP.Business]: Location '${tempBusinessLocationData.name}' loaded from database successfully!`); + logToConsole(LOG_VERBOSE, `[V.RP.Business]: Location '${tempBusinessLocationData.name}' loaded from database successfully!`); } } disconnectFromDatabase(dbConnection); } - logToConsole(LOG_VERBOSE, `[AGRP.Business]: ${tempBusinessLocations.length} location for business ${businessId} loaded from database successfully!`); + logToConsole(LOG_VERBOSE, `[V.RP.Business]: ${tempBusinessLocations.length} location for business ${businessId} loaded from database successfully!`); return tempBusinessLocations; } @@ -269,7 +269,7 @@ function loadBusinessLocationsFromDatabase(businessId) { /* function loadBusinessGameScriptsFromDatabase(businessId) { - logToConsole(LOG_VERBOSE, `[AGRP.Business]: Loading business game scripts for business ${businessId} from database ...`); + logToConsole(LOG_VERBOSE, `[V.RP.Business]: Loading business game scripts for business ${businessId} from database ...`); let tempBusinessGameScripts = []; let dbConnection = connectToDatabase(); @@ -284,13 +284,13 @@ function loadBusinessGameScriptsFromDatabase(businessId) { for (let i in dbAssoc) { let tempBusinessGameScriptData = new BusinessGameScriptData(dbAssoc[i]); tempBusinessGameScripts.push(tempBusinessGameScriptData); - logToConsole(LOG_VERBOSE, `[AGRP.Business]: Game script '${tempBusinessGameScriptData.name}' loaded from database successfully!`); + logToConsole(LOG_VERBOSE, `[V.RP.Business]: Game script '${tempBusinessGameScriptData.name}' loaded from database successfully!`); } } disconnectFromDatabase(dbConnection); } - logToConsole(LOG_VERBOSE, `[AGRP.Business]: ${tempBusinessGameScripts.length} game scripts for business ${businessId} loaded from database successfully!`); + logToConsole(LOG_VERBOSE, `[V.RP.Business]: ${tempBusinessGameScripts.length} game scripts for business ${businessId} loaded from database successfully!`); return tempBusinessGameScripts; } */ @@ -1554,7 +1554,7 @@ function orderItemForBusinessCommand(command, params, client) { let value = getItemTypeData(itemType).orderValue; let businessId = getPlayerBusiness(client); - logToConsole(LOG_DEBUG, `[AGRP.Business] ${getPlayerDisplayForConsole(client)} is ordering ${amount} ${splitParams.slice(0, -2).join(" ")}`); + logToConsole(LOG_DEBUG, `[V.RP.Business] ${getPlayerDisplayForConsole(client)} is ordering ${amount} ${splitParams.slice(0, -2).join(" ")}`); if (!getBusinessData(businessId)) { messagePlayerError(client, getLocaleString(client, "InvalidBusiness")); @@ -1893,7 +1893,7 @@ function saveBusinessToDatabase(businessId) { return false; } - logToConsole(LOG_DEBUG, `[AGRP.Business]: Saving business '${tempBusinessData.name}' to database ...`); + logToConsole(LOG_DEBUG, `[V.RP.Business]: Saving business '${tempBusinessData.name}' to database ...`); let dbConnection = connectToDatabase(); if (dbConnection) { let safeBusinessName = escapeDatabaseString(dbConnection, tempBusinessData.name); @@ -1949,7 +1949,7 @@ function saveBusinessToDatabase(businessId) { disconnectFromDatabase(dbConnection); return true; } - logToConsole(LOG_DEBUG, `[AGRP.Business]: Saved business '${tempBusinessData.name}' to database!`); + logToConsole(LOG_DEBUG, `[V.RP.Business]: Saved business '${tempBusinessData.name}' to database!`); return false; } @@ -2019,7 +2019,7 @@ function createBusinessEntrancePickup(businessId) { // return false; //} - logToConsole(LOG_VERBOSE, `[AGRP.Job]: Creating entrance pickup for business ${businessData.name}`); + logToConsole(LOG_VERBOSE, `[V.RP.Job]: Creating entrance pickup for business ${businessData.name}`); if (areServerElementsSupported() && getGame() != V_GAME_MAFIA_ONE && getGame() != V_GAME_GTA_IV) { let entrancePickup = null; @@ -2096,7 +2096,7 @@ function createBusinessEntranceBlip(businessId) { blipModelId = businessData.entranceBlipModel; } - logToConsole(LOG_VERBOSE, `[AGRP.Job]: Creating entrance blip for business ${businessData.name} (model ${blipModelId})`); + logToConsole(LOG_VERBOSE, `[V.RP.Job]: Creating entrance blip for business ${businessData.name} (model ${blipModelId})`); if (areServerElementsSupported() && getGame() != V_GAME_MAFIA_ONE && getGame() != V_GAME_GTA_IV) { let entranceBlip = createGameBlip(businessData.entrancePosition, blipModelId, 1, getColourByType("businessBlue")); @@ -2148,7 +2148,7 @@ function createBusinessExitPickup(businessId) { return false; } - logToConsole(LOG_VERBOSE, `[AGRP.Job]: Creating exit pickup for business ${businessData.name}`); + logToConsole(LOG_VERBOSE, `[V.RP.Job]: Creating exit pickup for business ${businessData.name}`); let exitPickup = null; if (isGameFeatureSupported("pickup")) { @@ -2220,7 +2220,7 @@ function createBusinessExitBlip(businessId) { blipModelId = businessData.exitBlipModel; } - logToConsole(LOG_VERBOSE, `[AGRP.Job]: Creating exit blip for business ${businessData.name} (model ${blipModelId})`); + logToConsole(LOG_VERBOSE, `[V.RP.Job]: Creating exit blip for business ${businessData.name} (model ${blipModelId})`); let exitBlip = createGameBlip(businessData.exitPosition, blipModelId, 1, getColourByName("businessBlue")); if (exitBlip != null) { @@ -2842,11 +2842,11 @@ function cacheBusinessItems(businessId) { clearArray(getBusinessData(businessId).storageItemCache); //let businessData = getBusinessData(businessId); - //logToConsole(LOG_VERBOSE, `[AGRP.Business] Caching business items for business ${businessId} (${businessData.name}) ...`); + //logToConsole(LOG_VERBOSE, `[V.RP.Business] Caching business items for business ${businessId} (${businessData.name}) ...`); //getBusinessData(businessId).floorItemCache = getServerData().items.filter(item => item.ownerType == V_ITEM_OWNER_BIZFLOOR && item.ownerId == businessData.databaseId).map(i => i.index); //getBusinessData(businessId).storageItemCache = getServerData().items.filter(item => item.ownerType == V_ITEM_OWNER_BIZSTORAGE && item.ownerId == businessData.databaseId); - logToConsole(LOG_VERBOSE, `[AGRP.Business] Caching business items for business ${businessId} (${getBusinessData(businessId).name}) ...`); + logToConsole(LOG_VERBOSE, `[V.RP.Business] Caching business items for business ${businessId} (${getBusinessData(businessId).name}) ...`); for (let i in getServerData().items) { if (getItemData(i).ownerType == V_ITEM_OWNER_BIZFLOOR && getItemData(i).ownerId == getBusinessData(businessId).databaseId) { getBusinessData(businessId).floorItemCache.push(i); @@ -2855,7 +2855,7 @@ function cacheBusinessItems(businessId) { } } - logToConsole(LOG_VERBOSE, `[AGRP.Business] Successfully cached ${getBusinessData(businessId).floorItemCache.length} floor items and ${getBusinessData(businessId).storageItemCache} storage items for business ${businessId} (${getBusinessData(businessId).name})!`); + logToConsole(LOG_VERBOSE, `[V.RP.Business] Successfully cached ${getBusinessData(businessId).floorItemCache.length} floor items and ${getBusinessData(businessId).storageItemCache} storage items for business ${businessId} (${getBusinessData(businessId).name})!`); } // =========================================================================== diff --git a/scripts/server/clan.js b/scripts/server/clan.js index 766d7e43..2f42c5a6 100644 --- a/scripts/server/clan.js +++ b/scripts/server/clan.js @@ -132,13 +132,13 @@ function loadClansFromDatabase() { //tempClanData.members = loadClanMembersFromDatabase(tempClanData.databaseId); tempClanData.ranks = loadClanRanksFromDatabase(tempClanData.databaseId); tempClans.push(tempClanData); - logToConsole(LOG_DEBUG, `[AGRP.Clan]: Clan '${tempClanData.name}' loaded from database successfully!`); + logToConsole(LOG_DEBUG, `[V.RP.Clan]: Clan '${tempClanData.name}' loaded from database successfully!`); } } disconnectFromDatabase(dbConnection); } - logToConsole(LOG_INFO, `[AGRP.Clan]: ${tempClans.length} clans loaded from database successfully!`); + logToConsole(LOG_INFO, `[V.RP.Clan]: ${tempClans.length} clans loaded from database successfully!`); return tempClans; } @@ -158,20 +158,20 @@ function loadClanMembersFromDatabase() { for (let i in dbAssoc) { let tempClanData = new ClanData(dbAssoc[i]); tempClans.push(tempClanData); - logToConsole(LOG_VERBOSE, `[AGRP.Clan]: Clan '${tempClanData.name}' loaded from database successfully!`); + logToConsole(LOG_VERBOSE, `[V.RP.Clan]: Clan '${tempClanData.name}' loaded from database successfully!`); } } disconnectFromDatabase(dbConnection); } - logToConsole(LOG_INFO, `[AGRP.Clan]: ${tempClans.length} clans loaded from database successfully!`); + logToConsole(LOG_INFO, `[V.RP.Clan]: ${tempClans.length} clans loaded from database successfully!`); return tempClans; } // =========================================================================== function loadClanRanksFromDatabase(clanDatabaseId) { - logToConsole(LOG_INFO, `[AGRP.Clan]: Loading ranks for clan ${clanDatabaseId} from database ...`); + logToConsole(LOG_INFO, `[V.RP.Clan]: Loading ranks for clan ${clanDatabaseId} from database ...`); let dbConnection = connectToDatabase(); let dbAssoc = []; @@ -184,13 +184,13 @@ function loadClanRanksFromDatabase(clanDatabaseId) { for (let i in dbAssoc) { let tempClanRankData = new ClanRankData(dbAssoc[i]); tempClanRanks.push(tempClanRankData); - logToConsole(LOG_VERBOSE, `[AGRP.Clan]: Clan rank '${tempClanRankData.name}' loaded from database successfully!`); + logToConsole(LOG_VERBOSE, `[V.RP.Clan]: Clan rank '${tempClanRankData.name}' loaded from database successfully!`); } } disconnectFromDatabase(dbConnection); } - logToConsole(LOG_INFO, `[AGRP.Clan]: Loaded ranks for clan ${clanDatabaseId} from database successfully!`); + logToConsole(LOG_INFO, `[V.RP.Clan]: Loaded ranks for clan ${clanDatabaseId} from database successfully!`); return tempClanRanks; } @@ -1285,10 +1285,10 @@ function setClanRankTitle(clanId, rankId, title) { // =========================================================================== function saveAllClansToDatabase() { - logToConsole(LOG_DEBUG, `[AGRP.Clan]: Saving all server clans to database ...`); + logToConsole(LOG_DEBUG, `[V.RP.Clan]: Saving all server clans to database ...`); if (getServerConfig().devServer) { - logToConsole(LOG_DEBUG, `[AGRP.Clan]: Aborting save all clans to database, dev server is enabled.`); + logToConsole(LOG_DEBUG, `[V.RP.Clan]: Aborting save all clans to database, dev server is enabled.`); return false; } @@ -1296,7 +1296,7 @@ function saveAllClansToDatabase() { saveClanToDatabase(i); } - logToConsole(LOG_INFO, `[AGRP.Clan]: Saved all server clans to database`); + logToConsole(LOG_INFO, `[V.RP.Clan]: Saved all server clans to database`); } // =========================================================================== diff --git a/scripts/server/client.js b/scripts/server/client.js index 5fc37401..c810dcd2 100644 --- a/scripts/server/client.js +++ b/scripts/server/client.js @@ -162,7 +162,7 @@ function initClientScript() { // =========================================================================== function resetClientStuff(client) { - logToConsole(LOG_DEBUG, `[AGRP.Utilities] Resetting client data for ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Utilities] Resetting client data for ${getPlayerDisplayForConsole(client)}`); if (!getPlayerData(client)) { return false; @@ -207,15 +207,15 @@ function kickAllClients() { // =========================================================================== function initClient(client) { - logToConsole(LOG_DEBUG, `[AGRP.Account] Initializing client ${getPlayerDisplayForConsole(client)} ...`); + logToConsole(LOG_DEBUG, `[V.RP.Account] Initializing client ${getPlayerDisplayForConsole(client)} ...`); if (isConsole(client)) { - logToConsole(LOG_DEBUG | LOG_ERROR, `[AGRP.Account] Client initialization failed for ${getPlayerDisplayForConsole(client)}! (is console client)`); + logToConsole(LOG_DEBUG | LOG_ERROR, `[V.RP.Account] Client initialization failed for ${getPlayerDisplayForConsole(client)}! (is console client)`); return false; } if (playerInitialized[client.index] == true) { - logToConsole(LOG_DEBUG | LOG_ERROR, `[AGRP.Account] Client initialization failed for ${getPlayerDisplayForConsole(client)}! (already initialized)`); + logToConsole(LOG_DEBUG | LOG_ERROR, `[V.RP.Account] Client initialization failed for ${getPlayerDisplayForConsole(client)}! (already initialized)`); return false; } @@ -223,25 +223,25 @@ function initClient(client) { //setEntityData(client, "v.rp.isInitialized", true, false); - logToConsole(LOG_DEBUG, `[AGRP.Account] Initializing GUI for ${getPlayerDisplayForConsole(client)} ...`); + logToConsole(LOG_DEBUG, `[V.RP.Account] Initializing GUI for ${getPlayerDisplayForConsole(client)} ...`); sendPlayerCurrencyString(client); sendPlayerGUIColours(client); sendPlayerGUIInit(client); updatePlayerSnowState(client, getServerConfig().groundSnow); - //logToConsole(LOG_DEBUG, `[AGRP.Account] Showing connect camera to ${getPlayerDisplayForConsole(client)} ...`); + //logToConsole(LOG_DEBUG, `[V.RP.Account] Showing connect camera to ${getPlayerDisplayForConsole(client)} ...`); //showConnectCameraToPlayer(client); messageClient(`Please wait ...`, client, getColourByName("softGreen")); - logToConsole(LOG_DEBUG, `[AGRP.Account] Waiting for 2.5 seconds to prevent race attack ...`); + logToConsole(LOG_DEBUG, `[V.RP.Account] Waiting for 2.5 seconds to prevent race attack ...`); setTimeout(function () { if (client != null) { clearChatBox(client); - logToConsole(LOG_DEBUG, `[AGRP.Account] Loading account for ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Account] Loading account for ${getPlayerDisplayForConsole(client)}`); let tempAccountData = loadAccountFromName(getPlayerName(client), true); - logToConsole(LOG_DEBUG, `[AGRP.Account] Loading subaccounts for ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Account] Loading subaccounts for ${getPlayerDisplayForConsole(client)}`); let tempSubAccounts = loadSubAccountsFromAccount(tempAccountData.databaseId); getServerData().clients[getPlayerId(client)] = new ClientData(client, tempAccountData, tempSubAccounts); @@ -258,10 +258,10 @@ function initClient(client) { playRadioStreamForPlayer(client, getServerIntroMusicURL(), true, getPlayerStreamingRadioVolume(client)); } else { if (doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) { - logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the login GUI.`); + logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the login GUI.`); showPlayerLoginGUI(client); } else { - logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled).`); + logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled).`); messagePlayerNormal(client, getLocaleString(client, "WelcomeBack", getServerName(), getPlayerName(client), "/login"), getColourByName("softGreen")); if (checkForGeoIPModule()) { @@ -281,10 +281,10 @@ function initClient(client) { } else { sendPlayerLocaleId(client, 0); if (doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) { - logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the register GUI.`); + logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the register GUI.`); showPlayerRegistrationGUI(client); } else { - logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the register message (GUI disabled).`); + logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the register message (GUI disabled).`); messagePlayerNormal(client, getLocaleString(client, "WelcomeNewPlayer", getServerName(), getPlayerName(client), "/register"), getColourByName("softGreen")); } playRadioStreamForPlayer(client, getServerIntroMusicURL(), true, getPlayerStreamingRadioVolume(client)); diff --git a/scripts/server/command.js b/scripts/server/command.js index e425d1f4..e643f7b7 100644 --- a/scripts/server/command.js +++ b/scripts/server/command.js @@ -707,7 +707,7 @@ function addAllCommandHandlers() { let commands = getCommands(); for (let i in commands) { for (let j in commands[i]) { - logToConsole(LOG_VERBOSE, `[AGRP.Command] Adding command handler for ${i} - ${commands[i][j].command}`); + logToConsole(LOG_VERBOSE, `[V.RP.Command] Adding command handler for ${i} - ${commands[i][j].command}`); addCommandHandler(commands[i][j].command, processPlayerCommand); commandCount++; } @@ -716,7 +716,7 @@ function addAllCommandHandlers() { removeCommandHandler("help"); addCommandHandler("help", helpCommand); - logToConsole(LOG_INFO, `[AGRP.Command] ${commandCount} command handlers added!`); + logToConsole(LOG_INFO, `[V.RP.Command] ${commandCount} command handlers added!`); } // =========================================================================== @@ -890,7 +890,7 @@ function processPlayerCommand(command, params, client) { } if (!doesCommandExist(toLowerCase(command))) { - logToConsole(LOG_WARN, `[AGRP.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (invalid command): /${command} ${paramsDisplay}`); + logToConsole(LOG_WARN, `[V.RP.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (invalid command): /${command} ${paramsDisplay}`); let possibleCommand = getCommandFromParams(command); if (possibleCommand != false && doesPlayerHaveStaffPermission(client, getCommandRequiredPermissions(toLowerCase(possibleCommand.command)))) { @@ -902,7 +902,7 @@ function processPlayerCommand(command, params, client) { } if (!commandData.enabled) { - logToConsole(LOG_WARN, `[AGRP.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (command is disabled): /${command} ${paramsDisplay}`); + logToConsole(LOG_WARN, `[V.RP.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (command is disabled): /${command} ${paramsDisplay}`); messagePlayerError(client, `The command {ALTCOLOUR}/${command}{MAINCOLOUR} is disabled!`); messagePlayerError(client, getLocaleString(client, "CommandDisabled", `{ALTCOLOUR}/${command}{MAINCOLOUR}`)); return false; @@ -910,7 +910,7 @@ function processPlayerCommand(command, params, client) { if (doesCommandRequireLogin(toLowerCase(command))) { if (!isPlayerLoggedIn(client)) { - logToConsole(LOG_WARN, `[AGRP.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (requires login first): /${command} ${paramsDisplay}`); + logToConsole(LOG_WARN, `[V.RP.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (requires login first): /${command} ${paramsDisplay}`); messagePlayerError(client, getLocaleString(client, "CommandRequiresLogin", `{ALTCOLOUR}/${command}{MAINCOLOUR}`)); return false; } @@ -918,7 +918,7 @@ function processPlayerCommand(command, params, client) { if (isClientFromDiscord(client)) { if (!isCommandAllowedOnDiscord(command)) { - logToConsole(LOG_WARN, `[AGRP.Command] ${getPlayerDisplayForConsole(client)} attempted to use command from discord, but failed (not available on discord): /${command} ${paramsDisplay}`); + logToConsole(LOG_WARN, `[V.RP.Command] ${getPlayerDisplayForConsole(client)} attempted to use command from discord, but failed (not available on discord): /${command} ${paramsDisplay}`); messagePlayerError(client, `The {ALTCOLOUR}/${command}{MAINCOLOUR} command isn't available on discord!`); return false; } @@ -926,13 +926,13 @@ function processPlayerCommand(command, params, client) { if (!isConsole(client)) { if (!doesPlayerHaveStaffPermission(client, getCommandRequiredPermissions(toLowerCase(command)))) { - logToConsole(LOG_WARN, `[AGRP.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (no permission): /${command} ${paramsDisplay}`); + logToConsole(LOG_WARN, `[V.RP.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (no permission): /${command} ${paramsDisplay}`); messagePlayerError(client, getLocaleString(client, "CommandNoPermissions", `{ALTCOLOUR}/${toLowerCase(command)}{MAINCOLOUR}`)); return false; } } - logToConsole(LOG_DEBUG, `[AGRP.Command] ${getPlayerDisplayForConsole(client)} used command: /${command} ${paramsDisplay}`); + logToConsole(LOG_DEBUG, `[V.RP.Command] ${getPlayerDisplayForConsole(client)} used command: /${command} ${paramsDisplay}`); commandData.handlerFunction(toLowerCase(command), params, client); } diff --git a/scripts/server/config.js b/scripts/server/config.js index a9745984..f9539f47 100644 --- a/scripts/server/config.js +++ b/scripts/server/config.js @@ -266,49 +266,49 @@ function loadGlobalConfig() { try { getGlobalConfig().database = loadDatabaseConfig(); } catch (error) { - logToConsole(LOG_ERROR, `[AGRP.Config] Failed to load global configuration. Error: ${error}`); + logToConsole(LOG_ERROR, `[V.RP.Config] Failed to load global configuration. Error: ${error}`); thisResource.stop(); } try { getGlobalConfig().economy = loadEconomyConfig(); } catch (error) { - logToConsole(LOG_ERROR, `[AGRP.Config] Failed to load economy configuration. Error: ${error}`); + logToConsole(LOG_ERROR, `[V.RP.Config] Failed to load economy configuration. Error: ${error}`); thisResource.stop(); } try { getGlobalConfig().locale = loadLocaleConfig(); } catch (error) { - logToConsole(LOG_ERROR, `[AGRP.Config] Failed to load locale configuration. Error: ${error}`); + logToConsole(LOG_ERROR, `[V.RP.Config] Failed to load locale configuration. Error: ${error}`); thisResource.stop(); } try { getGlobalConfig().accents = loadAccentConfig(); } catch (error) { - logToConsole(LOG_ERROR, `[AGRP.Config] Failed to load accent configuration. Error: ${error}`); + logToConsole(LOG_ERROR, `[V.RP.Config] Failed to load accent configuration. Error: ${error}`); thisResource.stop(); } try { getGlobalConfig().discord = loadDiscordConfig(); } catch (error) { - logToConsole(LOG_ERROR, `[AGRP.Config] Failed to load discord configuration. Error: ${error}`); + logToConsole(LOG_ERROR, `[V.RP.Config] Failed to load discord configuration. Error: ${error}`); thisResource.stop(); } try { getGlobalConfig().keyBind = loadKeyBindConfig(); } catch (error) { - logToConsole(LOG_ERROR, `[AGRP.Config] Failed to load keybind configuration. Error: ${error}`); + logToConsole(LOG_ERROR, `[V.RP.Config] Failed to load keybind configuration. Error: ${error}`); thisResource.stop(); } try { getGlobalConfig().email = loadEmailConfig(); } catch (error) { - logToConsole(LOG_ERROR, `[AGRP.Config] Failed to load email configuration. Error: ${error}`); + logToConsole(LOG_ERROR, `[V.RP.Config] Failed to load email configuration. Error: ${error}`); thisResource.stop(); } @@ -379,12 +379,12 @@ function applyConfigToServer(tempServerConfig) { updateServerGameTime(); //if (isTimeSupported()) { - // logToConsole(LOG_DEBUG, `[AGRP.Config]: Setting time to to ${tempServerConfig.hour}:${tempServerConfig.minute} with minute duration of ${tempServerConfig.minuteDuration}`); + // logToConsole(LOG_DEBUG, `[V.RP.Config]: Setting time to to ${tempServerConfig.hour}:${tempServerConfig.minute} with minute duration of ${tempServerConfig.minuteDuration}`); // setGameTime(tempServerConfig.hour, tempServerConfig.minute, tempServerConfig.minuteDuration); //} if (isWeatherSupported()) { - logToConsole(LOG_DEBUG, `[AGRP.Config]: Setting weather to ${tempServerConfig.weather}`); + logToConsole(LOG_DEBUG, `[V.RP.Config]: Setting weather to ${tempServerConfig.weather}`); game.forceWeather(getWeatherData(tempServerConfig.weather).weatherId); } @@ -394,7 +394,7 @@ function applyConfigToServer(tempServerConfig) { // =========================================================================== function saveServerConfigToDatabase() { - logToConsole(LOG_DEBUG, `[AGRP.Config]: Saving server ${getServerConfig().databaseId} configuration to database ...`); + logToConsole(LOG_DEBUG, `[V.RP.Config]: Saving server ${getServerConfig().databaseId} configuration to database ...`); if (getServerConfig().needsSaved) { let dbConnection = connectToDatabase(); if (dbConnection) { @@ -458,7 +458,7 @@ function saveServerConfigToDatabase() { } } - logToConsole(LOG_DEBUG, `[AGRP.Config]: Server ${getServerConfig().databaseId} configuration saved to database!`); + logToConsole(LOG_DEBUG, `[V.RP.Config]: Server ${getServerConfig().databaseId} configuration saved to database!`); } // =========================================================================== @@ -932,7 +932,7 @@ function reloadEmailConfigurationCommand(command, params, client) { */ function reloadDatabaseConfigurationCommand(command, params, client) { if (getDatabaseConfig().usePersistentConnection && isDatabaseConnected(persistentDatabaseConnection)) { - logToConsole(LOG_WARN, `[AGRP.Database] Closing persistent database connection`); + logToConsole(LOG_WARN, `[V.RP.Database] Closing persistent database connection`); persistentDatabaseConnection.close(); persistentDatabaseConnection = null; } @@ -1132,14 +1132,14 @@ function loadServerConfig() { serverConfig = loadServerConfigFromGame(getGame()); if (serverConfig == false) { - logToConsole(LOG_ERROR, `[AGRP.Config] Could not load server configuration for game ${getGame()}`); + logToConsole(LOG_ERROR, `[V.RP.Config] Could not load server configuration for game ${getGame()}`); server.shutdown(); } } else { serverConfig = loadServerConfigFromGameAndPort(getGame(), getServerPort()); if (serverConfig == false) { - logToConsole(LOG_ERROR, `[AGRP.Config] Could not load server configuration for game ${getGame()} and port ${getServerPort()}`); + logToConsole(LOG_ERROR, `[V.RP.Config] Could not load server configuration for game ${getGame()} and port ${getServerPort()}`); server.shutdown(); } } diff --git a/scripts/server/event.js b/scripts/server/event.js index a3ab454a..a6aa16bf 100644 --- a/scripts/server/event.js +++ b/scripts/server/event.js @@ -46,7 +46,7 @@ function addAllEventHandlers() { // =========================================================================== function onPlayerConnect(event, ipAddress, port) { - logToConsole(LOG_INFO, `[AGRP.Event] onPlayerConnect - Client connecting (IP: ${ipAddress})`); + logToConsole(LOG_INFO, `[V.RP.Event] onPlayerConnect - Client connecting (IP: ${ipAddress})`); //if(isIpAddressBanned(ipAddress)) { // messagePlayerError(client, "You are banned from this server!"); // return false; @@ -56,7 +56,7 @@ function onPlayerConnect(event, ipAddress, port) { // =========================================================================== function onPlayerJoin(event, client) { - logToConsole(LOG_INFO, `[AGRP.Event] onPlayerJoin - Client ${getPlayerDisplayForConsole(client)} joining from ${getPlayerIP(client)}`); + logToConsole(LOG_INFO, `[V.RP.Event] onPlayerJoin - Client ${getPlayerDisplayForConsole(client)} joining from ${getPlayerIP(client)}`); playerResourceReady[getPlayerId(client)] = false; playerResourceStarted[getPlayerId(client)] = false; @@ -77,7 +77,7 @@ function onPlayerJoin(event, client) { // =========================================================================== function onPlayerJoined(event, client) { - logToConsole(LOG_INFO, `[AGRP.Event] onPlayerJoined - Client ${getPlayerDisplayForConsole(client)} joined from ${getPlayerIP(client)}`); + logToConsole(LOG_INFO, `[V.RP.Event] onPlayerJoined - Client ${getPlayerDisplayForConsole(client)} joined from ${getPlayerIP(client)}`); //initClient(client); } @@ -214,7 +214,7 @@ function onPedExitingVehicle(event, ped, vehicle) { // =========================================================================== function onResourceStart(event, resource) { - logToConsole(LOG_WARN | LOG_DEBUG, `[AGRP.Event] Resource ${resource.name} started!`); + logToConsole(LOG_WARN | LOG_DEBUG, `[V.RP.Event] Resource ${resource.name} started!`); if (resource == thisResource) { //messageAdmins(`{MAINCOLOUR}Resource {ALTCOLOUR}${resource.name}{MAINCOLOUR} started!`); @@ -225,7 +225,7 @@ function onResourceStart(event, resource) { // =========================================================================== function onResourceStop(event, resource) { - logToConsole(LOG_WARN | LOG_DEBUG, `[AGRP.Event] Resource ${resource.name} stopped!`); + logToConsole(LOG_WARN | LOG_DEBUG, `[V.RP.Event] Resource ${resource.name} stopped!`); //if(resource != thisResource) { // messageAdmins(`{MAINCOLOUR}Resource {ALTCOLOUR}${resource.name}{MAINCOLOUR} stopped!`); @@ -252,7 +252,7 @@ function onPedEnteredSphere(event, ped, sphere) { return false; } - logToConsole(LOG_WARN | LOG_DEBUG, `[AGRP.Event] Ped ${ped.id} entered sphere ${sphere.id}!`); + logToConsole(LOG_WARN | LOG_DEBUG, `[V.RP.Event] Ped ${ped.id} entered sphere ${sphere.id}!`); //if (ped.isType(ELEMENT_PLAYER)) { // let client = getClientFromPlayerElement(ped); @@ -276,7 +276,7 @@ function onPedExitedSphere(event, ped, sphere) { return false; } - logToConsole(LOG_WARN | LOG_DEBUG, `[AGRP.Event] Ped ${ped.id} exited sphere ${sphere.id}!`); + logToConsole(LOG_WARN | LOG_DEBUG, `[V.RP.Event] Ped ${ped.id} exited sphere ${sphere.id}!`); //if (ped.isType(ELEMENT_PLAYER)) { // let client = getClientFromPlayerElement(ped); //} @@ -293,7 +293,7 @@ function onPedPickupPickedUp(event, ped, pickup) { return false; } - logToConsole(LOG_WARN | LOG_DEBUG, `[AGRP.Event] Ped ${ped.id} picked up pickup ${pickup.id}!`); + logToConsole(LOG_WARN | LOG_DEBUG, `[V.RP.Event] Ped ${ped.id} picked up pickup ${pickup.id}!`); if (ped.isType(ELEMENT_PLAYER)) { let client = getClientFromPlayerElement(ped); @@ -310,7 +310,7 @@ function onPedPickupPickedUp(event, ped, pickup) { /* function onPedWasted(event, ped, killerPed, weapon, pedPiece) { - logToConsole(LOG_WARN | LOG_DEBUG, `[AGRP.Event] Ped ${ped.id} wasted by ped ${killerPed.id}!`); + logToConsole(LOG_WARN | LOG_DEBUG, `[V.RP.Event] Ped ${ped.id} wasted by ped ${killerPed.id}!`); if (ped.isType(ELEMENT_PLAYER)) { let killerClient = null; @@ -325,7 +325,7 @@ function onPedWasted(event, ped, killerPed, weapon, pedPiece) { // =========================================================================== function onPlayerDeath(client, killer, weapon, pedPiece) { - logToConsole(LOG_WARN | LOG_DEBUG, `[AGRP.Event] Player ${getPlayerDisplayForConsole(client)} died!`); + logToConsole(LOG_WARN | LOG_DEBUG, `[V.RP.Event] Player ${getPlayerDisplayForConsole(client)} died!`); logToConsole(LOG_INFO, `${getPlayerDisplayForConsole(client)} died.`); getPlayerData(client).pedState = V_PEDSTATE_DEAD; @@ -418,7 +418,7 @@ function onPlayerDeath(client, killer, weapon, pedPiece) { // =========================================================================== function onPedSpawn(ped) { - logToConsole(LOG_WARN | LOG_DEBUG, `[AGRP.Event] Ped ${ped.id} spawned!`); + logToConsole(LOG_WARN | LOG_DEBUG, `[V.RP.Event] Ped ${ped.id} spawned!`); //if (ped.type == ELEMENT_PLAYER) { // if (getGame() != V_GAME_MAFIA_ONE) { @@ -431,14 +431,14 @@ function onPedSpawn(ped) { // =========================================================================== async function onPlayerSpawn(client) { - logToConsole(LOG_WARN | LOG_DEBUG, `[AGRP.Event] Player ${getPlayerDisplayForConsole(client)} spawned!`); - //logToConsole(LOG_DEBUG, `[AGRP.Event] Checking for ${getPlayerDisplayForConsole(client)}'s player ped`); + logToConsole(LOG_WARN | LOG_DEBUG, `[V.RP.Event] Player ${getPlayerDisplayForConsole(client)} spawned!`); + //logToConsole(LOG_DEBUG, `[V.RP.Event] Checking for ${getPlayerDisplayForConsole(client)}'s player ped`); //if(getPlayerPed(client) == null) { - // logToConsole(LOG_DEBUG, `[AGRP.Event] ${getPlayerDisplayForConsole(client)}'s player element not set yet. Rechecking ...`); + // logToConsole(LOG_DEBUG, `[V.RP.Event] ${getPlayerDisplayForConsole(client)}'s player element not set yet. Rechecking ...`); // setTimeout(onPlayerSpawn, 500, client); // return false; //} - //logToConsole(LOG_DEBUG, `[AGRP.Event] ${getPlayerDisplayForConsole(client)}'s player ped is valid. Continuing spawn processing ...`); + //logToConsole(LOG_DEBUG, `[V.RP.Event] ${getPlayerDisplayForConsole(client)}'s player ped is valid. Continuing spawn processing ...`); if (areServerElementsSupported()) { await waitUntil(() => client != null && getPlayerPed(client) != null); @@ -446,53 +446,53 @@ async function onPlayerSpawn(client) { stopRadioStreamForPlayer(client); - //logToConsole(LOG_DEBUG, `[AGRP.Event] Checking ${getPlayerDisplayForConsole(client)}'s player data`); + //logToConsole(LOG_DEBUG, `[V.RP.Event] Checking ${getPlayerDisplayForConsole(client)}'s player data`); if (!getPlayerData(client)) { - logToConsole(LOG_DEBUG, `[AGRP.Event] ${getPlayerDisplayForConsole(client)}'s player data is invalid. Kicking them from server.`); + logToConsole(LOG_DEBUG, `[V.RP.Event] ${getPlayerDisplayForConsole(client)}'s player data is invalid. Kicking them from server.`); getPlayerData(targetClient).customDisconnectReason = "Desync"; disconnectPlayer(client); return false; } - //logToConsole(LOG_DEBUG, `[AGRP.Event] Checking ${getPlayerDisplayForConsole(client)}'s login status`); + //logToConsole(LOG_DEBUG, `[V.RP.Event] Checking ${getPlayerDisplayForConsole(client)}'s login status`); if (!isPlayerLoggedIn(client)) { - logToConsole(LOG_DEBUG, `[AGRP.Event] ${getPlayerDisplayForConsole(client)} is NOT logged in. Despawning their player.`); + logToConsole(LOG_DEBUG, `[V.RP.Event] ${getPlayerDisplayForConsole(client)} is NOT logged in. Despawning their player.`); getPlayerData(targetClient).customDisconnectReason = "Desync"; disconnectPlayer(client); return false; } - //logToConsole(LOG_DEBUG, `[AGRP.Event] Checking ${getPlayerDisplayForConsole(client)}'s selected character status`); + //logToConsole(LOG_DEBUG, `[V.RP.Event] Checking ${getPlayerDisplayForConsole(client)}'s selected character status`); if (getPlayerData(client).currentSubAccount == -1) { - logToConsole(LOG_DEBUG, `[AGRP.Event] ${getPlayerDisplayForConsole(client)} has NOT selected a character. Despawning their player.`); + logToConsole(LOG_DEBUG, `[V.RP.Event] ${getPlayerDisplayForConsole(client)} has NOT selected a character. Despawning their player.`); getPlayerData(targetClient).customDisconnectReason = "Desync"; disconnectPlayer(client); return false; } - logToConsole(LOG_DEBUG, `[AGRP.Event] ${getPlayerDisplayForConsole(client)}'s player data is valid. Continuing spawn processing ...`); + logToConsole(LOG_DEBUG, `[V.RP.Event] ${getPlayerDisplayForConsole(client)}'s player data is valid. Continuing spawn processing ...`); if (isGameFeatureSupported("pedScale")) { - logToConsole(LOG_DEBUG, `[AGRP.Event] Setting ${getPlayerDisplayForConsole(client)}'s ped scale (${getPlayerCurrentSubAccount(client).pedScale})`); + logToConsole(LOG_DEBUG, `[V.RP.Event] Setting ${getPlayerDisplayForConsole(client)}'s ped scale (${getPlayerCurrentSubAccount(client).pedScale})`); setEntityData(getPlayerPed(client), "v.rp.scale", getPlayerCurrentSubAccount(client).pedScale, true); } //if (isPlayerSwitchingCharacter(client) || isPlayerCreatingCharacter(client)) { - // logToConsole(LOG_DEBUG, `[AGRP.Event] ${getPlayerDisplayForConsole(client)}'s ped is being used for character selection/creation. No further spawn processing needed'`); + // logToConsole(LOG_DEBUG, `[V.RP.Event] ${getPlayerDisplayForConsole(client)}'s ped is being used for character selection/creation. No further spawn processing needed'`); // return false; //} if (isCustomCameraSupported()) { - logToConsole(LOG_DEBUG, `[AGRP.Event] Restoring ${getPlayerDisplayForConsole(client)}'s camera`); + logToConsole(LOG_DEBUG, `[V.RP.Event] Restoring ${getPlayerDisplayForConsole(client)}'s camera`); restorePlayerCamera(client); } if (areServerElementsSupported()) { - logToConsole(LOG_DEBUG, `[AGRP.Event] Storing ${getPlayerDisplayForConsole(client)} ped in client data `); + logToConsole(LOG_DEBUG, `[V.RP.Event] Storing ${getPlayerDisplayForConsole(client)} ped in client data `); getPlayerData(client).ped = getPlayerPed(client); } - logToConsole(LOG_DEBUG, `[AGRP.Event] Sending ${getPlayerDisplayForConsole(client)} the 'now playing as' message`); + logToConsole(LOG_DEBUG, `[V.RP.Event] Sending ${getPlayerDisplayForConsole(client)} the 'now playing as' message`); messagePlayerAlert(client, `You are now playing as: {businessBlue}${getCharacterFullName(client)}`, getColourByName("white")); //messagePlayerNormal(client, "This server is in early development and may restart at any time for updates.", getColourByName("orange")); //messagePlayerNormal(client, "Please report any bugs using /bug and suggestions using /idea", getColourByName("yellow")); @@ -506,65 +506,65 @@ async function onPlayerSpawn(client) { //} if (isGameFeatureSupported("interior")) { - logToConsole(LOG_DEBUG, `[AGRP.Event] Setting player interior for ${getPlayerDisplayForConsole(client)} to ${getPlayerCurrentSubAccount(client).interior}`); + logToConsole(LOG_DEBUG, `[V.RP.Event] Setting player interior for ${getPlayerDisplayForConsole(client)} to ${getPlayerCurrentSubAccount(client).interior}`); setPlayerInterior(client, getPlayerCurrentSubAccount(client).interior); } - logToConsole(LOG_DEBUG, `[AGRP.Event] Setting player dimension for ${getPlayerDisplayForConsole(client)} to ${getPlayerCurrentSubAccount(client).dimension}`); + logToConsole(LOG_DEBUG, `[V.RP.Event] Setting player dimension for ${getPlayerDisplayForConsole(client)} to ${getPlayerCurrentSubAccount(client).dimension}`); setPlayerDimension(client, getPlayerCurrentSubAccount(client).dimension); //if(getPlayerCurrentSubAccount(client).interior != 0 || getPlayerCurrentSubAccount(client).dimension != 0) { // updateAllInteriorVehiclesForPlayer(client, getPlayerCurrentSubAccount(client).interior, getPlayerCurrentSubAccount(client).dimension); //} - logToConsole(LOG_DEBUG, `[AGRP.Event] Setting player health for ${getPlayerDisplayForConsole(client)} to ${getPlayerCurrentSubAccount(client).health}`); + logToConsole(LOG_DEBUG, `[V.RP.Event] Setting player health for ${getPlayerDisplayForConsole(client)} to ${getPlayerCurrentSubAccount(client).health}`); setPlayerHealth(client, getPlayerCurrentSubAccount(client).health); if (isGameFeatureSupported("pedArmour")) { - logToConsole(LOG_DEBUG, `[AGRP.Event] Setting player armour for ${getPlayerDisplayForConsole(client)} to ${getPlayerCurrentSubAccount(client).armour}`); + logToConsole(LOG_DEBUG, `[V.RP.Event] Setting player armour for ${getPlayerDisplayForConsole(client)} to ${getPlayerCurrentSubAccount(client).armour}`); setPlayerArmour(client, getPlayerCurrentSubAccount(client).armour); } - logToConsole(LOG_DEBUG, `[AGRP.Event] Sending ${getPlayerDisplayForConsole(client)}'s job type to their client (${getJobIndexFromDatabaseId(getPlayerCurrentSubAccount(client))})`); + logToConsole(LOG_DEBUG, `[V.RP.Event] Sending ${getPlayerDisplayForConsole(client)}'s job type to their client (${getJobIndexFromDatabaseId(getPlayerCurrentSubAccount(client))})`); sendPlayerJobType(client, getPlayerCurrentSubAccount(client).job); if (isGameFeatureSupported("rendering2D")) { - logToConsole(LOG_DEBUG, `[AGRP.Event] Enabling all rendering states for ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Event] Enabling all rendering states for ${getPlayerDisplayForConsole(client)}`); setPlayer2DRendering(client, true, true, true, true, true, true); } //if (isGameFeatureSupported("snow")) { - // logToConsole(LOG_DEBUG, `[AGRP.Event] Sending snow states to ${getPlayerDisplayForConsole(client)}`); + // logToConsole(LOG_DEBUG, `[V.RP.Event] Sending snow states to ${getPlayerDisplayForConsole(client)}`); // updatePlayerSnowState(client, true); //} if (areServerElementsSupported() && isGameFeatureSupported("walkStyle")) { - logToConsole(LOG_DEBUG, `[AGRP.Event] Setting player walking style for ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Event] Setting player walking style for ${getPlayerDisplayForConsole(client)}`); setEntityData(getPlayerPed(client), "v.rp.walkStyle", getPlayerCurrentSubAccount(client).walkStyle, true); } if (isGameFeatureSupported("fightStyle")) { - logToConsole(LOG_DEBUG, `[AGRP.Event] Setting player fighting style for ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Event] Setting player fighting style for ${getPlayerDisplayForConsole(client)}`); setPlayerFightStyle(client, getPlayerCurrentSubAccount(client).fightStyle); } if (isGameFeatureSupported("rendering2D")) { - logToConsole(LOG_DEBUG, `[AGRP.Event] Updating logo state for ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Event] Updating logo state for ${getPlayerDisplayForConsole(client)}`); updatePlayerShowLogoState(client, (getServerConfig().showLogo && doesPlayerHaveLogoEnabled(client))); } - logToConsole(LOG_DEBUG, `[AGRP.Event] Caching ${getPlayerDisplayForConsole(client)}'s hotbar items`); + logToConsole(LOG_DEBUG, `[V.RP.Event] Caching ${getPlayerDisplayForConsole(client)}'s hotbar items`); cachePlayerHotBarItems(client); - logToConsole(LOG_DEBUG, `[AGRP.Event] Syncing ${getPlayerDisplayForConsole(client)}'s hotbar`); + logToConsole(LOG_DEBUG, `[V.RP.Event] Syncing ${getPlayerDisplayForConsole(client)}'s hotbar`); updatePlayerHotBar(client); - logToConsole(LOG_DEBUG, `[AGRP.Event] Setting ${getPlayerDisplayForConsole(client)}'s switchchar state to false`); + logToConsole(LOG_DEBUG, `[V.RP.Event] Setting ${getPlayerDisplayForConsole(client)}'s switchchar state to false`); getPlayerData(client).switchingCharacter = false; if (!doesPlayerHaveKeyBindsDisabled(client) && doesPlayerHaveKeyBindForCommand(client, "enter")) { let keyId = getPlayerKeyBindForCommand(client, "enter"); - logToConsole(LOG_DEBUG, `[AGRP.Event] Sending custom enter property key ID (${keyId.key}, ${toUpperCase(getKeyNameFromId(keyId.key))}) to ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Event] Sending custom enter property key ID (${keyId.key}, ${toUpperCase(getKeyNameFromId(keyId.key))}) to ${getPlayerDisplayForConsole(client)}`); sendPlayerEnterPropertyKey(client, keyId.key); } @@ -595,7 +595,7 @@ async function onPlayerSpawn(client) { //sendPlayerPedPartsAndProps(client); } - logToConsole(LOG_DEBUG, `[AGRP.Event] Setting ${getPlayerDisplayForConsole(client)}'s ped state to ready`); + logToConsole(LOG_DEBUG, `[V.RP.Event] Setting ${getPlayerDisplayForConsole(client)}'s ped state to ready`); getPlayerData(client).pedState = V_PEDSTATE_READY; if (areServerElementsSupported()) { @@ -605,16 +605,16 @@ async function onPlayerSpawn(client) { //}, 1000); } - logToConsole(LOG_DEBUG, `[AGRP.Event] Syncing ${getPlayerDisplayForConsole(client)}'s cash ${getPlayerCurrentSubAccount(client).cash}`); + logToConsole(LOG_DEBUG, `[V.RP.Event] Syncing ${getPlayerDisplayForConsole(client)}'s cash ${getPlayerCurrentSubAccount(client).cash}`); updatePlayerCash(client); if (isGameFeatureSupported("customNametag")) { - logToConsole(LOG_DEBUG, `[AGRP.Event] Sending player nametag distance to ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Event] Sending player nametag distance to ${getPlayerDisplayForConsole(client)}`); sendNameTagDistanceToClient(client, getServerConfig().nameTagDistance); } if (!areServerElementsSupported() || getGame() == V_GAME_MAFIA_ONE || getGame() == V_GAME_GTA_IV) { - logToConsole(LOG_DEBUG, `[AGRP.Event] Sending properties, jobs, and vehicles to ${getPlayerDisplayForConsole(client)} (no server elements)`); + logToConsole(LOG_DEBUG, `[V.RP.Event] Sending properties, jobs, and vehicles to ${getPlayerDisplayForConsole(client)} (no server elements)`); sendAllBusinessesToPlayer(client); sendAllHousesToPlayer(client); if (getGame() != V_GAME_GTA_IV) { @@ -627,7 +627,7 @@ async function onPlayerSpawn(client) { sendAllVehiclesToPlayer(client); } - logToConsole(LOG_DEBUG, `[AGRP.Event] Updating spawned state for ${getPlayerDisplayForConsole(client)} to true`); + logToConsole(LOG_DEBUG, `[V.RP.Event] Updating spawned state for ${getPlayerDisplayForConsole(client)} to true`); updatePlayerSpawnedState(client, true); getPlayerData(client).payDayTickStart = sdl.ticks; @@ -635,7 +635,7 @@ async function onPlayerSpawn(client) { // Locales are handled via resource files now. No need to send anymore, but kept in case revert is needed. //sendPlayerLocaleStrings(client); - logToConsole(LOG_DEBUG, `[AGRP.Event] Updating all player name tags`); + logToConsole(LOG_DEBUG, `[V.RP.Event] Updating all player name tags`); updateAllPlayerNameTags(); setPlayerWeaponDamageEvent(client, V_WEAPON_DAMAGE_EVENT_NORMAL); @@ -692,7 +692,7 @@ async function onPlayerSpawn(client) { // =========================================================================== function onPlayerCommand(event, client, command, params) { - logToConsole(LOG_WARN | LOG_DEBUG, `[AGRP.Event] Player used command ${command}!`); + logToConsole(LOG_WARN | LOG_DEBUG, `[V.RP.Event] Player used command ${command}!`); if (!doesCommandExist(command)) { processPlayerCommand(command, params, client); @@ -710,7 +710,7 @@ function onPedExitedVehicle(event, ped, vehicle, seat) { return false; } - logToConsole(LOG_WARN | LOG_DEBUG, `[AGRP.Event] Ped ${ped.id} exited vehicle ${vehicle.id} from seat ${seat}!`); + logToConsole(LOG_WARN | LOG_DEBUG, `[V.RP.Event] Ped ${ped.id} exited vehicle ${vehicle.id} from seat ${seat}!`); if (getVehicleData(vehicle) == false) { return false; @@ -743,7 +743,7 @@ function onPedExitedVehicle(event, ped, vehicle, seat) { getVehicleData(vehicle).lastActiveTime = getCurrentUnixTimestamp(); - logToConsole(LOG_DEBUG, `[AGRP.Event] ${getPlayerDisplayForConsole(client)} exited a ${getVehicleName(vehicle)} (ID: ${vehicle.getData("v.rp.dataSlot")}, Database ID: ${getVehicleData(vehicle).databaseId})`); + logToConsole(LOG_DEBUG, `[V.RP.Event] ${getPlayerDisplayForConsole(client)} exited a ${getVehicleName(vehicle)} (ID: ${vehicle.getData("v.rp.dataSlot")}, Database ID: ${getVehicleData(vehicle).databaseId})`); } } } @@ -752,31 +752,31 @@ function onPedExitedVehicle(event, ped, vehicle, seat) { function onPedEnteredVehicle(event, ped, vehicle, seat) { if (ped == null) { - logToConsole(LOG_ERROR | LOG_DEBUG, `[AGRP.Event] Ped ${ped.id} entered vehicle ${vehicle.id} in seat ${seat}, but ped is null`); + logToConsole(LOG_ERROR | LOG_DEBUG, `[V.RP.Event] Ped ${ped.id} entered vehicle ${vehicle.id} in seat ${seat}, but ped is null`); return false; } if (vehicle == null) { - logToConsole(LOG_ERROR | LOG_DEBUG, `[AGRP.Event] Ped ${ped.id} entered vehicle ${vehicle.id} in seat ${seat}, but vehicle is null`); + logToConsole(LOG_ERROR | LOG_DEBUG, `[V.RP.Event] Ped ${ped.id} entered vehicle ${vehicle.id} in seat ${seat}, but vehicle is null`); return false; } - logToConsole(LOG_WARN | LOG_DEBUG, `[AGRP.Event] Ped ${ped.id} entered vehicle ${vehicle.id} in seat ${seat}!`); + logToConsole(LOG_WARN | LOG_DEBUG, `[V.RP.Event] Ped ${ped.id} entered vehicle ${vehicle.id} in seat ${seat}!`); if (ped.isType(ELEMENT_PLAYER)) { let client = getClientFromPlayerElement(ped); if (client != null) { if (getPlayerData(client) == false) { - logToConsole(LOG_ERROR | LOG_DEBUG, `[AGRP.Event] ${getPlayerDisplayForConsole(client)} entered vehicle ${vehicle.id} in seat ${seat}, but player data is false`); + logToConsole(LOG_ERROR | LOG_DEBUG, `[V.RP.Event] ${getPlayerDisplayForConsole(client)} entered vehicle ${vehicle.id} in seat ${seat}, but player data is false`); return false; } if (!getVehicleData(vehicle)) { - logToConsole(LOG_ERROR | LOG_DEBUG, `[AGRP.Event] ${getPlayerDisplayForConsole(client)} entered vehicle ${vehicle.id} in seat ${seat}, but vehicle data is false`); + logToConsole(LOG_ERROR | LOG_DEBUG, `[V.RP.Event] ${getPlayerDisplayForConsole(client)} entered vehicle ${vehicle.id} in seat ${seat}, but vehicle data is false`); return false; } - logToConsole(LOG_DEBUG, `[AGRP.Event] ${getPlayerDisplayForConsole(client)} entered a ${getVehicleName(vehicle)} (ID: ${vehicle.getData("v.rp.dataSlot")}, Database ID: ${getVehicleData(vehicle).databaseId})`); + logToConsole(LOG_DEBUG, `[V.RP.Event] ${getPlayerDisplayForConsole(client)} entered a ${getVehicleName(vehicle)} (ID: ${vehicle.getData("v.rp.dataSlot")}, Database ID: ${getVehicleData(vehicle).databaseId})`); getPlayerData(client).lastVehicle = vehicle; getVehicleData(vehicle).lastActiveTime = getCurrentUnixTimestamp(); @@ -887,7 +887,7 @@ function onPedEnteringVehicle(event, ped, vehicle, seat) { return false; } - logToConsole(LOG_WARN | LOG_DEBUG, `[AGRP.Event] Ped ${ped.id} is entering vehicle ${vehicle.id} in seat ${seat}!`); + logToConsole(LOG_WARN | LOG_DEBUG, `[V.RP.Event] Ped ${ped.id} is entering vehicle ${vehicle.id} in seat ${seat}!`); if (ped.isType(ELEMENT_PLAYER)) { let client = getClientFromPlayerElement(ped); @@ -911,7 +911,7 @@ function onPedExitingVehicle(event, ped, vehicle, seat) { return false; } - logToConsole(LOG_WARN | LOG_DEBUG, `[AGRP.Event] Ped ${ped.id} is exiting vehicle ${vehicle.id} in seat ${seat}!`); + logToConsole(LOG_WARN | LOG_DEBUG, `[V.RP.Event] Ped ${ped.id} is exiting vehicle ${vehicle.id} in seat ${seat}!`); if (ped.isType(ELEMENT_PLAYER)) { let client = getClientFromPlayerElement(ped); diff --git a/scripts/server/gate.js b/scripts/server/gate.js index 2ed68b43..4afc2d54 100644 --- a/scripts/server/gate.js +++ b/scripts/server/gate.js @@ -45,8 +45,8 @@ class GateData { // =========================================================================== function initGateScript() { - logToConsole(LOG_INFO, `[AGRP.Gate]: Initializing gate script ...`); - logToConsole(LOG_INFO, `[AGRP.Gate]: Gate script initialized successfully!`); + logToConsole(LOG_INFO, `[V.RP.Gate]: Initializing gate script ...`); + logToConsole(LOG_INFO, `[V.RP.Gate]: Gate script initialized successfully!`); } // =========================================================================== @@ -193,7 +193,7 @@ function saveGateToDatabase(gateId) { return false; } - logToConsole(LOG_VERBOSE, `[AGRP.Gate]: Saving gate ${tempGateData.databaseId} to database ...`); + logToConsole(LOG_VERBOSE, `[V.RP.Gate]: Saving gate ${tempGateData.databaseId} to database ...`); let dbConnection = connectToDatabase(); if (dbConnection) { let safeGateName = escapeDatabaseString(tempGateData.name); @@ -227,7 +227,7 @@ function saveGateToDatabase(gateId) { disconnectFromDatabase(dbConnection); return true; } - logToConsole(LOG_VERBOSE, `[AGRP.Gate]: Saved gate ${gateDataId} to database!`); + logToConsole(LOG_VERBOSE, `[V.RP.Gate]: Saved gate ${gateDataId} to database!`); return true; } @@ -248,13 +248,13 @@ function loadGatesFromDatabase() { for (let i in dbAssoc) { let tempGateData = new GateData(dbAssoc[i]); tempGates.push(tempGateData); - logToConsole(LOG_DEBUG, `[AGRP.Gate]: Gate '${tempGateData.name}' loaded from database successfully!`); + logToConsole(LOG_DEBUG, `[V.RP.Gate]: Gate '${tempGateData.name}' loaded from database successfully!`); } } disconnectFromDatabase(dbConnection); } - logToConsole(LOG_INFO, `[AGRP.Gate]: ${tempGates.length} gates loaded from database successfully!`); + logToConsole(LOG_INFO, `[V.RP.Gate]: ${tempGates.length} gates loaded from database successfully!`); return tempGates; } diff --git a/scripts/server/help.js b/scripts/server/help.js index 8423d4f5..7949af35 100644 --- a/scripts/server/help.js +++ b/scripts/server/help.js @@ -8,8 +8,8 @@ // =========================================================================== function initHelpScript() { - logToConsole(LOG_INFO, `[AGRP.Help]: Initializing help script ...`); - logToConsole(LOG_INFO, `[AGRP.Help]: Help script initialized successfully!`); + logToConsole(LOG_INFO, `[V.RP.Help]: Initializing help script ...`); + logToConsole(LOG_INFO, `[V.RP.Help]: Help script initialized successfully!`); } // =========================================================================== diff --git a/scripts/server/house.js b/scripts/server/house.js index 7785dcc9..0f2dafc1 100644 --- a/scripts/server/house.js +++ b/scripts/server/house.js @@ -187,12 +187,12 @@ function loadHousesFromDatabase() { for (let i in dbAssoc) { let tempHouseData = new HouseData(dbAssoc[i]); tempHouses.push(tempHouseData); - logToConsole(LOG_VERBOSE, `[AGRP.House]: House '${tempHouseData.description}' (ID ${tempHouseData.databaseId}) loaded!`); + logToConsole(LOG_VERBOSE, `[V.RP.House]: House '${tempHouseData.description}' (ID ${tempHouseData.databaseId}) loaded!`); } } disconnectFromDatabase(dbConnection); } - logToConsole(LOG_INFO, `[AGRP.House]: ${tempHouses.length} houses loaded from database successfully!`); + logToConsole(LOG_INFO, `[V.RP.House]: ${tempHouses.length} houses loaded from database successfully!`); return tempHouses; } @@ -877,9 +877,9 @@ function getPlayerHouse(client) { // =========================================================================== function saveAllHousesToDatabase() { - logToConsole(LOG_DEBUG, `[AGRP.House]: Saving all server houses to database ...`); + logToConsole(LOG_DEBUG, `[V.RP.House]: Saving all server houses to database ...`); if (getServerConfig().devServer) { - logToConsole(LOG_DEBUG | LOG_WARN, `[AGRP.House]: Aborting save all houses to database, dev server is enabled.`); + logToConsole(LOG_DEBUG | LOG_WARN, `[V.RP.House]: Aborting save all houses to database, dev server is enabled.`); return false; } @@ -888,7 +888,7 @@ function saveAllHousesToDatabase() { saveHouseToDatabase(i); } } - logToConsole(LOG_INFO, `[AGRP.House]: Saved all server houses to database`); + logToConsole(LOG_INFO, `[V.RP.House]: Saved all server houses to database`); } // =========================================================================== @@ -900,7 +900,7 @@ function saveHouseToDatabase(houseId) { return false; } - logToConsole(LOG_VERBOSE, `[AGRP.House]: Saving house '${tempHouseData.description}' to database ...`); + logToConsole(LOG_VERBOSE, `[V.RP.House]: Saving house '${tempHouseData.description}' to database ...`); let dbConnection = connectToDatabase(); if (dbConnection) { let safeHouseDescription = escapeDatabaseString(dbConnection, tempHouseData.description); @@ -954,7 +954,7 @@ function saveHouseToDatabase(houseId) { disconnectFromDatabase(dbConnection); return true; } - logToConsole(LOG_VERBOSE, `[AGRP.House]: Saved house '${tempHouseData.description}' to database!`); + logToConsole(LOG_VERBOSE, `[V.RP.House]: Saved house '${tempHouseData.description}' to database!`); return false; } @@ -968,7 +968,7 @@ function saveHouseLocationToDatabase(houseId, locationId) { return false; } - logToConsole(LOG_VERBOSE, `[AGRP.House]: Saving house location ${locationId} for house ${houseId} to database ...`); + logToConsole(LOG_VERBOSE, `[V.RP.House]: Saving house location ${locationId} for house ${houseId} to database ...`); let dbConnection = connectToDatabase(); if (dbConnection) { let data = [ @@ -1009,7 +1009,7 @@ function saveHouseLocationToDatabase(houseId, locationId) { disconnectFromDatabase(dbConnection); return true; } - logToConsole(LOG_VERBOSE, `[AGRP.House]: Saved location ${locationId} for house ${houseId} to database`); + logToConsole(LOG_VERBOSE, `[V.RP.House]: Saved location ${locationId} for house ${houseId} to database`); return false; } diff --git a/scripts/server/item.js b/scripts/server/item.js index 08bc49f5..d010b99a 100644 --- a/scripts/server/item.js +++ b/scripts/server/item.js @@ -288,7 +288,7 @@ function initItemScript() { // =========================================================================== function loadItemsFromDatabase() { - logToConsole(LOG_DEBUG, `[AGRP.Item]: Loading items from database ...`); + logToConsole(LOG_DEBUG, `[V.RP.Item]: Loading items from database ...`); let tempItems = []; let dbConnection = connectToDatabase(); let dbAssoc = []; @@ -299,19 +299,19 @@ function loadItemsFromDatabase() { for (let i in dbAssoc) { let tempItemData = new ItemData(dbAssoc[i]); tempItems.push(tempItemData); - logToConsole(LOG_VERBOSE, `[AGRP.Item]: Loaded item ${tempItemData.databaseId} (type ${tempItemData.itemType})} from database`); + logToConsole(LOG_VERBOSE, `[V.RP.Item]: Loaded item ${tempItemData.databaseId} (type ${tempItemData.itemType})} from database`); } } disconnectFromDatabase(dbConnection); } - logToConsole(LOG_DEBUG, `[AGRP.Item]: Loaded ${tempItems.length} items from database ...`); + logToConsole(LOG_DEBUG, `[V.RP.Item]: Loaded ${tempItems.length} items from database ...`); return tempItems; } // =========================================================================== function loadItemTypesFromDatabase() { - logToConsole(LOG_DEBUG, `[AGRP.Item]: Loading item types from database ...`); + logToConsole(LOG_DEBUG, `[V.RP.Item]: Loading item types from database ...`); let tempItemTypes = []; let dbConnection = connectToDatabase(); let dbAssoc = []; @@ -323,13 +323,13 @@ function loadItemTypesFromDatabase() { for (let i in dbAssoc) { let tempItemTypeData = new ItemTypeData(dbAssoc[i]); tempItemTypes.push(tempItemTypeData); - logToConsole(LOG_VERBOSE, `[AGRP.Item]: Loaded item type ${tempItemTypeData.name} (id ${tempItemTypeData.databaseId}} from database`); + logToConsole(LOG_VERBOSE, `[V.RP.Item]: Loaded item type ${tempItemTypeData.name} (id ${tempItemTypeData.databaseId}} from database`); } } disconnectFromDatabase(dbConnection); } - logToConsole(LOG_DEBUG, `[AGRP.Item]: Loaded ${tempItemTypes.length} item types from database ...`); + logToConsole(LOG_DEBUG, `[V.RP.Item]: Loaded ${tempItemTypes.length} item types from database ...`); return tempItemTypes; } @@ -1352,7 +1352,7 @@ function playerUseItem(client, hotBarSlot) { let itemIndex = getPlayerData(client).hotBarItems[hotBarSlot]; if (itemIndex == -1) { - logToConsole(LOG_DEBUG | LOG_WARN, `[AGRP.Item] ${getPlayerDisplayForConsole(client)} tried to use an empty hotbar slot ${hotBarSlot}`); + logToConsole(LOG_DEBUG | LOG_WARN, `[V.RP.Item] ${getPlayerDisplayForConsole(client)} tried to use an empty hotbar slot ${hotBarSlot}`); return false; } @@ -1366,7 +1366,7 @@ function playerUseItem(client, hotBarSlot) { let itemTypeData = getItemTypeData(itemData.itemTypeIndex); let hotBarItems = getPlayerData(client).hotBarItems; - logToConsole(LOG_DEBUG, `[AGRP.Item] ${getPlayerDisplayForConsole(client)} used a ${itemTypeData.name} (use type ${itemTypeData.useType} - ${typeof itemTypeData.useType}) item (ID: ${itemData.index}/${itemData.databaseId}, TypeID: ${itemTypeData.index}/${itemTypeData.databaseId})`); + logToConsole(LOG_DEBUG, `[V.RP.Item] ${getPlayerDisplayForConsole(client)} used a ${itemTypeData.name} (use type ${itemTypeData.useType} - ${typeof itemTypeData.useType}) item (ID: ${itemData.index}/${itemData.databaseId}, TypeID: ${itemTypeData.index}/${itemTypeData.databaseId})`); markPlayerActionTipSeen(client, "UseItemKeyAfterEquipping"); @@ -1909,7 +1909,7 @@ function playerSwitchItem(client, newHotBarSlot) { } let currentHotBarSlot = getPlayerData(client).activeHotBarSlot; - logToConsole(LOG_DEBUG, `[AGRP.Item] ${getPlayerDisplayForConsole(client)} switched from hotbar slot ${currentHotBarSlot} to ${newHotBarSlot}`); + logToConsole(LOG_DEBUG, `[V.RP.Item] ${getPlayerDisplayForConsole(client)} switched from hotbar slot ${currentHotBarSlot} to ${newHotBarSlot}`); let currentHotBarItem = -1; let newHotBarItem = -1; @@ -2564,7 +2564,7 @@ function saveItemToDatabase(itemId) { return false; } - logToConsole(LOG_VERBOSE, `[AGRP.Item]: Saving item '${itemData.index}' to database ...`); + logToConsole(LOG_VERBOSE, `[V.RP.Item]: Saving item '${itemData.index}' to database ...`); let position = getItemPosition(itemId); @@ -2621,7 +2621,7 @@ function saveItemTypeToDatabase(itemTypeId) { return false; } - logToConsole(LOG_VERBOSE, `[AGRP.Item]: Saving item type '${itemTypeData.name}' to database ...`); + logToConsole(LOG_VERBOSE, `[V.RP.Item]: Saving item type '${itemTypeData.name}' to database ...`); let dbConnection = connectToDatabase(); if (dbConnection) { @@ -2753,7 +2753,7 @@ function getItemTypeIndexFromDatabaseId(databaseId) { // =========================================================================== function playerItemActionDelayComplete(client) { - logToConsole(LOG_VERBOSE, `[AGRP.Item]: Player ${getPlayerDisplayForConsole(client)} item action delay complete (State: ${getPlayerData(client).itemActionState})`); + logToConsole(LOG_VERBOSE, `[V.RP.Item]: Player ${getPlayerDisplayForConsole(client)} item action delay complete (State: ${getPlayerData(client).itemActionState})`); switch (getPlayerData(client).itemActionState) { case V_ITEM_ACTION_USE: playerUseItem(client, getPlayerData(client).itemActionItem); diff --git a/scripts/server/job.js b/scripts/server/job.js index 2594ea2b..a2d996cb 100644 --- a/scripts/server/job.js +++ b/scripts/server/job.js @@ -554,13 +554,13 @@ function loadJobsFromDatabase() { tempJobData.routes = loadJobRoutesFromDatabase(tempJobData.databaseId); tempJobData.ranks = loadJobRanksFromDatabase(tempJobData.databaseId); tempJobs.push(tempJobData); - logToConsole(LOG_VERBOSE, `[AGRP.Job]: Job '${tempJobData.name}' loaded from database successfully!`); + logToConsole(LOG_VERBOSE, `[V.RP.Job]: Job '${tempJobData.name}' loaded from database successfully!`); } } disconnectFromDatabase(dbConnection); } - logToConsole(LOG_DEBUG, `[AGRP.Job]: ${tempJobs.length} jobs loaded from database successfully!`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: ${tempJobs.length} jobs loaded from database successfully!`); return tempJobs; } @@ -599,7 +599,7 @@ function loadAllJobLocationsFromDatabase() { // =========================================================================== function loadJobRanksFromDatabase(jobDatabaseId) { - logToConsole(LOG_DEBUG, `[AGRP.Job]: Loading ranks for job ${jobDatabaseId} from database ...`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: Loading ranks for job ${jobDatabaseId} from database ...`); let tempJobRanks = []; let dbConnection = connectToDatabase(); @@ -612,20 +612,20 @@ function loadJobRanksFromDatabase(jobDatabaseId) { for (let i in dbAssoc) { let tempJobRankData = new JobRankData(dbAssoc[i]); tempJobRanks.push(tempJobRankData); - logToConsole(LOG_VERBOSE, `[AGRP.Job]: Job rank '${tempJobRankData.name}' loaded from database successfully!`); + logToConsole(LOG_VERBOSE, `[V.RP.Job]: Job rank '${tempJobRankData.name}' loaded from database successfully!`); } } disconnectFromDatabase(dbConnection); } - logToConsole(LOG_DEBUG, `[AGRP.Job]: ${tempJobRanks.length} ranks for job ${jobDatabaseId} loaded from database successfully!`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: ${tempJobRanks.length} ranks for job ${jobDatabaseId} loaded from database successfully!`); return tempJobRanks; } // =========================================================================== function loadJobRoutesFromDatabase(jobDatabaseId) { - logToConsole(LOG_DEBUG, `[AGRP.Job]: Loading job routes for job ${jobDatabaseId} from database ...`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: Loading job routes for job ${jobDatabaseId} from database ...`); let tempJobRoutes = []; let dbConnection = connectToDatabase(); @@ -639,20 +639,20 @@ function loadJobRoutesFromDatabase(jobDatabaseId) { let tempJobRouteData = new JobRouteData(dbAssoc[i]); tempJobRouteData.locations = loadJobRouteLocationsFromDatabase(tempJobRouteData.databaseId); tempJobRoutes.push(tempJobRouteData); - logToConsole(LOG_VERBOSE, `[AGRP.Job]: Job route '${tempJobRouteData.name}' loaded from database successfully!`); + logToConsole(LOG_VERBOSE, `[V.RP.Job]: Job route '${tempJobRouteData.name}' loaded from database successfully!`); } } disconnectFromDatabase(dbConnection); } - logToConsole(LOG_DEBUG, `[AGRP.Job]: ${tempJobRoutes.length} job routes for job ${jobDatabaseId} loaded from database successfully!`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: ${tempJobRoutes.length} job routes for job ${jobDatabaseId} loaded from database successfully!`); return tempJobRoutes; } // =========================================================================== function loadJobRouteLocationsFromDatabase(jobRouteId) { - logToConsole(LOG_DEBUG, `[AGRP.Job]: Loading locations for job route ${jobRouteId} from database ...`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: Loading locations for job route ${jobRouteId} from database ...`); let tempJobRouteLocations = []; let dbConnection = connectToDatabase(); @@ -665,20 +665,20 @@ function loadJobRouteLocationsFromDatabase(jobRouteId) { for (let i in dbAssoc) { let tempJobRouteLocationData = new JobRouteLocationData(dbAssoc[i]); tempJobRouteLocations.push(tempJobRouteLocationData); - logToConsole(LOG_VERBOSE, `[AGRP.Job]: Job route location '${tempJobRouteLocationData.databaseId}' loaded from database successfully!`); + logToConsole(LOG_VERBOSE, `[V.RP.Job]: Job route location '${tempJobRouteLocationData.databaseId}' loaded from database successfully!`); } } disconnectFromDatabase(dbConnection); } - logToConsole(LOG_DEBUG, `[AGRP.Job]: ${tempJobRouteLocations.length} locations for job route ${jobRouteId} loaded from database successfully!`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: ${tempJobRouteLocations.length} locations for job route ${jobRouteId} loaded from database successfully!`); return tempJobRouteLocations; } // =========================================================================== function loadJobEquipmentsFromDatabase(jobDatabaseId) { - logToConsole(LOG_DEBUG, `[AGRP.Job]: Loading job equipments for job ${jobDatabaseId} from database ...`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: Loading job equipments for job ${jobDatabaseId} from database ...`); let tempJobEquipments = []; let dbConnection = connectToDatabase(); @@ -692,20 +692,20 @@ function loadJobEquipmentsFromDatabase(jobDatabaseId) { let tempJobEquipmentData = new JobEquipmentData(dbAssoc[i]); tempJobEquipmentData.items = loadJobEquipmentItemsFromDatabase(tempJobEquipmentData.databaseId); tempJobEquipments.push(tempJobEquipmentData); - logToConsole(LOG_VERBOSE, `[AGRP.Job]: Job equipment '${tempJobEquipmentData.name}' loaded from database successfully!`); + logToConsole(LOG_VERBOSE, `[V.RP.Job]: Job equipment '${tempJobEquipmentData.name}' loaded from database successfully!`); } } disconnectFromDatabase(dbConnection); } - logToConsole(LOG_DEBUG, `[AGRP.Job]: ${tempJobEquipments.length} job equipments for job ${jobDatabaseId} loaded from database successfully!`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: ${tempJobEquipments.length} job equipments for job ${jobDatabaseId} loaded from database successfully!`); return tempJobEquipments; } // =========================================================================== function loadJobLocationsFromDatabase(jobDatabaseId) { - logToConsole(LOG_DEBUG, `[AGRP.Job]: Loading job locations for job ${jobDatabaseId} from database ...`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: Loading job locations for job ${jobDatabaseId} from database ...`); let tempJobLocations = []; let dbConnection = connectToDatabase(); @@ -718,20 +718,20 @@ function loadJobLocationsFromDatabase(jobDatabaseId) { for (let i in dbAssoc) { let tempJobLocationData = new JobLocationData(dbAssoc[i]); tempJobLocations.push(tempJobLocationData); - logToConsole(LOG_VERBOSE, `[AGRP.Job]: Job location '${tempJobLocationData.databaseId}' loaded from database successfully!`); + logToConsole(LOG_VERBOSE, `[V.RP.Job]: Job location '${tempJobLocationData.databaseId}' loaded from database successfully!`); } } disconnectFromDatabase(dbConnection); } - logToConsole(LOG_DEBUG, `[AGRP.Job]: ${tempJobLocations.length} job locations for job ${jobDatabaseId} loaded from database successfully!`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: ${tempJobLocations.length} job locations for job ${jobDatabaseId} loaded from database successfully!`); return tempJobLocations; } // =========================================================================== function loadJobUniformsFromDatabase(jobDatabaseId) { - logToConsole(LOG_DEBUG, `[AGRP.Job]: Loading job uniforms for job ${jobDatabaseId} from database ...`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: Loading job uniforms for job ${jobDatabaseId} from database ...`); let tempJobUniforms = []; let dbConnection = connectToDatabase(); @@ -744,20 +744,20 @@ function loadJobUniformsFromDatabase(jobDatabaseId) { for (let i in dbAssoc) { let tempJobUniformData = new JobUniformData(dbAssoc[i]); tempJobUniforms.push(tempJobUniformData); - logToConsole(LOG_VERBOSE, `[AGRP.Job]: Job uniform '${tempJobUniformData.databaseId}' loaded from database successfully!`); + logToConsole(LOG_VERBOSE, `[V.RP.Job]: Job uniform '${tempJobUniformData.databaseId}' loaded from database successfully!`); } } disconnectFromDatabase(dbConnection); } - logToConsole(LOG_DEBUG, `[AGRP.Job]: ${tempJobUniforms.length} job uniforms for job ${jobDatabaseId} loaded from database successfully!`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: ${tempJobUniforms.length} job uniforms for job ${jobDatabaseId} loaded from database successfully!`); return tempJobUniforms; } // =========================================================================== function loadJobEquipmentItemsFromDatabase(jobEquipmentDatabaseId) { - logToConsole(LOG_DEBUG, `[AGRP.Job]: Loading job equipment items for job equipment ${jobEquipmentDatabaseId} from database ...`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: Loading job equipment items for job equipment ${jobEquipmentDatabaseId} from database ...`); let tempJobEquipmentItems = []; let dbConnection = connectToDatabase(); @@ -770,13 +770,13 @@ function loadJobEquipmentItemsFromDatabase(jobEquipmentDatabaseId) { for (let i in dbAssoc) { let tempJobEquipmentItemData = new JobEquipmentItemData(dbAssoc[i]); tempJobEquipmentItems.push(tempJobEquipmentItemData); - logToConsole(LOG_VERBOSE, `[AGRP.Job]: Job equipment item '${tempJobEquipmentItemData.databaseId}' loaded from database successfully!`); + logToConsole(LOG_VERBOSE, `[V.RP.Job]: Job equipment item '${tempJobEquipmentItemData.databaseId}' loaded from database successfully!`); } } disconnectFromDatabase(dbConnection); } - logToConsole(LOG_DEBUG, `[AGRP.Job]: ${tempJobEquipmentItems.length} job equipment items for equipment ${jobEquipmentDatabaseId} loaded from database successfully!`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: ${tempJobEquipmentItems.length} job equipment items for equipment ${jobEquipmentDatabaseId} loaded from database successfully!`); return tempJobEquipmentItems; } @@ -787,13 +787,13 @@ function createAllJobBlips() { return false; } - logToConsole(LOG_DEBUG, `[AGRP.Job] Spawning all job location blips ...`); + logToConsole(LOG_DEBUG, `[V.RP.Job] Spawning all job location blips ...`); for (let i in getServerData().jobs) { for (let j in getServerData().jobs[i].locations) { createJobLocationBlip(i, j); } } - logToConsole(LOG_DEBUG, `[AGRP.Job] All job location blips spawned!`); + logToConsole(LOG_DEBUG, `[V.RP.Job] All job location blips spawned!`); } // =========================================================================== @@ -803,7 +803,7 @@ function createAllJobPickups() { return false; } - logToConsole(LOG_DEBUG, `[AGRP.Job] Spawning all job location pickups ...`); + logToConsole(LOG_DEBUG, `[V.RP.Job] Spawning all job location pickups ...`); let pickupCount = 0; for (let i in getServerData().jobs) { if (getServerData().jobs[i].pickupModel != 0) { @@ -819,11 +819,11 @@ function createAllJobPickups() { setElementDimension(getServerData().jobs[i].locations[j].pickup, getServerData().jobs[i].locations[j].dimension); addToWorld(getServerData().jobs[i].locations[j].pickup); - logToConsole(LOG_VERBOSE, `[AGRP.Job] Job '${getServerData().jobs[i].name}' location pickup ${j} spawned!`); + logToConsole(LOG_VERBOSE, `[V.RP.Job] Job '${getServerData().jobs[i].name}' location pickup ${j} spawned!`); } } } - logToConsole(LOG_DEBUG, `[AGRP.Job] All job location pickups (${pickupCount}) spawned!`); + logToConsole(LOG_DEBUG, `[V.RP.Job] All job location pickups (${pickupCount}) spawned!`); } // =========================================================================== @@ -2720,11 +2720,11 @@ function saveJobToDatabase(jobData) { } if (jobData.needsSaved == false) { - logToConsole(LOG_DEBUG, `[AGRP.Job]: Job ${jobData.name} doesn't need saved. Skipping ...`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: Job ${jobData.name} doesn't need saved. Skipping ...`); return false; } - logToConsole(LOG_DEBUG, `[AGRP.Job]: Saving job ${jobData.name} to database ...`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: Saving job ${jobData.name} to database ...`); let dbConnection = connectToDatabase(); if (dbConnection) { let safeName = escapeDatabaseString(dbConnection, jobData.name); @@ -2761,7 +2761,7 @@ function saveJobToDatabase(jobData) { disconnectFromDatabase(dbConnection); return true; } - logToConsole(LOG_DEBUG, `[AGRP.Job]: Saved job ${jobData.name} to database!`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: Saved job ${jobData.name} to database!`); return false; } @@ -2775,11 +2775,11 @@ function saveJobRankToDatabase(jobRankData) { } if (jobRankData.needsSaved == false) { - logToConsole(LOG_DEBUG, `[AGRP.Job]: Job route ${jobRankData.name} (DB ID ${jobRankData.databaseId}) doesn't need saved. Skipping ...`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: Job route ${jobRankData.name} (DB ID ${jobRankData.databaseId}) doesn't need saved. Skipping ...`); return false; } - logToConsole(LOG_DEBUG, `[AGRP.Job]: Saving job route ${jobRankData.name} to database ...`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: Saving job route ${jobRankData.name} to database ...`); let dbConnection = connectToDatabase(); if (dbConnection) { let safeName = escapeDatabaseString(dbConnection, jobRankData.name); @@ -2810,7 +2810,7 @@ function saveJobRankToDatabase(jobRankData) { disconnectFromDatabase(dbConnection); return true; } - logToConsole(LOG_DEBUG, `[AGRP.Job]: Saved job rank ${jobRankData.name} to database!`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: Saved job rank ${jobRankData.name} to database!`); return false; } @@ -2824,11 +2824,11 @@ function saveJobRouteToDatabase(jobRouteData) { } if (jobRouteData.needsSaved == false) { - logToConsole(LOG_DEBUG, `[AGRP.Job]: Job route ${jobRouteData.name} (DB ID ${jobRouteData.databaseId}) doesn't need saved. Skipping ...`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: Job route ${jobRouteData.name} (DB ID ${jobRouteData.databaseId}) doesn't need saved. Skipping ...`); return false; } - logToConsole(LOG_DEBUG, `[AGRP.Job]: Saving job route ${jobRouteData.name} to database ...`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: Saving job route ${jobRouteData.name} to database ...`); let dbConnection = connectToDatabase(); if (dbConnection) { let safeName = escapeDatabaseString(dbConnection, jobRouteData.name); @@ -2869,7 +2869,7 @@ function saveJobRouteToDatabase(jobRouteData) { disconnectFromDatabase(dbConnection); return true; } - logToConsole(LOG_DEBUG, `[AGRP.Job]: Saved job route ${jobRouteData.name} to database!`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: Saved job route ${jobRouteData.name} to database!`); return false; } @@ -2883,11 +2883,11 @@ function saveJobRouteLocationToDatabase(jobRouteLocationData) { } if (jobRouteLocationData.needsSaved == false) { - logToConsole(LOG_DEBUG, `[AGRP.Job]: Job route location ${jobRouteLocationData.name} (DB ID ${jobRouteLocationData.databaseId}) doesn't need saved. Skipping ...`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: Job route location ${jobRouteLocationData.name} (DB ID ${jobRouteLocationData.databaseId}) doesn't need saved. Skipping ...`); return false; } - logToConsole(LOG_DEBUG, `[AGRP.Job]: Saving job route location ${jobRouteLocationData.name} to database ...`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: Saving job route location ${jobRouteLocationData.name} to database ...`); let dbConnection = connectToDatabase(); if (dbConnection) { let safeName = escapeDatabaseString(dbConnection, jobRouteLocationData.name); @@ -2919,7 +2919,7 @@ function saveJobRouteLocationToDatabase(jobRouteLocationData) { disconnectFromDatabase(dbConnection); return true; } - logToConsole(LOG_DEBUG, `[AGRP.Job]: Saved job route location ${jobRoutePositionData.name} (${jobRouteLocationData.databaseId}) to database!`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: Saved job route location ${jobRoutePositionData.name} (${jobRouteLocationData.databaseId}) to database!`); return false; } @@ -2933,11 +2933,11 @@ function saveJobLocationToDatabase(jobLocationData) { } if (!jobLocationData.needsSaved) { - logToConsole(LOG_DEBUG, `[AGRP.Job]: Job location ${jobLocationData.name} (${jobLocationData.databaseId}) doesn't need saved. Skipping ...`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: Job location ${jobLocationData.name} (${jobLocationData.databaseId}) doesn't need saved. Skipping ...`); return false; } - logToConsole(LOG_DEBUG, `[AGRP.Job]: Saving job location ${jobLocationData.databaseId} to database ...`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: Saving job location ${jobLocationData.databaseId} to database ...`); let dbConnection = connectToDatabase(); if (dbConnection) { let data = [ @@ -2968,7 +2968,7 @@ function saveJobLocationToDatabase(jobLocationData) { return true; } - logToConsole(LOG_DEBUG, `[AGRP.Job]: Saved job location ${jobLocationData.databaseId} to database`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: Saved job location ${jobLocationData.databaseId} to database`); return false; } @@ -2982,11 +2982,11 @@ function saveJobEquipmentToDatabase(jobEquipmentData) { } if (!jobEquipmentData.needsSaved) { - logToConsole(LOG_DEBUG, `[AGRP.Job]: Job equipment ${jobEquipmentData.name} (${jobEquipmentData.databaseId}) doesn't need saved. Skipping ...`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: Job equipment ${jobEquipmentData.name} (${jobEquipmentData.databaseId}) doesn't need saved. Skipping ...`); return false; } - logToConsole(LOG_DEBUG, `[AGRP.Job]: Saving job equipment ${jobEquipmentData.databaseId} to database ...`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: Saving job equipment ${jobEquipmentData.databaseId} to database ...`); let dbConnection = connectToDatabase(); if (dbConnection) { let safeName = escapeDatabaseString(dbConnection, jobEquipmentData.name); @@ -3014,7 +3014,7 @@ function saveJobEquipmentToDatabase(jobEquipmentData) { disconnectFromDatabase(dbConnection); return true; } - logToConsole(LOG_DEBUG, `[AGRP.Job]: Saved job equipment ${jobEquipmentData.databaseId} to database`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: Saved job equipment ${jobEquipmentData.databaseId} to database`); return false; } @@ -3028,11 +3028,11 @@ function saveJobEquipmentItemToDatabase(jobEquipmentItemData) { } if (!jobEquipmentItemData.needsSaved) { - logToConsole(LOG_DEBUG, `[AGRP.Job]: Job equipment item ${jobEquipmentItemData.databaseId} doesn't need saved. Skipping ...`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: Job equipment item ${jobEquipmentItemData.databaseId} doesn't need saved. Skipping ...`); return false; } - logToConsole(LOG_DEBUG, `[AGRP.Job]: Saving job equipment weapon ${jobEquipmentItemData.databaseId} to database ...`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: Saving job equipment weapon ${jobEquipmentItemData.databaseId} to database ...`); let dbConnection = connectToDatabase(); if (dbConnection) { let data = [ @@ -3059,7 +3059,7 @@ function saveJobEquipmentItemToDatabase(jobEquipmentItemData) { disconnectFromDatabase(dbConnection); return true; } - logToConsole(LOG_DEBUG, `[AGRP.Job]: Saved job equipment weapon ${jobEquipmentItemData.databaseId} to database`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: Saved job equipment weapon ${jobEquipmentItemData.databaseId} to database`); return false; } @@ -3073,11 +3073,11 @@ function saveJobUniformToDatabase(jobUniformData) { } if (!jobUniformData.needSaved) { - logToConsole(LOG_DEBUG, `[AGRP.Job]: Job uniform ${jobUniformData.databaseId} doesn't need saved. Skipping ...`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: Job uniform ${jobUniformData.databaseId} doesn't need saved. Skipping ...`); return false; } - logToConsole(LOG_DEBUG, `[AGRP.Job]: Saving job uniform ${jobUniformData.databaseId} to database ...`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: Saving job uniform ${jobUniformData.databaseId} to database ...`); let dbConnection = connectToDatabase(); if (dbConnection) { let safeName = escapeDatabaseString(dbConnection, jobUniformData.name); @@ -3106,7 +3106,7 @@ function saveJobUniformToDatabase(jobUniformData) { disconnectFromDatabase(dbConnection); return true; } - logToConsole(LOG_DEBUG, `[AGRP.Job]: Saved job uniform ${jobUniformData.databaseId} to database`); + logToConsole(LOG_DEBUG, `[V.RP.Job]: Saved job uniform ${jobUniformData.databaseId} to database`); return false; } @@ -3174,7 +3174,7 @@ function createJobLocationPickup(jobId, locationId) { let tempJobData = getJobData(jobId); - logToConsole(LOG_VERBOSE, `[AGRP.Job]: Creating pickup for location ${locationId} of the ${tempJobData.name} job`); + logToConsole(LOG_VERBOSE, `[V.RP.Job]: Creating pickup for location ${locationId} of the ${tempJobData.name} job`); if (tempJobData.pickupModel != -1) { let pickupModelId = -1; diff --git a/scripts/server/keybind.js b/scripts/server/keybind.js index f2ae5111..8430768c 100644 --- a/scripts/server/keybind.js +++ b/scripts/server/keybind.js @@ -116,7 +116,7 @@ function addPlayerKeyBind(client, keyId, command, params, tempKey = false) { if (!doesPlayerHaveKeyBindsDisabled(client) && doesPlayerHaveKeyBindForCommand(client, "enter")) { let keyId = getPlayerKeyBindForCommand(client, "enter"); - logToConsole(LOG_DEBUG, `[AGRP.Event] Sending custom enter property key ID (${keyId.key}, ${toUpperCase(getKeyNameFromId(keyId.key))}) to ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Event] Sending custom enter property key ID (${keyId.key}, ${toUpperCase(getKeyNameFromId(keyId.key))}) to ${getPlayerDisplayForConsole(client)}`); sendPlayerEnterPropertyKey(client, keyId.key); } else { sendPlayerEnterPropertyKey(client, false); @@ -140,7 +140,7 @@ function removePlayerKeyBind(client, keyId) { if (!doesPlayerHaveKeyBindsDisabled(client) && doesPlayerHaveKeyBindForCommand(client, "enter")) { let keyId = getPlayerKeyBindForCommand(client, "enter"); - logToConsole(LOG_DEBUG, `[AGRP.Event] Sending custom enter property key ID (${keyId.key}, ${toUpperCase(getKeyNameFromId(keyId.key))}) to ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Event] Sending custom enter property key ID (${keyId.key}, ${toUpperCase(getKeyNameFromId(keyId.key))}) to ${getPlayerDisplayForConsole(client)}`); sendPlayerEnterPropertyKey(client, keyId.key); } else { sendPlayerEnterPropertyKey(client, false); @@ -208,7 +208,7 @@ function playerUsedKeyBind(client, key, duration = 0) { return false; } - logToConsole(LOG_DEBUG, `[AGRP.KeyBind] ${getPlayerDisplayForConsole(client)} used keybind ${toUpperCase(getKeyNameFromId(key))} (${key})`); + logToConsole(LOG_DEBUG, `[V.RP.KeyBind] ${getPlayerDisplayForConsole(client)} used keybind ${toUpperCase(getKeyNameFromId(key))} (${key})`); if (!doesPlayerHaveKeyBindsDisabled(client) && doesPlayerHaveKeyBindForKey(client, key)) { let keyBindData = getPlayerKeyBindForKey(client, key); if (keyBindData.enabled) { diff --git a/scripts/server/locale.js b/scripts/server/locale.js index 36e2859f..8e010769 100644 --- a/scripts/server/locale.js +++ b/scripts/server/locale.js @@ -40,7 +40,7 @@ function getLocaleString(client, stringName, ...args) { let tempString = getRawLocaleString(getPlayerData(client).locale, stringName); if (tempString == "" || tempString == null || typeof tempString == "undefined") { - logToConsole(LOG_WARN, `[AGRP.Locale] Locale string missing for ${stringName} on language ${getLocaleData(getPlayerData(client).locale).englishName}`); + logToConsole(LOG_WARN, `[V.RP.Locale] Locale string missing for ${stringName} on language ${getLocaleData(getPlayerData(client).locale).englishName}`); submitBugReport(client, `(AUTOMATED REPORT) Locale string "${stringName}" is missing for "${getPlayerLocaleName(client)}"`); return ""; } @@ -57,7 +57,7 @@ function getLocaleString(client, stringName, ...args) { function getLanguageLocaleString(localeId, stringName, ...args) { let tempString = getRawLocaleString(localeId, stringName); if (tempString == "" || tempString == null || typeof tempString == "undefined") { - logToConsole(LOG_WARN, `[AGRP.Locale] Locale string missing for ${stringName} on language ${getLocaleData(localeId).englishName}`); + logToConsole(LOG_WARN, `[V.RP.Locale] Locale string missing for ${stringName} on language ${getLocaleData(localeId).englishName}`); submitBugReport(null, `(AUTOMATED REPORT) Locale string "${stringName}" is missing for "${getLocaleData(localeId).englishName}"`); return ""; } @@ -74,7 +74,7 @@ function getLanguageLocaleString(localeId, stringName, ...args) { function getLanguageGroupedLocaleString(localeId, stringName, index, ...args) { let tempString = getRawGroupedLocaleString(localeId, stringName, index); if (tempString == "" || tempString == null || typeof tempString == "undefined") { - logToConsole(LOG_WARN, `[AGRP.Locale] Locale string missing for index ${index} of "${stringName}" on language ${getLocaleData(localeId).englishName}`); + logToConsole(LOG_WARN, `[V.RP.Locale] Locale string missing for index ${index} of "${stringName}" on language ${getLocaleData(localeId).englishName}`); submitBugReport(null, `(AUTOMATED REPORT) Locale string index ${index} of "${stringName}" is missing for "${getLocaleData(localeId).englishName}"`); return ""; } @@ -106,7 +106,7 @@ function getGroupedLocaleString(client, stringName, index, ...args) { function getRawLocaleString(localeId, stringName) { if (typeof getLocaleStrings()[localeId][stringName] == "undefined") { - logToConsole(LOG_WARN, `[AGRP.Locale] Locale string missing for ${getLocaleStrings()[localeId][stringName]} on language ${getLocaleData(localeId).englishName}[${localeId}]`); + logToConsole(LOG_WARN, `[V.RP.Locale] Locale string missing for ${getLocaleStrings()[localeId][stringName]} on language ${getLocaleData(localeId).englishName}[${localeId}]`); submitBugReport(null, `(AUTOMATED REPORT) Locale string is missing for "${getLocaleStrings()[localeId][stringName]}" on language ${getLocaleData(localeId).englishName}[${localeId}]`); return ""; } @@ -127,7 +127,7 @@ function getRawLocaleString(localeId, stringName) { function getRawGroupedLocaleString(localeId, stringName, index) { if (typeof getLocaleStrings()[localeId][stringName][index] == "undefined") { - logToConsole(LOG_WARN, `[AGRP.Locale] Grouped locale string missing for index ${index} of string ${getLocaleStrings()[localeId][stringName][index]} on language ${getLocaleData(localeId).englishName}[${localeId}]`); + logToConsole(LOG_WARN, `[V.RP.Locale] Grouped locale string missing for index ${index} of string ${getLocaleStrings()[localeId][stringName][index]} on language ${getLocaleData(localeId).englishName}[${localeId}]`); submitBugReport(null, `(AUTOMATED REPORT) Grouped locale string is missing for index ${index} of string "${getLocaleStrings()[localeId][stringName][index]}" on language ${getLocaleData(localeId).englishName}[${localeId}]`); return ""; } diff --git a/scripts/server/misc.js b/scripts/server/misc.js index aad6faef..16e64347 100644 --- a/scripts/server/misc.js +++ b/scripts/server/misc.js @@ -417,7 +417,7 @@ function enterExitPropertyCommand(command, params, client) { }, 1100); } } - //logToConsole(LOG_DEBUG, `[AGRP.Misc] ${getPlayerDisplayForConsole(client)} exited business ${inBusiness.name}[${inBusiness.index}/${inBusiness.databaseId}]`); + //logToConsole(LOG_DEBUG, `[V.RP.Misc] ${getPlayerDisplayForConsole(client)} exited business ${inBusiness.name}[${inBusiness.index}/${inBusiness.databaseId}]`); return true; } diff --git a/scripts/server/native/connected.js b/scripts/server/native/connected.js index 424877c2..02da8ee1 100644 --- a/scripts/server/native/connected.js +++ b/scripts/server/native/connected.js @@ -826,24 +826,24 @@ function getPlayerWeapon(client) { function connectToDatabase() { if (getDatabaseConfig().usePersistentConnection) { if (persistentDatabaseConnection == null) { - logToConsole(LOG_DEBUG, `[AGRP.Database] Initializing database connection ...`); + logToConsole(LOG_DEBUG, `[V.RP.Database] Initializing database connection ...`); persistentDatabaseConnection = module.mysql.connect(getDatabaseConfig().host, getDatabaseConfig().user, getDatabaseConfig().pass, getDatabaseConfig().name, getDatabaseConfig().port); if (persistentDatabaseConnection.error) { - logToConsole(LOG_ERROR, `[AGRP.Database] Database connection error: ${persistentDatabaseConnection.error}`); + logToConsole(LOG_ERROR, `[V.RP.Database] Database connection error: ${persistentDatabaseConnection.error}`); persistentDatabaseConnection = null; return false; } - logToConsole(LOG_DEBUG, `[AGRP.Database] Database connection successful!`); + logToConsole(LOG_DEBUG, `[V.RP.Database] Database connection successful!`); return persistentDatabaseConnection; } else { - logToConsole(LOG_DEBUG, `[AGRP.Database] Using existing database connection.`); + logToConsole(LOG_DEBUG, `[V.RP.Database] Using existing database connection.`); return persistentDatabaseConnection; } } else { let databaseConnection = module.mysql.connect(getDatabaseConfig().host, getDatabaseConfig().user, getDatabaseConfig().pass, getDatabaseConfig().name, getDatabaseConfig().port); if (databaseConnection.error) { - logToConsole(LOG_ERROR, `[AGRP.Database] Database connection error: ${persistentDatabaseConnection.error}`); + logToConsole(LOG_ERROR, `[V.RP.Database] Database connection error: ${persistentDatabaseConnection.error}`); return false; } else { return databaseConnection; @@ -857,9 +857,9 @@ function disconnectFromDatabase(dbConnection, force = false) { if (!getDatabaseConfig().usePersistentConnection || force == true) { try { dbConnection.close(); - logToConsole(LOG_DEBUG, `[AGRP.Database] Database connection closed successfully`); + logToConsole(LOG_DEBUG, `[V.RP.Database] Database connection closed successfully`); } catch (error) { - logToConsole(LOG_ERROR, `[AGRP.Database] Database connection could not be closed! (Error: ${error})`); + logToConsole(LOG_ERROR, `[V.RP.Database] Database connection could not be closed! (Error: ${error})`); } } return true; @@ -868,7 +868,7 @@ function disconnectFromDatabase(dbConnection, force = false) { // =========================================================================== function queryDatabase(dbConnection, queryString, useThread = false) { - logToConsole(LOG_DEBUG, `[AGRP.Database] Query string: ${queryString}`); + logToConsole(LOG_DEBUG, `[V.RP.Database] Query string: ${queryString}`); if (useThread == true) { Promise.resolve().then(() => { let queryResult = dbConnection.query(queryString); @@ -942,19 +942,19 @@ function quickDatabaseQuery(queryString) { let dbConnection = connectToDatabase(); let insertId = 0; if (dbConnection) { - //logToConsole(LOG_DEBUG, `[AGRP.Database] Query string: ${queryString}`); + //logToConsole(LOG_DEBUG, `[V.RP.Database] Query string: ${queryString}`); let dbQuery = queryDatabase(dbConnection, queryString); if (getDatabaseInsertId(dbConnection)) { insertId = getDatabaseInsertId(dbConnection); - logToConsole(LOG_DEBUG, `[AGRP.Database] Query returned insert id ${insertId}`); + logToConsole(LOG_DEBUG, `[V.RP.Database] Query returned insert id ${insertId}`); } if (dbQuery) { try { freeDatabaseQuery(dbQuery); - logToConsole(LOG_DEBUG, `[AGRP.Database] Query result free'd successfully`); + logToConsole(LOG_DEBUG, `[V.RP.Database] Query result free'd successfully`); } catch (error) { - logToConsole(LOG_ERROR, `[AGRP.Database] Query result could not be free'd! (Error: ${error})`); + logToConsole(LOG_ERROR, `[V.RP.Database] Query result could not be free'd! (Error: ${error})`); } } @@ -1006,9 +1006,9 @@ function setConstantsAsGlobalVariablesInDatabase() { let dbConnection = connectToDatabase(); let entries = Object.entries(global); for (let i in entries) { - logToConsole(LOG_DEBUG, `[AGRP.Database] Checking entry ${i} (${entries[i]})`); + logToConsole(LOG_DEBUG, `[V.RP.Database] Checking entry ${i} (${entries[i]})`); if (toString(i).slice(0, 3).indexOf("V_") != -1) { - logToConsole(LOG_DEBUG, `[AGRP.Database] Adding ${i} (${entries[i]}) to database global variables`); + logToConsole(LOG_DEBUG, `[V.RP.Database] Adding ${i} (${entries[i]}) to database global variables`); } } } @@ -1193,7 +1193,7 @@ function setVehicleHealth(vehicle, health) { // =========================================================================== function givePlayerWeapon(client, weaponId, ammo, active = true) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending signal to ${getPlayerDisplayForConsole(client)} to give weapon (Weapon: ${weaponId}, Ammo: ${ammo})`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending signal to ${getPlayerDisplayForConsole(client)} to give weapon (Weapon: ${weaponId}, Ammo: ${ammo})`); sendNetworkEventToPlayer("v.rp.giveWeapon", client, weaponId, ammo, active); } @@ -1447,7 +1447,7 @@ function hideElementForPlayer(element, client) { return false; } - logToConsole(LOG_DEBUG, `[AGRP.Native.Connected] Hiding element ${element.id} for player ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Native.Connected] Hiding element ${element.id} for player ${getPlayerDisplayForConsole(client)}`); element.setExistsFor(client, false); } @@ -1462,7 +1462,7 @@ function showElementForPlayer(element, client) { return false; } - logToConsole(LOG_DEBUG, `[AGRP.Native.Connected] Showing element ${element.id} for player ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Native.Connected] Showing element ${element.id} for player ${getPlayerDisplayForConsole(client)}`); element.setExistsFor(client, true); } diff --git a/scripts/server/native/ragemp.js b/scripts/server/native/ragemp.js index 076f29be..33b2b84d 100644 --- a/scripts/server/native/ragemp.js +++ b/scripts/server/native/ragemp.js @@ -742,24 +742,24 @@ function getPlayerWeapon(client) { function connectToDatabase() { if (getDatabaseConfig().usePersistentConnection) { if (persistentDatabaseConnection == null) { - logToConsole(LOG_DEBUG, `[AGRP.Database] Initializing database connection ...`); + logToConsole(LOG_DEBUG, `[V.RP.Database] Initializing database connection ...`); persistentDatabaseConnection = module.mysql.connect(getDatabaseConfig().host, getDatabaseConfig().user, getDatabaseConfig().pass, getDatabaseConfig().name, getDatabaseConfig().port); if (persistentDatabaseConnection.error) { - logToConsole(LOG_ERROR, `[AGRP.Database] Database connection error: ${persistentDatabaseConnection.error}`); + logToConsole(LOG_ERROR, `[V.RP.Database] Database connection error: ${persistentDatabaseConnection.error}`); persistentDatabaseConnection = null; return false; } - logToConsole(LOG_DEBUG, `[AGRP.Database] Database connection successful!`); + logToConsole(LOG_DEBUG, `[V.RP.Database] Database connection successful!`); return persistentDatabaseConnection; } else { - logToConsole(LOG_DEBUG, `[AGRP.Database] Using existing database connection.`); + logToConsole(LOG_DEBUG, `[V.RP.Database] Using existing database connection.`); return persistentDatabaseConnection; } } else { let databaseConnection = module.mysql.connect(getDatabaseConfig().host, getDatabaseConfig().user, getDatabaseConfig().pass, getDatabaseConfig().name, getDatabaseConfig().port); if (databaseConnection.error) { - logToConsole(LOG_ERROR, `[AGRP.Database] Database connection error: ${persistentDatabaseConnection.error}`); + logToConsole(LOG_ERROR, `[V.RP.Database] Database connection error: ${persistentDatabaseConnection.error}`); return false; } else { return databaseConnection; @@ -773,9 +773,9 @@ function disconnectFromDatabase(dbConnection) { if (!getDatabaseConfig().usePersistentConnection) { try { dbConnection.close(); - logToConsole(LOG_DEBUG, `[AGRP.Database] Database connection closed successfully`); + logToConsole(LOG_DEBUG, `[V.RP.Database] Database connection closed successfully`); } catch (error) { - logToConsole(LOG_ERROR, `[AGRP.Database] Database connection could not be closed! (Error: ${error})`); + logToConsole(LOG_ERROR, `[V.RP.Database] Database connection could not be closed! (Error: ${error})`); } } return true; @@ -784,7 +784,7 @@ function disconnectFromDatabase(dbConnection) { // =========================================================================== function queryDatabase(dbConnection, queryString, useThread = false) { - logToConsole(LOG_DEBUG, `[AGRP.Database] Query string: ${queryString}`); + logToConsole(LOG_DEBUG, `[V.RP.Database] Query string: ${queryString}`); if (useThread == true) { Promise.resolve().then(() => { let queryResult = dbConnection.query(queryString); @@ -849,19 +849,19 @@ function quickDatabaseQuery(queryString) { let dbConnection = connectToDatabase(); let insertId = 0; if (dbConnection) { - //logToConsole(LOG_DEBUG, `[AGRP.Database] Query string: ${queryString}`); + //logToConsole(LOG_DEBUG, `[V.RP.Database] Query string: ${queryString}`); let dbQuery = queryDatabase(dbConnection, queryString); if (getDatabaseInsertId(dbConnection)) { insertId = getDatabaseInsertId(dbConnection); - logToConsole(LOG_DEBUG, `[AGRP.Database] Query returned insert id ${insertId}`); + logToConsole(LOG_DEBUG, `[V.RP.Database] Query returned insert id ${insertId}`); } if (dbQuery) { try { freeDatabaseQuery(dbQuery); - logToConsole(LOG_DEBUG, `[AGRP.Database] Query result free'd successfully`); + logToConsole(LOG_DEBUG, `[V.RP.Database] Query result free'd successfully`); } catch (error) { - logToConsole(LOG_ERROR, `[AGRP.Database] Query result could not be free'd! (Error: ${error})`); + logToConsole(LOG_ERROR, `[V.RP.Database] Query result could not be free'd! (Error: ${error})`); } } @@ -998,7 +998,7 @@ function setVehicleHealth(vehicle, health) { // =========================================================================== function givePlayerWeapon(client, weaponId, ammo, active = true) { - //logToConsole(LOG_DEBUG, `[AGRP.Client] Sending signal to ${getPlayerDisplayForConsole(client)} to give weapon (Weapon: ${weaponId}, Ammo: ${ammo})`); + //logToConsole(LOG_DEBUG, `[V.RP.Client] Sending signal to ${getPlayerDisplayForConsole(client)} to give weapon (Weapon: ${weaponId}, Ammo: ${ammo})`); //sendNetworkEventToPlayer("v.rp.giveWeapon", client, weaponId, ammo, active); client.giveWeapon(weaponId, ammo); } diff --git a/scripts/server/netevents.js b/scripts/server/netevents.js index 297f29ff..03efcff4 100644 --- a/scripts/server/netevents.js +++ b/scripts/server/netevents.js @@ -87,14 +87,14 @@ function updatePlayerNameTag(client) { return false; } - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending ${getPlayerDisplayForConsole(client)}'s updated nametag to all players`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending ${getPlayerDisplayForConsole(client)}'s updated nametag to all players`); sendNetworkEventToPlayer("v.rp.nametag", null, getPlayerName(client), getPlayerNameForNameTag(client), getPlayerColour(client), getPlayerData(client).afk, getPlayerPing(client)); } // =========================================================================== function updateAllPlayerNameTags() { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending updated nametags to all players`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending updated nametags to all players`); let clients = getClients(); for (let i in clients) { updatePlayerNameTag(clients[i]); @@ -104,7 +104,7 @@ function updateAllPlayerNameTags() { // =========================================================================== function updatePlayerPing(client) { - //logToConsole(LOG_DEBUG, `[AGRP.Client] Sending ${getPlayerDisplayForConsole(client)}'s ping to all players`); + //logToConsole(LOG_DEBUG, `[V.RP.Client] Sending ${getPlayerDisplayForConsole(client)}'s ping to all players`); sendNetworkEventToPlayer("v.rp.ping", null, getPlayerName(client), getPlayerPing(client)); } @@ -112,7 +112,7 @@ function updatePlayerPing(client) { function playerClientReady(client) { playerResourceReady[client.index] = true; - logToConsole(LOG_DEBUG, `[AGRP.Client] ${getPlayerDisplayForConsole(client)}'s client resources are downloaded and ready! Started: ${getYesNoFromBool(playerResourceStarted[client.index])}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] ${getPlayerDisplayForConsole(client)}'s client resources are downloaded and ready! Started: ${getYesNoFromBool(playerResourceStarted[client.index])}`); if (playerResourceStarted[client.index] == true && playerInitialized[client.index] == false) { initClient(client); } @@ -122,14 +122,14 @@ function playerClientReady(client) { function playerGUIReady(client) { playerGUI[client.index] = true; - logToConsole(LOG_DEBUG, `[AGRP.Client] ${getPlayerDisplayForConsole(client)}'s client GUI is initialized and ready!`); + logToConsole(LOG_DEBUG, `[V.RP.Client] ${getPlayerDisplayForConsole(client)}'s client GUI is initialized and ready!`); } // =========================================================================== function playerClientStarted(client) { playerResourceStarted[client.index] = true; - logToConsole(LOG_DEBUG, `[AGRP.Client] ${getPlayerDisplayForConsole(client)}'s client resources are started and running! Ready: ${getYesNoFromBool(playerResourceReady[client.index])}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] ${getPlayerDisplayForConsole(client)}'s client resources are started and running! Ready: ${getYesNoFromBool(playerResourceReady[client.index])}`); if (playerResourceReady[client.index] == true && playerInitialized[client.index] == false) { initClient(client); } @@ -138,7 +138,7 @@ function playerClientStarted(client) { // =========================================================================== function playerClientStopped(client) { - logToConsole(LOG_DEBUG | LOG_WARN, `[AGRP.Client] ${getPlayerDisplayForConsole(client)}'s client resources have stopped (possibly error?)`); + logToConsole(LOG_DEBUG | LOG_WARN, `[V.RP.Client] ${getPlayerDisplayForConsole(client)}'s client resources have stopped (possibly error?)`); getPlayerData(client).customDisconnectReason = "ClientScriptVerificationFail"; //disconnectPlayer(client); } @@ -146,7 +146,7 @@ function playerClientStopped(client) { // =========================================================================== function showSmallGameMessage(client, text, colour, duration, fontName = "Roboto") { - logToConsole(LOG_DEBUG, `[AGRP.Client] Showing game message to ${getPlayerDisplayForConsole(client)} (${text}) for ${duration} milliseconds`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Showing game message to ${getPlayerDisplayForConsole(client)} (${text}) for ${duration} milliseconds`); if (getGame() <= V_GAME_GTA_IV_EFLC) { fontName = "Pricedown"; @@ -163,7 +163,7 @@ function enableCityAmbienceForPlayer(client, clearElements = false) { // return false; //} - //logToConsole(LOG_DEBUG, `[AGRP.Client] Setting ${getPlayerDisplayForConsole(client)}'s city ambience to ${toUpperCase(getOnOffFromBool(false))}`); + //logToConsole(LOG_DEBUG, `[V.RP.Client] Setting ${getPlayerDisplayForConsole(client)}'s city ambience to ${toUpperCase(getOnOffFromBool(false))}`); //sendNetworkEventToPlayer("v.rp.ambience", client, true); } @@ -174,21 +174,21 @@ function disableCityAmbienceForPlayer(client, clearElements = false) { // return false; //} - //logToConsole(LOG_DEBUG, `[AGRP.Client] Setting ${getPlayerDisplayForConsole(client)}'s city ambience to ${toUpperCase(getOnOffFromBool(false))}`); + //logToConsole(LOG_DEBUG, `[V.RP.Client] Setting ${getPlayerDisplayForConsole(client)}'s city ambience to ${toUpperCase(getOnOffFromBool(false))}`); //sendNetworkEventToPlayer("v.rp.ambience", client, false, clearElements); } // =========================================================================== function clearPlayerOwnedPeds(client) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Clearing peds owned by ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Clearing peds owned by ${getPlayerDisplayForConsole(client)}`); sendNetworkEventToPlayer("v.rp.clearPeds", client); } // =========================================================================== function updatePlayerSpawnedState(client, state) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Setting ${getPlayerDisplayForConsole(client)}'s spawned state ${toUpperCase(getOnOffFromBool(state))}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Setting ${getPlayerDisplayForConsole(client)}'s spawned state ${toUpperCase(getOnOffFromBool(state))}`); getPlayerData(client).spawned = true; sendNetworkEventToPlayer("v.rp.spawned", client, state); } @@ -196,21 +196,21 @@ function updatePlayerSpawnedState(client, state) { // =========================================================================== function setPlayerControlState(client, state) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Setting ${getPlayerDisplayForConsole(client)}'s control state ${toUpperCase(getOnOffFromBool(state))}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Setting ${getPlayerDisplayForConsole(client)}'s control state ${toUpperCase(getOnOffFromBool(state))}`); sendNetworkEventToPlayer("v.rp.control", client, state, !state); } // =========================================================================== function updatePlayerShowLogoState(client, state) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Setting ${getPlayerDisplayForConsole(client)}'s logo state ${toUpperCase(getOnOffFromBool(state))}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Setting ${getPlayerDisplayForConsole(client)}'s logo state ${toUpperCase(getOnOffFromBool(state))}`); sendNetworkEventToPlayer("v.rp.logo", client, state); } // =========================================================================== function restorePlayerCamera(client) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Restoring ${getPlayerDisplayForConsole(client)}'s camera`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Restoring ${getPlayerDisplayForConsole(client)}'s camera`); sendNetworkEventToPlayer("v.rp.restoreCamera", client); } @@ -223,7 +223,7 @@ function setPlayer2DRendering(client, hudState = false, labelState = false, smal // =========================================================================== function syncPlayerProperties(client) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending signal to sync ${getPlayerDisplayForConsole(client)}'s player ped properties`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending signal to sync ${getPlayerDisplayForConsole(client)}'s player ped properties`); sendNetworkEventToPlayer("v.rp.syncElement", null, getPlayerPed(client).id); } @@ -231,7 +231,7 @@ function syncPlayerProperties(client) { function updatePlayerSnowState(client, forceGroundSnow = false) { if (isSnowSupported(getGame())) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Setting ${getPlayerDisplayForConsole(client)}'s snow state (Falling: ${toUpperCase(getOnOffFromBool(getServerConfig().fallingSnow))}, Ground: ${toUpperCase(getOnOffFromBool(getServerConfig().groundSnow))})`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Setting ${getPlayerDisplayForConsole(client)}'s snow state (Falling: ${toUpperCase(getOnOffFromBool(getServerConfig().fallingSnow))}, Ground: ${toUpperCase(getOnOffFromBool(getServerConfig().groundSnow))})`); sendNetworkEventToPlayer("v.rp.snow", client, getServerConfig().fallingSnow, getServerConfig().groundSnow, forceGroundSnow); } } @@ -239,7 +239,7 @@ function updatePlayerSnowState(client, forceGroundSnow = false) { // =========================================================================== function updatePlayerHotBar(client) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending updated hotbar data to ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending updated hotbar data to ${getPlayerDisplayForConsole(client)}`); let tempHotBarItems = []; for (let i in getPlayerData(client).hotBarItems) { let itemImage = ""; @@ -262,14 +262,14 @@ function updatePlayerHotBar(client) { // =========================================================================== function setPlayerWeaponDamageEnabled(client, state) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending weapon damage state for ${getPlayerDisplayForConsole(client)} to all players`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending weapon damage state for ${getPlayerDisplayForConsole(client)} to all players`); sendNetworkEventToPlayer("v.rp.weaponDamageEnabled", null, getPlayerName(client), state); } // =========================================================================== function setPlayerWeaponDamageEvent(client, eventType) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending weapon damage event (${eventType}) for ${getPlayerDisplayForConsole(client)} to all players`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending weapon damage event (${eventType}) for ${getPlayerDisplayForConsole(client)} to all players`); sendNetworkEventToPlayer("v.rp.weaponDamageEvent", null, getPlayerName(client), eventType); getPlayerData(client).weaponDamageEvent = eventType; } @@ -277,259 +277,259 @@ function setPlayerWeaponDamageEvent(client, eventType) { // =========================================================================== function sendJobRouteLocationToPlayer(client, position, colour) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending job route location data to ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending job route location data to ${getPlayerDisplayForConsole(client)}`); sendNetworkEventToPlayer("v.rp.showJobRouteLocation", client, position, colour); } // =========================================================================== function showPlayerLoginSuccessGUI(client) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending login success GUI signal to ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending login success GUI signal to ${getPlayerDisplayForConsole(client)}`); sendNetworkEventToPlayer("v.rp.loginSuccess", client); } // =========================================================================== function showPlayerLoginFailedGUI(client, errorMessage) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending login failed GUI signal to ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending login failed GUI signal to ${getPlayerDisplayForConsole(client)}`); sendNetworkEventToPlayer("v.rp.loginFailed", client, errorMessage); } // =========================================================================== function showPlayerRegistrationSuccessGUI(client) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending registration success GUI signal to ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending registration success GUI signal to ${getPlayerDisplayForConsole(client)}`); sendNetworkEventToPlayer("v.rp.registrationSuccess", client); } // =========================================================================== function showPlayerRegistrationFailedGUI(client, errorMessage) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending registration failed GUI signal to ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending registration failed GUI signal to ${getPlayerDisplayForConsole(client)}`); sendNetworkEventToPlayer("v.rp.registrationFailed", client, errorMessage); } // =========================================================================== function sendPlayerGUIColours(client) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending GUI colours to ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending GUI colours to ${getPlayerDisplayForConsole(client)}`); sendNetworkEventToPlayer("v.rp.guiColour", client, getServerConfig().guiColourPrimary[0], getServerConfig().guiColourPrimary[1], getServerConfig().guiColourPrimary[2], getServerConfig().guiColourSecondary[0], getServerConfig().guiColourSecondary[1], getServerConfig().guiColourSecondary[2], getServerConfig().guiTextColourPrimary[0], getServerConfig().guiTextColourPrimary[1], getServerConfig().guiTextColourPrimary[2]); } // =========================================================================== function sendPlayerGUIInit(client) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending GUI init signal to ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending GUI init signal to ${getPlayerDisplayForConsole(client)}`); sendNetworkEventToPlayer("v.rp.guiInit", client); } // =========================================================================== function showPlayerLoginGUI(client, errorMessage = "") { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending show login GUI signal to ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending show login GUI signal to ${getPlayerDisplayForConsole(client)}`); sendNetworkEventToPlayer("v.rp.showLogin", client); } // =========================================================================== function showPlayerRegistrationGUI(client, errorMessage = "") { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending show registration GUI signal to ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending show registration GUI signal to ${getPlayerDisplayForConsole(client)}`); sendNetworkEventToPlayer("v.rp.showRegistration", client); } // =========================================================================== function showPlayerNewCharacterGUI(client) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending show new character GUI signal to ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending show new character GUI signal to ${getPlayerDisplayForConsole(client)}`); sendNetworkEventToPlayer("v.rp.showNewCharacter", client); } // =========================================================================== function showPlayerChangePasswordGUI(client, errorMessage = "") { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending show change password GUI signal to ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending show change password GUI signal to ${getPlayerDisplayForConsole(client)}`); sendNetworkEventToPlayer("v.rp.showChangePassword", client, errorMessage); } // =========================================================================== function showPlayerResetPasswordCodeInputGUI(client) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending show reset password code input GUI signal to ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending show reset password code input GUI signal to ${getPlayerDisplayForConsole(client)}`); sendNetworkEventToPlayer("v.rp.showResetPasswordCodeInput", client); } // =========================================================================== function showPlayerResetPasswordEmailInputGUI(client) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending show reset password email input GUI signal to ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending show reset password email input GUI signal to ${getPlayerDisplayForConsole(client)}`); sendNetworkEventToPlayer("v.rp.showResetPasswordEmailInput", client); } // =========================================================================== function showPlayerCharacterSelectGUI(client, firstName, lastName, cash, clan, lastPlayed, skin) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending character select GUI signal to ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending character select GUI signal to ${getPlayerDisplayForConsole(client)}`); sendNetworkEventToPlayer("v.rp.showCharacterSelect", client, firstName, lastName, cash, clan, lastPlayed, skin); } // =========================================================================== function updatePlayerCharacterSelectGUI(client, firstName, lastName, cash, clan, lastPlayed, skin) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending update character select GUI signal to ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending update character select GUI signal to ${getPlayerDisplayForConsole(client)}`); sendNetworkEventToPlayer("v.rp.switchCharacterSelect", client, firstName, lastName, cash, clan, lastPlayed, skin); } // =========================================================================== function showPlayerCharacterSelectSuccessGUI(client) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending character select success GUI signal to ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending character select success GUI signal to ${getPlayerDisplayForConsole(client)}`); sendNetworkEventToPlayer("v.rp.characterSelectSuccess", client); } // =========================================================================== function showPlayerCharacterSelectFailedGUI(client) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending character select failed GUI signal to ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending character select failed GUI signal to ${getPlayerDisplayForConsole(client)}`); sendNetworkEventToPlayer("v.rp.characterSelectFailed", client); } // =========================================================================== function showPlayerPromptGUI(client, promptMessage, promptTitle, yesButtonText = "Yes", noButtonText = "No") { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending show prompt GUI signal to ${getPlayerDisplayForConsole(client)} (Title: ${promptTitle}, Message: ${promptMessage}, YesButton: ${yesButtonText}, NoButton: ${noButtonText})`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending show prompt GUI signal to ${getPlayerDisplayForConsole(client)} (Title: ${promptTitle}, Message: ${promptMessage}, YesButton: ${yesButtonText}, NoButton: ${noButtonText})`); sendNetworkEventToPlayer("v.rp.showPrompt", client, promptMessage, promptTitle, yesButtonText, noButtonText); } // =========================================================================== function showPlayerInfoGUI(client, infoMessage, infoTitle, buttonText = "OK") { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending show info GUI signal to ${getPlayerDisplayForConsole(client)} (Title: ${infoTitle}, Message: ${infoMessage})`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending show info GUI signal to ${getPlayerDisplayForConsole(client)} (Title: ${infoTitle}, Message: ${infoMessage})`); sendNetworkEventToPlayer("v.rp.showInfo", client, infoMessage, infoTitle, buttonText); } // =========================================================================== function showPlayerErrorGUI(client, errorMessage, errorTitle, buttonText = "OK") { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending show error GUI signal to ${getPlayerDisplayForConsole(client)} (Title: ${errorTitle}, Message: ${errorMessage})`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending show error GUI signal to ${getPlayerDisplayForConsole(client)} (Title: ${errorTitle}, Message: ${errorMessage})`); sendNetworkEventToPlayer("v.rp.showError", client, errorMessage, errorTitle, buttonText); } // =========================================================================== function sendRunCodeToClient(client, code, returnTo) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending runcode to ${getPlayerDisplayForConsole(client)} (returnTo: ${getPlayerDisplayForConsole(getClientFromIndex(returnTo))}, Code: ${code})`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending runcode to ${getPlayerDisplayForConsole(client)} (returnTo: ${getPlayerDisplayForConsole(getClientFromIndex(returnTo))}, Code: ${code})`); sendNetworkEventToPlayer("v.rp.runCode", client, code, getPlayerId(returnTo)); } // =========================================================================== function sendPlayerWorkingState(client, state) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending working state (${toUpperCase(getYesNoFromBool(state))}) to ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending working state (${toUpperCase(getYesNoFromBool(state))}) to ${getPlayerDisplayForConsole(client)}`); sendNetworkEventToPlayer("v.rp.working", client, state); } // =========================================================================== function sendPlayerJobType(client, jobType) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending job type (${jobType}) to ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending job type (${jobType}) to ${getPlayerDisplayForConsole(client)}`); sendNetworkEventToPlayer("v.rp.jobType", client, jobType); } // =========================================================================== function sendPlayerStopJobRoute(client) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending signal to abort job route to ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending signal to abort job route to ${getPlayerDisplayForConsole(client)}`); sendNetworkEventToPlayer("v.rp.hideJobRouteLocation", client); } // =========================================================================== function sendPlayerMouseCameraToggle(client) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending signal to toggle mouse camera ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending signal to toggle mouse camera ${getPlayerDisplayForConsole(client)}`); sendNetworkEventToPlayer("v.rp.mouseCamera", client); } // =========================================================================== function setPlayerMouseCameraState(client, state) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending signal to toggle mouse camera ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending signal to toggle mouse camera ${getPlayerDisplayForConsole(client)}`); sendNetworkEventToPlayer("v.rp.mouseCameraForce", client, state); } // =========================================================================== function sendPlayerMouseCursorToggle(client) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending signal to toggle mouse cursor ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending signal to toggle mouse cursor ${getPlayerDisplayForConsole(client)}`); sendNetworkEventToPlayer("v.rp.mouseCursor", client); } // =========================================================================== function sendAddAccountKeyBindToClient(client, key, keyState) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending added keybind to ${getPlayerDisplayForConsole(client)} (Key: ${toUpperCase(getKeyNameFromId(key))}, State: ${(keyState) ? "down" : "up"})`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending added keybind to ${getPlayerDisplayForConsole(client)} (Key: ${toUpperCase(getKeyNameFromId(key))}, State: ${(keyState) ? "down" : "up"})`); sendNetworkEventToPlayer("v.rp.addKeyBind", client, toInteger(key), (keyState) ? KEYSTATE_DOWN : KEYSTATE_UP); } // =========================================================================== function sendClearKeyBindsToClient(client, key, keyState) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending added keybind to ${getPlayerDisplayForConsole(client)} (Key: ${toUpperCase(getKeyNameFromId(key))}, State: ${(keyState) ? "down" : "up"})`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending added keybind to ${getPlayerDisplayForConsole(client)} (Key: ${toUpperCase(getKeyNameFromId(key))}, State: ${(keyState) ? "down" : "up"})`); sendNetworkEventToPlayer("v.rp.clearKeyBinds", client); } // =========================================================================== function sendRemoveAccountKeyBindToClient(client, key) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending deleted keybind to ${getPlayerDisplayForConsole(client)} (Key: ${toUpperCase(getKeyNameFromId(key))})`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending deleted keybind to ${getPlayerDisplayForConsole(client)} (Key: ${toUpperCase(getKeyNameFromId(key))})`); sendNetworkEventToPlayer("v.rp.delKeyBind", client, toInteger(key)); } // =========================================================================== function sendPlayerSetPosition(client, position) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending set position signal to ${getPlayerDisplayForConsole(client)} (Position: ${position.x}, ${position.y}, ${position.z})`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending set position signal to ${getPlayerDisplayForConsole(client)} (Position: ${position.x}, ${position.y}, ${position.z})`); sendNetworkEventToPlayer("v.rp.position", client, position); } // =========================================================================== function sendPlayerSetHeading(client, heading) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending set heading signal to ${getPlayerDisplayForConsole(client)} (Heading: ${heading})`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending set heading signal to ${getPlayerDisplayForConsole(client)} (Heading: ${heading})`); sendNetworkEventToPlayer("v.rp.heading", client, heading); } // =========================================================================== function sendPlayerSetInterior(client, interior) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending set interior signal to ${getPlayerDisplayForConsole(client)} (Interior: ${interior})`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending set interior signal to ${getPlayerDisplayForConsole(client)} (Interior: ${interior})`); sendNetworkEventToPlayer("v.rp.interior", client, interior); } // =========================================================================== function sendPlayerFrozenState(client, state) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending set frozen signal to ${getPlayerDisplayForConsole(client)} (State: ${toUpperCase(getYesNoFromBool(state))})`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending set frozen signal to ${getPlayerDisplayForConsole(client)} (State: ${toUpperCase(getYesNoFromBool(state))})`); sendNetworkEventToPlayer("v.rp.frozen", client, state); } // =========================================================================== function clearPlayerWeapons(client, clearData = true) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending signal to ${getPlayerDisplayForConsole(client)} to clear weapons`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending signal to ${getPlayerDisplayForConsole(client)} to clear weapons`); sendNetworkEventToPlayer("v.rp.clearWeapons", client, clearData); } // =========================================================================== function showPlayerNewCharacterFailedGUI(client, errorMessage) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending new character failed GUI signal to ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending new character failed GUI signal to ${getPlayerDisplayForConsole(client)}`); sendNetworkEventToPlayer("v.rp.newCharacterFailed", client, errorMessage); } // =========================================================================== function sendPlayerRemoveFromVehicle(client) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Sending remove from vehicle signal to ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Sending remove from vehicle signal to ${getPlayerDisplayForConsole(client)}`); sendNetworkEventToPlayer("v.rp.removeFromVehicle", client); } @@ -547,10 +547,10 @@ function showPlayerItemTakeDelay(client, itemId) { if (getItemData(itemId)) { let delay = getItemTypeData(getItemData(itemId).itemTypeIndex).pickupDelay; if (delay > 0) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Showing item TAKE delay to ${getPlayerDisplayForConsole(client)} (${delay} milliseconds)`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Showing item TAKE delay to ${getPlayerDisplayForConsole(client)} (${delay} milliseconds)`); sendNetworkEventToPlayer("v.rp.showItemActionDelay", client, delay); } else { - logToConsole(LOG_DEBUG, `[AGRP.Client] Showing item TAKE delay to ${getPlayerDisplayForConsole(client)} (instant)`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Showing item TAKE delay to ${getPlayerDisplayForConsole(client)} (instant)`); playerItemActionDelayComplete(client); } } @@ -562,10 +562,10 @@ function showPlayerItemUseDelay(client, itemSlot) { if (getItemData(getPlayerData(client).hotBarItems[itemSlot])) { let delay = getItemTypeData(getItemData(getPlayerData(client).hotBarItems[itemSlot]).itemTypeIndex).useDelay; if (delay > 0) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Showing item USE delay to ${getPlayerDisplayForConsole(client)} (${delay} milliseconds)`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Showing item USE delay to ${getPlayerDisplayForConsole(client)} (${delay} milliseconds)`); sendNetworkEventToPlayer("v.rp.showItemActionDelay", client, delay); } else { - logToConsole(LOG_DEBUG, `[AGRP.Client] Showing item USE delay to ${getPlayerDisplayForConsole(client)} (instant)`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Showing item USE delay to ${getPlayerDisplayForConsole(client)} (instant)`); playerItemActionDelayComplete(client); } } @@ -577,10 +577,10 @@ function showPlayerItemDropDelay(client, itemSlot) { if (getItemData(getPlayerData(client).hotBarItems[itemSlot])) { let delay = getItemTypeData(getItemData(getPlayerData(client).hotBarItems[itemSlot]).itemTypeIndex).dropDelay; if (delay > 0) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Showing item DROP delay to ${getPlayerDisplayForConsole(client)} (${delay} milliseconds)`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Showing item DROP delay to ${getPlayerDisplayForConsole(client)} (${delay} milliseconds)`); sendNetworkEventToPlayer("v.rp.showItemActionDelay", client, delay); } else { - logToConsole(LOG_DEBUG, `[AGRP.Client] Showing item DROP delay to ${getPlayerDisplayForConsole(client)} (instant)`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Showing item DROP delay to ${getPlayerDisplayForConsole(client)} (instant)`); playerItemActionDelayComplete(client); } } @@ -592,10 +592,10 @@ function showPlayerItemPickupDelay(client, itemId) { if (getItemData(itemId)) { let delay = getItemTypeData(getItemData(itemId).itemTypeIndex).pickupDelay; if (delay > 0) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Showing item PICKUP delay to ${getPlayerDisplayForConsole(client)} (${delay} milliseconds)`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Showing item PICKUP delay to ${getPlayerDisplayForConsole(client)} (${delay} milliseconds)`); sendNetworkEventToPlayer("v.rp.showItemActionDelay", client, delay); } else { - logToConsole(LOG_DEBUG, `[AGRP.Client] Showing item PICKUP delay to ${getPlayerDisplayForConsole(client)} (instant)`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Showing item PICKUP delay to ${getPlayerDisplayForConsole(client)} (instant)`); playerItemActionDelayComplete(client); } } @@ -607,10 +607,10 @@ function showPlayerItemPutDelay(client, itemSlot) { if (getItemData(getPlayerData(client).hotBarItems[itemSlot])) { let delay = getItemTypeData(getItemData(getPlayerData(client).hotBarItems[itemSlot]).itemTypeIndex).putDelay; if (delay > 0) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Showing item PUT delay to ${getPlayerDisplayForConsole(client)} (${delay} milliseconds)`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Showing item PUT delay to ${getPlayerDisplayForConsole(client)} (${delay} milliseconds)`); sendNetworkEventToPlayer("v.rp.showItemActionDelay", client, delay); } else { - logToConsole(LOG_DEBUG, `[AGRP.Client] Showing item PUT delay to ${getPlayerDisplayForConsole(client)} (instant)`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Showing item PUT delay to ${getPlayerDisplayForConsole(client)} (instant)`); playerItemActionDelayComplete(client); } } @@ -623,18 +623,18 @@ function showPlayerItemSwitchDelay(client, itemSlot) { if (getPlayerData(client).hotBarItems[itemSlot] != -1) { let delay = getItemTypeData(getItemData(getPlayerData(client).hotBarItems[itemSlot]).itemTypeIndex).switchDelay; if (delay > 0) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Showing item switch delay to ${getPlayerDisplayForConsole(client)} (${delay} milliseconds)`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Showing item switch delay to ${getPlayerDisplayForConsole(client)} (${delay} milliseconds)`); sendNetworkEventToPlayer("v.rp.showItemActionDelay", client, delay); } else { - logToConsole(LOG_DEBUG, `[AGRP.Client] Showing item switch delay to ${getPlayerDisplayForConsole(client)} (instant)`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Showing item switch delay to ${getPlayerDisplayForConsole(client)} (instant)`); playerItemActionDelayComplete(client); } } else { - logToConsole(LOG_DEBUG, `[AGRP.Client] Showing item switch delay to ${getPlayerDisplayForConsole(client)} (instant)`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Showing item switch delay to ${getPlayerDisplayForConsole(client)} (instant)`); playerItemActionDelayComplete(client); } } else { - logToConsole(LOG_DEBUG, `[AGRP.Client] Showing item switch delay to ${getPlayerDisplayForConsole(client)} (instant)`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Showing item switch delay to ${getPlayerDisplayForConsole(client)} (instant)`); playerSwitchItem(client, itemSlot); } } @@ -642,14 +642,14 @@ function showPlayerItemSwitchDelay(client, itemSlot) { // =========================================================================== function sendPlayerDrunkEffect(client, amount, duration) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Setting drunk effect for ${getPlayerDisplayForConsole(client)} to ${amount} for ${duration} milliseconds`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Setting drunk effect for ${getPlayerDisplayForConsole(client)} to ${amount} for ${duration} milliseconds`); sendNetworkEventToPlayer("v.rp.drunkEffect", client, amount, duration); } // =========================================================================== function sendPlayerClearPedState(client) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Clearing ped state for ${getPlayerDisplayForConsole(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Clearing ped state for ${getPlayerDisplayForConsole(client)}`); sendNetworkEventToPlayer("v.rp.clearPedState", client); } @@ -659,29 +659,29 @@ function playerDamagedByPlayer(client, damagerEntityName, weaponId, pedPiece, he let damagerEntity = getPlayerFromParams(damagerEntityName); if (isNull(damagerEntity)) { - logToConsole(LOG_DEBUG, `[AGRP.Client] ${getPlayerDisplayForConsole(client)}'s damager entity from ID is null`); + logToConsole(LOG_DEBUG, `[V.RP.Client] ${getPlayerDisplayForConsole(client)}'s damager entity from ID is null`); return false; } - logToConsole(LOG_DEBUG, `[AGRP.Client] ${getPlayerDisplayForConsole(client)} was damaged by ${damagerEntity}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] ${getPlayerDisplayForConsole(client)} was damaged by ${damagerEntity}`); if (isNull(damagerEntity)) { - logToConsole(LOG_DEBUG, `[AGRP.Client] ${getPlayerDisplayForConsole(client)}'s damager client is INVALID`); + logToConsole(LOG_DEBUG, `[V.RP.Client] ${getPlayerDisplayForConsole(client)}'s damager client is INVALID`); return false; } if (!getPlayerData(damagerEntity) || !getPlayerData(client)) { - logToConsole(LOG_DEBUG, `[AGRP.Client] ${getPlayerDisplayForConsole(client)}'s damager's client data is INVALID`); + logToConsole(LOG_DEBUG, `[V.RP.Client] ${getPlayerDisplayForConsole(client)}'s damager's client data is INVALID`); return false; } - logToConsole(LOG_DEBUG, `[AGRP.Client] ${getPlayerDisplayForConsole(client)}'s damager is ${getPlayerDisplayForConsole(damagerEntity)}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] ${getPlayerDisplayForConsole(client)}'s damager is ${getPlayerDisplayForConsole(damagerEntity)}`); switch (getPlayerData(damagerEntity).weaponDamageEvent) { case V_WEAPON_DAMAGE_EVENT_TAZER: - logToConsole(LOG_DEBUG, `[AGRP.Client] ${getPlayerDisplayForConsole(client)}'s damager ${getPlayerDisplayForConsole(damagerEntity)} is using a tazer`); + logToConsole(LOG_DEBUG, `[V.RP.Client] ${getPlayerDisplayForConsole(client)}'s damager ${getPlayerDisplayForConsole(damagerEntity)} is using a tazer`); if (!isPlayerTazed(client) && !isPlayerHandCuffed(client) && !isPlayerInAnyVehicle(client)) { - logToConsole(LOG_DEBUG, `[AGRP.Client] ${getPlayerDisplayForConsole(client)} was not previously tazed, binded, or in a vehicle. Taze successful`); + logToConsole(LOG_DEBUG, `[V.RP.Client] ${getPlayerDisplayForConsole(client)} was not previously tazed, binded, or in a vehicle. Taze successful`); meActionToNearbyPlayers(damagerEntity, `electrifies ${getCharacterFullName(client)} with their tazer`); tazePlayer(client); } @@ -694,10 +694,10 @@ function playerDamagedByPlayer(client, damagerEntityName, weaponId, pedPiece, he break; case V_WEAPON_DAMAGE_EVENT_NORMAL: - logToConsole(LOG_DEBUG, `[AGRP.Client] ${getPlayerDisplayForConsole(client)}'s damager ${getPlayerDisplayForConsole(damagerEntity)} caused ${healthLoss} damage (damage reduction makes it ${(healthLoss * getPlayerData(client).incomingDamageMultiplier)})`); + logToConsole(LOG_DEBUG, `[V.RP.Client] ${getPlayerDisplayForConsole(client)}'s damager ${getPlayerDisplayForConsole(damagerEntity)} caused ${healthLoss} damage (damage reduction makes it ${(healthLoss * getPlayerData(client).incomingDamageMultiplier)})`); let remainingDamage = healthLoss * getPlayerData(client).incomingDamageMultiplier; if (getPlayerArmour(client) > 0) { - //logToConsole(LOG_DEBUG, `[AGRP.Client] ${getPlayerDisplayForConsole(client)}'s armour was ${getPlayerArmour(client)}, so it was reduced by ${healthLoss}`); + //logToConsole(LOG_DEBUG, `[V.RP.Client] ${getPlayerDisplayForConsole(client)}'s armour was ${getPlayerArmour(client)}, so it was reduced by ${healthLoss}`); if (getPlayerArmour(client) - remainingDamage < 0) { setPlayerArmour(client, 0); remainingDamage = remainingDamage - getPlayerArmour(client); @@ -709,7 +709,7 @@ function playerDamagedByPlayer(client, damagerEntityName, weaponId, pedPiece, he break; default: - logToConsole(LOG_DEBUG, `[AGRP.Client] ${getPlayerDisplayForConsole(client)}'s damager ${getPlayerDisplayForConsole(damagerEntity)} caused ${healthLoss} damage (damage reduction makes it ${(healthLoss * getPlayerData(client).incomingDamageMultiplier)})`); + logToConsole(LOG_DEBUG, `[V.RP.Client] ${getPlayerDisplayForConsole(client)}'s damager ${getPlayerDisplayForConsole(damagerEntity)} caused ${healthLoss} damage (damage reduction makes it ${(healthLoss * getPlayerData(client).incomingDamageMultiplier)})`); setPlayerHealth(client, getPlayerHealth(client) - (healthLoss * getPlayerData(client).incomingDamageMultiplier)); break; } @@ -969,21 +969,21 @@ function sendPlayerChatAutoHideDelay(client, delay) { // =========================================================================== function playRadioStreamForPlayer(client, streamURL, loop = true, volume = 0, element = false) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Forcing ${getPlayerDisplayForConsole(client)} to stream ${streamURL}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Forcing ${getPlayerDisplayForConsole(client)} to stream ${streamURL}`); sendNetworkEventToPlayer("v.rp.radioStream", client, streamURL, loop, volume, element); } // =========================================================================== function playAudioFileForPlayer(client, audioName, loop = true, volume = 0, element = false) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Forcing ${getPlayerDisplayForConsole(client)} to play audio ${audioName}`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Forcing ${getPlayerDisplayForConsole(client)} to play audio ${audioName}`); sendNetworkEventToPlayer("v.rp.audioFileStream", client, audioName, loop, volume); } // =========================================================================== function stopRadioStreamForPlayer(client) { - logToConsole(LOG_DEBUG, `[AGRP.Client] Forcing ${getPlayerDisplayForConsole(client)} to stop their radio stream`); + logToConsole(LOG_DEBUG, `[V.RP.Client] Forcing ${getPlayerDisplayForConsole(client)} to stop their radio stream`); sendNetworkEventToPlayer("v.rp.stopRadioStream", client); } diff --git a/scripts/server/npc.js b/scripts/server/npc.js index c15af387..ca2c6899 100644 --- a/scripts/server/npc.js +++ b/scripts/server/npc.js @@ -246,7 +246,7 @@ function createNPCCommand(command, params, client) { // =========================================================================== function loadNPCsFromDatabase() { - logToConsole(LOG_DEBUG, `[AGRP.NPC]: Loading NPCs from database ...`); + logToConsole(LOG_DEBUG, `[V.RP.NPC]: Loading NPCs from database ...`); let dbConnection = connectToDatabase(); let tempNPCs = []; let dbAssoc = []; @@ -263,14 +263,14 @@ function loadNPCsFromDatabase() { disconnectFromDatabase(dbConnection); } - logToConsole(LOG_DEBUG, `[AGRP.NPC]: ${tempNPCs.length} NPCs loaded from database successfully!`); + logToConsole(LOG_DEBUG, `[V.RP.NPC]: ${tempNPCs.length} NPCs loaded from database successfully!`); return tempNPCs; } // =========================================================================== function loadNPCTriggersFromDatabase(npcDatabaseId) { - logToConsole(LOG_DEBUG, `[AGRP.NPC]: Loading NPC triggers for NPC ${npcDatabaseId} from database ...`); + logToConsole(LOG_DEBUG, `[V.RP.NPC]: Loading NPC triggers for NPC ${npcDatabaseId} from database ...`); let dbConnection = connectToDatabase(); let tempNPCTriggers = []; let dbAssoc = []; @@ -288,14 +288,14 @@ function loadNPCTriggersFromDatabase(npcDatabaseId) { disconnectFromDatabase(dbConnection); } - logToConsole(LOG_DEBUG, `[AGRP.NPC]: ${tempNPCTriggers.length} NPC triggers loaded for NPC ${npcDatabaseId} from database successfully!`); + logToConsole(LOG_DEBUG, `[V.RP.NPC]: ${tempNPCTriggers.length} NPC triggers loaded for NPC ${npcDatabaseId} from database successfully!`); return tempNPCTriggers; } // =========================================================================== function loadNPCTriggerConditionsFromDatabase(npcTriggerDatabaseId) { - logToConsole(LOG_DEBUG, `[AGRP.NPC]: Loading NPC trigger conditions for trigger ${npcTriggerDatabaseId} from database ...`); + logToConsole(LOG_DEBUG, `[V.RP.NPC]: Loading NPC trigger conditions for trigger ${npcTriggerDatabaseId} from database ...`); let dbConnection = connectToDatabase(); let tempNPCTriggerConditions = []; let dbAssoc; @@ -311,14 +311,14 @@ function loadNPCTriggerConditionsFromDatabase(npcTriggerDatabaseId) { disconnectFromDatabase(dbConnection); } - logToConsole(LOG_DEBUG, `[AGRP.NPC]: ${tempNPCTriggerConditions.length} conditions loaded for trigger ${npcTriggerDatabaseId} from database successfully!`); + logToConsole(LOG_DEBUG, `[V.RP.NPC]: ${tempNPCTriggerConditions.length} conditions loaded for trigger ${npcTriggerDatabaseId} from database successfully!`); return tempNPCTriggerConditions; } // =========================================================================== function loadNPCTriggerResponsesFromDatabase(npcTriggerDatabaseId) { - logToConsole(LOG_DEBUG, `[AGRP.NPC]: Loading NPC trigger responses for trigger ${npcTriggerDatabaseId} from database ...`); + logToConsole(LOG_DEBUG, `[V.RP.NPC]: Loading NPC trigger responses for trigger ${npcTriggerDatabaseId} from database ...`); let dbConnection = connectToDatabase(); let tempNPCTriggerResponses = []; let dbAssoc; @@ -337,7 +337,7 @@ function loadNPCTriggerResponsesFromDatabase(npcTriggerDatabaseId) { disconnectFromDatabase(dbConnection); } - logToConsole(LOG_DEBUG, `[AGRP.NPC]: ${tempNPCTriggerResponses.length} responses loaded for trigger ${npcTriggerDatabaseId} from database successfully!`); + logToConsole(LOG_DEBUG, `[V.RP.NPC]: ${tempNPCTriggerResponses.length} responses loaded for trigger ${npcTriggerDatabaseId} from database successfully!`); return tempNPCTriggerResponses; } @@ -357,28 +357,28 @@ function saveAllNPCsToDatabase() { function saveNPCToDatabase(npcDataId) { if (getServerConfig().devServer) { - logToConsole(LOG_VERBOSE, `[AGRP.NPC]: NPC ${npcDataId} can't be saved because server is running as developer only. Aborting save ...`); + logToConsole(LOG_VERBOSE, `[V.RP.NPC]: NPC ${npcDataId} can't be saved because server is running as developer only. Aborting save ...`); return false; } if (getNPCData(npcDataId) == false) { - logToConsole(LOG_VERBOSE, `[AGRP.NPC]: NPC ${npcDataId} data is invalid. Aborting save ...`); + logToConsole(LOG_VERBOSE, `[V.RP.NPC]: NPC ${npcDataId} data is invalid. Aborting save ...`); return false; } let tempNPCData = getNPCData(npcDataId); if (tempNPCData.databaseId == -1) { - logToConsole(LOG_VERBOSE, `[AGRP.NPC]: NPC ${npcDataId} is a temp NPC. Aborting save ...`); + logToConsole(LOG_VERBOSE, `[V.RP.NPC]: NPC ${npcDataId} is a temp NPC. Aborting save ...`); return false; } if (!tempNPCData.needsSaved) { - logToConsole(LOG_VERBOSE, `[AGRP.NPC]: NPC ${npcDataId} hasn't changed data. Aborting save ...`); + logToConsole(LOG_VERBOSE, `[V.RP.NPC]: NPC ${npcDataId} hasn't changed data. Aborting save ...`); return false; } - logToConsole(LOG_VERBOSE, `[AGRP.NPC]: Saving NPC ${tempNPCData.databaseId} to database ...`); + logToConsole(LOG_VERBOSE, `[V.RP.NPC]: Saving NPC ${tempNPCData.databaseId} to database ...`); let dbConnection = connectToDatabase(); if (dbConnection) { if (tempNPCData.ped != false) { @@ -445,7 +445,7 @@ function saveNPCToDatabase(npcDataId) { disconnectFromDatabase(dbConnection); return true; } - logToConsole(LOG_VERBOSE, `[AGRP.NPC]: Saved NPC ${npcDataId} to database!`); + logToConsole(LOG_VERBOSE, `[V.RP.NPC]: Saved NPC ${npcDataId} to database!`); return false; } diff --git a/scripts/server/paintball.js b/scripts/server/paintball.js index 77d6ee7b..664f79bd 100644 --- a/scripts/server/paintball.js +++ b/scripts/server/paintball.js @@ -60,7 +60,7 @@ function startPaintBall(client) { return false; } - logToConsole(LOG_DEBUG, `[AGRP.PaintBall]: Starting paintball for ${getPlayerDisplayForConsole(client)} ...`); + logToConsole(LOG_DEBUG, `[V.RP.PaintBall]: Starting paintball for ${getPlayerDisplayForConsole(client)} ...`); if (isPlayerWorking(client)) { stopWorking(client); } @@ -79,7 +79,7 @@ function startPaintBall(client) { messagePlayerAlert(client, getLocaleString(client, "JoinedPaintBall")); - logToConsole(LOG_DEBUG, `[AGRP.PaintBall]: Started paintball for ${getPlayerDisplayForConsole(client)} successfully`); + logToConsole(LOG_DEBUG, `[V.RP.PaintBall]: Started paintball for ${getPlayerDisplayForConsole(client)} successfully`); } // =========================================================================== @@ -89,7 +89,7 @@ function stopPaintBall(client) { return false; } - logToConsole(LOG_DEBUG, `[AGRP.PaintBall]: Stopping paintball for ${getPlayerDisplayForConsole(client)} ...`); + logToConsole(LOG_DEBUG, `[V.RP.PaintBall]: Stopping paintball for ${getPlayerDisplayForConsole(client)} ...`); clearPlayerWeapons(client); deletePaintBallItems(client); restorePlayerTempLockerItems(client); @@ -119,13 +119,13 @@ function stopPaintBall(client) { //checkRemainingPaintBallPlayers(tempBusiness); - logToConsole(LOG_DEBUG, `[AGRP.PaintBall]: Stopped paintball for ${getPlayerDisplayForConsole(client)} successfully`); + logToConsole(LOG_DEBUG, `[V.RP.PaintBall]: Stopped paintball for ${getPlayerDisplayForConsole(client)} successfully`); } // =========================================================================== function givePlayerPaintBallItems(client) { - logToConsole(LOG_DEBUG, `[AGRP.PaintBall]: Giving ${getPlayerDisplayForConsole(client)} paintball items ...`); + logToConsole(LOG_DEBUG, `[V.RP.PaintBall]: Giving ${getPlayerDisplayForConsole(client)} paintball items ...`); for (let i in paintBallItems) { let itemId = createItem(paintBallItems[i], 999999, V_ITEM_OWNER_PLAYER, getPlayerCurrentSubAccount(client).databaseId); getItemData(itemId).needsSaved = false; @@ -135,26 +135,26 @@ function givePlayerPaintBallItems(client) { getPlayerData(client).paintBallItemCache.push(itemId); updatePlayerHotBar(client); } - logToConsole(LOG_DEBUG, `[AGRP.PaintBall]: Gave ${getPlayerDisplayForConsole(client)} paintball items successfully`); + logToConsole(LOG_DEBUG, `[V.RP.PaintBall]: Gave ${getPlayerDisplayForConsole(client)} paintball items successfully`); } // =========================================================================== function deletePaintBallItems(client) { - logToConsole(LOG_DEBUG, `[AGRP.PaintBall]: Deleting paintball items for ${getPlayerDisplayForConsole(client)} ...`); + logToConsole(LOG_DEBUG, `[V.RP.PaintBall]: Deleting paintball items for ${getPlayerDisplayForConsole(client)} ...`); for (let i in getPlayerData(client).paintBallItemCache) { deleteItem(getPlayerData(client).paintBallItemCache[i]); } cachePlayerHotBarItems(client); updatePlayerHotBar(client); - logToConsole(LOG_DEBUG, `[AGRP.PaintBall]: Deleting paintball items for ${getPlayerDisplayForConsole(client)} successfully`); + logToConsole(LOG_DEBUG, `[V.RP.PaintBall]: Deleting paintball items for ${getPlayerDisplayForConsole(client)} successfully`); } // =========================================================================== function cacheAllPaintBallItemTypes() { - logToConsole(LOG_DEBUG, `[AGRP.PaintBall]: Cacheing all paintball item types ...`); + logToConsole(LOG_DEBUG, `[V.RP.PaintBall]: Cacheing all paintball item types ...`); for (let i in paintBallItemNames[getGame()]) { let itemTypeId = getItemTypeFromParams(paintBallItemNames[getGame()][i]); if (itemTypeId != -1 && getItemTypeData(itemTypeId) != false) { @@ -162,13 +162,13 @@ function cacheAllPaintBallItemTypes() { } } - logToConsole(LOG_DEBUG, `[AGRP.PaintBall]: Cached all paintball item types`); + logToConsole(LOG_DEBUG, `[V.RP.PaintBall]: Cached all paintball item types`); } // =========================================================================== function respawnPlayerForPaintBall(client) { - logToConsole(LOG_DEBUG, `[AGRP.PaintBall]: Respawning ${getPlayerDisplayForConsole(client)} for paintball ...`); + logToConsole(LOG_DEBUG, `[V.RP.PaintBall]: Respawning ${getPlayerDisplayForConsole(client)} for paintball ...`); despawnPlayer(client); let businessId = getPlayerData(client).paintBallBusiness; @@ -183,7 +183,7 @@ function respawnPlayerForPaintBall(client) { makePlayerStopAnimation(client); setPlayerControlState(client, true); resetPlayerBlip(client); - logToConsole(LOG_DEBUG, `[AGRP.PaintBall]: Respawned ${getPlayerDisplayForConsole(client)} for paintball successfully`); + logToConsole(LOG_DEBUG, `[V.RP.PaintBall]: Respawned ${getPlayerDisplayForConsole(client)} for paintball successfully`); } // =========================================================================== diff --git a/scripts/server/prompt.js b/scripts/server/prompt.js index 08f1a377..e98e6d13 100644 --- a/scripts/server/prompt.js +++ b/scripts/server/prompt.js @@ -32,7 +32,7 @@ function playerPromptAnswerNo(client) { return false; } - logToConsole(LOG_DEBUG, `[AGRP.Prompt] ${getPlayerDisplayForConsole(client)} answered NO to their prompt (${getPlayerData(client).promptType})`); + logToConsole(LOG_DEBUG, `[V.RP.Prompt] ${getPlayerDisplayForConsole(client)} answered NO to their prompt (${getPlayerData(client).promptType})`); switch (getPlayerData(client).promptType) { case V_PROMPT_CREATEFIRSTCHAR: @@ -71,7 +71,7 @@ function playerPromptAnswerYes(client) { return false; } - logToConsole(LOG_DEBUG, `[AGRP.Prompt] ${getPlayerDisplayForConsole(client)} answered YES to their prompt (${getPlayerData(client).promptType})`); + logToConsole(LOG_DEBUG, `[V.RP.Prompt] ${getPlayerDisplayForConsole(client)} answered YES to their prompt (${getPlayerData(client).promptType})`); switch (getPlayerData(client).promptType) { case V_PROMPT_CREATEFIRSTCHAR: { @@ -82,7 +82,7 @@ function playerPromptAnswerYes(client) { case V_PROMPT_BIZORDER: { if (getPlayerData(client).businessOrderAmount > 0) { if (getBusinessData(getPlayerData(client).businessOrderBusiness).till < getPlayerData(client).businessOrderCost) { - logToConsole(LOG_DEBUG, `[AGRP.Prompt] ${getPlayerDisplayForConsole(client)} failed to order ${getPlayerData(client).businessOrderAmount} ${getItemTypeData(getPlayerData(client).businessOrderItem).name} at ${getPlayerData(client).businessOrderCost / getPlayerData(client).businessOrderAmount} each for business ${getBusinessData(getPlayerData(client).businessOrderBusiness).name} (Reason: Not enough money in business till)`); + logToConsole(LOG_DEBUG, `[V.RP.Prompt] ${getPlayerDisplayForConsole(client)} failed to order ${getPlayerData(client).businessOrderAmount} ${getItemTypeData(getPlayerData(client).businessOrderItem).name} at ${getPlayerData(client).businessOrderCost / getPlayerData(client).businessOrderAmount} each for business ${getBusinessData(getPlayerData(client).businessOrderBusiness).name} (Reason: Not enough money in business till)`); if (doesPlayerHaveGUIEnabled(client)) { showPlayerErrorGUI(client, getLocaleString(client, "BusinessOrderNotEnoughMoney", `{ALTCOLOUR}/bizdeposit{MAINCOLOUR}`), getLocaleString(client, "BusinessOrderCanceled")); } else { @@ -93,7 +93,7 @@ function playerPromptAnswerYes(client) { getPlayerData(client).businessOrderItem = -1; getPlayerData(client).businessOrderValue = -1; } else { - logToConsole(LOG_DEBUG, `[AGRP.Prompt] ${getPlayerDisplayForConsole(client)} successfully ordered ${getPlayerData(client).businessOrderAmount} ${getItemTypeData(getPlayerData(client).businessOrderItem).name} at ${getPlayerData(client).businessOrderCost / getPlayerData(client).businessOrderAmount} each for business ${getBusinessData(getPlayerData(client).businessOrderBusiness).name}`); + logToConsole(LOG_DEBUG, `[V.RP.Prompt] ${getPlayerDisplayForConsole(client)} successfully ordered ${getPlayerData(client).businessOrderAmount} ${getItemTypeData(getPlayerData(client).businessOrderItem).name} at ${getPlayerData(client).businessOrderCost / getPlayerData(client).businessOrderAmount} each for business ${getBusinessData(getPlayerData(client).businessOrderBusiness).name}`); showPlayerInfoGUI(client, getLocaleString(client, "BusinessOrderSuccessInfo", getPlayerData(client).businessOrderAmount, getItemTypeData(getPlayerData(client).businessOrderItem).name, getItemValueDisplay(getPlayerData(client).businessOrderItem, getPlayerData(client).businessOrderValue), getPlayerData(client).businessOrderCost), getLocaleString(client, "GUIInfoTitle")); createItem(getPlayerData(client).businessOrderItem, getPlayerData(client).businessOrderValue, V_ITEM_OWNER_BIZFLOOR, getBusinessData(getPlayerData(client).businessOrderBusiness).databaseId, getPlayerData(client).businessOrderAmount); diff --git a/scripts/server/property.js b/scripts/server/property.js index da8f986c..7711c676 100644 --- a/scripts/server/property.js +++ b/scripts/server/property.js @@ -190,20 +190,20 @@ function loadPropertiesFromDatabase() { let tempPropertyData = new PropertyData(dbAssoc[i]); tempPropertyData.locations = loadPropertyLocationsFromDatabase(tempPropertyData.databaseId); tempProperties.push(tempPropertyData); - logToConsole(LOG_VERBOSE, `[AGRP.Property]: Property '${tempPropertyData.name}' (ID ${tempPropertyData.databaseId}) loaded from database successfully!`); + logToConsole(LOG_VERBOSE, `[V.RP.Property]: Property '${tempPropertyData.name}' (ID ${tempPropertyData.databaseId}) loaded from database successfully!`); } } disconnectFromDatabase(dbConnection); } - logToConsole(LOG_INFO, `[AGRP.Property]: ${tempProperties.length} properties loaded from database successfully!`); + logToConsole(LOG_INFO, `[V.RP.Property]: ${tempProperties.length} properties loaded from database successfully!`); return tempProperties; } // =========================================================================== function loadPropertyLocationsFromDatabase(propertyIndex) { - logToConsole(LOG_VERBOSE, `[AGRP.Property]: Loading property locations for property ${propertyIndex} from database ...`); + logToConsole(LOG_VERBOSE, `[V.RP.Property]: Loading property locations for property ${propertyIndex} from database ...`); let tempPropertyLocations = []; let dbConnection = connectToDatabase(); @@ -219,7 +219,7 @@ function loadPropertyLocationsFromDatabase(propertyIndex) { for (let i in dbAssoc) { let tempPropertyLocationData = new PropertyLocationData(dbAssoc[i]); tempPropertyLocations.push(tempPropertyLocationData); - logToConsole(LOG_VERBOSE, `[AGRP.Property]: Location '${tempPropertyLocationData.name}' loaded from database successfully!`); + logToConsole(LOG_VERBOSE, `[V.RP.Property]: Location '${tempPropertyLocationData.name}' loaded from database successfully!`); } } freeDatabaseQuery(dbQuery); @@ -227,7 +227,7 @@ function loadPropertyLocationsFromDatabase(propertyIndex) { disconnectFromDatabase(dbConnection); } - logToConsole(LOG_VERBOSE, `[AGRP.Property]: ${tempPropertyLocations.length} location for property ${propertyIndex} loaded from database successfully!`); + logToConsole(LOG_VERBOSE, `[V.RP.Property]: ${tempPropertyLocations.length} location for property ${propertyIndex} loaded from database successfully!`); return tempPropertyLocations; } @@ -1208,7 +1208,7 @@ function orderItemForPropertyCommand(command, params, client) { let value = toInteger(splitParams.slice(-1)) || getItemTypeData(itemType).capacity; let propertyIndex = getPlayerProperty(client); - logToConsole(LOG_DEBUG, `[AGRP.Property] ${getPlayerDisplayForConsole(client)} is ordering ${amount} ${splitParams.slice(0, -2).join(" ")} (${value})`); + logToConsole(LOG_DEBUG, `[V.RP.Property] ${getPlayerDisplayForConsole(client)} is ordering ${amount} ${splitParams.slice(0, -2).join(" ")} (${value})`); if (!getPropertyData(propertyIndex)) { messagePlayerError(client, getLocaleString(client, "InvalidProperty")); @@ -1460,7 +1460,7 @@ function savePropertyToDatabase(propertyIndex) { return false; } - logToConsole(LOG_DEBUG, `[AGRP.Property]: Saving business '${tempPropertyData.name}' to database ...`); + logToConsole(LOG_DEBUG, `[V.RP.Property]: Saving business '${tempPropertyData.name}' to database ...`); let dbConnection = connectToDatabase(); if (dbConnection) { let safePropertyName = escapeDatabaseString(dbConnection, tempPropertyData.name); @@ -1516,7 +1516,7 @@ function savePropertyToDatabase(propertyIndex) { disconnectFromDatabase(dbConnection); return true; } - logToConsole(LOG_DEBUG, `[AGRP.Property]: Saved property '${tempPropertyData.name}' to database!`); + logToConsole(LOG_DEBUG, `[V.RP.Property]: Saved property '${tempPropertyData.name}' to database!`); return false; } @@ -1575,7 +1575,7 @@ function createPropertyEntrancePickup(propertyIndex) { return false; } - logToConsole(LOG_VERBOSE, `[AGRP.Job]: Creating entrance pickup for property ${propertyData.name}`); + logToConsole(LOG_VERBOSE, `[V.RP.Job]: Creating entrance pickup for property ${propertyData.name}`); if (areServerElementsSupported() && getGame() != V_GAME_MAFIA_ONE) { let entrancePickup = null; @@ -1652,7 +1652,7 @@ function createPropertyEntranceBlip(propertyIndex) { blipModelId = propertyData.entranceBlipModel; } - logToConsole(LOG_VERBOSE, `[AGRP.Job]: Creating entrance blip for business ${propertyData.name} (model ${blipModelId})`); + logToConsole(LOG_VERBOSE, `[V.RP.Job]: Creating entrance blip for business ${propertyData.name} (model ${blipModelId})`); if (areServerElementsSupported()) { let entranceBlip = createGameBlip(propertyData.entrancePosition, blipModelId, 1, getColourByType("propertyColour")); @@ -1697,7 +1697,7 @@ function createPropertyExitPickup(propertyIndex) { return false; } - logToConsole(LOG_VERBOSE, `[AGRP.Job]: Creating exit pickup for business ${propertyData.name}`); + logToConsole(LOG_VERBOSE, `[V.RP.Job]: Creating exit pickup for business ${propertyData.name}`); let exitPickup = null; if (isGameFeatureSupported("pickup")) { @@ -1764,7 +1764,7 @@ function createPropertyExitBlip(propertyIndex) { blipModelId = propertyData.exitBlipModel; } - logToConsole(LOG_VERBOSE, `[AGRP.Job]: Creating exit blip for property ${propertyData.name} (model ${blipModelId})`); + logToConsole(LOG_VERBOSE, `[V.RP.Job]: Creating exit blip for property ${propertyData.name} (model ${blipModelId})`); let exitBlip = createGameBlip(propertyData.exitPosition, blipModelId, 1, getColourByName("propertyColour")); if (exitBlip != null) { @@ -2270,11 +2270,11 @@ function cachePropertyItems(propertyIndex) { clearArray(getPropertyData(propertyIndex).storageItemCache); //let propertyData = getPropertyData(propertyIndex); - //logToConsole(LOG_VERBOSE, `[AGRP.Property] Caching business items for business ${propertyIndex} (${propertyData.name}) ...`); + //logToConsole(LOG_VERBOSE, `[V.RP.Property] Caching business items for business ${propertyIndex} (${propertyData.name}) ...`); //getPropertyData(propertyIndex).floorItemCache = getServerData().items.filter(item => item.ownerType == V_ITEM_OWNER_BIZFLOOR && item.ownerId == propertyData.databaseId).map(i => i.index); //getPropertyData(propertyIndex).storageItemCache = getServerData().items.filter(item => item.ownerType == V_ITEM_OWNER_BIZSTORAGE && item.ownerId == propertyData.databaseId); - logToConsole(LOG_VERBOSE, `[AGRP.Property] Caching business items for business ${propertyIndex} (${getPropertyData(propertyIndex).name}) ...`); + logToConsole(LOG_VERBOSE, `[V.RP.Property] Caching business items for business ${propertyIndex} (${getPropertyData(propertyIndex).name}) ...`); for (let i in getServerData().items) { if (getItemData(i).ownerType == V_ITEM_OWNER_BIZFLOOR && getItemData(i).ownerId == getPropertyData(propertyIndex).databaseId) { getPropertyData(propertyIndex).floorItemCache.push(i); @@ -2283,7 +2283,7 @@ function cachePropertyItems(propertyIndex) { } } - logToConsole(LOG_VERBOSE, `[AGRP.Property] Successfully cached ${getPropertyData(propertyIndex).floorItemCache.length} floor items and ${getPropertyData(propertyIndex).storageItemCache} storage items for business ${propertyIndex} (${getPropertyData(propertyIndex).name})!`); + logToConsole(LOG_VERBOSE, `[V.RP.Property] Successfully cached ${getPropertyData(propertyIndex).floorItemCache.length} floor items and ${getPropertyData(propertyIndex).storageItemCache} storage items for business ${propertyIndex} (${getPropertyData(propertyIndex).name})!`); } // =========================================================================== diff --git a/scripts/server/radio.js b/scripts/server/radio.js index 65369014..1c4909d9 100644 --- a/scripts/server/radio.js +++ b/scripts/server/radio.js @@ -53,7 +53,7 @@ function loadRadioStationsFromDatabase() { disconnectFromDatabase(dbConnection); } - logToConsole(LOG_INFO, `[AGRP.Radio]: ${tempRadioStations.length} radio stations loaded from database successfully!`); + logToConsole(LOG_INFO, `[V.RP.Radio]: ${tempRadioStations.length} radio stations loaded from database successfully!`); return tempRadioStations; } diff --git a/scripts/server/subaccount.js b/scripts/server/subaccount.js index b552ef5e..416620c8 100644 --- a/scripts/server/subaccount.js +++ b/scripts/server/subaccount.js @@ -220,7 +220,7 @@ function loadSubAccountsFromAccount(accountId) { let jobRankIndex = getJobRankIndexFromDatabaseId(jobIndex, tempSubAccount.jobRank); if (!getJobRankData(jobIndex, jobRankIndex)) { let newJobRankIndex = getLowestJobRank(jobIndex); - console.log(`[AGRP.SubAccount]: Job ${jobIndex} has no rank ${tempSubAccount.jobRank}! Using lowest rank ${newJobRankIndex} instead.`); + console.log(`[V.RP.SubAccount]: Job ${jobIndex} has no rank ${tempSubAccount.jobRank}! Using lowest rank ${newJobRankIndex} instead.`); tempSubAccount.jobRank = getJobRankData(jobIndex, newJobRankIndex).databaseId; tempSubAccount.jobRankIndex = newJobRankIndex; } else { @@ -339,7 +339,7 @@ function saveSubAccountToDatabase(subAccountData) { // =========================================================================== function createSubAccount(accountId, firstName, lastName) { - logToConsole(LOG_DEBUG, `[AGRP.Account] Attempting to create subaccount ${firstName} ${lastName} in database`); + logToConsole(LOG_DEBUG, `[V.RP.Account] Attempting to create subaccount ${firstName} ${lastName} in database`); let dbConnection = connectToDatabase(); let dbQuery = false; @@ -373,7 +373,7 @@ function showCharacterSelectToClient(client) { if (doesPlayerHaveAutoSelectLastCharacterEnabled(client)) { if (getPlayerData(client).subAccounts.length > 0) { - logToConsole(LOG_DEBUG, `[AGRP.SubAccount] ${getPlayerDisplayForConsole(client)} is being auto-spawned as character ID ${getPlayerLastUsedSubAccount(client)}`); + logToConsole(LOG_DEBUG, `[V.RP.SubAccount] ${getPlayerDisplayForConsole(client)} is being auto-spawned as character ID ${getPlayerLastUsedSubAccount(client)}`); selectCharacter(client, getPlayerLastUsedSubAccount(client)); return true; } @@ -381,7 +381,7 @@ function showCharacterSelectToClient(client) { if (doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) { getPlayerData(client).currentSubAccount = 0; - logToConsole(LOG_DEBUG, `[AGRP.SubAccount] Setting ${getPlayerDisplayForConsole(client)}'s character to ID ${getPlayerData(client).currentSubAccount}`); + logToConsole(LOG_DEBUG, `[V.RP.SubAccount] Setting ${getPlayerDisplayForConsole(client)}'s character to ID ${getPlayerData(client).currentSubAccount}`); let tempSubAccount = getPlayerData(client).subAccounts[0]; let clanName = (tempSubAccount.clan != 0) ? getClanData(getClanIndexFromDatabaseId(tempSubAccount.clan)).name : "None"; let lastPlayedText = (tempSubAccount.lastLogin != 0) ? `${msToTime(getCurrentUnixTimestamp() - tempSubAccount.lastLogin)} ago` : "Never"; @@ -391,7 +391,7 @@ function showCharacterSelectToClient(client) { //setTimeout(function() { // showCharacterSelectCameraToPlayer(client); //}, 500); - logToConsole(LOG_DEBUG, `[AGRP.SubAccount] ${getPlayerDisplayForConsole(client)} is being shown the character select GUI`); + logToConsole(LOG_DEBUG, `[V.RP.SubAccount] ${getPlayerDisplayForConsole(client)} is being shown the character select GUI`); } else { let charactersList = getPlayerData(client).subAccounts.map((sacct, index) => `{teal}${index + 1}: {ALTCOLOUR}${sacct.firstName} ${sacct.lastName}`); let chunkedList = splitArrayIntoChunks(charactersList, 5); @@ -400,7 +400,7 @@ function showCharacterSelectToClient(client) { messagePlayerNormal(client, chunkedList[i].join("{MAINCOLOUR} • ")); } messagePlayerInfo(client, getLocaleString(client, "CharacterSelectHelpText", `{ALTCOLOUR}/usechar{MAINCOLOUR}`, `{ALTCOLOUR}/newchar{MAINCOLOUR}`)); - logToConsole(LOG_DEBUG, `[AGRP.SubAccount] ${getPlayerDisplayForConsole(client)} is being shown the character select/list message (GUI disabled)`); + logToConsole(LOG_DEBUG, `[V.RP.SubAccount] ${getPlayerDisplayForConsole(client)} is being shown the character select/list message (GUI disabled)`); } } @@ -420,7 +420,7 @@ function checkNewCharacter(client, firstName, lastName) { lastName = lastName.trim(); if (doesNameContainInvalidCharacters(firstName) || doesNameContainInvalidCharacters(lastName)) { - logToConsole(LOG_INFO | LOG_WARN, `[AGRP.Account] Subaccount ${firstName} ${lastName} could not be created (invalid characters in name)`); + logToConsole(LOG_INFO | LOG_WARN, `[V.RP.Account] Subaccount ${firstName} ${lastName} could not be created (invalid characters in name)`); showPlayerNewCharacterFailedGUI(client, "Invalid characters in name!"); return false; } @@ -467,7 +467,7 @@ function checkPreviousCharacter(client) { let lastPlayedText = (tempSubAccount.lastLogin != 0) ? `${msToTime(getCurrentUnixTimestamp() - tempSubAccount.lastLogin)} ago` : "Never"; showPlayerCharacterSelectGUI(client, tempSubAccount.firstName, tempSubAccount.lastName, tempSubAccount.cash, clanName, lastPlayedText, getGameConfig().skins[getGame()][tempSubAccount.skin][0]); - logToConsole(LOG_DEBUG, `[AGRP.SubAccount] Setting ${getPlayerDisplayForConsole(client)}'s character to ID ${getPlayerData(client).currentSubAccount}`); + logToConsole(LOG_DEBUG, `[V.RP.SubAccount] Setting ${getPlayerDisplayForConsole(client)}'s character to ID ${getPlayerData(client).currentSubAccount}`); } } @@ -488,16 +488,16 @@ function checkNextCharacter(client) { let lastPlayedText = (tempSubAccount.lastLogin != 0) ? `${msToTime(getCurrentUnixTimestamp() - tempSubAccount.lastLogin)} ago` : "Never"; showPlayerCharacterSelectGUI(client, tempSubAccount.firstName, tempSubAccount.lastName, tempSubAccount.cash, clanName, lastPlayedText, getGameConfig().skins[getGame()][tempSubAccount.skin][0]); - logToConsole(LOG_DEBUG, `[AGRP.SubAccount] Setting ${getPlayerDisplayForConsole(client)}'s character to ID ${getPlayerData(client).currentSubAccount}`); + logToConsole(LOG_DEBUG, `[V.RP.SubAccount] Setting ${getPlayerDisplayForConsole(client)}'s character to ID ${getPlayerData(client).currentSubAccount}`); } } // =========================================================================== function selectCharacter(client, characterId = -1) { - logToConsole(LOG_DEBUG, `[AGRP.SubAccount] ${getPlayerDisplayForConsole(client)} character select called (Character ID ${characterId})`); + logToConsole(LOG_DEBUG, `[V.RP.SubAccount] ${getPlayerDisplayForConsole(client)} character select called (Character ID ${characterId})`); if (characterId != -1) { - logToConsole(LOG_DEBUG, `[AGRP.SubAccount] ${getPlayerDisplayForConsole(client)} provided character ID (${characterId}) to spawn with`); + logToConsole(LOG_DEBUG, `[V.RP.SubAccount] ${getPlayerDisplayForConsole(client)} provided character ID (${characterId}) to spawn with`); getPlayerData(client).currentSubAccount = characterId; } @@ -511,7 +511,7 @@ function selectCharacter(client, characterId = -1) { getPlayerData(client).switchingCharacter = false; - logToConsole(LOG_DEBUG, `[AGRP.SubAccount] Spawning ${getPlayerDisplayForConsole(client)} as character ID ${getPlayerData(client).currentSubAccount} with skin ${skin} (${spawnPosition.x}, ${spawnPosition.y}, ${spawnPosition.z})`); + logToConsole(LOG_DEBUG, `[V.RP.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 = V_PEDSTATE_SPAWNING; @@ -520,14 +520,14 @@ function selectCharacter(client, characterId = -1) { onPlayerSpawn(client); } else if (getGame() == V_GAME_MAFIA_ONE) { //spawnPlayer(client, spawnPosition, spawnHeading, getGameConfig().skins[getGame()][skin][0]); - //logToConsole(LOG_DEBUG, `[AGRP.SubAccount] Spawning ${getPlayerDisplayForConsole(client)} as ${getGameConfig().skins[getGame()][skin][1]} (${getGameConfig().skins[getGame()][skin][0]})`); + //logToConsole(LOG_DEBUG, `[V.RP.SubAccount] Spawning ${getPlayerDisplayForConsole(client)} as ${getGameConfig().skins[getGame()][skin][1]} (${getGameConfig().skins[getGame()][skin][0]})`); spawnPlayer(client, spawnPosition, spawnHeading, getGameConfig().skins[getGame()][skin][0]); onPlayerSpawn(client); } //removePlayerKeyBind(client, getKeyIdFromParams("insert")); - logToConsole(LOG_DEBUG, `[AGRP.SubAccount] Spawned ${getPlayerDisplayForConsole(client)} as character ID ${getPlayerData(client).currentSubAccount} with skin ${skin} (${spawnPosition.x}, ${spawnPosition.y}, ${spawnPosition.z})`); + logToConsole(LOG_DEBUG, `[V.RP.SubAccount] Spawned ${getPlayerDisplayForConsole(client)} as character ID ${getPlayerData(client).currentSubAccount} with skin ${skin} (${spawnPosition.x}, ${spawnPosition.y}, ${spawnPosition.z})`); getPlayerCurrentSubAccount(client).lastLogin = getCurrentUnixTimestamp(); } @@ -535,14 +535,14 @@ function selectCharacter(client, characterId = -1) { // =========================================================================== function switchCharacterCommand(command, params, client) { - logToConsole(LOG_DEBUG, `[AGRP.SubAccount] ${getPlayerDisplayForConsole(client)} is requesting to switch characters (current character: ${getCharacterFullName(client)} [${getPlayerData(client).currentSubAccount}/${getPlayerCurrentSubAccount(client).databaseId}])`); + logToConsole(LOG_DEBUG, `[V.RP.SubAccount] ${getPlayerDisplayForConsole(client)} is requesting to switch characters (current character: ${getCharacterFullName(client)} [${getPlayerData(client).currentSubAccount}/${getPlayerCurrentSubAccount(client).databaseId}])`); if (!isPlayerSpawned(client)) { - logToConsole(LOG_WARN, `[AGRP.SubAccount] ${getPlayerDisplayForConsole(client)} is not allowed to switch characters (not spawned)`); + logToConsole(LOG_WARN, `[V.RP.SubAccount] ${getPlayerDisplayForConsole(client)} is not allowed to switch characters (not spawned)`); return false; } if (isPlayerSwitchingCharacter(client)) { - logToConsole(LOG_WARN, `[AGRP.SubAccount] ${getPlayerDisplayForConsole(client)} is not allowed to switch characters (already in switch char mode)`); + logToConsole(LOG_WARN, `[V.RP.SubAccount] ${getPlayerDisplayForConsole(client)} is not allowed to switch characters (already in switch char mode)`); messagePlayerError(client, "You are already selecting/switching characters!"); return false; } diff --git a/scripts/server/timers.js b/scripts/server/timers.js index bc3c8911..3234eb15 100644 --- a/scripts/server/timers.js +++ b/scripts/server/timers.js @@ -103,14 +103,14 @@ function initTimers() { // =========================================================================== function oneMinuteTimerFunction() { - logToConsole(LOG_DEBUG, `[AGRP.Event] Checking server game time`); + logToConsole(LOG_DEBUG, `[V.RP.Event] Checking server game time`); checkServerGameTime(); if (getClients().length > 0) { - logToConsole(LOG_DEBUG, `[AGRP.Event] Checking rentable vehicles`); + logToConsole(LOG_DEBUG, `[V.RP.Event] Checking rentable vehicles`); checkVehicleRenting(); - logToConsole(LOG_DEBUG, `[AGRP.Event] Updating all player name tags`); + logToConsole(LOG_DEBUG, `[V.RP.Event] Updating all player name tags`); updateAllPlayerNameTags(); } } @@ -244,7 +244,7 @@ function checkServerGameTime() { removeAllPlayersFromProperties(); removeAllPlayersFromVehicles(); saveServerDataToDatabase(); - logToConsole(LOG_INFO | LOG_WARN, `[AGRP.Timers] Changing server map to night`); + logToConsole(LOG_INFO | LOG_WARN, `[V.RP.Timers] Changing server map to night`); messageDiscordEventChannel("🌙 Changing server map to night"); game.changeMap(getGameConfig().mainWorldScene[getGame()]); } @@ -258,7 +258,7 @@ function checkServerGameTime() { removeAllPlayersFromProperties(); removeAllPlayersFromVehicles(); saveServerDataToDatabase(); - logToConsole(LOG_INFO | LOG_WARN, `[AGRP.Timers] Changing server map to day`); + logToConsole(LOG_INFO | LOG_WARN, `[V.RP.Timers] Changing server map to day`); messageDiscordEventChannel("🌞 Changing server map to day"); game.changeMap(getGameConfig().mainWorldScene[getGame()]); } diff --git a/scripts/server/utilities.js b/scripts/server/utilities.js index f44434d9..73782e02 100644 --- a/scripts/server/utilities.js +++ b/scripts/server/utilities.js @@ -76,7 +76,7 @@ function initAllClients() { // =========================================================================== function updateServerRules() { - logToConsole(LOG_DEBUG, `[AGRP.Utilities]: Updating all server rules ...`); + logToConsole(LOG_DEBUG, `[V.RP.Utilities]: Updating all server rules ...`); let timeWeatherRule = []; let tempText = ""; @@ -116,7 +116,7 @@ function updateServerRules() { } setServerRule("Time & Weather", timeWeatherRule.join(", ")); - logToConsole(LOG_DEBUG, `[AGRP.Utilities]: All server rules updated successfully!`); + logToConsole(LOG_DEBUG, `[V.RP.Utilities]: All server rules updated successfully!`); } // =========================================================================== @@ -517,15 +517,15 @@ function removeAllPlayersFromVehicles() { // =========================================================================== function processPlayerEnteringExitingProperty(client) { - logToConsole(LOG_DEBUG, `[AGRP.Utilities]: Processing property enter/exit for player ${getPlayerDisplayForConsole(client)} ...`); + logToConsole(LOG_DEBUG, `[V.RP.Utilities]: Processing property enter/exit for player ${getPlayerDisplayForConsole(client)} ...`); if (getPlayerData(client).enteringExitingProperty == null) { - logToConsole(LOG_DEBUG | LOG_WARN, `[AGRP.Utilities]: Aborting property enter/exit for player ${getPlayerDisplayForConsole(client)}. Assigned property data is null.`); + logToConsole(LOG_DEBUG | LOG_WARN, `[V.RP.Utilities]: Aborting property enter/exit for player ${getPlayerDisplayForConsole(client)}. Assigned property data is null.`); return false; } let pedState = getPlayerData(client).pedState; if (pedState != V_PEDSTATE_ENTERINGPROPERTY && pedState != V_PEDSTATE_EXITINGPROPERTY) { - logToConsole(LOG_DEBUG | LOG_WARN, `[AGRP.Utilities]: Aborting property enter/exit for player ${getPlayerDisplayForConsole(client)}. Ped state is not entering or exiting property.`); + logToConsole(LOG_DEBUG | LOG_WARN, `[V.RP.Utilities]: Aborting property enter/exit for player ${getPlayerDisplayForConsole(client)}. Ped state is not entering or exiting property.`); return false; } @@ -537,14 +537,14 @@ function processPlayerEnteringExitingProperty(client) { } if (propertyData == null || propertyData == false) { - logToConsole(LOG_DEBUG | LOG_WARN, `[AGRP.Utilities]: Aborting property enter/exit for player ${getPlayerDisplayForConsole(client)}. Property is invalid.`); + logToConsole(LOG_DEBUG | LOG_WARN, `[V.RP.Utilities]: Aborting property enter/exit for player ${getPlayerDisplayForConsole(client)}. Property is invalid.`); return false; } if (pedState == V_PEDSTATE_ENTERINGPROPERTY) { - logToConsole(LOG_VERBOSE, `[AGRP.Utilities]: Processing property ENTER for player ${getPlayerDisplayForConsole(client)} ...`); + logToConsole(LOG_VERBOSE, `[V.RP.Utilities]: Processing property ENTER for player ${getPlayerDisplayForConsole(client)} ...`); if (isGameFeatureSupported("interiorScene") && propertyData.exitScene != "") { - logToConsole(LOG_VERBOSE, `[AGRP.Utilities]: Player ${getPlayerDisplayForConsole(client)} is entering a property with interior scene (${propertyData.exitScene})`); + logToConsole(LOG_VERBOSE, `[V.RP.Utilities]: Player ${getPlayerDisplayForConsole(client)} is entering a property with interior scene (${propertyData.exitScene})`); spawnPlayer(client, propertyData.exitPosition, propertyData.exitRotation, getGameConfig().skins[getGame()][getPlayerCurrentSubAccount(client).skin][0]); onPlayerSpawn(client); } else { @@ -580,9 +580,9 @@ function processPlayerEnteringExitingProperty(client) { getPlayerData(client).enteringExitingProperty = null; getPlayerData(client).pedState = V_PEDSTATE_READY; } else if (pedState == V_PEDSTATE_EXITINGPROPERTY) { - logToConsole(LOG_VERBOSE, `[AGRP.Utilities]: Processing property EXIT for player ${getPlayerDisplayForConsole(client)} from property ID ${propertyData.index}/${propertyData.databaseId} ...`); + logToConsole(LOG_VERBOSE, `[V.RP.Utilities]: Processing property EXIT for player ${getPlayerDisplayForConsole(client)} from property ID ${propertyData.index}/${propertyData.databaseId} ...`); if (isGameFeatureSupported("interiorScene") && propertyData.entranceScene != "") { - logToConsole(LOG_VERBOSE, `[AGRP.Utilities]: Player ${getPlayerDisplayForConsole(client)} is exiting a property with external interior scene (${propertyData.entranceScene})`); + logToConsole(LOG_VERBOSE, `[V.RP.Utilities]: Player ${getPlayerDisplayForConsole(client)} is exiting a property with external interior scene (${propertyData.entranceScene})`); spawnPlayer(client, propertyData.entrancePosition, propertyData.entranceRotation, getGameConfig().skins[getGame()][getPlayerCurrentSubAccount(client).skin][0]); onPlayerSpawn(client); } else { diff --git a/scripts/server/vehicle.js b/scripts/server/vehicle.js index 81cc79d0..68a9c4f6 100644 --- a/scripts/server/vehicle.js +++ b/scripts/server/vehicle.js @@ -193,7 +193,7 @@ function loadVehiclesFromDatabase() { disconnectFromDatabase(dbConnection); } - logToConsole(LOG_INFO, `[AGRP.Vehicle]: ${tempVehicles.length} vehicles loaded from database successfully!`); + logToConsole(LOG_INFO, `[V.RP.Vehicle]: ${tempVehicles.length} vehicles loaded from database successfully!`); return tempVehicles; } @@ -236,7 +236,7 @@ function saveVehicleToDatabase(vehicleDataId) { return false; } - logToConsole(LOG_VERBOSE, `[AGRP.Vehicle]: Saving vehicle ${tempVehicleData.databaseId} to database ...`); + logToConsole(LOG_VERBOSE, `[V.RP.Vehicle]: Saving vehicle ${tempVehicleData.databaseId} to database ...`); let dbConnection = connectToDatabase(); if (dbConnection) { if (tempVehicleData.vehicle != false) { @@ -313,7 +313,7 @@ function saveVehicleToDatabase(vehicleDataId) { disconnectFromDatabase(dbConnection); return true; } - logToConsole(LOG_VERBOSE, `[AGRP.Vehicle]: Saved vehicle ${vehicleDataId} to database!`); + logToConsole(LOG_VERBOSE, `[V.RP.Vehicle]: Saved vehicle ${vehicleDataId} to database!`); return false; } @@ -1488,7 +1488,7 @@ function respawnVehicle(vehicle) { // =========================================================================== function spawnVehicle(vehicleData) { - logToConsole(LOG_DEBUG, `[AGRP.Vehicle]: Spawning ${getVehicleNameFromModel(vehicleData.model)} at ${vehicleData.spawnPosition.x}, ${vehicleData.spawnPosition.y}, ${vehicleData.spawnPosition.z} with heading ${vehicleData.spawnRotation}`); + logToConsole(LOG_DEBUG, `[V.RP.Vehicle]: Spawning ${getVehicleNameFromModel(vehicleData.model)} at ${vehicleData.spawnPosition.x}, ${vehicleData.spawnPosition.y}, ${vehicleData.spawnPosition.z} with heading ${vehicleData.spawnRotation}`); let vehicle = createGameVehicle(vehicleData.model, vehicleData.spawnPosition, vehicleData.spawnRotation); if (!vehicle) { @@ -1505,25 +1505,25 @@ function spawnVehicle(vehicleData) { vehicle.setRGBColours(vehicleData.colour1RGBA, vehicleData.colour2RGBA); let colour1 = rgbaArrayFromToColour(vehicleData.colour1RGBA); let colour2 = rgbaArrayFromToColour(vehicleData.colour2RGBA); - logToConsole(LOG_VERBOSE, `[AGRP.Vehicle]: Setting vehicle ${vehicle.id}'s colours to RGBA [${colour1[0]}, ${colour1[1]}, ${colour1[2]}, ${colour1[3]}], [(]${colour2[0]}, ${colour2[1]}, ${colour2[2]}, ${colour2[3]}]`); + logToConsole(LOG_VERBOSE, `[V.RP.Vehicle]: Setting vehicle ${vehicle.id}'s colours to RGBA [${colour1[0]}, ${colour1[1]}, ${colour1[2]}, ${colour1[3]}], [(]${colour2[0]}, ${colour2[1]}, ${colour2[2]}, ${colour2[3]}]`); vehicle.setRGBColours(vehicleData.colour1RGBA, vehicleData.colour2RGBA); } else { setVehicleColours(vehicle, vehicleData.colour1, vehicleData.colour2, vehicleData.colour3, vehicleData.colour4); - logToConsole(LOG_VERBOSE, `[AGRP.Vehicle]: Setting vehicle ${vehicle.id}'s colours to ${vehicleData.colour1}, ${vehicleData.colour2}, ${vehicleData.colour3}, ${vehicleData.colour4}`); + logToConsole(LOG_VERBOSE, `[V.RP.Vehicle]: Setting vehicle ${vehicle.id}'s colours to ${vehicleData.colour1}, ${vehicleData.colour2}, ${vehicleData.colour3}, ${vehicleData.colour4}`); } } if (vehicleData.spawnLocked == true) { setVehicleEngine(vehicle, false); - logToConsole(LOG_VERBOSE, `[AGRP.Vehicle]: Setting vehicle ${vehicle.id}'s engine to OFF`); + logToConsole(LOG_VERBOSE, `[V.RP.Vehicle]: Setting vehicle ${vehicle.id}'s engine to OFF`); } else { setVehicleEngine(vehicle, intToBool(vehicleData.engine)); - logToConsole(LOG_VERBOSE, `[AGRP.Vehicle]: Setting vehicle ${vehicle.id}'s engine to ${toUpperCase(getOnOffFromBool(getVehicleEngine(vehicle)))}`); + logToConsole(LOG_VERBOSE, `[V.RP.Vehicle]: Setting vehicle ${vehicle.id}'s engine to ${toUpperCase(getOnOffFromBool(getVehicleEngine(vehicle)))}`); } if (typeof vehicle.locked != "undefined") { setVehicleLocked(vehicle, intToBool(vehicleData.locked)); - logToConsole(LOG_VERBOSE, `[AGRP.Vehicle]: Setting vehicle ${vehicle.id}'s lock state to ${toUpperCase(getOnOffFromBool(getVehicleLocked(vehicle)))}`); + logToConsole(LOG_VERBOSE, `[V.RP.Vehicle]: Setting vehicle ${vehicle.id}'s lock state to ${toUpperCase(getOnOffFromBool(getVehicleLocked(vehicle)))}`); } //setVehicleHealth(vehicle, 1000); diff --git a/scripts/shared/utilities.js b/scripts/shared/utilities.js index 5139e2ac..803ef34e 100644 --- a/scripts/shared/utilities.js +++ b/scripts/shared/utilities.js @@ -1748,7 +1748,7 @@ function areWorldLabelsSupported() { function isGameFeatureSupported(featureName) { if (typeof supportedFeatures[featureName] === "undefined") { - logToConsole(LOG_WARN, `[AGRP.Utilities] Game feature support error. Unknown feature name: ${featureName}`); + logToConsole(LOG_WARN, `[V.RP.Utilities] Game feature support error. Unknown feature name: ${featureName}`); if (isServerScript()) { submitBugReport(null, `[AUTOMATED REPORT] Game feature support error. Unknown feature name: ${featureName}`); return false;