diff --git a/IDEAS.md b/IDEAS.md
index 598125be..1ee07900 100644
--- a/IDEAS.md
+++ b/IDEAS.md
@@ -1,5 +1,4 @@
# Ideas
-## For Asshat Gaming RP
==============================================================================================================
diff --git a/README.md b/README.md
index a4f1fd43..1b633ad8 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,12 @@
-# Asshat Gaming
-## GTA Connected Roleplay Division
+# Vortrex's Roleplay Resource
### Description
-This is the roleplay resource for Asshat Gaming's GTAC servers
+This is Vortrex's Roleplay Resource
### Git Branches
* master/main - The current release. *Never commit to this branch directly*
-* testing - The next upcoming release. All feature/fix/change branches are merged into this one
-* feature/fix/change - This is where the stuff you're currently working on goes into.
+* nightly - The next upcoming release. All feature/fix/change branches are merged into this one
+* feature/fix/change - This is where the stuff currently being working on goes into.
### Scripting Style
* Always use camelCase, even for event names.
@@ -15,7 +14,8 @@ This is the roleplay resource for Asshat Gaming's GTAC servers
* Keep opening curly brackets in-line. Don't linebreak before an opening curly brackets.
* Use sentence case instead of adjacent uppercase letters in class/member names. (i.e. Id instead of ID)
* Use generic, non-specific class member names wherever possible. (i.e. databaseId instead of accountId)
-* All communications from server to client are handled in `client.js` script file via utils
+* All communications from server to client are handled in server-side `client.js` script file via utils
+* All communications from client to server are handled in client-side `server.js` script file via utils
* All server events are handled in `event.js` script file, sometimes with utils.
### Database Style
@@ -29,7 +29,5 @@ This is the roleplay resource for Asshat Gaming's GTAC servers
### Notes
* The resource is designed to load the script files first, then initialize after that's done.
-* Never edit scripts directly on the server. Always edit in the cloned repo on your PC.
-* Never upload scripts to the main server. Vortrex will handle deployment of public releases.
* The IDEAS.md file is not a to-do list. It's just a random file to throw ideas into when they come to mind.
* Delete the row containing the bug or idea from the database once you've scripted and tested it and it works.
diff --git a/meta.xml b/meta.xml
index cebbc90b..8d8b7a7c 100644
--- a/meta.xml
+++ b/meta.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/scripts/client/afk.js b/scripts/client/afk.js
index 725f09ad..9b7693ec 100644
--- a/scripts/client/afk.js
+++ b/scripts/client/afk.js
@@ -8,8 +8,8 @@
// ===========================================================================
function initAFKScript() {
- logToConsole(LOG_DEBUG, "[Asshat.AFK]: Initializing AFK script ...");
- logToConsole(LOG_DEBUG, "[Asshat.AFK]: AFK script initialized!");
+ logToConsole(LOG_DEBUG, "[VRR.AFK]: Initializing AFK script ...");
+ logToConsole(LOG_DEBUG, "[VRR.AFK]: AFK script initialized!");
}
// ===========================================================================
diff --git a/scripts/client/chatbox.js b/scripts/client/chatbox.js
index a0052462..9d853793 100644
--- a/scripts/client/chatbox.js
+++ b/scripts/client/chatbox.js
@@ -19,9 +19,9 @@ let maxChatBoxLines = 6;
// ===========================================================================
function initChatBoxScript() {
- logToConsole(LOG_DEBUG, "[Asshat.ChatBox]: Initializing chatbox script ...");
+ logToConsole(LOG_DEBUG, "[VRR.ChatBox]: Initializing chatbox script ...");
bindChatBoxKeys();
- logToConsole(LOG_DEBUG, "[Asshat.ChatBox]: Chatbox script initialized!");
+ logToConsole(LOG_DEBUG, "[VRR.ChatBox]: Chatbox script initialized!");
}
// ===========================================================================
diff --git a/scripts/client/event.js b/scripts/client/event.js
index f7fc837b..9e3a8876 100644
--- a/scripts/client/event.js
+++ b/scripts/client/event.js
@@ -8,10 +8,10 @@
// ===========================================================================
function initEventScript() {
- logToConsole(LOG_DEBUG, "[Asshat.Event]: Initializing event script ...");
+ logToConsole(LOG_DEBUG, "[VRR.Event]: Initializing event script ...");
addCustomEvents();
addAllEventHandlers();
- logToConsole(LOG_DEBUG, "[Asshat.Event]: Event script initialized!");
+ logToConsole(LOG_DEBUG, "[VRR.Event]: Event script initialized!");
}
// ===========================================================================
@@ -135,7 +135,7 @@ function onDrawnHUD(event) {
// ===========================================================================
function onPedWasted(event, wastedPed, killerPed, weapon, pedPiece) {
- logToConsole(LOG_DEBUG, `[Asshat.Event] Ped ${wastedPed.name} died`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] Ped ${wastedPed.name} died`);
wastedPed.clearWeapons();
}
@@ -148,7 +148,7 @@ function onElementStreamIn(event, element) {
// ===========================================================================
function onLocalPlayerExitedVehicle(event, vehicle, seat) {
- logToConsole(LOG_DEBUG, `[Asshat.Event] Local player exited vehicle`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] Local player exited vehicle`);
triggerNetworkEvent("ag.onPlayerExitVehicle", getVehicleForNetworkEvent(vehicle), seat);
if(inVehicleSeat) {
parkedVehiclePosition = false;
@@ -159,7 +159,7 @@ function onLocalPlayerExitedVehicle(event, vehicle, seat) {
// ===========================================================================
function onLocalPlayerEnteredVehicle(event, vehicle, seat) {
- logToConsole(LOG_DEBUG, `[Asshat.Event] Local player entered vehicle`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] Local player entered vehicle`);
triggerNetworkEvent("ag.onPlayerEnterVehicle", getVehicleForNetworkEvent(vehicle), seat);
if(inVehicleSeat == 0) {
@@ -179,7 +179,7 @@ function onPedInflictDamage(event, damagedEntity, damagerEntity, weaponId, healt
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, `[Asshat.Event] ${damagerEntityString} damaged ${damagedEntityString}'s '${pedPiece} with weapon ${weaponId}`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] ${damagerEntityString} damaged ${damagedEntityString}'s '${pedPiece} with weapon ${weaponId}`);
if(!isNull(damagedEntity) && !isNull(damagerEntity)) {
if(damagedEntity.isType(ELEMENT_PLAYER)) {
if(damagedEntity == localPlayer) {
@@ -195,7 +195,7 @@ function onPedInflictDamage(event, damagedEntity, damagerEntity, weaponId, healt
// ===========================================================================
function onLocalPlayerEnterSphere(event, sphere) {
- logToConsole(LOG_DEBUG, `[Asshat.Event] Local player entered sphere`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] Local player entered sphere`);
if(sphere == jobRouteStopSphere) {
enteredJobRouteSphere();
}
@@ -204,7 +204,7 @@ function onLocalPlayerEnterSphere(event, sphere) {
// ===========================================================================
function onLocalPlayerExitSphere(event, sphere) {
- logToConsole(LOG_DEBUG, `[Asshat.Event] Local player exited sphere`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] Local player exited sphere`);
}
// ===========================================================================
diff --git a/scripts/client/gui.js b/scripts/client/gui.js
index be89da49..684eb1c2 100644
--- a/scripts/client/gui.js
+++ b/scripts/client/gui.js
@@ -144,16 +144,16 @@ let creatingCharacter = false;
// ===========================================================================
function initGUIScript() {
- logToConsole(LOG_DEBUG, "[Asshat.GUI]: Initializing GUI script ...");
- logToConsole(LOG_DEBUG, "[Asshat.GUI]: GUI script initialized!");
+ logToConsole(LOG_DEBUG, "[VRR.GUI]: Initializing GUI script ...");
+ logToConsole(LOG_DEBUG, "[VRR.GUI]: GUI script initialized!");
}
// ===========================================================================
function initGUI() {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Initializing GUI ...`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Initializing GUI ...`);
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Creating login GUI ...`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Creating login GUI ...`);
login.window = mexui.window(game.width/2-150, game.height/2-129, 300, 258, 'LOGIN', {
main: {
backgroundColour: toColour(0, 0, 0, windowAlpha),
@@ -228,11 +228,11 @@ function initGUI() {
},
}, checkLogin);
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Created login GUI`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Created login GUI`);
// ===========================================================================
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Creating two factor auth GUI ...`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Creating two factor auth GUI ...`);
twoFactorAuth.window = mexui.window(game.width/2-150, game.height/2-129, 300, 258, 'LOGIN', {
main: {
backgroundColour: toColour(0, 0, 0, windowAlpha),
@@ -306,11 +306,11 @@ function initGUI() {
},
}, checkTwoFactorAuth);
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Created two factor auth GUI`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Created two factor auth GUI`);
// ===========================================================================
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Creating new character GUI ...`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Creating new character GUI ...`);
newCharacter.window = mexui.window(game.width/2-130, game.height/2-100, 300, 200, 'Character Name', {
main: {
backgroundColour: toColour(0, 0, 0, windowAlpha),
@@ -398,11 +398,11 @@ function initGUI() {
borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], buttonAlpha),
},
}, checkNewCharacter);
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Created new character GUI`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Created new character GUI`);
// ===========================================================================
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Creating register GUI ...`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Creating register GUI ...`);
register.window = mexui.window(game.width/2-130, game.height/2-125, 300, 250, 'Register', {
main: {
backgroundColour: toColour(0, 0, 0, windowAlpha),
@@ -511,11 +511,11 @@ function initGUI() {
borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], buttonAlpha),
},
}, checkRegistration);
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Created register GUI`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Created register GUI`);
// ===========================================================================
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Creating error GUI ...`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Creating error GUI ...`);
errorDialog.window = mexui.window(game.width/2-200, game.height/2-70, 500, 140, 'ERROR', {
main: {
backgroundColour: toColour(0, 0, 0, windowAlpha),
@@ -557,11 +557,11 @@ function initGUI() {
borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], 255),
},
}, closeErrorDialog);
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Created error GUI ...`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Created error GUI ...`);
// ===========================================================================
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Created prompt GUI ...`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Created prompt GUI ...`);
yesNoDialog.window = mexui.window(game.width/2-200, game.height/2-70, 400, 140, 'Question', {
main: {
backgroundColour: toColour(0, 0, 0, windowAlpha),
@@ -616,11 +616,11 @@ function initGUI() {
borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], 255),
},
}, yesNoDialogAnswerNo);
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Created prompt GUI`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Created prompt GUI`);
// ===========================================================================
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Creating info dialog GUI ...`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Creating info dialog GUI ...`);
infoDialog.window = mexui.window(game.width/2-200, game.height/2-70, 400, 140, 'Information', {
main: {
backgroundColour: toColour(0, 0, 0, windowAlpha),
@@ -661,11 +661,11 @@ function initGUI() {
borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], 255),
},
}, closeInfoDialog);
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Created info dialog GUI`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Created info dialog GUI`);
// ===========================================================================
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Creating list dialog GUI ...`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Creating list dialog GUI ...`);
listDialog.window = mexui.window(game.width/2-200, game.height/2-70, 400, 500, 'List', {
main: {
backgroundColour: toColour(0, 0, 0, windowAlpha),
@@ -719,11 +719,11 @@ function initGUI() {
}
}
});
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Created list dialog GUI`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Created list dialog GUI`);
// ===========================================================================
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Creating character select GUI ...`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Creating character select GUI ...`);
characterSelect.window = mexui.window(game.width/2-215, game.height/2-83, 430, 190, 'Select Character', {
main: {
backgroundColour: toColour(0, 0, 0, windowAlpha),
@@ -845,25 +845,25 @@ function initGUI() {
borderColour: toColour(0, 0, 0, 0),
}
});
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Created character select GUI`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Created character select GUI`);
// ===========================================================================
- logToConsole(LOG_DEBUG, `[Asshat.GUI] All GUI created successfully!`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] All GUI created successfully!`);
closeAllWindows();
};
// ===========================================================================
let checkLogin = function() {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Checking login with server ...`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Checking login with server ...`);
triggerNetworkEvent("ag.checkLogin", login.passwordInput.lines[0]);
}
// ===========================================================================
let loginFailed = function(errorMessage) {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Server reports login failed`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Server reports login failed`);
login.messageLabel.text = errorMessage;
login.messageLabel.styles.main.textColour = toColour(180, 32, 32, 255);
login.passwordInput.text = "";
@@ -872,21 +872,21 @@ let loginFailed = function(errorMessage) {
// ===========================================================================
let loginSuccess = function() {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Server reports login was successful`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Server reports login was successful`);
closeAllWindows();
}
// ===========================================================================
let checkRegistration = function() {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Checking registration with server ...`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Checking registration with server ...`);
triggerNetworkEvent("ag.checkRegistration", register.passwordInput.lines[0], register.confirmPasswordInput.lines[0], register.emailInput.lines[0]);
}
// ===========================================================================
let checkNewCharacter = function() {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Checking new character with server ...`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Checking new character with server ...`);
let skinId = false;
if(newCharacter.firstNameInput.lines[0].length < 2) {
@@ -906,7 +906,7 @@ let checkNewCharacter = function() {
// ===========================================================================
let registrationFailed = function(errorMessage) {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Server reports registration failed. Reason: ${errorMessage}`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Server reports registration failed. Reason: ${errorMessage}`);
register.messageLabel.text = errorMessage;
register.messageLabel.styles.main.textColour = toColour(180, 32, 32, 255);
register.passwordInput.text = "";
@@ -917,7 +917,7 @@ let registrationFailed = function(errorMessage) {
// ===========================================================================
let newCharacterFailed = function(errorMessage) {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Server reports new character creation failed. Reason: ${errorMessage}`);
+ logToConsole(LOG_DEBUG, `[VRR.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 = "";
@@ -927,14 +927,14 @@ let newCharacterFailed = function(errorMessage) {
// ===========================================================================
let registrationSuccess = function() {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Server reports registration was successful`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Server reports registration was successful`);
closeAllWindows();
}
// ===========================================================================
let twoFactorAuthFailed = function(errorMessage) {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Server reports two-factor authentication failed. Reason: ${errorMessage}`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Server reports two-factor authentication failed. Reason: ${errorMessage}`);
login.messageLabel.text = errorMessage;
login.messageLabel.styles.main.textColour = toColour(180, 32, 32, 255);
login.passwordInput.text = "";
@@ -943,28 +943,28 @@ let twoFactorAuthFailed = function(errorMessage) {
// ===========================================================================
let twoFactorAuthSuccess = function() {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Server reports two-factor authentication was successful`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Server reports two-factor authentication was successful`);
closeAllWindows();
}
// ===========================================================================
let checkTwoFactorAuth = function() {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Checking two-factor authentication with server ...`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Checking two-factor authentication with server ...`);
triggerNetworkEvent("ag.checkTwoFactorAuth", twoFactorAuth.codeInput.lines[0]);
}
// ===========================================================================
let characterSelectSuccess = function() {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Server reports character selection was successful`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Server reports character selection was successful`);
closeAllWindows();
}
// ===========================================================================
let closeErrorDialog = function() {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Closing error dialog`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Closing error dialog`);
errorDialog.window.shown = false;
mexui.setInput(false);
}
@@ -972,7 +972,7 @@ let closeErrorDialog = function() {
// ===========================================================================
let closeInfoDialog = function() {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Closing info dialog`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Closing info dialog`);
infoDialog.window.shown = false;
mexui.setInput(false);
}
@@ -980,7 +980,7 @@ let closeInfoDialog = function() {
// ===========================================================================
let closeAllWindows = function() {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Closing all GUI windows`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Closing all GUI windows`);
infoDialog.window.shown = false;
yesNoDialog.window.shown = false;
errorDialog.window.shown = false;
@@ -996,7 +996,7 @@ let closeAllWindows = function() {
// ===========================================================================
let yesNoDialogAnswerNo = function() {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Responding with answer NO to server prompt`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Responding with answer NO to server prompt`);
triggerNetworkEvent("ag.promptAnswerNo");
closeAllWindows();
}
@@ -1004,7 +1004,7 @@ let yesNoDialogAnswerNo = function() {
// ===========================================================================
let yesNoDialogAnswerYes = function() {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Responding with answer YES to server prompt`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Responding with answer YES to server prompt`);
triggerNetworkEvent("ag.promptAnswerYes");
closeAllWindows();
}
@@ -1012,7 +1012,7 @@ let yesNoDialogAnswerYes = function() {
// ===========================================================================
let showRegistration = function() {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Showing registration window`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Showing registration window`);
closeAllWindows();
setChatWindowEnabled(false);
mexui.setInput(true);
@@ -1023,7 +1023,7 @@ let showRegistration = function() {
let showLogin = function() {
closeAllWindows();
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Showing login window`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Showing login window`);
setChatWindowEnabled(false);
mexui.setInput(true);
login.window.shown = true;
@@ -1033,7 +1033,7 @@ let showLogin = function() {
let showTwoFactorAuth = function() {
closeAllWindows();
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Showing two-factor authentication window`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Showing two-factor authentication window`);
setChatWindowEnabled(false);
mexui.setInput(true);
twoFactorAuth.window.shown = true;
@@ -1043,7 +1043,7 @@ let showTwoFactorAuth = function() {
let showCharacterSelect = function(firstName, lastName, cash, clan, lastPlayed, skinId) {
closeAllWindows();
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Showing character selection window`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Showing character selection window`);
setChatWindowEnabled(false);
mexui.setInput(true);
characterSelect.nameText.text = `${firstName} ${lastName}`;
@@ -1058,7 +1058,7 @@ let showCharacterSelect = function(firstName, lastName, cash, clan, lastPlayed,
let showError = function(errorMessage, errorTitle) {
closeAllWindows();
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Showing error window. Error: ${errorTitle} - ${errorMessage}`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Showing error window. Error: ${errorTitle} - ${errorMessage}`);
setChatWindowEnabled(false);
mexui.setInput(true);
errorDialog.messageLabel.text = errorMessage;
@@ -1069,7 +1069,7 @@ let showError = function(errorMessage, errorTitle) {
let showYesNo = function(promptMessage, promptTitle) {
closeAllWindows();
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Showing prompt window. Prompt: ${promptTitle} - ${promptMessage}`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Showing prompt window. Prompt: ${promptTitle} - ${promptMessage}`);
mexui.setInput(true);
yesNoDialog.messageLabel.text = promptMessage;
yesNoDialog.window.shown = true;
@@ -1079,7 +1079,7 @@ let showYesNo = function(promptMessage, promptTitle) {
let showInfo = function(infoMessage, infoTitle) {
closeAllWindows();
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Showing info dialog window. Info: ${infoTitle} - ${infoMessage}`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Showing info dialog window. Info: ${infoTitle} - ${infoMessage}`);
mexui.setInput(true);
infoDialog.messageLabel.text = infoMessage;
infoDialog.window.shown = true;
@@ -1089,7 +1089,7 @@ let showInfo = function(infoMessage, infoTitle) {
let showNewCharacter = function() {
closeAllWindows();
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Showing new character dialog window`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Showing new character dialog window`);
setChatWindowEnabled(false);
mexui.setInput(true);
setHUDEnabled(false);
@@ -1104,28 +1104,28 @@ let showNewCharacter = function() {
// ===========================================================================
let selectNextCharacter = function() {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Requesting next character info from server for character select window`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Requesting next character info from server for character select window`);
triggerNetworkEvent("ag.nextCharacter");
}
// ===========================================================================
let selectPreviousCharacter = function() {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Requesting previous character info from server for character select window`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Requesting previous character info from server for character select window`);
triggerNetworkEvent("ag.previousCharacter");
}
// ===========================================================================
let selectThisCharacter = function() {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Tell server the current shown character was selected in character select window`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Tell server the current shown character was selected in character select window`);
triggerNetworkEvent("ag.selectCharacter");
}
// ===========================================================================
let switchCharacterSelect = function(firstName, lastName, cash, clan, lastPlayed, skinId) {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Updating character info with data from server`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Updating character info with data from server`);
setChatWindowEnabled(false);
characterSelect.window.shown = false;
characterSelect.nameText.text = `${firstName} ${lastName}`;
@@ -1139,70 +1139,70 @@ let switchCharacterSelect = function(firstName, lastName, cash, clan, lastPlayed
// ===========================================================================
addNetworkHandler("ag.showLogin", function() {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Received request from server to show login window`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Received request from server to show login window`);
showLogin();
});
// ===========================================================================
addNetworkHandler("ag.showRegistration", function() {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Received request from server to show registration window`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Received request from server to show registration window`);
showRegistration();
});
// ===========================================================================
addNetworkHandler("ag.showNewCharacter", function() {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Received request from server to show new character window`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Received request from server to show new character window`);
showNewCharacter();
});
// ===========================================================================
addNetworkHandler("ag.showCharacterSelect", function(firstName, lastName, cash, clan, lastPlayed, skinId) {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Received request from server to show character selection window`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Received request from server to show character selection window`);
showCharacterSelect(firstName, lastName, cash, clan, lastPlayed, skinId);
});
// ===========================================================================
addNetworkHandler("ag.switchCharacterSelect", function(firstName, lastName, cash, clan, lastPlayed, skinId) {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Received request from server to update character selection window with new info`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Received request from server to update character selection window with new info`);
switchCharacterSelect(firstName, lastName, cash, clan, lastPlayed, skinId);
});
// ===========================================================================
addNetworkHandler("ag.showError", function(errorMessage, errorTitle) {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Received request from server to show error window`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Received request from server to show error window`);
showError(errorMessage, errorTitle);
});
// ===========================================================================
addNetworkHandler("ag.showPrompt", function(promptMessage, promptTitle) {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Received request from server to show prompt window`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Received request from server to show prompt window`);
showYesNo(promptMessage, promptTitle);
});
// ===========================================================================
addNetworkHandler("ag.showInfo", function(infoMessage) {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Received request from server to show info dialog`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Received request from server to show info dialog`);
showInfo(infoMessage);
});
// ===========================================================================
addNetworkHandler("ag.loginSuccess", function() {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Received signal of successful login from server`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Received signal of successful login from server`);
loginSuccess();
});
// ===========================================================================
addNetworkHandler("ag.characterSelectSuccess", function() {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Received signal of successful character selection from server`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Received signal of successful character selection from server`);
characterSelectSuccess();
setChatWindowEnabled(true);
});
@@ -1210,35 +1210,35 @@ addNetworkHandler("ag.characterSelectSuccess", function() {
// ===========================================================================
addNetworkHandler("ag.loginFailed", function(remainingAttempts) {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Received signal of failed login from server`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Received signal of failed login from server`);
loginFailed(remainingAttempts);
});
// ===========================================================================
addNetworkHandler("ag.registrationSuccess", function() {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Received signal of successful registration from server`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Received signal of successful registration from server`);
registrationSuccess();
});
// ===========================================================================
addNetworkHandler("ag.registrationFailed", function(errorMessage) {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Received signal of failed registration from server`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Received signal of failed registration from server`);
registrationFailed(errorMessage);
});
// ===========================================================================
addNetworkHandler("ag.newCharacterFailed", function(errorMessage) {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Received signal of failed registration from server`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Received signal of failed registration from server`);
newCharacterFailed(errorMessage);
});
// ===========================================================================
addNetworkHandler("ag.guiColour", function(red, green, blue) {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Received new GUI colours from server`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Received new GUI colours from server`);
primaryColour = [red, green, blue];
focusedColour = [red+focusedColourOffset, green+focusedColourOffset, blue+focusedColourOffset];
});
@@ -1246,7 +1246,7 @@ addNetworkHandler("ag.guiColour", function(red, green, blue) {
// ===========================================================================
addNetworkHandler("ag.guiInit", function() {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] Initializing MexUI app`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] Initializing MexUI app`);
initGUI();
triggerNetworkEvent("ag.guiReady", true);
});
diff --git a/scripts/client/item.js b/scripts/client/item.js
index 7e9d60fa..0d131063 100644
--- a/scripts/client/item.js
+++ b/scripts/client/item.js
@@ -16,8 +16,8 @@ let itemActionDelaySize = toVector2(200, 5);
// ===========================================================================
function initItemScript() {
- logToConsole(LOG_DEBUG, "[Asshat.Item]: Initializing item script ...");
- logToConsole(LOG_DEBUG, "[Asshat.Item]: Item script initialized!");
+ logToConsole(LOG_DEBUG, "[VRR.Item]: Initializing item script ...");
+ logToConsole(LOG_DEBUG, "[VRR.Item]: Item script initialized!");
}
// ===========================================================================
@@ -47,7 +47,7 @@ function processItemActionRendering() {
// ===========================================================================
function updatePlayerHotBar(activeSlot, itemsArray) {
- logToConsole(LOG_DEBUG, `[Asshat.Main] Updating hotbar`);
+ logToConsole(LOG_DEBUG, `[VRR.Main] Updating hotbar`);
}
// ===========================================================================
diff --git a/scripts/client/job.js b/scripts/client/job.js
index dccec8b7..32a8ecf3 100644
--- a/scripts/client/job.js
+++ b/scripts/client/job.js
@@ -15,28 +15,28 @@ let jobRouteStopSphere = null;
// ===========================================================================
function initJobScript() {
- logToConsole(LOG_DEBUG, "[Asshat.Job]: Initializing job script ...");
- logToConsole(LOG_DEBUG, "[Asshat.Job]: Job script initialized!");
+ logToConsole(LOG_DEBUG, "[VRR.Job]: Initializing job script ...");
+ logToConsole(LOG_DEBUG, "[VRR.Job]: Job script initialized!");
}
// ===========================================================================
function setLocalPlayerJobType(tempJobType) {
- logToConsole(LOG_DEBUG, `[Asshat.Main] Set local player job type to ${tempJobType}`);
+ logToConsole(LOG_DEBUG, `[VRR.Main] Set local player job type to ${tempJobType}`);
localPlayerJobType = tempJobType;
}
// ===========================================================================
function setLocalPlayerWorkingState(tempWorking) {
- logToConsole(LOG_DEBUG, `[Asshat.Main] Setting working state to ${tempWorking}`);
+ logToConsole(LOG_DEBUG, `[VRR.Main] Setting working state to ${tempWorking}`);
localPlayerWorking = tempWorking;
}
// ===========================================================================
function showJobRouteStop() {
- logToConsole(LOG_DEBUG, `[Asshat.Job] Showing route stop`);
+ logToConsole(LOG_DEBUG, `[VRR.Job] Showing route stop`);
if(gta.game == GAME_GTA_SA) {
jobRouteStopSphere = gta.createPickup(1318, position, 1);
} else {
@@ -50,7 +50,7 @@ function showJobRouteStop() {
// ===========================================================================
function showJobRouteStop(position, colour) {
- logToConsole(LOG_DEBUG, `[Asshat.Job] Showing route stop`);
+ logToConsole(LOG_DEBUG, `[VRR.Job] Showing route stop`);
if(gta.game == GAME_GTA_SA) {
jobRouteStopSphere = gta.createPickup(1318, position, 1);
} else {
@@ -64,7 +64,7 @@ function showJobRouteStop(position, colour) {
// ===========================================================================
function enteredJobRouteSphere() {
- logToConsole(LOG_DEBUG, `[Asshat.Job] Entered job route sphere`);
+ logToConsole(LOG_DEBUG, `[VRR.Job] Entered job route sphere`);
tellServerPlayerArrivedAtJobRouteStop();
destroyElement(jobRouteStopSphere);
destroyElement(jobRouteStopBlip);
diff --git a/scripts/client/keybind.js b/scripts/client/keybind.js
index 3abe5008..a33786e8 100644
--- a/scripts/client/keybind.js
+++ b/scripts/client/keybind.js
@@ -15,25 +15,25 @@ let keyBindLongHoldDuration = 1500;
// ===========================================================================
function initKeyBindScript() {
- logToConsole(LOG_DEBUG, "[Asshat.KeyBind]: Initializing key bind script ...");
- logToConsole(LOG_DEBUG, "[Asshat.KeyBind]: Key bind script initialized!");
+ logToConsole(LOG_DEBUG, "[VRR.KeyBind]: Initializing key bind script ...");
+ logToConsole(LOG_DEBUG, "[VRR.KeyBind]: Key bind script initialized!");
}
// ===========================================================================
function bindAccountKey(key, keyState) {
- logToConsole(LOG_DEBUG, `[Asshat.KeyBind]: Binded key ${sdl.getKeyName(key)} (${key})`);
+ logToConsole(LOG_DEBUG, `[VRR.KeyBind]: Binded key ${sdl.getKeyName(key)} (${key})`);
bindKey(toInteger(key), keyState, function(event) {
if(hasKeyBindDelayElapsed()) {
if(canLocalPlayerUseKeyBinds()) {
- logToConsole(LOG_DEBUG, `[Asshat.KeyBind]: Using keybind for key ${sdl.getKeyName(key)} (${key})`);
+ logToConsole(LOG_DEBUG, `[VRR.KeyBind]: Using keybind for key ${sdl.getKeyName(key)} (${key})`);
lastKeyBindUse = sdl.ticks;
tellServerPlayerUsedKeyBind(key);
} else {
- logToConsole(LOG_ERROR, `[Asshat.KeyBind]: Failed to use keybind for key ${sdl.getKeyName(key)} (${key}) - Not allowed to use keybinds!`);
+ logToConsole(LOG_ERROR, `[VRR.KeyBind]: Failed to use keybind for key ${sdl.getKeyName(key)} (${key}) - Not allowed to use keybinds!`);
}
} else {
- logToConsole(LOG_ERROR, `[Asshat.KeyBind]: Failed to use keybind for key ${sdl.getKeyName(key)} (${key}) - Not enough time has passed since last keybind use!`);
+ logToConsole(LOG_ERROR, `[VRR.KeyBind]: Failed to use keybind for key ${sdl.getKeyName(key)} (${key}) - Not enough time has passed since last keybind use!`);
}
});
}
@@ -41,7 +41,7 @@ function bindAccountKey(key, keyState) {
// ===========================================================================
function unBindAccountKey(key) {
- logToConsole(LOG_DEBUG, `[Asshat.KeyBind]: Unbinded key ${sdl.getKeyName(key)} (${key})`);
+ logToConsole(LOG_DEBUG, `[VRR.KeyBind]: Unbinded key ${sdl.getKeyName(key)} (${key})`);
unbindKey(key);
return true;
}
diff --git a/scripts/client/label.js b/scripts/client/label.js
index 92f565cc..7354d5ff 100644
--- a/scripts/client/label.js
+++ b/scripts/client/label.js
@@ -32,12 +32,12 @@ let propertyLabelNameOffset = 18;
// ===========================================================================
function initLabelScript() {
- logToConsole(LOG_DEBUG, "[Asshat.Label]: Initializing label script ...");
+ logToConsole(LOG_DEBUG, "[VRR.Label]: Initializing label script ...");
propertyLabelNameFont = initLabelPropertyNameFont();
propertyLabelLockedFont = initLabelPropertyLockedFont();
jobNameLabelFont = initLabelJobNameFont();
jobHelpLabelFont = initLabelJobHelpFont();
- logToConsole(LOG_DEBUG, "[Asshat.Label]: Label script initialized!");
+ logToConsole(LOG_DEBUG, "[VRR.Label]: Label script initialized!");
}
// ===========================================================================
@@ -99,10 +99,10 @@ function renderPropertyEntranceLabel(name, position, locked, isBusiness, price,
text = (locked) ? "LOCKED" : "UNLOCKED";
if(isBusiness) {
text = (locked) ? "CLOSED" : "OPEN";
- if(!locked && bizLabelInfoType != AG_BIZLABEL_INFO_NONE) {
+ if(!locked && bizLabelInfoType != VRR_BIZLABEL_INFO_NONE) {
let bizInfoText = "";
switch(bizLabelInfoType) {
- case AG_BIZLABEL_INFO_ENTER:
+ case VRR_BIZLABEL_INFO_ENTER:
if(enterPropertyKey != null) {
bizInfoText = `Press ${sdl.getKeyName(enterPropertyKey)} to enter`;
} else {
@@ -110,15 +110,15 @@ function renderPropertyEntranceLabel(name, position, locked, isBusiness, price,
}
break;
- case AG_BIZLABEL_INFO_BUY:
+ case VRR_BIZLABEL_INFO_BUY:
bizInfoText = `Use /buy to purchase items`;
break;
- case AG_BIZLABEL_INFO_ENTERVEH:
+ case VRR_BIZLABEL_INFO_ENTERVEH:
bizInfoText = "Enter a vehicle to purchase it";
break;
- case AG_BIZLABEL_INFO_NONE:
+ case VRR_BIZLABEL_INFO_NONE:
default:
bizInfoText = "";
break;
@@ -227,7 +227,7 @@ function processLabelRendering() {
if(pickups[i].getData("ag.label.type") != null) {
if(getDistance(localPlayer.position, pickups[i].position) <= renderLabelDistance) {
let price = 0;
- let bizLabelInfoType = AG_BIZLABEL_INFO_NONE;
+ let bizLabelInfoType = VRR_BIZLABEL_INFO_NONE;
if(pickups[i].getData("ag.label.price") != null) {
price = makeLargeNumberReadable(pickups[i].getData("ag.label.price"));
}
@@ -237,19 +237,19 @@ function processLabelRendering() {
}
switch(pickups[i].getData("ag.label.type")) {
- case AG_LABEL_BUSINESS:
+ case VRR_LABEL_BUSINESS:
renderPropertyEntranceLabel(pickups[i].getData("ag.label.name"), pickups[i].position, pickups[i].getData("ag.label.locked"), true, price, bizLabelInfoType);
break;
- case AG_LABEL_HOUSE:
+ case VRR_LABEL_HOUSE:
renderPropertyEntranceLabel(pickups[i].getData("ag.label.name"), pickups[i].position, pickups[i].getData("ag.label.locked"), false, price, bizLabelInfoType);
break;
- case AG_LABEL_JOB:
+ case VRR_LABEL_JOB:
renderJobLabel(pickups[i].getData("ag.label.name"), pickups[i].position, pickups[i].getData("ag.label.jobType"));
break;
- case AG_LABEL_EXIT:
+ case VRR_LABEL_EXIT:
renderPropertyExitLabel(pickups[i].position);
break;
}
diff --git a/scripts/client/logo.js b/scripts/client/logo.js
index c80528a1..0219f0fd 100644
--- a/scripts/client/logo.js
+++ b/scripts/client/logo.js
@@ -14,9 +14,9 @@ let logoSize = toVector2(128, 128);
// ===========================================================================
function initLogoScript() {
- logToConsole(LOG_DEBUG, "[Asshat.Logo]: Initializing logo script ...");
+ logToConsole(LOG_DEBUG, "[VRR.Logo]: Initializing logo script ...");
logoImage = loadLogoImage();
- logToConsole(LOG_DEBUG, "[Asshat.Logo]: Logo script initialized!");
+ logToConsole(LOG_DEBUG, "[VRR.Logo]: Logo script initialized!");
}
// ===========================================================================
@@ -45,7 +45,7 @@ function processLogoRendering() {
// ===========================================================================
function setServerLogoRenderState(state) {
- logToConsole(LOG_DEBUG, `[Asshat.Main] Server logo ${(state) ? "enabled" : "disabled"}`);
+ logToConsole(LOG_DEBUG, `[VRR.Main] Server logo ${(state) ? "enabled" : "disabled"}`);
renderLogo = state;
}
diff --git a/scripts/client/messaging.js b/scripts/client/messaging.js
index aeffbe12..aa686584 100644
--- a/scripts/client/messaging.js
+++ b/scripts/client/messaging.js
@@ -15,9 +15,9 @@ let smallGameMessageTimer = null;
// ===========================================================================
function initMessagingScript() {
- logToConsole(LOG_DEBUG, "[Asshat.Messaging]: Initializing messaging script ...");
+ logToConsole(LOG_DEBUG, "[VRR.Messaging]: Initializing messaging script ...");
smallGameMessageFont = loadSmallGameMessageFont();
- logToConsole(LOG_DEBUG, "[Asshat.Messaging]: Messaging script initialized!");
+ logToConsole(LOG_DEBUG, "[VRR.Messaging]: Messaging script initialized!");
}
// ===========================================================================
@@ -61,7 +61,7 @@ function processSmallGameMessageRendering() {
// ===========================================================================
function showSmallGameMessage(text, colour, duration) {
- logToConsole(LOG_DEBUG, `[Asshat.Messaging] Showing small game message '${text}' for ${duration}ms`);
+ logToConsole(LOG_DEBUG, `[VRR.Messaging] Showing small game message '${text}' for ${duration}ms`);
if(smallGameMessageText != "") {
clearTimeout(smallGameMessageTimer);
}
diff --git a/scripts/client/nametag.js b/scripts/client/nametag.js
index af5381d8..8d8c7d5e 100644
--- a/scripts/client/nametag.js
+++ b/scripts/client/nametag.js
@@ -22,10 +22,10 @@ let playerPing = {};
// ===========================================================================
function initNameTagScript() {
- logToConsole(LOG_DEBUG, "[Asshat.NameTag]: Initializing nametag script ...");
+ logToConsole(LOG_DEBUG, "[VRR.NameTag]: Initializing nametag script ...");
nametagFont = loadNameTagFont();
afkStatusFont = loadPausedStatusFont();
- logToConsole(LOG_DEBUG, "[Asshat.NameTag]: Nametag script initialized!");
+ logToConsole(LOG_DEBUG, "[VRR.NameTag]: Nametag script initialized!");
}
// ===========================================================================
diff --git a/scripts/client/scoreboard.js b/scripts/client/scoreboard.js
index 7193cb66..c4f0b980 100644
--- a/scripts/client/scoreboard.js
+++ b/scripts/client/scoreboard.js
@@ -17,10 +17,10 @@ let scoreboardKey = SDLK_TAB;
// ===========================================================================
function initScoreBoardScript() {
- logToConsole(LOG_DEBUG, "[Asshat.ScoreBoard]: Initializing scoreboard script ...");
+ logToConsole(LOG_DEBUG, "[VRR.ScoreBoard]: Initializing scoreboard script ...");
scoreBoardTitleFont = initScoreBoardTitleFont();
scoreBoardListFont = initScoreBoardListFont();
- logToConsole(LOG_DEBUG, "[Asshat.ScoreBoard]: Scoreboard script initialized!");
+ logToConsole(LOG_DEBUG, "[VRR.ScoreBoard]: Scoreboard script initialized!");
}
// ===========================================================================
diff --git a/scripts/client/server.js b/scripts/client/server.js
index ef8a599e..91097754 100644
--- a/scripts/client/server.js
+++ b/scripts/client/server.js
@@ -8,15 +8,15 @@
// ===========================================================================
function initServerScript() {
- logToConsole(LOG_DEBUG, "[Asshat.Server]: Initializing server script ...");
+ logToConsole(LOG_DEBUG, "[VRR.Server]: Initializing server script ...");
addAllNetworkHandlers();
- logToConsole(LOG_DEBUG, "[Asshat.Server]: Server script initialized!");
+ logToConsole(LOG_DEBUG, "[VRR.Server]: Server script initialized!");
}
// ===========================================================================
function addAllNetworkHandlers() {
- logToConsole(LOG_DEBUG, "[Asshat.Server]: Adding network handlers ...");
+ logToConsole(LOG_DEBUG, "[VRR.Server]: Adding network handlers ...");
addNetworkHandler("ag.smallGameMessage", showSmallGameMessage);
addNetworkHandler("ag.working", setLocalPlayerWorkingState);
@@ -104,7 +104,7 @@ function sendResourceStoppedSignalToServer() {
// ===========================================================================
function setPlayer2DRendering(hudState, labelState, smallGameMessageState, scoreboardState, hotBarState, itemActionDelayState) {
- logToConsole(LOG_DEBUG, `[Asshat.Main] Updating render states (HUD: ${hudState}, Labels: ${labelState}, Bottom Text: ${smallGameMessageState}, Scoreboard: ${scoreboardState}, HotBar: ${hotBarState}, Item Action Delay: ${itemActionDelayState})`);
+ logToConsole(LOG_DEBUG, `[VRR.Main] Updating render states (HUD: ${hudState}, Labels: ${labelState}, Bottom Text: ${smallGameMessageState}, Scoreboard: ${scoreboardState}, HotBar: ${hotBarState}, Item Action Delay: ${itemActionDelayState})`);
renderHUD = hudState;
setHUDEnabled(hudState);
@@ -118,7 +118,7 @@ function setPlayer2DRendering(hudState, labelState, smallGameMessageState, score
// ===========================================================================
function onServerSpawnedPlayer(state) {
- logToConsole(LOG_DEBUG, `[Asshat.Main] Setting spawned state to ${state}`);
+ logToConsole(LOG_DEBUG, `[VRR.Main] Setting spawned state to ${state}`);
isSpawned = state;
if(state) {
if(gta.game == GAME_GTA_III) {
diff --git a/scripts/client/skin-select.js b/scripts/client/skin-select.js
index 127ad2f5..c3ebbc1a 100644
--- a/scripts/client/skin-select.js
+++ b/scripts/client/skin-select.js
@@ -40,10 +40,10 @@ let newCharacterSkinSelectPedHeading = [
// ===========================================================================
function initSkinSelectScript() {
- logToConsole(LOG_DEBUG, "[Asshat.SkinSelect]: Initializing skin selector script ...");
+ logToConsole(LOG_DEBUG, "[VRR.SkinSelect]: Initializing skin selector script ...");
skinSelectMessageFontTop = loadSkinSelectMessageFontTop();
skinSelectMessageFontBottom = loadSkinSelectMessageFontBottom();
- logToConsole(LOG_DEBUG, "[Asshat.SkinSelect]: Skin selector script initialized!");
+ logToConsole(LOG_DEBUG, "[VRR.SkinSelect]: Skin selector script initialized!");
}
// ===========================================================================
diff --git a/scripts/client/utilities.js b/scripts/client/utilities.js
index 3ab499e2..1caa928b 100644
--- a/scripts/client/utilities.js
+++ b/scripts/client/utilities.js
@@ -175,14 +175,14 @@ function closeAllGarages() {
// ===========================================================================
function setLocalPlayerFrozenState(state) {
- logToConsole(LOG_DEBUG, `[Asshat.Utilities] Setting frozen state to ${state}`);
+ logToConsole(LOG_DEBUG, `[VRR.Utilities] Setting frozen state to ${state}`);
gui.showCursor(state, !state);
}
// ===========================================================================
function setLocalPlayerControlState(controlState, cursorState = false) {
- logToConsole(LOG_DEBUG, `[Asshat.Utilities] Setting control state to ${controlState} (Cursor: ${cursorState})`);
+ logToConsole(LOG_DEBUG, `[VRR.Utilities] Setting control state to ${controlState} (Cursor: ${cursorState})`);
controlsEnabled = controlState;
localPlayer.invincible = true;
localPlayer.collisionsEnabled = controlState;
@@ -192,7 +192,7 @@ function setLocalPlayerControlState(controlState, cursorState = false) {
// ===========================================================================
function fadeLocalCamera(state, time) {
- logToConsole(LOG_DEBUG, `[Asshat.Utilities] Fading camera ${(state)?"in":"out"} for ${time} seconds`);
+ logToConsole(LOG_DEBUG, `[VRR.Utilities] Fading camera ${(state)?"in":"out"} for ${time} seconds`);
gta.fadeCamera(state, time);
}
@@ -205,29 +205,29 @@ function removeLocalPlayerFromVehicle() {
// ===========================================================================
function restoreLocalCamera() {
- logToConsole(LOG_DEBUG, `[Asshat.Utilities] Camera restored`);
+ logToConsole(LOG_DEBUG, `[VRR.Utilities] Camera restored`);
gta.restoreCamera(true);
};
// ===========================================================================
function clearLocalPlayerOwnedPeds() {
- logToConsole(LOG_DEBUG, `[Asshat.Utilities] Clearing all self-owned peds ...`);
+ logToConsole(LOG_DEBUG, `[VRR.Utilities] Clearing all self-owned peds ...`);
clearSelfOwnedPeds();
- logToConsole(LOG_DEBUG, `[Asshat.Utilities] All self-owned peds cleared`);
+ logToConsole(LOG_DEBUG, `[VRR.Utilities] All self-owned peds cleared`);
};
// ===========================================================================
function setLocalCameraLookAt(cameraPosition, cameraLookAt) {
- logToConsole(LOG_DEBUG, `[Asshat.Utilities] Set camera to look at [${cameraLookAt.x}, ${cameraLookAt.y}, ${cameraLookAt.z}] from [${cameraPosition.x}, ${cameraPosition.y}, ${cameraPosition.z}]`);
+ logToConsole(LOG_DEBUG, `[VRR.Utilities] Set camera to look at [${cameraLookAt.x}, ${cameraLookAt.y}, ${cameraLookAt.z}] from [${cameraPosition.x}, ${cameraPosition.y}, ${cameraPosition.z}]`);
gta.setCameraLookAt(cameraPosition, cameraLookAt, true);
}
// ===========================================================================
function setCityAmbienceState(state) {
- logToConsole(LOG_DEBUG, `[Asshat.Utilities] Ambient civilians and traffic ${(state) ? "enabled" : "disabled"}`);
+ logToConsole(LOG_DEBUG, `[VRR.Utilities] Ambient civilians and traffic ${(state) ? "enabled" : "disabled"}`);
gta.setTrafficEnabled(state);
gta.setGenerateCarsAroundCamera(state);
if(gta.game != GAME_GTA_SA) {
@@ -263,7 +263,7 @@ function enterVehicleAsPassenger() {
// ===========================================================================
function giveLocalPlayerWeapon(weaponId, ammo, active) {
- logToConsole(LOG_DEBUG, `[Asshat.Utilities] Giving weapon ${weaponId} with ${ammo} ammo`);
+ logToConsole(LOG_DEBUG, `[VRR.Utilities] Giving weapon ${weaponId} with ${ammo} ammo`);
localPlayer.giveWeapon(weaponId, ammo, active);
forceWeaponAmmo = localPlayer.getWeaponAmmunition(getWeaponSlot(weaponId));
forceWeaponClipAmmo = localPlayer.getWeaponClipAmmunition(getWeaponSlot(weaponId));
@@ -273,7 +273,7 @@ function giveLocalPlayerWeapon(weaponId, ammo, active) {
// ===========================================================================
function giveLocalPlayerWeapon(weaponId, ammo, active) {
- logToConsole(LOG_DEBUG, `[Asshat.Utilities] Giving weapon ${weaponId} with ${ammo} ammo`);
+ logToConsole(LOG_DEBUG, `[VRR.Utilities] Giving weapon ${weaponId} with ${ammo} ammo`);
localPlayer.giveWeapon(weaponId, ammo, active);
forceWeaponAmmo = localPlayer.getWeaponAmmunition(getWeaponSlot(weaponId));
forceWeaponClipAmmo = localPlayer.getWeaponClipAmmunition(getWeaponSlot(weaponId));
@@ -283,7 +283,7 @@ function giveLocalPlayerWeapon(weaponId, ammo, active) {
// ===========================================================================
function clearLocalPlayerWeapons() {
- logToConsole(LOG_DEBUG, `[Asshat.Utilities] Clearing weapons`);
+ logToConsole(LOG_DEBUG, `[VRR.Utilities] Clearing weapons`);
localPlayer.clearWeapons();
forceWeapon = 0;
forceWeaponAmmo = 0;
@@ -299,7 +299,7 @@ function getClosestVehicle(pos) {
// ===========================================================================
function setLocalPlayerPosition(position) {
- logToConsole(LOG_DEBUG, `[Asshat.Utilities] Setting position to ${position.x}, ${position.y}, ${position.z}`);
+ logToConsole(LOG_DEBUG, `[VRR.Utilities] Setting position to ${position.x}, ${position.y}, ${position.z}`);
localPlayer.velocity = toVector3(0.0, 0.0, 0.0);
localPlayer.position = position;
}
@@ -307,14 +307,14 @@ function setLocalPlayerPosition(position) {
// ===========================================================================
function setLocalPlayerHeading(heading) {
- logToConsole(LOG_DEBUG, `[Asshat.Utilities] Setting heading to ${heading}`);
+ logToConsole(LOG_DEBUG, `[VRR.Utilities] Setting heading to ${heading}`);
localPlayer.heading = heading;
}
// ===========================================================================
function setLocalPlayerInterior(interior) {
- logToConsole(LOG_DEBUG, `[Asshat.Utilities] Setting interior to ${interior}`);
+ logToConsole(LOG_DEBUG, `[VRR.Utilities] Setting interior to ${interior}`);
localPlayer.interior = interior;
gta.cameraInterior = interior;
}
@@ -322,7 +322,7 @@ function setLocalPlayerInterior(interior) {
// ===========================================================================
function setSnowState(fallingSnow, groundSnow) {
- logToConsole(LOG_DEBUG, `[Asshat.Utilities] Setting falling snow to ${fallingSnow} and ground snow to ${groundSnow}`);
+ logToConsole(LOG_DEBUG, `[VRR.Utilities] Setting falling snow to ${fallingSnow} and ground snow to ${groundSnow}`);
if(!isNull(snowing)) {
snowing = fallingSnow;
forceSnowing(groundSnow);
@@ -344,14 +344,14 @@ function isSnowEnabled() {
// ===========================================================================
function playPedSpeech(pedName, speechId) {
- logToConsole(LOG_DEBUG, `[Asshat.Utilities] Making ${pedName}'s ped talk (${speechId})`);
+ logToConsole(LOG_DEBUG, `[VRR.Utilities] Making ${pedName}'s ped talk (${speechId})`);
gta.SET_CHAR_SAY(int, int);
}
// ===========================================================================
function clearLocalPedState() {
- logToConsole(LOG_DEBUG, `[Asshat.Utilities] Clearing local ped state`);
+ logToConsole(LOG_DEBUG, `[VRR.Utilities] Clearing local ped state`);
localPlayer.clearObjective();
}
@@ -364,7 +364,7 @@ function getWeaponSlot(weaponId) {
// ===========================================================================
function setLocalPlayerDrunkEffect(amount, duration) {
- logToConsole(LOG_DEBUG, `[Asshat.Utilities] Drunk effect set to ${amount} for ${duration}ms`);
+ logToConsole(LOG_DEBUG, `[VRR.Utilities] Drunk effect set to ${amount} for ${duration}ms`);
drunkEffectAmount = 0;
drunkEffectDurationTimer = setInterval(function() {
drunkEffectAmount = drunkEffectAmount;
@@ -401,7 +401,7 @@ function clearSelfOwnedPeds() {
// ===========================================================================
function setMouseCameraState(state) {
- logToConsole(LOG_DEBUG, `[Asshat.Utilities] ${(state)?"Enabled":"Disabled"} mouse camera`);
+ logToConsole(LOG_DEBUG, `[VRR.Utilities] ${(state)?"Enabled":"Disabled"} mouse camera`);
mouseCameraEnabled = !mouseCameraEnabled;
SetStandardControlsEnabled(!mouseCameraEnabled);
}
@@ -409,42 +409,42 @@ function setMouseCameraState(state) {
// ===========================================================================
function setMouseCursorState(state) {
- logToConsole(LOG_DEBUG, `[Asshat.Utilities] ${(state)?"Enabled":"Disabled"} mouse cursor`);
+ logToConsole(LOG_DEBUG, `[VRR.Utilities] ${(state)?"Enabled":"Disabled"} mouse cursor`);
gui.showCursor(state, !state);
}
// ===========================================================================
function setPlayerWeaponDamageEvent(clientName, eventType) {
- logToConsole(LOG_DEBUG, `[Asshat.Utilities] Set ${clientName} damage event type to ${eventType}`);
+ logToConsole(LOG_DEBUG, `[VRR.Utilities] Set ${clientName} damage event type to ${eventType}`);
weaponDamageEvent[clientName] = eventType;
}
// ===========================================================================
function setPlayerWeaponDamageEnabled(clientName, state) {
- logToConsole(LOG_DEBUG, `[Asshat.Utilities] ${(state)?"Enabled":"Disabled"} damage from ${clientName}`);
+ logToConsole(LOG_DEBUG, `[VRR.Utilities] ${(state)?"Enabled":"Disabled"} damage from ${clientName}`);
weaponDamageEnabled[clientName] = state;
}
// ===========================================================================
function setLocalPlayerCash(amount) {
- logToConsole(LOG_DEBUG, `[Asshat.Utilities] Setting local player money`);
+ logToConsole(LOG_DEBUG, `[VRR.Utilities] Setting local player money`);
localPlayer.money = amount;
}
// ===========================================================================
function removeWorldObject(model, position, range) {
- logToConsole(LOG_DEBUG, `[Asshat.Utilities] Removing world object ${model} at X: ${position.x}, Y: ${position.x}, Z: ${position.x} with range of ${range}`);
+ logToConsole(LOG_DEBUG, `[VRR.Utilities] Removing world object ${model} at X: ${position.x}, Y: ${position.x}, Z: ${position.x} with range of ${range}`);
gta.removeWorldObject(model, position, range);
}
// ===========================================================================
function excludeModelFromGroundSnow(model) {
- logToConsole(LOG_DEBUG, `[Asshat.Utilities] Disabling ground snow for object model ${model}`);
+ logToConsole(LOG_DEBUG, `[VRR.Utilities] Disabling ground snow for object model ${model}`);
groundSnow.excludeModel(model);
}
diff --git a/scripts/server/account.js b/scripts/server/account.js
index e5520250..205f4a6d 100644
--- a/scripts/server/account.js
+++ b/scripts/server/account.js
@@ -8,8 +8,8 @@
// ===========================================================================
function initAccountScript() {
- logToConsole(LOG_DEBUG, "[Asshat.Account]: Initializing account script ...");
- logToConsole(LOG_DEBUG, "[Asshat.Account]: Account script initialized!");
+ logToConsole(LOG_DEBUG, "[VRR.Account]: Initializing account script ...");
+ logToConsole(LOG_DEBUG, "[VRR.Account]: Account script initialized!");
}
// ===========================================================================
@@ -67,29 +67,29 @@ function toggleAccountGUICommand(command, params, client) {
if(!doesPlayerHaveGUIEnabled(client)) {
getPlayerData(client).accountData.settings = getPlayerData(client).accountData.settings & ~flagValue;
messagePlayerNormal(client, `⚙️ You will now be shown GUI (if enabled on current server)`);
- logToConsole(LOG_DEBUG, `[Asshat.Account] ${getPlayerDisplayForConsole(client)} has toggled GUI for their account ON.`);
+ logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} has toggled GUI for their account ON.`);
} else {
getPlayerData(client).accountData.settings = getPlayerData(client).accountData.settings | flagValue;
messagePlayerNormal(client, `⚙️ You will not be shown GUI anymore. Any GUI stuff will be shown as messages in the chatbox instead.`);
- logToConsole(LOG_DEBUG, `[Asshat.Account] ${getPlayerDisplayForConsole(client)} has toggled GUI for their account OFF.`);
+ logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} has toggled GUI for their account OFF.`);
}
if(!isPlayerLoggedIn(client)) {
if(getPlayerData().accountData.databaseId != 0) {
if(getServerConfig().useGUI && doesPlayerHaveGUIEnabled(client)) {
showPlayerLoginGUI(client);
- logToConsole(LOG_DEBUG, `[Asshat.Account] ${getPlayerDisplayForConsole(client)} is being shown the login GUI`);
+ logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the login GUI`);
} else {
messagePlayerNormal(client, `👋 Welcome back to Asshat Gaming RP, ${client.name}! Please /login to continue.`, getColourByName("softGreen"));
- logToConsole(LOG_DEBUG, `[Asshat.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled)`);
+ logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled)`);
}
} else {
if(getServerConfig().useGUI && doesPlayerHaveGUIEnabled(client)) {
showPlayerRegistrationGUI(client);
- logToConsole(LOG_DEBUG, `[Asshat.Account] ${getPlayerDisplayForConsole(client)} is being shown the register GUI`);
+ logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the register GUI`);
} else {
messagePlayerNormal(client, `👋 Welcome to Asshat Gaming RP, ${client.name}! Please /register to continue.`, getColourByName("softGreen"));
- logToConsole(LOG_DEBUG, `[Asshat.Account] ${getPlayerDisplayForConsole(client)} is being shown the register message (GUI disabled)`);
+ logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the register message (GUI disabled)`);
}
}
}
@@ -104,14 +104,14 @@ function toggleAccountServerLogoCommand(command, params, client) {
if(!doesPlayerHaveLogoEnabled(client)) {
getPlayerData(client).accountData.settings = getPlayerData(client).accountData.settings & ~flagValue;
messagePlayerNormal(client, `⚙️ You will ${getBoolRedGreenInlineColour(true)}now [#FFFFFF]be shown the server logo (if enabled on current server)`);
- logToConsole(LOG_DEBUG, `[Asshat.Account] ${getPlayerDisplayForConsole(client)} has toggled the server logo ON for their account`);
+ logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} has toggled the server logo ON for their account`);
if(getServerConfig().showLogo) {
updatePlayerShowLogoState(client, true);
}
} else {
getPlayerData(client).accountData.settings = getPlayerData(client).accountData.settings | flagValue;
messagePlayerNormal(client, `⚙️ You will ${getBoolRedGreenInlineColour(false)}not [#FFFFFF]be shown the server logo.`);
- logToConsole(LOG_DEBUG, `[Asshat.Account] ${getPlayerDisplayForConsole(client)} has toggled the server logo OFF for their account`);
+ logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} has toggled the server logo OFF for their account`);
updatePlayerShowLogoState(client, false);
}
@@ -143,12 +143,12 @@ function toggleAccountTwoFactorAuthCommand(command, params, client) {
getPlayerData(client).accountData.settings = addBitFlag(getPlayerData(client).accountData.settings, flagValue);
messagePlayerSuccess(client, `[#FFFFFF]You have turned ${getBoolRedGreenInlineColour(false)}ON [#FFFFFF] two factor authentication![#AAAAAA]${addtoAuthenticatorCode}`);
messagePlayerAlert(client, "You will be required to enter a code sent to your email every time you log on.");
- logToConsole(LOG_DEBUG, `[Asshat.Account] ${getPlayerDisplayForConsole(client)} has toggled two-factor authentication ON for their account`);
+ logToConsole(LOG_DEBUG, `[VRR.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, `You have turned ${getBoolRedGreenInlineColour(false)}OFF [#FFFFFF]two-factor authentication for login.`);
messagePlayerAlert(client, "You won't be required to enter a code sent to your email every time you log on anymore.");
- logToConsole(LOG_DEBUG, `[Asshat.Account] ${getPlayerDisplayForConsole(client)} has toggled two-factor authentication OFF for their account`);
+ logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} has toggled two-factor authentication OFF for their account`);
}
return true;
}
@@ -486,24 +486,24 @@ function saltAccountInfo(name, password) {
// ===========================================================================
function loginSuccess(client) {
- logToConsole(LOG_DEBUG, `[Asshat.Account] ${getPlayerDisplayForConsole(client)} successfully logged in.`);
+ logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} successfully logged in.`);
getPlayerData(client).loggedIn = true;
updateConnectionLogOnAuth(client, getPlayerData(client).accountData.databaseId);
if(doesPlayerHaveStaffPermission(client, "developer") || doesPlayerHaveStaffPermission(client, "manageServer")) {
- logToConsole(LOG_WARN, `[Asshat.Account] ${getPlayerDisplayForConsole(client)} has needed permissions and is being given administrator access`);
+ logToConsole(LOG_WARN, `[VRR.Account] ${getPlayerDisplayForConsole(client)} has needed permissions and is being given administrator access`);
client.administrator = true;
}
if(getPlayerData(client).subAccounts.length == 0) {
if(getServerConfig().useGUI && doesPlayerHaveGUIEnabled(client)) {
showPlayerPromptGUI(client, "You have no characters. Would you like to make one?", "No characters");
- getPlayerData(client).promptType = AG_PROMPT_CREATEFIRSTCHAR;
- logToConsole(LOG_DEBUG, `[Asshat.Account] ${getPlayerDisplayForConsole(client)} is being shown the no characters prompt GUI`);
+ getPlayerData(client).promptType = VRR_PROMPT_CREATEFIRSTCHAR;
+ logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the no characters prompt GUI`);
} else {
messagePlayerAlert(client, `You have no characters. Use /newchar to make one.`);
- logToConsole(LOG_DEBUG, `[Asshat.Account] ${getPlayerDisplayForConsole(client)} is being shown the no characters message (GUI disabled)`);
+ logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the no characters message (GUI disabled)`);
}
} else {
showCharacterSelectToClient(client);
@@ -671,7 +671,7 @@ function checkLogin(client, password) {
}
if(isPlayerLoggedIn(client)) {
- logToConsole(LOG_WARN, `[Asshat.Account] ${getPlayerDisplayForConsole(client)} attempted to login but is already logged in`);
+ logToConsole(LOG_WARN, `[VRR.Account] ${getPlayerDisplayForConsole(client)} attempted to login but is already logged in`);
if(getServerConfig().useGUI && doesPlayerHaveGUIEnabled(client)) {
sendPlayerLoginSuccess(client);
} else {
@@ -682,37 +682,37 @@ function checkLogin(client, password) {
}
if(!isPlayerRegistered(client)) {
- logToConsole(LOG_WARN, `[Asshat.Account] ${getPlayerDisplayForConsole(client)} attempted to login but is not registered`);
+ logToConsole(LOG_WARN, `[VRR.Account] ${getPlayerDisplayForConsole(client)} attempted to login but is not registered`);
if(getServerConfig().useGUI && doesPlayerHaveGUIEnabled(client)) {
showPlayerRegistratonGUI(client);
- logToConsole(LOG_DEBUG, `[Asshat.Account] ${getPlayerDisplayForConsole(client)} is being shown the register GUI`);
+ logToConsole(LOG_DEBUG, `[VRR.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, `[Asshat.Account] ${getPlayerDisplayForConsole(client)} is being shown the register message (GUI disabled)`);
+ logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the register message (GUI disabled)`);
}
return false;
}
if(areParamsEmpty(password)) {
- logToConsole(LOG_WARN, `[Asshat.Account] ${getPlayerDisplayForConsole(client)} attempted to login but failed (empty password). ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining`);
+ logToConsole(LOG_WARN, `[VRR.Account] ${getPlayerDisplayForConsole(client)} attempted to login but failed (empty password). ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining`);
if(getServerConfig().useGUI && doesPlayerHaveGUIEnabled(client)) {
showPlayerLoginFailedGUI(client, `Invalid password! ${getPlayerData(client).loginAttemptsRemaining} tries remaining.`);
- logToConsole(LOG_DEBUG, `[Asshat.Account] ${getPlayerDisplayForConsole(client)} is being shown the login GUI with ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining alert.`);
+ logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the login GUI with ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining alert.`);
} else {
messagePlayerError(client, `You must enter a password! ${getPlayerData(client).loginAttemptsRemaining} tries remaining.`);
- logToConsole(LOG_DEBUG, `[Asshat.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled) with ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining alert.`);
+ logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled) with ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining alert.`);
}
return false;
}
if(!isAccountPasswordCorrect(getPlayerData(client).accountData, hashAccountPassword(client.name, password))) {
- logToConsole(LOG_WARN, `[Asshat.Account] ${getPlayerDisplayForConsole(client)} attempted to login but failed (wrong password). ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining`);
+ logToConsole(LOG_WARN, `[VRR.Account] ${getPlayerDisplayForConsole(client)} attempted to login but failed (wrong password). ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining`);
if(getServerConfig().useGUI && doesPlayerHaveGUIEnabled(client)) {
showPlayerLoginFailedGUI(client, `Invalid password! ${getPlayerData(client).loginAttemptsRemaining} tries remaining.`);
- logToConsole(LOG_DEBUG, `[Asshat.Account] ${getPlayerDisplayForConsole(client)} is being shown the login GUI with ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining alert.`);
+ logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the login GUI with ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining alert.`);
} else {
messagePlayerError(client, `Invalid password! ${getPlayerData(client).loginAttemptsRemaining} tries remaining.`);
- logToConsole(LOG_DEBUG, `[Asshat.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled) with ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining alert.`);
+ logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled) with ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining alert.`);
}
return false;
}
@@ -727,7 +727,7 @@ function checkLogin(client, password) {
// ===========================================================================
function checkRegistration(client, password, confirmPassword = "", emailAddress = "") {
- logToConsole(LOG_DEBUG, "[Asshat.Account]: Checking registration for " + toString(client.name));
+ logToConsole(LOG_DEBUG, "[VRR.Account]: Checking registration for " + toString(client.name));
if(isPlayerRegistered(client)) {
if(getServerConfig().useGUI && doesPlayerHaveGUIEnabled(client)) {
@@ -816,7 +816,7 @@ function checkRegistration(client, password, confirmPassword = "", emailAddress
if(getServerConfig().useGUI && doesPlayerHaveGUIEnabled(client)) {
showPlayerRegistrationSuccessGUI(client);
showPlayerPromptGUI(client, "You have no characters. Would you like to make one?", "No Characters");
- getPlayerData(client).promptType = AG_PROMPT_CREATEFIRSTCHAR;
+ getPlayerData(client).promptType = VRR_PROMPT_CREATEFIRSTCHAR;
if(getEmailConfig().enabled) {
let emailVerificationCode = generateEmailVerificationCode();
@@ -837,11 +837,11 @@ function isValidEmailAddress(emailAddress) {
// ===========================================================================
function saveAllClientsToDatabase() {
- logToConsole(LOG_DEBUG, "[Asshat.Account]: Saving all clients to database ...");
+ logToConsole(LOG_DEBUG, "[VRR.Account]: Saving all clients to database ...");
getClients().forEach(function(client) {
savePlayerToDatabase(client);
});
- logToConsole(LOG_DEBUG, "[Asshat.Account]: All clients saved to database successfully!");
+ logToConsole(LOG_DEBUG, "[VRR.Account]: All clients saved to database successfully!");
}
// ===========================================================================
@@ -855,7 +855,7 @@ function savePlayerToDatabase(client) {
return false;
}
- logToConsole(LOG_DEBUG, `[Asshat.Account]: Saving client ${client.name} to database ...`);
+ logToConsole(LOG_DEBUG, `[VRR.Account]: Saving client ${client.name} to database ...`);
saveAccountToDatabase(getPlayerData(client).accountData);
if(getPlayerData(client).currentSubAccount != -1) {
@@ -877,7 +877,7 @@ function savePlayerToDatabase(client) {
saveSubAccountToDatabase(getPlayerCurrentSubAccount(client));
}
- logToConsole(LOG_DEBUG, `[Asshat.Account]: Saved client ${getPlayerDisplayForConsole(client)} to database successfully!`);
+ logToConsole(LOG_DEBUG, `[VRR.Account]: Saved client ${getPlayerDisplayForConsole(client)} to database successfully!`);
return true;
}
@@ -914,19 +914,19 @@ function initClient(client) {
loginSuccess(client);
} else {
if(getServerConfig().useGUI && doesPlayerHaveGUIEnabled(client)) {
- logToConsole(LOG_DEBUG, `[Asshat.Account] ${getPlayerDisplayForConsole(client)} is being shown the login GUI.`);
+ logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the login GUI.`);
showPlayerLoginGUI(client);
} else {
- logToConsole(LOG_DEBUG, `[Asshat.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled).`);
+ logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled).`);
messagePlayerNormal(client, `Welcome back to Asshat Gaming RP, ${client.name}! Please /login to continue.`, getColourByName("softGreen"));
}
}
} else {
if(getServerConfig().useGUI && doesPlayerHaveGUIEnabled(client)) {
- logToConsole(LOG_DEBUG, `[Asshat.Account] ${getPlayerDisplayForConsole(client)} is being shown the register GUI.`);
+ logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the register GUI.`);
showPlayerRegistrationGUI(client);
} else {
- logToConsole(LOG_DEBUG, `[Asshat.Account] ${getPlayerDisplayForConsole(client)} is being shown the register message (GUI disabled).`);
+ logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the register message (GUI disabled).`);
messagePlayerNormal(client, `Welcome to Asshat Gaming RP, ${client.name}! Please /register to continue.`, getColourByName("softGreen"));
}
}
@@ -949,18 +949,18 @@ function saveConnectionToDatabase(client) {
// ===========================================================================
function createDefaultKeybindsForAccount(accountDatabaseId) {
- logToConsole(LOG_DEBUG, `[Asshat.Account]: Creating default keybinds for account ${accountDatabaseId} ...`);
+ logToConsole(LOG_DEBUG, `[VRR.Account]: Creating default keybinds for account ${accountDatabaseId} ...`);
for(let j = 1 ; j <= 4 ; j++) {
- logToConsole(LOG_DEBUG, `[Asshat.Account]: Creating default keybinds for account ${accountDatabaseId} on server ${j} ...`);
+ logToConsole(LOG_DEBUG, `[VRR.Account]: Creating default keybinds for account ${accountDatabaseId} on server ${j} ...`);
for(let i in getGlobalConfig().keyBind.defaultKeyBinds) {
- logToConsole(LOG_DEBUG, `[Asshat.Account]: Creating default keybind ${i} for account ${accountDatabaseId} on server ${j} with key ${sdl.getKeyFromName(getGlobalConfig().keyBind.defaultKeyBinds[i].keyName.toLowerCase())} ...`);
+ logToConsole(LOG_DEBUG, `[VRR.Account]: Creating default keybind ${i} for account ${accountDatabaseId} on server ${j} with key ${sdl.getKeyFromName(getGlobalConfig().keyBind.defaultKeyBinds[i].keyName.toLowerCase())} ...`);
let dbQueryString = `INSERT INTO acct_hotkey (acct_hotkey_acct, acct_hotkey_server, acct_hotkey_key, acct_hotkey_cmdstr, acct_hotkey_when_added, acct_hotkey_down) VALUES (${accountDatabaseId}, ${j}, ${sdl.getKeyFromName(getGlobalConfig().keyBind.defaultKeyBinds[i].keyName.toLowerCase())}, '${getGlobalConfig().keyBind.defaultKeyBinds[i].commandString}', UNIX_TIMESTAMP(), ${getGlobalConfig().keyBind.defaultKeyBinds[i].keyState})`;
quickDatabaseQuery(dbQueryString);
- logToConsole(LOG_DEBUG, `[Asshat.Account]: Created default keybind ${i} for account ${accountDatabaseId} on server ${j} with key ${sdl.getKeyFromName(getGlobalConfig().keyBind.defaultKeyBinds[i].keyName.toLowerCase())}!`);
+ logToConsole(LOG_DEBUG, `[VRR.Account]: Created default keybind ${i} for account ${accountDatabaseId} on server ${j} with key ${sdl.getKeyFromName(getGlobalConfig().keyBind.defaultKeyBinds[i].keyName.toLowerCase())}!`);
}
- logToConsole(LOG_DEBUG, `[Asshat.Account]: Create default keybinds for account ${accountDatabaseId} on server ${j}!`);
+ logToConsole(LOG_DEBUG, `[VRR.Account]: Create default keybinds for account ${accountDatabaseId} on server ${j}!`);
}
- logToConsole(LOG_DEBUG, `[Asshat.Account]: Created default keybinds for account ${accountDatabaseId} successfully!`);
+ logToConsole(LOG_DEBUG, `[VRR.Account]: Created default keybinds for account ${accountDatabaseId} successfully!`);
}
// ===========================================================================
@@ -975,7 +975,7 @@ function createDefaultAccountServerData(accountDatabaseId) {
// ===========================================================================
function loadAccountKeybindsFromDatabase(accountDatabaseID) {
- logToConsole(LOG_DEBUG, `[Asshat.Account]: Loading account keybinds for account ${accountDatabaseID} from database ...`);
+ logToConsole(LOG_DEBUG, `[VRR.Account]: Loading account keybinds for account ${accountDatabaseID} from database ...`);
let tempAccountKeybinds = [];
let dbConnection = connectToDatabase();
@@ -989,7 +989,7 @@ function loadAccountKeybindsFromDatabase(accountDatabaseID) {
while(dbAssoc = fetchQueryAssoc(dbQuery)) {
let tempAccountKeyBindData = new serverClasses.keyBindData(dbAssoc);
tempAccountKeybinds.push(tempAccountKeyBindData);
- logToConsole(LOG_DEBUG, `[Asshat.Account]: Account keybind '${tempAccountKeyBindData.databaseId}' (Key ${tempAccountKeyBindData.key} '${sdl.getKeyName(tempAccountKeyBindData.key)}') loaded from database successfully!`);
+ logToConsole(LOG_DEBUG, `[VRR.Account]: Account keybind '${tempAccountKeyBindData.databaseId}' (Key ${tempAccountKeyBindData.key} '${sdl.getKeyName(tempAccountKeyBindData.key)}') loaded from database successfully!`);
}
}
freeDatabaseQuery(dbQuery);
@@ -997,14 +997,14 @@ function loadAccountKeybindsFromDatabase(accountDatabaseID) {
disconnectFromDatabase(dbConnection);
}
- logToConsole(LOG_DEBUG, `[Asshat.Account]: ${tempAccountKeybinds.length} account keybinds for account ${accountDatabaseID} loaded from database successfully!`);
+ logToConsole(LOG_DEBUG, `[VRR.Account]: ${tempAccountKeybinds.length} account keybinds for account ${accountDatabaseID} loaded from database successfully!`);
return tempAccountKeybinds;
}
// ===========================================================================
function loadAccountStaffNotesFromDatabase(accountDatabaseID) {
- logToConsole(LOG_DEBUG, `[Asshat.Account]: Loading account staff notes for account ${accountDatabaseID} from database ...`);
+ logToConsole(LOG_DEBUG, `[VRR.Account]: Loading account staff notes for account ${accountDatabaseID} from database ...`);
let tempAccountStaffNotes = [];
let dbConnection = connectToDatabase();
@@ -1018,7 +1018,7 @@ function loadAccountStaffNotesFromDatabase(accountDatabaseID) {
while(dbAssoc = fetchQueryAssoc(dbQuery)) {
let tempAccountStaffNoteData = new serverClasses.accountStaffNoteData(dbAssoc);
tempAccountStaffNotes.push(tempAccountStaffNoteData);
- logToConsole(LOG_DEBUG, `[Asshat.Account]: Account staff note '${tempAccountStaffNoteData.databaseId}' loaded from database successfully!`);
+ logToConsole(LOG_DEBUG, `[VRR.Account]: Account staff note '${tempAccountStaffNoteData.databaseId}' loaded from database successfully!`);
}
}
freeDatabaseQuery(dbQuery);
@@ -1026,14 +1026,14 @@ function loadAccountStaffNotesFromDatabase(accountDatabaseID) {
disconnectFromDatabase(dbConnection);
}
- logToConsole(LOG_DEBUG, `[Asshat.Account]: ${tempAccountStaffNotes.length} account staff notes for account ${accountDatabaseID} loaded from database successfully!`);
+ logToConsole(LOG_DEBUG, `[VRR.Account]: ${tempAccountStaffNotes.length} account staff notes for account ${accountDatabaseID} loaded from database successfully!`);
return tempAccountStaffNotes;
}
// ===========================================================================
function loadAccountContactsFromDatabase(accountDatabaseID) {
- logToConsole(LOG_DEBUG, `[Asshat.Account]: Loading account contacts for account ${accountDatabaseID} from database ...`);
+ logToConsole(LOG_DEBUG, `[VRR.Account]: Loading account contacts for account ${accountDatabaseID} from database ...`);
let tempAccountContacts = [];
let dbConnection = connectToDatabase();
@@ -1047,7 +1047,7 @@ function loadAccountContactsFromDatabase(accountDatabaseID) {
while(dbAssoc = fetchQueryAssoc(dbQuery)) {
let tempAccountContactData = new serverClasses.accountContactData(dbAssoc);
tempAccountContacts.push(tempAccountContactData);
- logToConsole(LOG_DEBUG, `[Asshat.Account]: Account contact '${tempAccountContactData.databaseId}' loaded from database successfully!`);
+ logToConsole(LOG_DEBUG, `[VRR.Account]: Account contact '${tempAccountContactData.databaseId}' loaded from database successfully!`);
}
}
freeDatabaseQuery(dbQuery);
@@ -1055,14 +1055,14 @@ function loadAccountContactsFromDatabase(accountDatabaseID) {
disconnectFromDatabase(dbConnection);
}
- logToConsole(LOG_DEBUG, `[Asshat.Account]: ${tempAccountContacts.length} account contacts for account ${accountDatabaseID} loaded from database successfully!`);
+ logToConsole(LOG_DEBUG, `[VRR.Account]: ${tempAccountContacts.length} account contacts for account ${accountDatabaseID} loaded from database successfully!`);
return tempAccountContacts;
}
// ===========================================================================
function loadAccountMessagesFromDatabase(accountDatabaseID) {
- logToConsole(LOG_DEBUG, `[Asshat.Account]: Loading account messages for account ${accountDatabaseID} from database ...`);
+ logToConsole(LOG_DEBUG, `[VRR.Account]: Loading account messages for account ${accountDatabaseID} from database ...`);
let tempAccountMessages = [];
let dbConnection = connectToDatabase();
@@ -1076,7 +1076,7 @@ function loadAccountMessagesFromDatabase(accountDatabaseID) {
while(dbAssoc = fetchQueryAssoc(dbQuery)) {
let tempAccountMessageData = new serverClasses.accountContactData(dbAssoc);
tempAccountMessages.push(tempAccountMessageData);
- logToConsole(LOG_DEBUG, `[Asshat.Account]: Account contact '${tempAccountMessageData.databaseId}' loaded from database successfully!`);
+ logToConsole(LOG_DEBUG, `[VRR.Account]: Account contact '${tempAccountMessageData.databaseId}' loaded from database successfully!`);
}
}
freeDatabaseQuery(dbQuery);
@@ -1084,7 +1084,7 @@ function loadAccountMessagesFromDatabase(accountDatabaseID) {
disconnectFromDatabase(dbConnection);
}
- logToConsole(LOG_DEBUG, `[Asshat.Account]: ${tempAccountMessages.length} account messages for account ${accountDatabaseID} loaded from database successfully!`);
+ logToConsole(LOG_DEBUG, `[VRR.Account]: ${tempAccountMessages.length} account messages for account ${accountDatabaseID} loaded from database successfully!`);
return tempAccountMessages;
}
diff --git a/scripts/server/anticheat.js b/scripts/server/anticheat.js
index 9b9a055d..2c7453ed 100644
--- a/scripts/server/anticheat.js
+++ b/scripts/server/anticheat.js
@@ -8,15 +8,15 @@
// ===========================================================================
function initAntiCheatScript() {
- logToConsole(LOG_DEBUG, "[Asshat.AntiCheat]: Initializing anticheat script ...");
+ logToConsole(LOG_DEBUG, "[VRR.AntiCheat]: Initializing anticheat script ...");
getServerData().antiCheat.whiteListedGameScripts = loadAntiCheatGameScriptWhiteListFromDatabase();
getServerData().antiCheat.blackListedGameScripts = loadAntiCheatGameScriptBlackListFromDatabase();
- logToConsole(LOG_DEBUG, "[Asshat.AntiCheat]: Anticheat script initialized!");
+ logToConsole(LOG_DEBUG, "[VRR.AntiCheat]: Anticheat script initialized!");
}
// ===========================================================================
function loadAntiCheatGameScriptWhiteListFromDatabase() {
- logToConsole(LOG_DEBUG, `[Asshat.AntiCheat] Loading whitelisted game scripts ...`);
+ logToConsole(LOG_DEBUG, `[VRR.AntiCheat] Loading whitelisted game scripts ...`);
let dbConnection = connectToDatabase();
let tempWhiteListedGameScripts = [];
@@ -28,19 +28,19 @@ function loadAntiCheatGameScriptWhiteListFromDatabase() {
let dbAssoc = fetchQueryAssoc(dbQuery);
let tempWhiteListedGameScriptData = new serverClasses.whiteListedGameScriptData(dbAssoc);
tempWhiteListedGameScripts.push(tempWhiteListedGameScriptData);
- logToConsole(LOG_DEBUG, `[Asshat.AntiCheat] Whitelisted game script '${tempWhiteListedGameScriptData.scriptName}' loaded successfully!`);
+ logToConsole(LOG_DEBUG, `[VRR.AntiCheat] Whitelisted game script '${tempWhiteListedGameScriptData.scriptName}' loaded successfully!`);
}
}
disconnectFromDatabase(dbConnection);
}
- logToConsole(LOG_DEBUG, `[Asshat.AntiCheat] ${tempWhiteListedGameScripts.length} whitelisted game scripts loaded!`);
+ logToConsole(LOG_DEBUG, `[VRR.AntiCheat] ${tempWhiteListedGameScripts.length} whitelisted game scripts loaded!`);
return tempWhiteListedGameScripts;
}
// ===========================================================================
function loadAntiCheatGameScriptBlackListFromDatabase() {
- logToConsole(LOG_DEBUG, `[Asshat.AntiCheat] Loading blacklisted game scripts ...`);
+ logToConsole(LOG_DEBUG, `[VRR.AntiCheat] Loading blacklisted game scripts ...`);
let dbConnection = connectToDatabase();
let tempBlackListedGameScripts = [];
@@ -52,22 +52,22 @@ function loadAntiCheatGameScriptBlackListFromDatabase() {
let dbAssoc = fetchQueryAssoc(dbQuery);
let tempBlackListedGameScriptData = new serverClasses.blackListedGameScriptData(dbAssoc);
tempBlackListedGameScripts.push(tempBlackListedGameScriptData);
- logToConsole(LOG_DEBUG, `[Asshat.AntiCheat] Blacklisted game script '${tempBlackListedGameScriptData.scriptName}' loaded successfully!`);
+ logToConsole(LOG_DEBUG, `[VRR.AntiCheat] Blacklisted game script '${tempBlackListedGameScriptData.scriptName}' loaded successfully!`);
}
}
disconnectFromDatabase(dbConnection);
}
- logToConsole(LOG_DEBUG, `[Asshat.AntiCheat] ${tempBlackListedGameScripts.length} blacklisted game scripts loaded!`);
+ logToConsole(LOG_DEBUG, `[VRR.AntiCheat] ${tempBlackListedGameScripts.length} blacklisted game scripts loaded!`);
return tempBlackListedGameScripts;
}
// ===========================================================================
function clearPlayerStateToEnterExitProperty(client) {
- if(getPlayerData(client).pedState != AG_PEDSTATE_READY) {
- if(getPlayerData(client).pedState == AG_PEDSTATE_ENTERINGVEHICLE) {
+ if(getPlayerData(client).pedState != VRR_PEDSTATE_READY) {
+ if(getPlayerData(client).pedState == VRR_PEDSTATE_ENTERINGVEHICLE) {
sendPlayerClearPedState(client);
- getPlayerData(client).pedState = AG_PEDSTATE_READY;
+ getPlayerData(client).pedState = VRR_PEDSTATE_READY;
} else {
return false;
}
diff --git a/scripts/server/ban.js b/scripts/server/ban.js
index f45fe0bf..f8ac2942 100644
--- a/scripts/server/ban.js
+++ b/scripts/server/ban.js
@@ -10,8 +10,8 @@
// ===========================================================================
function initBanScript() {
- logToConsole(LOG_INFO, "[Asshat.Ban]: Initializing ban script ...");
- logToConsole(LOG_INFO, "[Asshat.Ban]: Ban script initialized!");
+ logToConsole(LOG_INFO, "[VRR.Ban]: Initializing ban script ...");
+ logToConsole(LOG_INFO, "[VRR.Ban]: Ban script initialized!");
}
// ===========================================================================
@@ -32,7 +32,7 @@ function accountBanCommand(command, params, client) {
let targetClient = getPlayerFromParams(splitParams[0]);
let reason = splitParams.slice(1).join(" ");
- logToConsole(LOG_WARN, `[Asshat.Ban]: ${getPlayerDisplayForConsole(targetClient)} (${getPlayerData(targetClient).accountData.name}) account was banned by ${getPlayerDisplayForConsole(client)}. Reason: ${reason}`);
+ logToConsole(LOG_WARN, `[VRR.Ban]: ${getPlayerDisplayForConsole(targetClient)} (${getPlayerData(targetClient).accountData.name}) account was banned by ${getPlayerDisplayForConsole(client)}. Reason: ${reason}`);
messageAdminAction(`${getPlayerDisplayForConsole(targetClient)} (${getPlayerData(targetClient).accountData.name}) has been account banned.`);
banAccount(getPlayerData(targetClient).accountData.databaseId, getPlayerData(client).accountData.databaseId, reason);
@@ -57,7 +57,7 @@ function subAccountBanCommand(command, params, client, fromDiscord) {
let targetClient = getPlayerFromParams(splitParams[0]);
let reason = splitParams.slice(1).join(" ");
- logToConsole(LOG_WARN, `[Asshat.Ban]: ${getPlayerDisplayForConsole(targetClient)} (${getPlayerData(targetClient).accountData.name})'s subaccount was banned by ${getPlayerDisplayForConsole(client)}. Reason: ${reason}`);
+ logToConsole(LOG_WARN, `[VRR.Ban]: ${getPlayerDisplayForConsole(targetClient)} (${getPlayerData(targetClient).accountData.name})'s subaccount was banned by ${getPlayerDisplayForConsole(client)}. Reason: ${reason}`);
messageAdminAction(`${getPlayerData(targetClient).currentSubAccountData.name} has been character banned.`);
banSubAccount(getPlayerData(targetClient).currentSubAccountData.databaseId, getPlayerData(client).accountData.databaseId, reason);
@@ -117,7 +117,7 @@ function banAccount(accountId, adminAccountId, reason) {
let dbConnection = connectToDatabase();
if(dbConnection) {
let safeReason = dbConnection.escapetoString(reason);
- let dbQuery = queryDatabase(dbConnection, `INSERT INTO ban_main (ban_type, ban_detail, ban_who_banned, ban_reason) VALUES (${AG_BANTYPE_ACCOUNT}, ${accountId}, ${adminAccountId}, '${safeReason}');`);
+ let dbQuery = queryDatabase(dbConnection, `INSERT INTO ban_main (ban_type, ban_detail, ban_who_banned, ban_reason) VALUES (${VRR_BANTYPE_ACCOUNT}, ${accountId}, ${adminAccountId}, '${safeReason}');`);
freeDatabaseQuery(dbQuery);
dbConnection.close();
return true;
@@ -132,7 +132,7 @@ function banSubAccount(subAccountId, adminAccountId, reason) {
let dbConnection = connectToDatabase();
if(dbConnection) {
let safeReason = dbConnection.escapetoString(reason);
- let dbQuery = queryDatabase(dbConnection, `INSERT INTO ban_main (ban_type, ban_detail, ban_who_banned, ban_reason) VALUES (${AG_BANTYPE_SUBACCOUNT}, ${subAccountId}, ${adminAccountId}, '${safeReason}');`);
+ let dbQuery = queryDatabase(dbConnection, `INSERT INTO ban_main (ban_type, ban_detail, ban_who_banned, ban_reason) VALUES (${VRR_BANTYPE_SUBACCOUNT}, ${subAccountId}, ${adminAccountId}, '${safeReason}');`);
freeDatabaseQuery(dbQuery);
dbConnection.close();
return true;
@@ -147,7 +147,7 @@ function banIPAddress(ipAddress, adminAccountId, reason) {
let dbConnection = connectToDatabase();
if(dbConnection) {
let safeReason = dbConnection.escapetoString(reason);
- let dbQuery = queryDatabase(dbConnection, `INSERT INTO ban_main (ban_type, ban_detail, ban_who_banned, ban_reason) VALUES (${AG_BANTYPE_IPADDRESS}, INET_ATON(${ipAddress}), ${adminAccountId}, '${safeReason}');`);
+ let dbQuery = queryDatabase(dbConnection, `INSERT INTO ban_main (ban_type, ban_detail, ban_who_banned, ban_reason) VALUES (${VRR_BANTYPE_IPADDRESS}, INET_ATON(${ipAddress}), ${adminAccountId}, '${safeReason}');`);
freeDatabaseQuery(dbQuery);
dbConnection.close();
return true;
@@ -162,7 +162,7 @@ function banSubNet(ipAddressStart, ipAddressEnd, adminAccountId, reason) {
let dbConnection = connectToDatabase();
if(dbConnection) {
let safeReason = dbConnection.escapetoString(reason);
- let dbQuery = queryDatabase(dbConnection, `INSERT INTO ban_main (ban_type, ban_ip_start, ban_ip_end, ban_who_banned, ban_reason) VALUES (${AG_BANTYPE_SUBNET}, INET_ATON(${ipAddressStart}), INET_ATON(${ipAddressEnd}), ${adminAccountId}, '${safeReason}');`);
+ let dbQuery = queryDatabase(dbConnection, `INSERT INTO ban_main (ban_type, ban_ip_start, ban_ip_end, ban_who_banned, ban_reason) VALUES (${VRR_BANTYPE_SUBNET}, INET_ATON(${ipAddressStart}), INET_ATON(${ipAddressEnd}), ${adminAccountId}, '${safeReason}');`);
freeDatabaseQuery(dbQuery);
dbConnection.close();
return true;
@@ -176,7 +176,7 @@ function banSubNet(ipAddressStart, ipAddressEnd, adminAccountId, reason) {
function unbanAccount(accountId, adminAccountId) {
let dbConnection = connectToDatabase();
if(dbConnection) {
- let dbQuery = queryDatabase(dbConnection, `UPDATE ban_main SET ban_who_removed=${adminAccountId}, ban_removed=1 WHERE ban_type=${AG_BANTYPE_ACCOUNT} AND ban_detail=${accountId}`);
+ let dbQuery = queryDatabase(dbConnection, `UPDATE ban_main SET ban_who_removed=${adminAccountId}, ban_removed=1 WHERE ban_type=${VRR_BANTYPE_ACCOUNT} AND ban_detail=${accountId}`);
freeDatabaseQuery(dbQuery);
dbConnection.close();
return true;
@@ -190,7 +190,7 @@ function unbanAccount(accountId, adminAccountId) {
function unbanSubAccount(subAccountId, adminAccountId) {
let dbConnection = connectToDatabase();
if(dbConnection) {
- let dbQuery = queryDatabase(dbConnection, `UPDATE ban_main SET ban_who_removed=${adminAccountId}, ban_removed=1 WHERE ban_type=${AG_BANTYPE_SUBACCOUNT} AND ban_detail=${subAccountId}`);
+ let dbQuery = queryDatabase(dbConnection, `UPDATE ban_main SET ban_who_removed=${adminAccountId}, ban_removed=1 WHERE ban_type=${VRR_BANTYPE_SUBACCOUNT} AND ban_detail=${subAccountId}`);
freeDatabaseQuery(dbQuery);
dbConnection.close();
return true;
@@ -204,7 +204,7 @@ function unbanSubAccount(subAccountId, adminAccountId) {
function unbanIPAddress(ipAddress, adminAccountId) {
let dbConnection = connectToDatabase();
if(dbConnection) {
- let dbQuery = queryDatabase(dbConnection, `UPDATE ban_main SET ban_who_removed=${adminAccountId}, ban_removed=1 WHERE ban_type=${AG_BANTYPE_IPADDRESS} AND ban_detail=INET_ATON(${ipAddress})`);
+ let dbQuery = queryDatabase(dbConnection, `UPDATE ban_main SET ban_who_removed=${adminAccountId}, ban_removed=1 WHERE ban_type=${VRR_BANTYPE_IPADDRESS} AND ban_detail=INET_ATON(${ipAddress})`);
freeDatabaseQuery(dbQuery);
dbConnection.close();
return true;
@@ -218,7 +218,7 @@ function unbanIPAddress(ipAddress, adminAccountId) {
function unbanSubNet(ipAddressStart, ipAddressEnd, adminAccountId) {
let dbConnection = connectToDatabase();
if(dbConnection) {
- let dbQuery = queryDatabase(dbConnection, `UPDATE ban_main SET ban_who_removed=${adminAccountId}, ban_removed=1 WHERE ban_type=${AG_BANTYPE_SUBNET} AND ban_ip_start=INET_ATON(${ipAddressStart}) AND ban_ip_end=INET_ATON(${ipAddressEnd})`);
+ let dbQuery = queryDatabase(dbConnection, `UPDATE ban_main SET ban_who_removed=${adminAccountId}, ban_removed=1 WHERE ban_type=${VRR_BANTYPE_SUBNET} AND ban_ip_start=INET_ATON(${ipAddressStart}) AND ban_ip_end=INET_ATON(${ipAddressEnd})`);
freeDatabaseQuery(dbQuery);
dbConnection.close();
return true;
@@ -232,7 +232,7 @@ function unbanSubNet(ipAddressStart, ipAddressEnd, adminAccountId) {
function isAccountBanned(accountId) {
let bans = getServerData().bans;
for(let i in bans) {
- if(bans[i].type == AG_BANTYPE_ACCOUNT) {
+ if(bans[i].type == VRR_BANTYPE_ACCOUNT) {
if(bans[i].detail == accountId) {
return true;
}
@@ -247,7 +247,7 @@ function isAccountBanned(accountId) {
function isSubAccountBanned(subAccountId) {
let bans = getServerData().bans;
for(let i in bans) {
- if(bans[i].type == AG_BANTYPE_SUBACCOUNT) {
+ if(bans[i].type == VRR_BANTYPE_SUBACCOUNT) {
if(bans[i].detail == subAccountId) {
return true;
}
@@ -262,7 +262,7 @@ function isSubAccountBanned(subAccountId) {
function isIpAddressBanned(ipAddress) {
let bans = getServerData().bans;
for(let i in bans) {
- if(bans[i].type == AG_BANTYPE_IPADDRESS) {
+ if(bans[i].type == VRR_BANTYPE_IPADDRESS) {
if(bans[i].detail == ipAddress) {
return true;
}
diff --git a/scripts/server/bitflag.js b/scripts/server/bitflag.js
index 4fa11868..5e3b6f7c 100644
--- a/scripts/server/bitflag.js
+++ b/scripts/server/bitflag.js
@@ -224,7 +224,7 @@ let serverBitFlagKeys = {
// ===========================================================================
function initBitFlagScript() {
- logToConsole(LOG_INFO, "[Asshat.BitFlag]: Initializing bit flag script ...");
+ logToConsole(LOG_INFO, "[VRR.BitFlag]: Initializing bit flag script ...");
serverBitFlags.staffFlags = createBitFlagTable(serverBitFlagKeys.staffFlagKeys);
serverBitFlags.moderationFlags = createBitFlagTable(serverBitFlagKeys.moderationFlagKeys);
serverBitFlags.accountSettingsFlags = createBitFlagTable(serverBitFlagKeys.accountSettingsFlagKeys);
@@ -235,7 +235,7 @@ function initBitFlagScript() {
serverBitFlags.npcTriggerTypes = createBitFlagTable(serverBitFlagKeys.npcTriggerTypeKeys);
serverBitFlags.npcTriggerConditionTypes = createBitFlagTable(serverBitFlagKeys.npcTriggerConditionTypeKeys);
serverBitFlags.npcTriggerResponseTypes = createBitFlagTable(serverBitFlagKeys.npcTriggerResponseTypeKeys);
- logToConsole(LOG_INFO, "[Asshat.BitFlag]: Bit flag script initialized successfully!");
+ logToConsole(LOG_INFO, "[VRR.BitFlag]: Bit flag script initialized successfully!");
return true;
}
diff --git a/scripts/server/business.js b/scripts/server/business.js
index 6a7d1102..0336881b 100644
--- a/scripts/server/business.js
+++ b/scripts/server/business.js
@@ -8,7 +8,7 @@
// ===========================================================================
function initBusinessScript() {
- logToConsole(LOG_INFO, "[Asshat.Business]: Initializing business script ...");
+ logToConsole(LOG_INFO, "[VRR.Business]: Initializing business script ...");
getServerData().businesses = loadBusinessesFromDatabase();
cacheAllBusinessItems();
@@ -23,7 +23,7 @@ function initBusinessScript() {
setAllBusinessIndexes();
- logToConsole(LOG_INFO, "[Asshat.Business]: Business script initialized successfully!");
+ logToConsole(LOG_INFO, "[VRR.Business]: Business script initialized successfully!");
return true;
}
@@ -48,7 +48,7 @@ function loadBusinessFromId(businessId) {
// ===========================================================================
function loadBusinessesFromDatabase() {
- logToConsole(LOG_INFO, "[Asshat.Business]: Loading businesses from database ...");
+ logToConsole(LOG_INFO, "[VRR.Business]: Loading businesses from database ...");
let tempBusinesses = [];
let dbConnection = connectToDatabase();
@@ -63,7 +63,7 @@ function loadBusinessesFromDatabase() {
let tempBusinessData = new serverClasses.businessData(dbAssoc);
tempBusinessData.locations = loadBusinessLocationsFromDatabase(tempBusinessData.databaseId);
tempBusinesses.push(tempBusinessData);
- logToConsole(LOG_INFO, `[Asshat.Business]: Business '${tempBusinessData.name}' (ID ${tempBusinessData.databaseId}) loaded from database successfully!`);
+ logToConsole(LOG_INFO, `[VRR.Business]: Business '${tempBusinessData.name}' (ID ${tempBusinessData.databaseId}) loaded from database successfully!`);
}
}
freeDatabaseQuery(dbQuery);
@@ -71,14 +71,14 @@ function loadBusinessesFromDatabase() {
disconnectFromDatabase(dbConnection);
}
- logToConsole(LOG_INFO, `[Asshat.Business]: ${tempBusinesses.length} businesses loaded from database successfully!`);
+ logToConsole(LOG_INFO, `[VRR.Business]: ${tempBusinesses.length} businesses loaded from database successfully!`);
return tempBusinesses;
}
// ===========================================================================
function loadBusinessLocationsFromDatabase(businessId) {
- logToConsole(LOG_VERBOSE, `[Asshat.Business]: Loading business locations for business ${businessId} from database ...`);
+ logToConsole(LOG_VERBOSE, `[VRR.Business]: Loading business locations for business ${businessId} from database ...`);
let tempBusinessLocations = [];
let dbConnection = connectToDatabase();
@@ -94,7 +94,7 @@ function loadBusinessLocationsFromDatabase(businessId) {
while(dbAssoc = fetchQueryAssoc(dbQuery)) {
let tempBusinessLocationData = new serverClasses.businessLocationData(dbAssoc);
tempBusinessLocations.push(tempBusinessLocationData);
- logToConsole(LOG_VERBOSE, `[Asshat.Business]: Location '${tempBusinessLocationData.name}' loaded from database successfully!`);
+ logToConsole(LOG_VERBOSE, `[VRR.Business]: Location '${tempBusinessLocationData.name}' loaded from database successfully!`);
}
}
freeDatabaseQuery(dbQuery);
@@ -102,7 +102,7 @@ function loadBusinessLocationsFromDatabase(businessId) {
disconnectFromDatabase(dbConnection);
}
- logToConsole(LOG_VERBOSE, `[Asshat.Business]: ${tempBusinessLocations.length} location for business ${businessId} loaded from database successfully!`);
+ logToConsole(LOG_VERBOSE, `[VRR.Business]: ${tempBusinessLocations.length} location for business ${businessId} loaded from database successfully!`);
return tempBusinessLocations;
}
@@ -231,7 +231,7 @@ function setBusinessOwnerCommand(command, params, client) {
return false;
}
- getBusinessData(businessId).ownerType = AG_BIZOWNER_PLAYER;
+ getBusinessData(businessId).ownerType = VRR_BIZOWNER_PLAYER;
getBusinessData(businessId).ownerId = getServerData().clients[newBusinessOwner.index].accountData.databaseId;
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set business [#0099FF]${getBusinessData(businessId).name} [#FFFFFF]owner to [#AAAAAA]${newBusinessOwner.name}`);
}
@@ -252,7 +252,7 @@ function setBusinessClanCommand(command, params, client) {
return false;
}
- getBusinessData(businessId).ownerType = AG_BIZOWNER_CLAN;
+ getBusinessData(businessId).ownerType = VRR_BIZOWNER_CLAN;
getBusinessData(businessId).ownerId = getClanData(clanId).databaseId;
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set business [#0099FF]${getBusinessData(businessId).name} [#FFFFFF]owner to the [#FF9900]${getClanData(clanId).name} [#FFFFFF]clan`);
}
@@ -283,7 +283,7 @@ function setBusinessJobCommand(command, params, client) {
return false;
}
- getBusinessData(businessId).ownerType = AG_BIZOWNER_JOB;
+ getBusinessData(businessId).ownerType = VRR_BIZOWNER_JOB;
getBusinessData(businessId).ownerId = getJobData(jobId).databaseId;
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set business [#0099FF]${getBusinessData(businessId).name} [#FFFFFF]owner to the [#FFFF00]${getJobData(jobId).name} [#FFFFFF]job`);
}
@@ -302,7 +302,7 @@ function setBusinessPublicCommand(command, params, client) {
return false;
}
- getBusinessData(businessId).ownerType = AG_BIZOWNER_PUBLIC;
+ getBusinessData(businessId).ownerType = VRR_BIZOWNER_PUBLIC;
getBusinessData(businessId).ownerId = 0;
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set business [#0099FF]${getBusinessData(businessId).name} [#FFFFFF]owner set to [#AAAAAA]public`);
}
@@ -358,24 +358,24 @@ function getBusinessInfoCommand(command, params, client) {
let ownerName = "Unknown";
switch(getBusinessData(businessId).ownerType) {
- case AG_BIZOWNER_CLAN:
+ case VRR_BIZOWNER_CLAN:
ownerName = getClanData(getBusinessData(businessId).ownerId).name;
break;
- case AG_BIZOWNER_JOB:
+ case VRR_BIZOWNER_JOB:
ownerName = getJobData(getBusinessData(businessId).ownerId).name;
break;
- case AG_BIZOWNER_PLAYER:
+ case VRR_BIZOWNER_PLAYER:
let subAccountData = loadSubAccountFromId(getBusinessData(businessId).ownerId);
ownerName = `${subAccountData.firstName} ${subAccountData.lastName} [${subAccountData.databaseId}]`;
break;
- case AG_BIZOWNER_NONE:
+ case VRR_BIZOWNER_NONE:
ownerName = "None";
break;
- case AG_BIZOWNER_PUBLIC:
+ case VRR_BIZOWNER_PUBLIC:
ownerName = "Public";
break;
}
@@ -523,7 +523,7 @@ function giveDefaultItemsToBusinessCommand(command, params, client) {
let itemTypeId = getItemTypeFromParams(getGameConfig().defaultBusinessItems[getServerGame()][typeParam][i][0]);
let itemTypeData = getItemTypeData(itemTypeId);
if(itemTypeData) {
- let newItemIndex = createItem(itemTypeId, itemTypeData.orderValue, AG_ITEM_OWNER_BIZFLOOR, getBusinessData(businessId).databaseId, getGameConfig().defaultBusinessItems[getServerGame()][typeParam][i][1]);
+ let newItemIndex = createItem(itemTypeId, itemTypeData.orderValue, VRR_ITEM_OWNER_BIZFLOOR, getBusinessData(businessId).databaseId, getGameConfig().defaultBusinessItems[getServerGame()][typeParam][i][1]);
getItemData(newItemIndex).buyPrice = applyServerInflationMultiplier(itemTypeData.orderPrice)*getGameConfig().defaultBusinessItems[getServerGame()][typeParam][i][2];
}
}
@@ -690,7 +690,7 @@ function orderItemForBusinessCommand(command, params, client) {
let value = toInteger(splitParams.slice(-1)) || getItemTypeData(itemType).capacity;
let businessId = (isPlayerInAnyBusiness(client)) ? getPlayerBusiness(client) : getClosestBusinessEntrance(getPlayerPosition(client));
- logToConsole(LOG_DEBUG, `[Asshat.Business] ${getPlayerDisplayForConsole(client)} is ordering ${amount} ${splitParams.slice(0,-2).join(" ")} (${value})`);
+ logToConsole(LOG_DEBUG, `[VRR.Business] ${getPlayerDisplayForConsole(client)} is ordering ${amount} ${splitParams.slice(0,-2).join(" ")} (${value})`);
if(!getBusinessData(businessId)) {
messagePlayerError(client, "You must be inside or near a business door!");
@@ -699,14 +699,14 @@ function orderItemForBusinessCommand(command, params, client) {
let orderTotalCost = pricePerItem*amount;
- //getPlayerData(client).promptType = AG_PROMPT_BIZORDER;
+ //getPlayerData(client).promptType = VRR_PROMPT_BIZORDER;
getPlayerData(client).businessOrderAmount = amount;
getPlayerData(client).businessOrderBusiness = businessId;
getPlayerData(client).businessOrderItem = itemType;
getPlayerData(client).businessOrderValue = value;
getPlayerData(client).businessOrderCost = orderTotalCost;
- showPlayerPrompt(client, AG_PROMPT_BIZORDER, `Ordering ${amount} ${getPluralForm(getItemTypeData(itemType).name)} (${getItemValueDisplay(itemType, value)}) at $${makeLargeNumberReadable(pricePerItem)} each will cost a total of $${makeLargeNumberReadable(orderTotalCost)}`, "Business Order Cost");
+ showPlayerPrompt(client, VRR_PROMPT_BIZORDER, `Ordering ${amount} ${getPluralForm(getItemTypeData(itemType).name)} (${getItemValueDisplay(itemType, value)}) at $${makeLargeNumberReadable(pricePerItem)} each will cost a total of $${makeLargeNumberReadable(orderTotalCost)}`, "Business Order Cost");
}
// ===========================================================================
@@ -760,7 +760,7 @@ function buyBusinessCommand(command, params, client) {
return false;
}
- getBusinessData(client).ownerType = AG_BIZOWNER_PLAYER;
+ getBusinessData(client).ownerType = VRR_BIZOWNER_PLAYER;
getBusinessData(client).ownerId = getPlayerCurrentSubAccount(client).databaseId;
getBusinessData(client).buyPrice = 0;
@@ -879,7 +879,7 @@ function saveAllBusinessesToDatabase() {
function saveBusinessToDatabase(businessId) {
let tempBusinessData = getServerData().businesses[businessId]
- logToConsole(LOG_DEBUG, `[Asshat.Business]: Saving business '${tempBusinessData.name}' to database ...`);
+ logToConsole(LOG_DEBUG, `[VRR.Business]: Saving business '${tempBusinessData.name}' to database ...`);
let dbConnection = connectToDatabase();
if(dbConnection) {
let safeBusinessName = escapeDatabaseString(dbConnection, tempBusinessData.name);
@@ -976,7 +976,7 @@ function saveBusinessToDatabase(businessId) {
disconnectFromDatabase(dbConnection);
return true;
}
- logToConsole(LOG_DEBUG, `[Asshat.Business]: Saved business '${tempBusinessData.name}' to database!`);
+ logToConsole(LOG_DEBUG, `[VRR.Business]: Saved business '${tempBusinessData.name}' to database!`);
return false;
}
@@ -1030,7 +1030,7 @@ function createBusinessLocationEntranceBlip(businessId, locationId) {
getBusinessData(businessId).locations[locationId].entranceBlip = gta.createBlip(getBusinessData(businessId).locations[locationId].entrancePosition, blipModelId, 1, getColourByName("businessBlue"));
getBusinessData(businessId).locations[locationId].entranceBlip.onAllDimensions = false;
getBusinessData(businessId).locations[locationId].entranceBlip.dimension = getBusinessData(businessId).locations[locationId].entranceDimension;
- getBusinessData(businessId).locations[locationId].entranceBlip.setData("ag.owner.type", AG_BLIP_BUSINESS_ENTRANCE, false);
+ getBusinessData(businessId).locations[locationId].entranceBlip.setData("ag.owner.type", VRR_BLIP_BUSINESS_ENTRANCE, false);
getBusinessData(businessId).locations[locationId].entranceBlip.setData("ag.owner.id", businessId, false);
addToWorld(getBusinessData(businessId).locations[locationId].entranceBlip);
}
@@ -1050,9 +1050,9 @@ function createBusinessLocationExitPickup(businessId, locationId) {
getBusinessData(businessId).locations[locationId].exitPickup = gta.createPickup(pickupModelId, getBusinessData(businessId).locations[locationId].exitPosition);
getBusinessData(businessId).locations[locationId].exitPickup.onAllDimensions = false;
getBusinessData(businessId).locations[locationId].exitPickup.dimension = getBusinessData(businessId).locations[locationId].exitDimension;
- getBusinessData(businessId).locations[locationId].exitPickup.setData("ag.owner.type", AG_PICKUP_BUSINESS_EXIT, false);
+ getBusinessData(businessId).locations[locationId].exitPickup.setData("ag.owner.type", VRR_PICKUP_BUSINESS_EXIT, false);
getBusinessData(businessId).locations[locationId].exitPickup.setData("ag.owner.id", businessId, false);
- getBusinessData(businessId).locations[locationId].exitPickup.setData("ag.label.type", AG_LABEL_EXIT, true);
+ getBusinessData(businessId).locations[locationId].exitPickup.setData("ag.label.type", VRR_LABEL_EXIT, true);
addToWorld(getBusinessData(businessId).locations[locationId].exitPickup);
}
}
@@ -1073,7 +1073,7 @@ function createBusinessLocationExitBlip(businessId, locationId) {
getBusinessData(businessId).locations[locationId].exitBlip.onAllDimensions = false;
getBusinessData(businessId).locations[locationId].exitBlip.dimension = getBusinessData(businessId).locations[locationId].entranceDimension;
//getBusinessData(businessId).exitBlip.interior = getBusinessData(businessId).exitInterior;
- getBusinessData(businessId).locations[locationId].exitBlip.setData("ag.owner.type", AG_BLIP_BUSINESS_EXIT, false);
+ getBusinessData(businessId).locations[locationId].exitBlip.setData("ag.owner.type", VRR_BLIP_BUSINESS_EXIT, false);
getBusinessData(businessId).locations[locationId].exitBlip.setData("ag.owner.id", businessId, false);
addToWorld(getBusinessData(businessId).locations[locationId].exitBlip);
}
@@ -1150,17 +1150,17 @@ function exitBusiness(client) {
function getBusinessOwnerTypeText(ownerType) {
switch(ownerType) {
- case AG_BIZOWNER_CLAN:
+ case VRR_BIZOWNER_CLAN:
return "clan";
- case AG_BIZOWNER_JOB:
+ case VRR_BIZOWNER_JOB:
return "job";
- case AG_BIZOWNER_PLAYER:
+ case VRR_BIZOWNER_PLAYER:
return "player";
- case AG_BIZOWNER_NONE:
- case AG_BIZOWNER_PUBLIC:
+ case VRR_BIZOWNER_NONE:
+ case VRR_BIZOWNER_PUBLIC:
return "not owned";
default:
@@ -1291,7 +1291,7 @@ function addToBusinessInventory(businessId, itemType, amount, buyPrice) {
tempItemData.buyPrice = buyPrice;
tempItemData.itemType = getItemTypeData(itemType).databaseId;
tempItemData.ownerId = getBusinessData(business).databaseId;
- tempItemData.ownerType = AG_ITEMOWNER_BIZ;
+ tempItemData.ownerType = VRR_ITEMOWNER_BIZ;
tempItemData.ownerIndex = businessId;
tempItemData.itemTypeIndex = itemType;
saveItemToDatabase(tempItemData);
@@ -1378,7 +1378,7 @@ function buyFromBusinessCommand(command, params, client) {
let priceEach = (amount > 1) ? `($${individualCost} each)` : ``;
takePlayerCash(client, totalCost);
- createItem(getItemData(getBusinessData(businessId).floorItemCache[itemSlot-1]).itemTypeIndex, getItemData(getBusinessData(businessId).floorItemCache[itemSlot-1]).value, AG_ITEM_OWNER_PLAYER, getPlayerCurrentSubAccount(client).databaseId, amount);
+ createItem(getItemData(getBusinessData(businessId).floorItemCache[itemSlot-1]).itemTypeIndex, getItemData(getBusinessData(businessId).floorItemCache[itemSlot-1]).value, VRR_ITEM_OWNER_PLAYER, getPlayerCurrentSubAccount(client).databaseId, amount);
cachePlayerHotBarItems(client);
getBusinessData(businessId).till = getBusinessData(businessId).till + totalCost;
@@ -1455,7 +1455,7 @@ function storeItemInBusinessStorageCommand(command, params, client) {
return false;
}
- getItemData(getBusinessData(businessId).floorItemCache[itemSlot-1]).ownerType = AG_ITEM_OWNER_BIZSTORAGE;
+ getItemData(getBusinessData(businessId).floorItemCache[itemSlot-1]).ownerType = VRR_ITEM_OWNER_BIZSTORAGE;
getBusinessData(businessId).storageItemCache[firstSlot] = getBusinessData(businessId).floorItemCache[itemSlot-1];
getBusinessData(businessId).storageItemCache[itemSlot-1] = -1;
messagePlayerSuccess(client, `You moved the ${getItemTypeData(getItemData(getBusinessData(businessId).storageItemCache[firstSlot]).itemTypeIndex).name}s in slot ${itemSlot} to the business storage in slot ${firstSlot}`);
@@ -1491,7 +1491,7 @@ function stockItemOnBusinessFloorCommand(command, params, client) {
return false;
}
- getItemData(getBusinessData(businessId).storageItemCache[itemSlot-1]).ownerType = AG_ITEM_OWNER_BIZFLOOR;
+ getItemData(getBusinessData(businessId).storageItemCache[itemSlot-1]).ownerType = VRR_ITEM_OWNER_BIZFLOOR;
getBusinessData(businessId).floorItemCache[firstSlot] = getBusinessData(businessId).storageItemCache[itemSlot-1];
getBusinessData(businessId).storageItemCache[itemSlot-1] = -1;
messagePlayerSuccess(client, `You moved the ${getItemTypeData(getItemData(getBusinessData(businessId).storageItemCache[firstSlot]).itemTypeIndex).name}s in slot ${itemSlot} of the business storage to the business floor slot ${firstSlot}`);
@@ -1524,11 +1524,11 @@ function getBusinessFloorFirstFreeItemSlot(businessId) {
// ===========================================================================
function cacheAllBusinessItems() {
- logToConsole(LOG_DEBUG, "[Asshat.Business] Caching all business items ...");
+ logToConsole(LOG_DEBUG, "[VRR.Business] Caching all business items ...");
for(let i in getServerData().businesses) {
cacheBusinessItems(i);
}
- logToConsole(LOG_DEBUG, "[Asshat.Business] Cached all business items successfully!");
+ logToConsole(LOG_DEBUG, "[VRR.Business] Cached all business items successfully!");
}
// ===========================================================================
@@ -1537,15 +1537,15 @@ function cacheBusinessItems(businessId) {
getBusinessData(businessId).floorItemCache = [];
getBusinessData(businessId).storageItemCache = [];
- logToConsole(LOG_VERBOSE, `[Asshat.Business] Caching business items for business ${businessId} (${getBusinessData(businessId).name}) ...`);
+ logToConsole(LOG_VERBOSE, `[VRR.Business] Caching business items for business ${businessId} (${getBusinessData(businessId).name}) ...`);
for(let i in getServerData().items) {
- if(getItemData(i).ownerType == AG_ITEM_OWNER_BIZFLOOR && getItemData(i).ownerId == getBusinessData(businessId).databaseId) {
+ if(getItemData(i).ownerType == VRR_ITEM_OWNER_BIZFLOOR && getItemData(i).ownerId == getBusinessData(businessId).databaseId) {
getBusinessData(businessId).floorItemCache.push(i);
- } else if(getItemData(i).ownerType == AG_ITEM_OWNER_BIZSTORAGE && getItemData(i).ownerId == getBusinessData(businessId).databaseId) {
+ } else if(getItemData(i).ownerType == VRR_ITEM_OWNER_BIZSTORAGE && getItemData(i).ownerId == getBusinessData(businessId).databaseId) {
getBusinessData(businessId).storageItemCache.push(i);
}
}
- logToConsole(LOG_VERBOSE, `[Asshat.Business] Successfully cached ${getBusinessData(businessId).floorItemCache.length} floor items and ${getBusinessData(businessId).storageItemCache} storage items for business ${businessId} (${getBusinessData(businessId).name})!`);
+ logToConsole(LOG_VERBOSE, `[VRR.Business] Successfully cached ${getBusinessData(businessId).floorItemCache.length} floor items and ${getBusinessData(businessId).storageItemCache} storage items for business ${businessId} (${getBusinessData(businessId).name})!`);
}
// ===========================================================================
@@ -1563,17 +1563,17 @@ function getHouseIdFromDatabaseId(databaseId) {
// ===========================================================================
function updateBusinessPickupLabelData(businessId) {
- setEntityData(getBusinessData(businessId).entrancePickup, "ag.owner.type", AG_PICKUP_BUSINESS_ENTRANCE, false);
+ setEntityData(getBusinessData(businessId).entrancePickup, "ag.owner.type", VRR_PICKUP_BUSINESS_ENTRANCE, false);
setEntityData(getBusinessData(businessId).entrancePickup, "ag.owner.id", businessId, false);
- setEntityData(getBusinessData(businessId).entrancePickup, "ag.label.type", AG_LABEL_BUSINESS, true);
+ setEntityData(getBusinessData(businessId).entrancePickup, "ag.label.type", VRR_LABEL_BUSINESS, true);
setEntityData(getBusinessData(businessId).entrancePickup, "ag.label.name", getBusinessData(businessId).name, true);
setEntityData(getBusinessData(businessId).entrancePickup, "ag.label.locked", getBusinessData(businessId).locked, true);
- setEntityData(getBusinessData(businessId).entrancePickup, "ag.label.help", AG_BIZLABEL_INFO_NONE, true);
+ setEntityData(getBusinessData(businessId).entrancePickup, "ag.label.help", VRR_BIZLABEL_INFO_NONE, true);
if(getBusinessData(businessId).hasInterior) {
- setEntityData(getBusinessData(businessId).entrancePickup, "ag.label.help", AG_BIZLABEL_INFO_ENTER, true);
+ setEntityData(getBusinessData(businessId).entrancePickup, "ag.label.help", VRR_BIZLABEL_INFO_ENTER, true);
} else {
if(getBusinessData(businessId).floorItemCache.length > 0) {
- setEntityData(getBusinessData(businessId).entrancePickup, "ag.label.help", AG_BIZLABEL_INFO_BUY, true);
+ setEntityData(getBusinessData(businessId).entrancePickup, "ag.label.help", VRR_BIZLABEL_INFO_BUY, true);
}
}
@@ -1581,9 +1581,9 @@ function updateBusinessPickupLabelData(businessId) {
setEntityData(getBusinessData(businessId).entrancePickup, "ag.label.price", getBusinessData(businessId).buyPrice, true);
}
- setEntityData(getBusinessData(businessId).exitPickup, "ag.owner.type", AG_PICKUP_BUSINESS_EXIT, false);
+ setEntityData(getBusinessData(businessId).exitPickup, "ag.owner.type", VRR_PICKUP_BUSINESS_EXIT, false);
setEntityData(getBusinessData(businessId).exitPickup, "ag.owner.id", businessId, false);
- setEntityData(getBusinessData(businessId).exitPickup, "ag.label.type", AG_LABEL_EXIT, true);
+ setEntityData(getBusinessData(businessId).exitPickup, "ag.label.type", VRR_LABEL_EXIT, true);
}
// ===========================================================================
\ No newline at end of file
diff --git a/scripts/server/chat.js b/scripts/server/chat.js
index 3bc410df..0ddd67df 100644
--- a/scripts/server/chat.js
+++ b/scripts/server/chat.js
@@ -8,8 +8,8 @@
// ===========================================================================
function initChatScript() {
- logToConsole(LOG_INFO, "[Asshat.Chat]: Initializing chat script ...");
- logToConsole(LOG_INFO, "[Asshat.Chat]: Chat script initialized successfully!");
+ logToConsole(LOG_INFO, "[VRR.Chat]: Initializing chat script ...");
+ logToConsole(LOG_INFO, "[VRR.Chat]: Chat script initialized successfully!");
return true;
}
diff --git a/scripts/server/clan.js b/scripts/server/clan.js
index 32ab768b..ffea31c8 100644
--- a/scripts/server/clan.js
+++ b/scripts/server/clan.js
@@ -8,17 +8,17 @@
// ===========================================================================
function initClanScript() {
- logToConsole(LOG_INFO, "[Asshat.Clan]: Initializing clans script ...");
+ logToConsole(LOG_INFO, "[VRR.Clan]: Initializing clans script ...");
getServerData().clans = loadClansFromDatabase();
setAllClanDataIndexes();
- logToConsole(LOG_INFO, "[Asshat.Clan]: Clan script initialized successfully!");
+ logToConsole(LOG_INFO, "[VRR.Clan]: Clan script initialized successfully!");
return true;
}
// ===========================================================================
function loadClansFromDatabase() {
- logToConsole(LOG_INFO, "[Asshat.Clan]: Loading clans from database ...");
+ logToConsole(LOG_INFO, "[VRR.Clan]: Loading clans from database ...");
let tempClans = [];
let dbConnection = connectToDatabase();
@@ -33,7 +33,7 @@ function loadClansFromDatabase() {
tempClanData.members = loadClanMembersFromDatabase(tempClanData.databaseId);
tempClanData.ranks = loadClanRanksFromDatabase(tempClanData.databaseId);
tempClans.push(tempClanData);
- logToConsole(LOG_VERBOSE, `[Asshat.Clan]: Clan '${tempClanData.name}' loaded from database successfully!`);
+ logToConsole(LOG_VERBOSE, `[VRR.Clan]: Clan '${tempClanData.name}' loaded from database successfully!`);
}
}
freeDatabaseQuery(dbQuery);
@@ -41,14 +41,14 @@ function loadClansFromDatabase() {
disconnectFromDatabase(dbConnection);
}
- logToConsole(LOG_INFO, `[Asshat.Clan]: ${tempClans.length} clans loaded from database successfully!`);
+ logToConsole(LOG_INFO, `[VRR.Clan]: ${tempClans.length} clans loaded from database successfully!`);
return tempClans;
}
// ===========================================================================
function loadClanMembersFromDatabase() {
- logToConsole(LOG_INFO, "[Asshat.Clan]: Loading clans from database ...");
+ logToConsole(LOG_INFO, "[VRR.Clan]: Loading clans from database ...");
let tempClans = [];
let dbConnection = connectToDatabase();
@@ -63,7 +63,7 @@ function loadClanMembersFromDatabase() {
tempClanData.members = loadClanMembersFromDatabase(tempClanData.databaseId);
tempClanData.ranks = loadClanRanksFromDatabase(tempClanData.databaseId);
tempClans.push(tempClanData);
- logToConsole(LOG_VERBOSE, `[Asshat.Clan]: Clan '${tempClanData.name}' loaded from database successfully!`);
+ logToConsole(LOG_VERBOSE, `[VRR.Clan]: Clan '${tempClanData.name}' loaded from database successfully!`);
}
}
freeDatabaseQuery(dbQuery);
@@ -71,14 +71,14 @@ function loadClanMembersFromDatabase() {
disconnectFromDatabase(dbConnection);
}
- logToConsole(LOG_INFO, `[Asshat.Clan]: ${tempClans.length} clans loaded from database successfully!`);
+ logToConsole(LOG_INFO, `[VRR.Clan]: ${tempClans.length} clans loaded from database successfully!`);
return tempClans;
}
// ===========================================================================
function loadClanRanksFromDatabase(clanDatabaseId) {
- logToConsole(LOG_INFO, `[Asshat.Clan]: Loading ranks for clan ${clanDatabaseId} from database ...`);
+ logToConsole(LOG_INFO, `[VRR.Clan]: Loading ranks for clan ${clanDatabaseId} from database ...`);
let dbConnection = connectToDatabase();
let dbAssoc;
@@ -91,21 +91,21 @@ function loadClanRanksFromDatabase(clanDatabaseId) {
let dbAssoc = fetchQueryAssoc(dbQuery)
let tempClanRankData = new serverClasses.clanRankData(dbAssoc);
tempClanRanks.push(tempClanRankData);
- logToConsole(LOG_VERBOSE, `[Asshat.Clan]: Clan rank '${tempClanRankData.name}' loaded from database successfully!`);
+ logToConsole(LOG_VERBOSE, `[VRR.Clan]: Clan rank '${tempClanRankData.name}' loaded from database successfully!`);
}
freeDatabaseQuery(dbQuery);
}
disconnectFromDatabase(dbConnection);
}
- logToConsole(LOG_INFO, `[Asshat.Clan]: Loaded ranks for clan ${clanDatabaseId} from database successfully!`);
+ logToConsole(LOG_INFO, `[VRR.Clan]: Loaded ranks for clan ${clanDatabaseId} from database successfully!`);
return tempClanRanks;
}
// ===========================================================================
function loadClanMembersFromDatabase(clanDatabaseId) {
- logToConsole(LOG_INFO, `[Asshat.Clan]: Loading members for clan ${clanDatabaseId} from database ...`);
+ logToConsole(LOG_INFO, `[VRR.Clan]: Loading members for clan ${clanDatabaseId} from database ...`);
let dbConnection = connectToDatabase();
let dbAssoc;
@@ -118,14 +118,14 @@ function loadClanMembersFromDatabase(clanDatabaseId) {
let dbAssoc = fetchQueryAssoc(dbQuery)
let tempClanMemberData = new serverClasses.clanMemberData(dbAssoc);
tempClanMembers.push(tempClanMemberData);
- logToConsole(LOG_VERBOSE, `[Asshat.Clan]: Clan member '${tempClanMemberData.subAccount}' loaded from database successfully!`);
+ logToConsole(LOG_VERBOSE, `[VRR.Clan]: Clan member '${tempClanMemberData.subAccount}' loaded from database successfully!`);
}
freeDatabaseQuery(dbQuery);
}
disconnectFromDatabase(dbConnection);
}
- logToConsole(LOG_INFO, `[Asshat.Clan]: Loaded members for clan ${clanDatabaseId} from database successfully!`);
+ logToConsole(LOG_INFO, `[VRR.Clan]: Loaded members for clan ${clanDatabaseId} from database successfully!`);
return tempClanMembers;
}
diff --git a/scripts/server/class.js b/scripts/server/class.js
index f5c0351b..283f33fb 100644
--- a/scripts/server/class.js
+++ b/scripts/server/class.js
@@ -12,9 +12,9 @@ let serverClasses = {};
// ===========================================================================
function initClassScript() {
- logToConsole(LOG_INFO, "[Asshat.Class]: Initializing class script ...");
+ logToConsole(LOG_INFO, "[VRR.Class]: Initializing class script ...");
serverClasses = initClassTable();
- logToConsole(LOG_INFO, "[Asshat.Class]: Class script initialized successfully!");
+ logToConsole(LOG_INFO, "[VRR.Class]: Class script initialized successfully!");
}
// ===========================================================================
@@ -175,14 +175,14 @@ function initClassTable() {
this.jobEquipmentCache = [];
this.jobUniform = 0;
- this.itemActionState = AG_ITEM_ACTION_NONE;
+ this.itemActionState = VRR_ITEM_ACTION_NONE;
this.itemActionItem = -1;
this.alcoholLevel = 0;
- this.pedState = AG_PEDSTATE_NONE;
+ this.pedState = VRR_PEDSTATE_NONE;
- this.promptType = AG_PROMPT_NONE;
+ this.promptType = VRR_PROMPT_NONE;
this.businessOrderAmount = 0;
this.businessOrderBusiness = -1;
@@ -192,7 +192,7 @@ function initClassTable() {
this.syncPosition = null;
this.syncHeading = null;
- this.twoFactorAuthenticationState = AG_2FA_STATE_NONE;
+ this.twoFactorAuthenticationState = VRR_2FA_STATE_NONE;
this.twoFactorAuthenticationCode = 0;
this.payDayAmount = 0;
@@ -450,7 +450,7 @@ function initClassTable() {
constructor(dbAssoc) {
this.databaseId = 0;
this.name = "";
- this.ownerType = AG_BIZOWNER_NONE;
+ this.ownerType = VRR_BIZOWNER_NONE;
this.ownerId = 0;
this.buyPrice = 0;
this.locked = false;
@@ -611,7 +611,7 @@ function initClassTable() {
constructor(dbAssoc) {
this.databaseId = 0
this.description = "";
- this.ownerType = AG_HOUSEOWNER_NONE;
+ this.ownerType = VRR_HOUSEOWNER_NONE;
this.ownerId = 0;
this.buyPrice = 0;
this.rentPrice = 0;
@@ -785,7 +785,7 @@ function initClassTable() {
this.needsSaved = false;
// Ownership
- this.ownerType = AG_VEHOWNER_NONE;
+ this.ownerType = VRR_VEHOWNER_NONE;
this.ownerId = 0;
this.buyPrice = 0;
this.rentPrice = 0;
@@ -949,7 +949,7 @@ function initClassTable() {
jobData: class {
constructor(dbAssoc = false) {
this.databaseId = 0;
- this.type = AG_JOB_NONE;
+ this.type = VRR_JOB_NONE;
this.name = "Unnamed";
this.enabled = true;
this.blipModel = -1
@@ -1155,7 +1155,7 @@ function initClassTable() {
}
},
keyBindData: class {
- constructor(dbAssoc = false, key = 0, commandString = "", keyState = AG_KEYSTATE_UP) {
+ constructor(dbAssoc = false, key = 0, commandString = "", keyState = VRR_KEYSTATE_UP) {
this.databaseId = 0;
this.key = key;
this.account = 0;
@@ -1252,7 +1252,7 @@ function initClassTable() {
this.index = 0;
this.itemTypeIndex = 0;
this.itemType = 0;
- this.ownerType = AG_ITEM_OWNER_NONE;
+ this.ownerType = VRR_ITEM_OWNER_NONE;
this.ownerId = 0;
this.ownerIndex = -1;
this.position = toVector3(0.0, 0.0, 0.0);
@@ -1289,11 +1289,11 @@ function initClassTable() {
this.index = 0;
this.name = "Unknown";
this.enabled = false;
- this.useType = AG_ITEM_USETYPE_NONE;
+ this.useType = VRR_ITEM_USETYPE_NONE;
this.useId = 0;
this.useValue = 0;
this.maxValue = 0;
- this.dropType = AG_ITEM_DROPTYPE_NONE;
+ this.dropType = VRR_ITEM_DROPTYPE_NONE;
this.useId = 0;
this.dropPosition = toVector3(0.0, 0.0, 0.0);
this.dropRotation = toVector3(0.0, 0.0, 0.0);
@@ -1367,7 +1367,7 @@ function initClassTable() {
this.fightStyle = 0;
this.health = 100;
this.armour = 100;
- this.currentAction = AG_NPCACTION_NONE;
+ this.currentAction = VRR_NPCACTION_NONE;
this.triggers = [];
this.bodyParts = {
diff --git a/scripts/server/client.js b/scripts/server/client.js
index 75785d72..b69fb235 100644
--- a/scripts/server/client.js
+++ b/scripts/server/client.js
@@ -8,15 +8,15 @@
// ===========================================================================
function initClientScript() {
- logToConsole(LOG_DEBUG, "[Asshat.Client]: Initializing client script ...");
+ logToConsole(LOG_DEBUG, "[VRR.Client]: Initializing client script ...");
addAllNetworkHandlers();
- logToConsole(LOG_DEBUG, "[Asshat.Client]: Client script initialized!");
+ logToConsole(LOG_DEBUG, "[VRR.Client]: Client script initialized!");
}
// ===========================================================================
function addAllNetworkHandlers() {
- logToConsole(LOG_DEBUG, "[Asshat.Client]: Adding network handlers ...");
+ logToConsole(LOG_DEBUG, "[VRR.Client]: Adding network handlers ...");
// KeyBind
addNetworkHandler("ag.useKeyBind", playerUsedKeyBind);
@@ -74,14 +74,14 @@ function addAllNetworkHandlers() {
// ===========================================================================
function updatePlayerNameTag(client) {
- //logToConsole(LOG_DEBUG, `[Asshat.Client] Sending ${getPlayerDisplayForConsole(client)}'s updated nametag to all players`);
+ //logToConsole(LOG_DEBUG, `[VRR.Client] Sending ${getPlayerDisplayForConsole(client)}'s updated nametag to all players`);
triggerNetworkEvent("ag.nametag", null, client.name, getPlayerNameForNameTag(client), getPlayerColour(client), false, client.ping);
}
// ===========================================================================
function updateAllPlayerNameTags() {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending updated nametags to all players`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending updated nametags to all players`);
let clients = getClients();
for(let i in clients) {
updatePlayerNameTag(clients[i]);
@@ -91,7 +91,7 @@ function updateAllPlayerNameTags() {
// ===========================================================================
function updatePlayerPing(client) {
- //logToConsole(LOG_DEBUG, `[Asshat.Client] Sending ${getPlayerDisplayForConsole(client)}'s ping to all players`);
+ //logToConsole(LOG_DEBUG, `[VRR.Client] Sending ${getPlayerDisplayForConsole(client)}'s ping to all players`);
triggerNetworkEvent("ag.ping", null, client.name, client.ping);
}
@@ -132,35 +132,35 @@ function playerClientStopped(client) {
// ===========================================================================
function showGameMessage(client, text, colour, duration) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Showing game message to ${getPlayerDisplayForConsole(client)} (${text}) for ${duration} milliseconds`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Showing game message to ${getPlayerDisplayForConsole(client)} (${text}) for ${duration} milliseconds`);
triggerNetworkEvent("ag.smallGameMessage", client, text, colour, duration);
}
// ===========================================================================
function enableCityAmbienceForPlayer(client) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Setting ${getPlayerDisplayForConsole(client)}'s city ambience to ${toUpperCase(getOnOffFromBool(false))}`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Setting ${getPlayerDisplayForConsole(client)}'s city ambience to ${toUpperCase(getOnOffFromBool(false))}`);
triggerNetworkEvent("ag.ambience", client, true);
}
// ===========================================================================
function disableCityAmbienceForPlayer(client) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Setting ${getPlayerDisplayForConsole(client)}'s city ambience to ${toUpperCase(getOnOffFromBool(false))}`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Setting ${getPlayerDisplayForConsole(client)}'s city ambience to ${toUpperCase(getOnOffFromBool(false))}`);
triggerNetworkEvent("ag.ambience", client, false);
}
// ===========================================================================
function clearPlayerOwnedPeds(client) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Clearing peds owned by ${getPlayerDisplayForConsole(client)}`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Clearing peds owned by ${getPlayerDisplayForConsole(client)}`);
triggerNetworkEvent("ag.clearPeds", client);
}
// ===========================================================================
function updatePlayerSpawnedState(client, state) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Setting ${getPlayerDisplayForConsole(client)}'s spawned state ${toUpperCase(getOnOffFromBool(state))}`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Setting ${getPlayerDisplayForConsole(client)}'s spawned state ${toUpperCase(getOnOffFromBool(state))}`);
getPlayerData(client).spawned = true;
triggerNetworkEvent("ag.spawned", client, state);
}
@@ -168,21 +168,21 @@ function updatePlayerSpawnedState(client, state) {
// ===========================================================================
function setPlayerControlState(client, state) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Setting ${getPlayerDisplayForConsole(client)}'s control state ${toUpperCase(getOnOffFromBool(state))}`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Setting ${getPlayerDisplayForConsole(client)}'s control state ${toUpperCase(getOnOffFromBool(state))}`);
triggerNetworkEvent("ag.control", client, state, !state);
}
// ===========================================================================
function updatePlayerShowLogoState(client, state) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Setting ${getPlayerDisplayForConsole(client)}'s logo state ${toUpperCase(getOnOffFromBool(state))}`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Setting ${getPlayerDisplayForConsole(client)}'s logo state ${toUpperCase(getOnOffFromBool(state))}`);
triggerNetworkEvent("ag.logo", client, state);
}
// ===========================================================================
function restorePlayerCamera(client) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Restoring ${getPlayerDisplayForConsole(client)}'s camera`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Restoring ${getPlayerDisplayForConsole(client)}'s camera`);
triggerNetworkEvent("ag.restoreCamera", client);
}
@@ -195,7 +195,7 @@ function setPlayer2DRendering(client, hudState = false, labelState = false, smal
// ===========================================================================
function syncPlayerProperties(client) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending signal to sync ${getPlayerDisplayForConsole(client)}'s player ped properties`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending signal to sync ${getPlayerDisplayForConsole(client)}'s player ped properties`);
triggerNetworkEvent("ag.player.sync", null, client.player);
}
@@ -203,7 +203,7 @@ function syncPlayerProperties(client) {
function updatePlayerSnowState(client) {
if(doesGameHaveSnow(getServerGame())) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Setting ${getPlayerDisplayForConsole(client)}'s snow state (Falling: ${toUpperCase(getOnOffFromBool(getServerConfig().fallingSnow))}, Ground: ${toUpperCase(getOnOffFromBool(getServerConfig().groundSnow))})`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Setting ${getPlayerDisplayForConsole(client)}'s snow state (Falling: ${toUpperCase(getOnOffFromBool(getServerConfig().fallingSnow))}, Ground: ${toUpperCase(getOnOffFromBool(getServerConfig().groundSnow))})`);
triggerNetworkEvent("ag.snow", client, getServerConfig().fallingSnow, getServerConfig().groundSnow);
}
}
@@ -213,7 +213,7 @@ function updatePlayerSnowState(client) {
function sendExcludedModelsForGroundSnowToPlayer(client) {
if(getGameConfig().excludedGroundSnowModels[getServerGame()].length > 0) {
for(let i in getGameConfig().excludedGroundSnowModels[getServerGame()]) {
- logToConsole(LOG_DEBUG, `[Asshat.Misc] Sending excluded model ${i} for ground snow to ${client.name}`);
+ logToConsole(LOG_DEBUG, `[VRR.Misc] Sending excluded model ${i} for ground snow to ${client.name}`);
triggerNetworkEvent("ag.excludeGroundSnow", client, getGameConfig().excludedGroundSnowModels[getServerGame()][i]);
}
}
@@ -224,7 +224,7 @@ function sendExcludedModelsForGroundSnowToPlayer(client) {
function sendRemovedWorldObjectsToPlayer(client) {
if(getGameConfig().removedWorldObjects[getServerGame()].length > 0) {
for(let i in getGameConfig().removedWorldObjects[getServerGame()]) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending removed world object ${i} (${getGameConfig().removedWorldObjects[getServerGame()][i].model}) to ${client.name}`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending removed world object ${i} (${getGameConfig().removedWorldObjects[getServerGame()][i].model}) to ${client.name}`);
triggerNetworkEvent("ag.removeWorldObject", client, getGameConfig().removedWorldObjects[getServerGame()][i].model, getGameConfig().removedWorldObjects[getServerGame()][i].position, getGameConfig().removedWorldObjects[getServerGame()][i].range);
}
}
@@ -234,7 +234,7 @@ function sendRemovedWorldObjectsToPlayer(client) {
// ===========================================================================
function updatePlayerHotBar(client) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending updated hotbar data to ${getPlayerDisplayForConsole(client)}`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending updated hotbar data to ${getPlayerDisplayForConsole(client)}`);
let tempHotBarItems = [];
for(let i in getPlayerData(client).hotBarItems) {
let itemImage = "";
@@ -257,14 +257,14 @@ function updatePlayerHotBar(client) {
// ===========================================================================
function setPlayerWeaponDamageEnabled(client, state) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending weapon damage state for ${getPlayerDisplayForConsole(client)} to all players`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending weapon damage state for ${getPlayerDisplayForConsole(client)} to all players`);
triggerNetworkEvent("ag.weaponDamageEnabled", null, client.name, state);
}
// ===========================================================================
function setPlayerWeaponDamageEvent(client, eventType) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending weapon damage event (${eventType}) for ${getPlayerDisplayForConsole(client)} to all players`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending weapon damage event (${eventType}) for ${getPlayerDisplayForConsole(client)} to all players`);
triggerNetworkEvent("ag.weaponDamageEvent", null, client.name, eventType);
getPlayerData(client).weaponDamageEvent = eventType;
}
@@ -272,231 +272,231 @@ function setPlayerWeaponDamageEvent(client, eventType) {
// ===========================================================================
function sendJobRouteStopToPlayer(client, position, colour) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending job route stop data to ${getPlayerDisplayForConsole(client)}`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending job route stop data to ${getPlayerDisplayForConsole(client)}`);
triggerNetworkEvent("ag.showJobRouteStop", client, position, colour);
}
// ===========================================================================
function showPlayerLoginSuccessGUI(client) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending login success GUI signal to ${getPlayerDisplayForConsole(client)}`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending login success GUI signal to ${getPlayerDisplayForConsole(client)}`);
triggerNetworkEvent("ag.loginSuccess", client);
}
// ===========================================================================
function showPlayerLoginFailedGUI(client, errorMessage) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending login failed GUI signal to ${getPlayerDisplayForConsole(client)}`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending login failed GUI signal to ${getPlayerDisplayForConsole(client)}`);
triggerNetworkEvent("ag.loginFailed", client, errorMessage);
}
// ===========================================================================
function showPlayerRegistrationSuccessGUI(client) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending registration success GUI signal to ${getPlayerDisplayForConsole(client)}`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending registration success GUI signal to ${getPlayerDisplayForConsole(client)}`);
triggerNetworkEvent("ag.registrationSuccess", client);
}
// ===========================================================================
function showPlayerRegistrationFailedGUI(client, errorMessage) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending registration failed GUI signal to ${getPlayerDisplayForConsole(client)}`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending registration failed GUI signal to ${getPlayerDisplayForConsole(client)}`);
triggerNetworkEvent("ag.registrationFailed", client, errorMessage);
}
// ===========================================================================
function sendPlayerGUIColours(client) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending GUI colours to ${getPlayerDisplayForConsole(client)}`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending GUI colours to ${getPlayerDisplayForConsole(client)}`);
triggerNetworkEvent("ag.guiColour", client, getServerConfig().guiColour[0], getServerConfig().guiColour[1], getServerConfig().guiColour[2]);
}
// ===========================================================================
function sendPlayerGUIInit(client) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending GUI init signal to ${getPlayerDisplayForConsole(client)}`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending GUI init signal to ${getPlayerDisplayForConsole(client)}`);
triggerNetworkEvent("ag.guiInit", client);
}
// ===========================================================================
function showPlayerLoginGUI(client, errorMessage = "") {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending show login GUI signal to ${getPlayerDisplayForConsole(client)}`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending show login GUI signal to ${getPlayerDisplayForConsole(client)}`);
triggerNetworkEvent("ag.showLogin", client);
}
// ===========================================================================
function showPlayerRegistrationGUI(client, errorMessage = "") {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending show registration GUI signal to ${getPlayerDisplayForConsole(client)}`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending show registration GUI signal to ${getPlayerDisplayForConsole(client)}`);
triggerNetworkEvent("ag.showRegistration", client);
}
// ===========================================================================
function showPlayerNewCharacterGUI(client) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending show new character GUI signal to ${getPlayerDisplayForConsole(client)}`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending show new character GUI signal to ${getPlayerDisplayForConsole(client)}`);
triggerNetworkEvent("ag.showNewCharacter", client);
}
// ===========================================================================
function showPlayerCharacterSelectGUI(client, firstName, lastName, cash, clan, lastPlayed, skin) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending character select GUI signal to ${getPlayerDisplayForConsole(client)}`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending character select GUI signal to ${getPlayerDisplayForConsole(client)}`);
triggerNetworkEvent("ag.showCharacterSelect", client, firstName, lastName, cash, clan, lastPlayed, skin);
}
// ===========================================================================
function updatePlayerCharacterSelectGUI(client, firstName, lastName, cash, clan, lastPlayed, skin) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending update character select GUI signal to ${getPlayerDisplayForConsole(client)}`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending update character select GUI signal to ${getPlayerDisplayForConsole(client)}`);
triggerNetworkEvent("ag.switchCharacterSelect", client, firstName, lastName, cash, clan, lastPlayed, skin);
}
// ===========================================================================
function showPlayerCharacterSelectSuccessGUI(client) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending character select success GUI signal to ${getPlayerDisplayForConsole(client)}`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending character select success GUI signal to ${getPlayerDisplayForConsole(client)}`);
triggerNetworkEvent("ag.characterSelectSuccess", client);
}
// ===========================================================================
function showPlayerCharacterSelectFailedGUI(client) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending character select failed GUI signal to ${getPlayerDisplayForConsole(client)}`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending character select failed GUI signal to ${getPlayerDisplayForConsole(client)}`);
triggerNetworkEvent("ag.characterSelectFailed", client);
}
// ===========================================================================
function showPlayerPromptGUI(client, promptMessage, promptTitle) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending show prompt GUI signal to ${getPlayerDisplayForConsole(client)} (Title: ${promptTitle}, Message: ${promptMessage})`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending show prompt GUI signal to ${getPlayerDisplayForConsole(client)} (Title: ${promptTitle}, Message: ${promptMessage})`);
triggerNetworkEvent("ag.showPrompt", client, promptMessage, promptTitle);
}
// ===========================================================================
function showPlayerInfoGUI(client, infoMessage, infoTitle) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending show info GUI signal to ${getPlayerDisplayForConsole(client)} (Title: ${infoTitle}, Message: ${infoMessage})`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending show info GUI signal to ${getPlayerDisplayForConsole(client)} (Title: ${infoTitle}, Message: ${infoMessage})`);
triggerNetworkEvent("ag.showInfo", client, infoMessage, infoTitle);
}
// ===========================================================================
function showPlayerErrorGUI(client, errorMessage, errorTitle) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending show error GUI signal to ${getPlayerDisplayForConsole(client)} (Title: ${errorTitle}, Message: ${errorMessage})`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending show error GUI signal to ${getPlayerDisplayForConsole(client)} (Title: ${errorTitle}, Message: ${errorMessage})`);
triggerNetworkEvent("ag.showInfo", client, errorMessage, errorTitle);
}
// ===========================================================================
function sendRunCodeToClient(client, code, returnTo) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending runcode to ${getPlayerDisplayForConsole(client)} (returnTo: ${getPlayerDisplayForConsole(getClientFromIndex(returnTo))}, Code: ${code})`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending runcode to ${getPlayerDisplayForConsole(client)} (returnTo: ${getPlayerDisplayForConsole(getClientFromIndex(returnTo))}, Code: ${code})`);
triggerNetworkEvent("ag.runCode", client, code, returnTo);
}
// ===========================================================================
function sendPlayerWorkingState(client, state) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending working state (${toUpperCase(getYesNoFromBool(state))}) to ${getPlayerDisplayForConsole(client)}`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending working state (${toUpperCase(getYesNoFromBool(state))}) to ${getPlayerDisplayForConsole(client)}`);
triggerNetworkEvent("ag.working", client, state);
}
// ===========================================================================
function sendPlayerJobType(client, jobType) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending job type (${jobType}) to ${getPlayerDisplayForConsole(client)}`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending job type (${jobType}) to ${getPlayerDisplayForConsole(client)}`);
triggerNetworkEvent("ag.jobType", client, jobType);
}
// ===========================================================================
function sendPlayerStopJobRoute(client) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending signal to abort job route to ${getPlayerDisplayForConsole(client)}`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending signal to abort job route to ${getPlayerDisplayForConsole(client)}`);
triggerNetworkEvent("ag.stopJobRoute", client);
}
// ===========================================================================
function sendPlayerMouseCameraToggle(client) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending signal to toggle mouse camera ${getPlayerDisplayForConsole(client)}`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending signal to toggle mouse camera ${getPlayerDisplayForConsole(client)}`);
triggerNetworkEvent("ag.mouseCamera", client);
}
// ===========================================================================
function sendPlayerMouseCursorToggle(client) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending signal to toggle mouse cursor ${getPlayerDisplayForConsole(client)}`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending signal to toggle mouse cursor ${getPlayerDisplayForConsole(client)}`);
triggerNetworkEvent("ag.mouseCursor", client);
}
// ===========================================================================
function sendAddAccountKeyBindToClient(client, key, keyState) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending added keybind to ${getPlayerDisplayForConsole(client)} (Key: ${sdl.getKeyName(key)}, State: ${(keyState) ? "down" : "up"})`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending added keybind to ${getPlayerDisplayForConsole(client)} (Key: ${sdl.getKeyName(key)}, State: ${(keyState) ? "down" : "up"})`);
triggerNetworkEvent("ag.addKeyBind", client, toInteger(key), (keyState) ? KEYSTATE_DOWN : KEYSTATE_UP);
}
// ===========================================================================
function sendRemoveAccountKeyBindToClient(client, key) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending deleted keybind to ${getPlayerDisplayForConsole(client)} (Key: ${sdl.getKeyName(key)})`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending deleted keybind to ${getPlayerDisplayForConsole(client)} (Key: ${sdl.getKeyName(key)})`);
triggerNetworkEvent("ag.delKeyBind", client, toInteger(key));
}
// ===========================================================================
function sendPlayerSetPosition(client, position) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending set position signal to ${getPlayerDisplayForConsole(client)} (Position: ${position.x}, ${position.y}, ${position.z})`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending set position signal to ${getPlayerDisplayForConsole(client)} (Position: ${position.x}, ${position.y}, ${position.z})`);
triggerNetworkEvent("ag.position", client, position);
}
// ===========================================================================
function sendPlayerSetHeading(client, heading) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending set heading signal to ${getPlayerDisplayForConsole(client)} (Heading: ${heading})`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending set heading signal to ${getPlayerDisplayForConsole(client)} (Heading: ${heading})`);
triggerNetworkEvent("ag.heading", client, heading);
}
// ===========================================================================
function sendPlayerSetInterior(client, interior) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending set interior signal to ${getPlayerDisplayForConsole(client)} (Interior: ${interior})`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending set interior signal to ${getPlayerDisplayForConsole(client)} (Interior: ${interior})`);
triggerNetworkEvent("ag.interior", client, interior);
}
// ===========================================================================
function sendPlayerFrozenState(client, state) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending set frozen signal to ${getPlayerDisplayForConsole(client)} (State: ${toUpperCase(getYesNoFromBool(state))})`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending set frozen signal to ${getPlayerDisplayForConsole(client)} (State: ${toUpperCase(getYesNoFromBool(state))})`);
triggerNetworkEvent("ag.frozen", client, state);
}
// ===========================================================================
function givePlayerWeapon(client, weaponId, ammo, active) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending signal to ${getPlayerDisplayForConsole(client)} to give weapon (Weapon: ${weaponId}, Ammo: ${ammo})`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending signal to ${getPlayerDisplayForConsole(client)} to give weapon (Weapon: ${weaponId}, Ammo: ${ammo})`);
triggerNetworkEvent("ag.giveWeapon", client, weaponId, ammo, active);
}
// ===========================================================================
function clearPlayerWeapons(client) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending signal to ${getPlayerDisplayForConsole(client)} to clear weapons`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending signal to ${getPlayerDisplayForConsole(client)} to clear weapons`);
triggerNetworkEvent("ag.clearWeapons", client);
}
// ===========================================================================
function showPlayerNewCharacterFailedGUI(client, errorMessage) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending new character failed GUI signal to ${getPlayerDisplayForConsole(client)}`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending new character failed GUI signal to ${getPlayerDisplayForConsole(client)}`);
triggerNetworkEvent("ag.newCharacterFailed", client, errorMessage);
}
// ===========================================================================
function sendPlayerRemoveFromVehicle(client) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Sending remove from vehicle signal to ${getPlayerDisplayForConsole(client)}`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending remove from vehicle signal to ${getPlayerDisplayForConsole(client)}`);
triggerNetworkEvent("ag.removeFromVehicle", client);
}
@@ -512,10 +512,10 @@ function showPlayerItemTakeDelay(client, itemId) {
if(getItemData(itemId)) {
let delay = getItemTypeData(getItemData(itemId).itemTypeIndex).pickupDelay;
if(delay > 0) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Showing item TAKE delay to ${getPlayerDisplayForConsole(client)} (${delay} milliseconds)`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Showing item TAKE delay to ${getPlayerDisplayForConsole(client)} (${delay} milliseconds)`);
triggerNetworkEvent("ag.showItemActionDelay", client, delay);
} else {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Showing item TAKE delay to ${getPlayerDisplayForConsole(client)} (instant)`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Showing item TAKE delay to ${getPlayerDisplayForConsole(client)} (instant)`);
playerTakeItem(client, itemId);
}
}
@@ -527,10 +527,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, `[Asshat.Client] Showing item USE delay to ${getPlayerDisplayForConsole(client)} (${delay} milliseconds)`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Showing item USE delay to ${getPlayerDisplayForConsole(client)} (${delay} milliseconds)`);
triggerNetworkEvent("ag.showItemActionDelay", client, delay);
} else {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Showing item USE delay to ${getPlayerDisplayForConsole(client)} (instant)`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Showing item USE delay to ${getPlayerDisplayForConsole(client)} (instant)`);
playerUseItem(client, itemSlot);
}
}
@@ -542,10 +542,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, `[Asshat.Client] Showing item DROP delay to ${getPlayerDisplayForConsole(client)} (${delay} milliseconds)`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Showing item DROP delay to ${getPlayerDisplayForConsole(client)} (${delay} milliseconds)`);
triggerNetworkEvent("ag.showItemActionDelay", client, delay);
} else {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Showing item DROP delay to ${getPlayerDisplayForConsole(client)} (instant)`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Showing item DROP delay to ${getPlayerDisplayForConsole(client)} (instant)`);
playerDropItem(client, itemSlot);
}
}
@@ -557,10 +557,10 @@ function showPlayerItemPickupDelay(client, itemId) {
if(getItemData(itemId)) {
let delay = getItemTypeData(getItemData(itemId).itemTypeIndex).pickupDelay;
if(delay > 0) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Showing item PICKUP delay to ${getPlayerDisplayForConsole(client)} (${delay} milliseconds)`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Showing item PICKUP delay to ${getPlayerDisplayForConsole(client)} (${delay} milliseconds)`);
triggerNetworkEvent("ag.showItemActionDelay", client, delay);
} else {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Showing item PICKUP delay to ${getPlayerDisplayForConsole(client)} (instant)`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Showing item PICKUP delay to ${getPlayerDisplayForConsole(client)} (instant)`);
playerPickupItem(client, itemId);
}
}
@@ -572,10 +572,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, `[Asshat.Client] Showing item PUT delay to ${getPlayerDisplayForConsole(client)} (${delay} milliseconds)`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Showing item PUT delay to ${getPlayerDisplayForConsole(client)} (${delay} milliseconds)`);
triggerNetworkEvent("ag.showItemActionDelay", client, delay);
} else {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Showing item PUT delay to ${getPlayerDisplayForConsole(client)} (instant)`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Showing item PUT delay to ${getPlayerDisplayForConsole(client)} (instant)`);
playerPutItem(client, itemSlot);
}
}
@@ -586,14 +586,14 @@ function showPlayerItemPutDelay(client, itemSlot) {
function showPlayerItemSwitchDelay(client, itemSlot) {
if(itemSlot != -1) {
if(getPlayerData(client).hotBarItems[itemSlot] != -1) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Showing item switch delay to ${getPlayerDisplayForConsole(client)} (${getItemTypeData(getItemData(getPlayerData(client).hotBarItems[itemSlot]).itemTypeIndex).switchDelay} milliseconds)`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Showing item switch delay to ${getPlayerDisplayForConsole(client)} (${getItemTypeData(getItemData(getPlayerData(client).hotBarItems[itemSlot]).itemTypeIndex).switchDelay} milliseconds)`);
triggerNetworkEvent("ag.showItemActionDelay", client, getItemTypeData(getItemData(getPlayerData(client).hotBarItems[itemSlot]).itemTypeIndex).switchDelay);
} else {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Showing item switch delay to ${getPlayerDisplayForConsole(client)} (instant)`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Showing item switch delay to ${getPlayerDisplayForConsole(client)} (instant)`);
playerSwitchItem(client, itemSlot);
}
} else {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Showing item switch delay to ${getPlayerDisplayForConsole(client)} (instant)`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Showing item switch delay to ${getPlayerDisplayForConsole(client)} (instant)`);
playerSwitchItem(client, itemSlot);
}
}
@@ -601,14 +601,14 @@ function showPlayerItemSwitchDelay(client, itemSlot) {
// ===========================================================================
function sendPlayerDrunkEffect(client, amount, duration) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Setting drunk effect for ${getPlayerDisplayForConsole(client)} to ${amount} for ${duration} milliseconds`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Setting drunk effect for ${getPlayerDisplayForConsole(client)} to ${amount} for ${duration} milliseconds`);
triggerNetworkEvent("ag.drunkEffect", client, amount, duration);
}
// ===========================================================================
function sendPlayerClearPedState(client) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] Clearing ped state for ${getPlayerDisplayForConsole(client)}`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] Clearing ped state for ${getPlayerDisplayForConsole(client)}`);
triggerNetworkEvent("ag.clearPedState", client);
}
@@ -618,29 +618,29 @@ function playerDamagedByPlayer(client, damagerEntityName, weaponId, pedPiece, he
let damagerEntity = getPlayerFromParams(damagerEntityName);
if(isNull(damagerEntity)) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] ${getPlayerDisplayForConsole(client)}'s damager entity from ID is null`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] ${getPlayerDisplayForConsole(client)}'s damager entity from ID is null`);
return false;
}
- logToConsole(LOG_DEBUG, `[Asshat.Client] ${getPlayerDisplayForConsole(client)} was damaged by ${damagerEntity}`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] ${getPlayerDisplayForConsole(client)} was damaged by ${damagerEntity}`);
if(isNull(damagerEntity)) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] ${getPlayerDisplayForConsole(client)}'s damager client is INVALID`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] ${getPlayerDisplayForConsole(client)}'s damager client is INVALID`);
return false;
}
if(!getPlayerData(damagerEntity) || !getPlayerData(client)) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] ${getPlayerDisplayForConsole(client)}'s damager's client data is INVALID`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] ${getPlayerDisplayForConsole(client)}'s damager's client data is INVALID`);
return false;
}
- logToConsole(LOG_DEBUG, `[Asshat.Client] ${getPlayerDisplayForConsole(client)}'s damager is ${getPlayerDisplayForConsole(damagerEntity)}`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] ${getPlayerDisplayForConsole(client)}'s damager is ${getPlayerDisplayForConsole(damagerEntity)}`);
switch(getPlayerData(damagerEntity).weaponDamageEvent) {
- case AG_WEAPON_DAMAGE_EVENT_TAZER:
- logToConsole(LOG_DEBUG, `[Asshat.Client] ${getPlayerDisplayForConsole(client)}'s damager ${getPlayerDisplayForConsole(damagerEntity)} is using a tazer`);
+ case VRR_WEAPON_DAMAGE_EVENT_TAZER:
+ logToConsole(LOG_DEBUG, `[VRR.Client] ${getPlayerDisplayForConsole(client)}'s damager ${getPlayerDisplayForConsole(damagerEntity)} is using a tazer`);
if(!isPlayerTazed(client) && !isPlayerHandCuffed(client) && !isPlayerInAnyVehicle(client)) {
- logToConsole(LOG_DEBUG, `[Asshat.Client] ${getPlayerDisplayForConsole(client)} was not previously tazed, binded, or in a vehicle. Taze successful`);
+ logToConsole(LOG_DEBUG, `[VRR.Client] ${getPlayerDisplayForConsole(client)} was not previously tazed, binded, or in a vehicle. Taze successful`);
meActionToNearbyPlayers(damagerEntity, `electrifies ${getCharacterFullName(client)} with their tazer`);
tazePlayer(client);
}
diff --git a/scripts/server/command.js b/scripts/server/command.js
index 4eb7ef07..4387a0ea 100644
--- a/scripts/server/command.js
+++ b/scripts/server/command.js
@@ -27,10 +27,10 @@ let builtInCommands = [
// ===========================================================================
function initCommandScript() {
- logToConsole(LOG_INFO, "[Asshat.Command]: Initializing commands script ...");
+ logToConsole(LOG_INFO, "[VRR.Command]: Initializing commands script ...");
serverCommands = loadCommands();
//addAllCommandHandlers();
- logToConsole(LOG_INFO, "[Asshat.Command]: Initialized commands script!");
+ logToConsole(LOG_INFO, "[VRR.Command]: Initialized commands script!");
}
// ===========================================================================
@@ -553,20 +553,20 @@ function processPlayerCommand(command, params, client) {
}
if(!doesCommandExist(toLowerCase(command))) {
- console.warn(`[Asshat.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (invalid command): /${command} ${paramsDisplay}`);
+ console.warn(`[VRR.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (invalid command): /${command} ${paramsDisplay}`);
messagePlayerError(client, `The command [#AAAAAA]/${command} [#FFFFFF]does not exist! Use /help for commands and information.`);
return false;
}
if(!commandData.enabled) {
- console.warn(`[Asshat.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (command is disabled): /${command} ${paramsDisplay}`);
+ console.warn(`[VRR.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (command is disabled): /${command} ${paramsDisplay}`);
messagePlayerError(client, `The command [#AAAAAA]/${command} [#FFFFFF]is disabled!`);
return false;
}
if(doesCommandRequireLogin(toLowerCase(command))) {
if(!isPlayerLoggedIn(client)) {
- console.warn(`[Asshat.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (requires login first): /${command} ${paramsDisplay}`);
+ console.warn(`[VRR.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (requires login first): /${command} ${paramsDisplay}`);
messagePlayerError(client, `You must be logged in to use the [#AAAAAA]/${command} [#FFFFFF]command!`);
return false;
}
@@ -574,7 +574,7 @@ function processPlayerCommand(command, params, client) {
//if(isClientFromDiscord(client)) {
// if(!isCommandAllowedOnDiscord(command)) {
- // console.warn(`[Asshat.Command] ${getPlayerDisplayForConsole(client)} attempted to use command from discord, but failed (not available on discord): /${command} ${paramsDisplay}`);
+ // console.warn(`[VRR.Command] ${getPlayerDisplayForConsole(client)} attempted to use command from discord, but failed (not available on discord): /${command} ${paramsDisplay}`);
// messagePlayerError(client, `The [#AAAAAA]/${command} [#FFFFFF] command isn't available on discord!`);
// return false;
// }
@@ -582,13 +582,13 @@ function processPlayerCommand(command, params, client) {
if(!client.console) {
if(!doesPlayerHaveStaffPermission(client, getCommandRequiredPermissions(toLowerCase(command)))) {
- console.warn(`[Asshat.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (no permission): /${command} ${paramsDisplay}`);
+ console.warn(`[VRR.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (no permission): /${command} ${paramsDisplay}`);
messagePlayerError(client, `You do not have permission to use the [#AAAAAA]/${toLowerCase(command)} [#FFFFFF]command!`);
return false;
}
}
- logToConsole(LOG_DEBUG, `[Asshat.Command] ${getPlayerDisplayForConsole(client)} used command: /${command} ${paramsDisplay}`);
+ logToConsole(LOG_DEBUG, `[VRR.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 73514104..9d010359 100644
--- a/scripts/server/config.js
+++ b/scripts/server/config.js
@@ -46,11 +46,11 @@ function loadGlobalConfig() {
phoneTalkDistance: 15,
tazerEffectDuration: 15000,
weaponEquippableTypes: [
- AG_ITEM_USETYPE_WEAPON,
- AG_ITEM_USETYPE_TAZER,
- AG_ITEM_USETYPE_EXTINGUISHER,
- AG_ITEM_USETYPE_SPRAYPAINT,
- AG_ITEM_USETYPE_PEPPERSPRAY,
+ VRR_ITEM_USETYPE_WEAPON,
+ VRR_ITEM_USETYPE_TAZER,
+ VRR_ITEM_USETYPE_EXTINGUISHER,
+ VRR_ITEM_USETYPE_SPRAYPAINT,
+ VRR_ITEM_USETYPE_PEPPERSPRAY,
],
itemActionStateReset: 5000,
subAccountNameAllowedCharacters: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
@@ -928,12 +928,12 @@ function loadGameConfig() {
// ===========================================================================
function initConfigScript() {
- logToConsole(LOG_INFO, "[Asshat.Config]: Initializing config script ...");
+ logToConsole(LOG_INFO, "[VRR.Config]: Initializing config script ...");
globalConfig = loadGlobalConfig();
gameConfig = loadGameConfig();
serverConfig = loadServerConfigFromGameAndPort(server.game, server.port);
applyConfigToServer(serverConfig);
- logToConsole(LOG_INFO, "[Asshat.Config]: Config script initialized!");
+ logToConsole(LOG_INFO, "[VRR.Config]: Config script initialized!");
}
// ===========================================================================
@@ -991,7 +991,7 @@ function applyConfigToServer(tempServerConfig) {
// ===========================================================================
function saveServerConfigToDatabase(serverConfigData) {
- logToConsole(LOG_DEBUG, `[Asshat.Config]: Saving server ${serverConfigData.databaseId} configuration to database ...`);
+ logToConsole(LOG_DEBUG, `[VRR.Config]: Saving server ${serverConfigData.databaseId} configuration to database ...`);
let dbConnection = connectToDatabase();
if(dbConnection) {
let safeServerName = escapeDatabaseString(dbConnection, serverConfigData.name);
@@ -1001,7 +1001,7 @@ function saveServerConfigToDatabase(serverConfigData) {
let dbQuery = queryDatabase(dbConnection, dbQueryString);
disconnectFromDatabase(dbConnection);
}
- logToConsole(LOG_DEBUG, `[Asshat.Config]: Server ${serverConfigData.databaseId} configuration saved to database!`);
+ logToConsole(LOG_DEBUG, `[VRR.Config]: Server ${serverConfigData.databaseId} configuration saved to database!`);
}
// ===========================================================================
@@ -1201,7 +1201,7 @@ function reloadEmailConfigurationCommand(command, params, client) {
function reloadDatabaseConfigurationCommand(command, params, client) {
//if(!databaseInUse) {
if(databaseConfig.usePersistentConnection && isDatabaseConnected(persistentDatabaseConnection)) {
- console.warn(`[Asshat.Database] Closing persistent database connection`);
+ console.warn(`[VRR.Database] Closing persistent database connection`);
persistentDatabaseConnection.close();
persistentDatabaseConnection = null;
}
diff --git a/scripts/server/const.js b/scripts/server/const.js
index 925c7c68..b51c5349 100644
--- a/scripts/server/const.js
+++ b/scripts/server/const.js
@@ -8,282 +8,282 @@
// ===========================================================================
// Prompts (used for client GUI prompt responses)
-const AG_PROMPT_NONE = 0;
-const AG_PROMPT_CREATEFIRSTCHAR = 1;
-const AG_PROMPT_BIZORDER = 2;
+const VRR_PROMPT_NONE = 0;
+const VRR_PROMPT_CREATEFIRSTCHAR = 1;
+const VRR_PROMPT_BIZORDER = 2;
// Job Types
-const AG_JOB_NONE = 0;
-const AG_JOB_POLICE = 1;
-const AG_JOB_MEDICAL = 2;
-const AG_JOB_FIRE = 3;
-const AG_JOB_BUS = 4;
-const AG_JOB_TAXI = 5;
-const AG_JOB_GARBAGE = 6;
-const AG_JOB_WEAPON = 7;
-const AG_JOB_DRUG = 8;
+const VRR_JOB_NONE = 0;
+const VRR_JOB_POLICE = 1;
+const VRR_JOB_MEDICAL = 2;
+const VRR_JOB_FIRE = 3;
+const VRR_JOB_BUS = 4;
+const VRR_JOB_TAXI = 5;
+const VRR_JOB_GARBAGE = 6;
+const VRR_JOB_WEAPON = 7;
+const VRR_JOB_DRUG = 8;
// Pickup Types
-const AG_PICKUP_NONE = 0;
-const AG_PICKUP_JOB = 1;
-const AG_PICKUP_BUSINESS_ENTRANCE = 2;
-const AG_PICKUP_BUSINESS_EXIT = 3;
-const AG_PICKUP_HOUSE_ENTRANCE = 4;
-const AG_PICKUP_HOUSE_EXIT = 5;
-const AG_PICKUP_EXIT = 5;
+const VRR_PICKUP_NONE = 0;
+const VRR_PICKUP_JOB = 1;
+const VRR_PICKUP_BUSINESS_ENTRANCE = 2;
+const VRR_PICKUP_BUSINESS_EXIT = 3;
+const VRR_PICKUP_HOUSE_ENTRANCE = 4;
+const VRR_PICKUP_HOUSE_EXIT = 5;
+const VRR_PICKUP_EXIT = 5;
// Vehicle Owner Types
-const AG_VEHOWNER_NONE = 0; // Not owned
-const AG_VEHOWNER_PLAYER = 1; // Owned by a player (character/subaccount)
-const AG_VEHOWNER_JOB = 2; // Owned by a job
-const AG_VEHOWNER_CLAN = 3; // Owned by a clan
-const AG_VEHOWNER_FACTION = 4; // Owned by a faction (not used at the moment)
-const AG_VEHOWNER_PUBLIC = 5; // Public vehicle. Anybody can drive it.
-const AG_VEHOWNER_BIZ = 6; // Owned by a business (also includes dealerships since they're businesses)
+const VRR_VEHOWNER_NONE = 0; // Not owned
+const VRR_VEHOWNER_PLAYER = 1; // Owned by a player (character/subaccount)
+const VRR_VEHOWNER_JOB = 2; // Owned by a job
+const VRR_VEHOWNER_CLAN = 3; // Owned by a clan
+const VRR_VEHOWNER_FACTION = 4; // Owned by a faction (not used at the moment)
+const VRR_VEHOWNER_PUBLIC = 5; // Public vehicle. Anybody can drive it.
+const VRR_VEHOWNER_BIZ = 6; // Owned by a business (also includes dealerships since they're businesses)
// Business Owner Types
-const AG_BIZOWNER_NONE = 0; // Not owned
-const AG_BIZOWNER_PLAYER = 1; // Owned by a player (character/subaccount)
-const AG_BIZOWNER_JOB = 2; // Owned by a job
-const AG_BIZOWNER_CLAN = 3; // Owned by a clan
-const AG_BIZOWNER_FACTION = 4; // Owned by a faction (not used at the moment)
-const AG_BIZOWNER_PUBLIC = 5; // Public Business. Used for goverment/official places like police, fire, city hall, DMV, etc
+const VRR_BIZOWNER_NONE = 0; // Not owned
+const VRR_BIZOWNER_PLAYER = 1; // Owned by a player (character/subaccount)
+const VRR_BIZOWNER_JOB = 2; // Owned by a job
+const VRR_BIZOWNER_CLAN = 3; // Owned by a clan
+const VRR_BIZOWNER_FACTION = 4; // Owned by a faction (not used at the moment)
+const VRR_BIZOWNER_PUBLIC = 5; // Public Business. Used for goverment/official places like police, fire, city hall, DMV, etc
// House Owner Types
-const AG_HOUSEOWNER_NONE = 0; // Not owned
-const AG_HOUSEOWNER_PLAYER = 1; // Owner is a player (character/subaccount)
-const AG_HOUSEOWNER_JOB = 2; // Owned by a job
-const AG_HOUSEOWNER_CLAN = 3; // Owned by a clan
-const AG_HOUSEOWNER_FACTION = 4; // Owned by a faction
-const AG_HOUSEOWNER_PUBLIC = 5; // Is a public house. Technically not owned. This probably won't be used.
+const VRR_HOUSEOWNER_NONE = 0; // Not owned
+const VRR_HOUSEOWNER_PLAYER = 1; // Owner is a player (character/subaccount)
+const VRR_HOUSEOWNER_JOB = 2; // Owned by a job
+const VRR_HOUSEOWNER_CLAN = 3; // Owned by a clan
+const VRR_HOUSEOWNER_FACTION = 4; // Owned by a faction
+const VRR_HOUSEOWNER_PUBLIC = 5; // Is a public house. Technically not owned. This probably won't be used.
// Business Location Types
-const AG_BIZLOC_NONE = 0; // None
-const AG_BIZLOC_FUEL = 1; // Fuel pump
-const AG_BIZLOC_DRIVETHRU = 2; // Drivethrough
-const AG_BIZLOC_VENDMACHINE = 3; // Vending machine
+const VRR_BIZLOC_NONE = 0; // None
+const VRR_BIZLOC_FUEL = 1; // Fuel pump
+const VRR_BIZLOC_DRIVETHRU = 2; // Drivethrough
+const VRR_BIZLOC_VENDMACHINE = 3; // Vending machine
// Account Contact Types
-const AG_CONTACT_NONE = 0;
-const AG_CONTACT_NEUTRAL = 1; // Contact is neutral. Used for general contacts with no special additional features
-const AG_CONTACT_FRIEND = 2; // Contact is a friend. Shows when they're online.
-const AG_CONTACT_BLOCKED = 3; // Contact is blocked. Prevents all communication to/from them except for RP
+const VRR_CONTACT_NONE = 0;
+const VRR_CONTACT_NEUTRAL = 1; // Contact is neutral. Used for general contacts with no special additional features
+const VRR_CONTACT_FRIEND = 2; // Contact is a friend. Shows when they're online.
+const VRR_CONTACT_BLOCKED = 3; // Contact is blocked. Prevents all communication to/from them except for RP
// Job Work Types (Currently Unused)
-const AG_JOBWORKTYPE_NONE = 0;
-const AG_JOBWORKTYPE_ROUTE = 1; // Jobs that use routes. Bus, trash collector, mail, etc
-const AG_JOBWORKTYPE_SELL = 2; // Jobs that sell items to other players and NPCs. Drugs, guns, etc
-const AG_JOBWORKTYPE_SERVICE = 3; // Services to other players and NPCs. Taxi ride, mechanic fix, etc
+const VRR_JOBWORKTYPE_NONE = 0;
+const VRR_JOBWORKTYPE_ROUTE = 1; // Jobs that use routes. Bus, trash collector, mail, etc
+const VRR_JOBWORKTYPE_SELL = 2; // Jobs that sell items to other players and NPCs. Drugs, guns, etc
+const VRR_JOBWORKTYPE_SERVICE = 3; // Services to other players and NPCs. Taxi ride, mechanic fix, etc
// Vehicle Seats
-const AG_VEHSEAT_DRIVER = 0;
-const AG_VEHSEAT_FRONTPASSENGER = 1;
-const AG_VEHSEAT_REARLEFTPASSENGER = 2;
-const AG_VEHSEAT_REARRIGHTPASSENGER = 3;
+const VRR_VEHSEAT_DRIVER = 0;
+const VRR_VEHSEAT_FRONTPASSENGER = 1;
+const VRR_VEHSEAT_REARLEFTPASSENGER = 2;
+const VRR_VEHSEAT_REARRIGHTPASSENGER = 3;
// Ban Types
-const AG_BANTYPE_NONE = 0;
-const AG_BANTYPE_ACCOUNT = 1;
-const AG_BANTYPE_SUBACCOUNT = 2;
-const AG_BANTYPE_IPADDRESS = 3;
-const AG_BANTYPE_SUBNET = 4;
+const VRR_BANTYPE_NONE = 0;
+const VRR_BANTYPE_ACCOUNT = 1;
+const VRR_BANTYPE_SUBACCOUNT = 2;
+const VRR_BANTYPE_IPADDRESS = 3;
+const VRR_BANTYPE_SUBNET = 4;
// Blip Owner Types
-const AG_BLIP_NONE = 0;
-const AG_BLIP_JOB = 1;
-const AG_BLIP_BUSINESS_ENTRANCE = 2;
-const AG_BLIP_BUSINESS_EXIT = 3;
-const AG_BLIP_HOUSE_ENTRANCE = 4;
-const AG_BLIP_HOUSE_EXIT = 5;
-const AG_BLIP_EXIT = 6;
+const VRR_BLIP_NONE = 0;
+const VRR_BLIP_JOB = 1;
+const VRR_BLIP_BUSINESS_ENTRANCE = 2;
+const VRR_BLIP_BUSINESS_EXIT = 3;
+const VRR_BLIP_HOUSE_ENTRANCE = 4;
+const VRR_BLIP_HOUSE_EXIT = 5;
+const VRR_BLIP_EXIT = 6;
// Insurance Account Owner Types
-const AG_INS_ACCT_OWNER_NONE = 0; // None
-const AG_INS_ACCT_OWNER_PLAYER = 1; // Player owns insurance company
-const AG_INS_ACCT_OWNER_BIZ = 2; // Business owns insurance company
-const AG_INS_ACCT_OWNER_CLAN = 3; // Clan owns insurance company
+const VRR_INS_ACCT_OWNER_NONE = 0; // None
+const VRR_INS_ACCT_OWNER_PLAYER = 1; // Player owns insurance company
+const VRR_INS_ACCT_OWNER_BIZ = 2; // Business owns insurance company
+const VRR_INS_ACCT_OWNER_CLAN = 3; // Clan owns insurance company
// Insurance Account Entity Types
-const AG_INS_ACCT_ENTITY_NONE = 0; // None
-const AG_INS_ACCT_ENTITY_PLAYER_HEALTH = 1; // Health Insurance
-const AG_INS_ACCT_ENTITY_PLAYER_LIFE = 2; // Life Insurance
-const AG_INS_ACCT_ENTITY_VEH = 3; // Vehicle Insurance
-const AG_INS_ACCT_ENTITY_BIZ = 4; // Business Insurance
-const AG_INS_ACCT_ENTITY_HOUSE = 5; // House Insurance
+const VRR_INS_ACCT_ENTITY_NONE = 0; // None
+const VRR_INS_ACCT_ENTITY_PLAYER_HEALTH = 1; // Health Insurance
+const VRR_INS_ACCT_ENTITY_PLAYER_LIFE = 2; // Life Insurance
+const VRR_INS_ACCT_ENTITY_VEH = 3; // Vehicle Insurance
+const VRR_INS_ACCT_ENTITY_BIZ = 4; // Business Insurance
+const VRR_INS_ACCT_ENTITY_HOUSE = 5; // House Insurance
// Insurance Account History Types
-const AG_INS_ACCT_HISTORY_NONE = 0; // None
-const AG_INS_ACCT_HISTORY_PLAYER_MEDICAL = 1; // Medical insurance was used (player disease/injury)
-const AG_INS_ACCT_HISTORY_PLAYER_DEATH = 2; // Life insurance was used (player death)
-const AG_INS_ACCT_HISTORY_VEH_DAMAGE = 3; // Vehicle was damaged, but not destroyed
-const AG_INS_ACCT_HISTORY_VEH_WRECKED = 4; // Vehicle was completely destroyed
-const AG_INS_ACCT_HISTORY_VEH_THEFT = 5; // Vehicle was stolen
-const AG_INS_ACCT_HISTORY_BIZ_DAMAGE = 6; // Business was damaged (broken items/window/door)
-const AG_INS_ACCT_HISTORY_BIZ_THEFT = 7; // Business was stolen from
-const AG_INS_ACCT_HISTORY_HOUSE_DAMAGE = 8; // House was damaged
-const AG_INS_ACCT_HISTORY_HOUSE_THEFT = 9; // House was stolen from
+const VRR_INS_ACCT_HISTORY_NONE = 0; // None
+const VRR_INS_ACCT_HISTORY_PLAYER_MEDICAL = 1; // Medical insurance was used (player disease/injury)
+const VRR_INS_ACCT_HISTORY_PLAYER_DEATH = 2; // Life insurance was used (player death)
+const VRR_INS_ACCT_HISTORY_VEH_DAMAGE = 3; // Vehicle was damaged, but not destroyed
+const VRR_INS_ACCT_HISTORY_VEH_WRECKED = 4; // Vehicle was completely destroyed
+const VRR_INS_ACCT_HISTORY_VEH_THEFT = 5; // Vehicle was stolen
+const VRR_INS_ACCT_HISTORY_BIZ_DAMAGE = 6; // Business was damaged (broken items/window/door)
+const VRR_INS_ACCT_HISTORY_BIZ_THEFT = 7; // Business was stolen from
+const VRR_INS_ACCT_HISTORY_HOUSE_DAMAGE = 8; // House was damaged
+const VRR_INS_ACCT_HISTORY_HOUSE_THEFT = 9; // House was stolen from
// Islands
-const AG_ISLAND_NONE = 0; // None
-const AG_ISLAND_PORTLAND = 0; // Portland Island
-const AG_ISLAND_STAUNTON = 1; // Staunton Island
-const AG_ISLAND_SHORESIDEVALE = 2; // Shoreside Vale
-const AG_ISLAND_VICEWEST = 0; // Western Island of VC
-const AG_ISLAND_VICEEAST = 1; // Eastern Island of VC
-const AG_ISLAND_LOSSANTOS = 0; // Los Santos
-const AG_ISLAND_LASVENTURAS = 1; // Las Venturas
-const AG_ISLAND_SANFIERRO = 2; // San Fierro
-const AG_ISLAND_REDCOUNTYNORTH = 4; // Red County North (spans all the way from Palamino/shore on the east east to border of Flint Co on the west)
-const AG_ISLAND_BONECOUNTYNORTH = 5; // Bone County North (usually called Tierra Robada)
-const AG_ISLAND_BONECOUNTYSOUTH = 6; // Bone County South
+const VRR_ISLAND_NONE = 0; // None
+const VRR_ISLAND_PORTLAND = 0; // Portland Island
+const VRR_ISLAND_STAUNTON = 1; // Staunton Island
+const VRR_ISLAND_SHORESIDEVALE = 2; // Shoreside Vale
+const VRR_ISLAND_VICEWEST = 0; // Western Island of VC
+const VRR_ISLAND_VICEEAST = 1; // Eastern Island of VC
+const VRR_ISLAND_LOSSANTOS = 0; // Los Santos
+const VRR_ISLAND_LASVENTURAS = 1; // Las Venturas
+const VRR_ISLAND_SANFIERRO = 2; // San Fierro
+const VRR_ISLAND_REDCOUNTYNORTH = 4; // Red County North (spans all the way from Palamino/shore on the east east to border of Flint Co on the west)
+const VRR_ISLAND_BONECOUNTYNORTH = 5; // Bone County North (usually called Tierra Robada)
+const VRR_ISLAND_BONECOUNTYSOUTH = 6; // Bone County South
// Item Owners
-const AG_ITEM_OWNER_NONE = 0; // None
-const AG_ITEM_OWNER_PLAYER = 1; // Item is in a player's inventory
-const AG_ITEM_OWNER_VEHTRUNK = 2; // Item is in a vehicle's trunk
-const AG_ITEM_OWNER_VEHDASH = 3; // Item is in a vehicle's glove compartment
-const AG_ITEM_OWNER_BIZFLOOR = 4; // Item is in the public area of a business (on the floor = ready to buy)
-const AG_ITEM_OWNER_BIZSTORAGE = 5; // Item is in a business's storage area (stock room)
-const AG_ITEM_OWNER_HOUSE = 6; // Item is in a house
-const AG_ITEM_OWNER_SAFE = 7; // Item is in a safe (safes can be anywhere)
-const AG_ITEM_OWNER_ITEM = 8; // Item is in another item (trashbag, briefcase, wallet, suitcase, crate/box, barrel, etc)
-const AG_ITEM_OWNER_GROUND = 9; // Item is on the ground
-const AG_ITEM_OWNER_JOBLOCKER = 10; // Item is in player's job locker
-const AG_ITEM_OWNER_LOCKER = 10; // Item is in player's locker
+const VRR_ITEM_OWNER_NONE = 0; // None
+const VRR_ITEM_OWNER_PLAYER = 1; // Item is in a player's inventory
+const VRR_ITEM_OWNER_VEHTRUNK = 2; // Item is in a vehicle's trunk
+const VRR_ITEM_OWNER_VEHDASH = 3; // Item is in a vehicle's glove compartment
+const VRR_ITEM_OWNER_BIZFLOOR = 4; // Item is in the public area of a business (on the floor = ready to buy)
+const VRR_ITEM_OWNER_BIZSTORAGE = 5; // Item is in a business's storage area (stock room)
+const VRR_ITEM_OWNER_HOUSE = 6; // Item is in a house
+const VRR_ITEM_OWNER_SAFE = 7; // Item is in a safe (safes can be anywhere)
+const VRR_ITEM_OWNER_ITEM = 8; // Item is in another item (trashbag, briefcase, wallet, suitcase, crate/box, barrel, etc)
+const VRR_ITEM_OWNER_GROUND = 9; // Item is on the ground
+const VRR_ITEM_OWNER_JOBLOCKER = 10; // Item is in player's job locker
+const VRR_ITEM_OWNER_LOCKER = 10; // Item is in player's locker
// Item Use Types
-const AG_ITEM_USETYPE_NONE = 0; // Has no effect
-const AG_ITEM_USETYPE_WEAPON = 1; // Equips weapon
-const AG_ITEM_USETYPE_AMMO_CLIP = 2; // Magazine for weapon. If in inventory, R will load it into gun
-const AG_ITEM_USETYPE_PHONE = 3; // Pulls out phone
-const AG_ITEM_USETYPE_GPS = 4; // Not sure how I want this to work yet
-const AG_ITEM_USETYPE_MAP = 5; // Shows minimap on HUD
-const AG_ITEM_USETYPE_SKIN = 6; // Changes skin (item skin is replaced with previous skin before changing)
-const AG_ITEM_USETYPE_PEDPART = 7; // Changes ped part (clothing, skin, hair, etc) (UNUSED)
-const AG_ITEM_USETYPE_PEDPROP = 8; // Changes ped prop (watches, glasses, hats, etc) (UNUSED)
-const AG_ITEM_USETYPE_STORAGE = 9; // Shows stored items. Backpack, crate, briefcase, wallet, etc
-const AG_ITEM_USETYPE_VEHKEY = 10; // Locks/unlocks a vehicle and allows starting engine without hotwire
-const AG_ITEM_USETYPE_BIZKEY = 11; // Locks/unlocks a business
-const AG_ITEM_USETYPE_HOUSEKEY = 12; // Locks/unlocks a house
-const AG_ITEM_USETYPE_SEED = 13; // Plants a seed
-const AG_ITEM_USETYPE_WEED = 14; // Light drug effect (short term relief of addiction symptoms?)
-const AG_ITEM_USETYPE_COKE = 15; // Medium drug effect (medium term relief of addiction symptoms?)
-const AG_ITEM_USETYPE_METH = 16; // Heavy drug effect (extended term relief of addiction symptoms?)
-const AG_ITEM_USETYPE_CIGAR = 17; // Just for appearance. Makes people look cool I guess
-const AG_ITEM_USETYPE_WATER = 18; // Replenishes small amount of health
-const AG_ITEM_USETYPE_FOOD = 19; // Eat food. Replenishes a small amount of health
-const AG_ITEM_USETYPE_BEER = 20; // Subtle drunk effect. Replenishes small amount of health.
-const AG_ITEM_USETYPE_WINE = 21; // Moderate drunk effect. Replenishes moderate amount of health.
-const AG_ITEM_USETYPE_LIQUOR = 22; // Heavy drunk effect. Replenishes large amount of health.
-const AG_ITEM_USETYPE_COFFEE = 23; // Replenishes moderate amount of health.
-const AG_ITEM_USETYPE_AMMO_ROUND = 23; // Bullet. Loads into magazine. Not used at the moment
-const AG_ITEM_USETYPE_HANDCUFF = 24; //
-const AG_ITEM_USETYPE_ROPE = 25; //
-const AG_ITEM_USETYPE_BLINDFOLD = 26; //
-const AG_ITEM_USETYPE_TAZER = 27; //
-const AG_ITEM_USETYPE_ARMOUR = 28; //
-const AG_ITEM_USETYPE_HEALTH = 29; //
-const AG_ITEM_USETYPE_AED = 30; //
-const AG_ITEM_USETYPE_WALKIETALKIE = 31; //
-const AG_ITEM_USETYPE_BOOMBOX = 32; //
-const AG_ITEM_USETYPE_EARBUDS = 33; //
-const AG_ITEM_USETYPE_BADGE = 34; //
-const AG_ITEM_USETYPE_DRINK = 35; //
-const AG_ITEM_USETYPE_EXTINGUISHER = 36; //
-const AG_ITEM_USETYPE_SPRAYPAINT = 37; //
-const AG_ITEM_USETYPE_PEPPERSPRAY = 38; //
-const AG_ITEM_USETYPE_FLASHLIGHT = 39; //
-const AG_ITEM_USETYPE_AIRPLANETICKET = 40; //
-const AG_ITEM_USETYPE_TRAINTICKET = 41; //
-const AG_ITEM_USETYPE_VEHUPGRADE_PART = 42; //
-const AG_ITEM_USETYPE_VEHTIRE = 43; //
-const AG_ITEM_USETYPE_FUELCAN = 44; //
+const VRR_ITEM_USETYPE_NONE = 0; // Has no effect
+const VRR_ITEM_USETYPE_WEAPON = 1; // Equips weapon
+const VRR_ITEM_USETYPE_AMMO_CLIP = 2; // Magazine for weapon. If in inventory, R will load it into gun
+const VRR_ITEM_USETYPE_PHONE = 3; // Pulls out phone
+const VRR_ITEM_USETYPE_GPS = 4; // Not sure how I want this to work yet
+const VRR_ITEM_USETYPE_MAP = 5; // Shows minimap on HUD
+const VRR_ITEM_USETYPE_SKIN = 6; // Changes skin (item skin is replaced with previous skin before changing)
+const VRR_ITEM_USETYPE_PEDPART = 7; // Changes ped part (clothing, skin, hair, etc) (UNUSED)
+const VRR_ITEM_USETYPE_PEDPROP = 8; // Changes ped prop (watches, glasses, hats, etc) (UNUSED)
+const VRR_ITEM_USETYPE_STORAGE = 9; // Shows stored items. Backpack, crate, briefcase, wallet, etc
+const VRR_ITEM_USETYPE_VEHKEY = 10; // Locks/unlocks a vehicle and allows starting engine without hotwire
+const VRR_ITEM_USETYPE_BIZKEY = 11; // Locks/unlocks a business
+const VRR_ITEM_USETYPE_HOUSEKEY = 12; // Locks/unlocks a house
+const VRR_ITEM_USETYPE_SEED = 13; // Plants a seed
+const VRR_ITEM_USETYPE_WEED = 14; // Light drug effect (short term relief of addiction symptoms?)
+const VRR_ITEM_USETYPE_COKE = 15; // Medium drug effect (medium term relief of addiction symptoms?)
+const VRR_ITEM_USETYPE_METH = 16; // Heavy drug effect (extended term relief of addiction symptoms?)
+const VRR_ITEM_USETYPE_CIGAR = 17; // Just for appearance. Makes people look cool I guess
+const VRR_ITEM_USETYPE_WATER = 18; // Replenishes small amount of health
+const VRR_ITEM_USETYPE_FOOD = 19; // Eat food. Replenishes a small amount of health
+const VRR_ITEM_USETYPE_BEER = 20; // Subtle drunk effect. Replenishes small amount of health.
+const VRR_ITEM_USETYPE_WINE = 21; // Moderate drunk effect. Replenishes moderate amount of health.
+const VRR_ITEM_USETYPE_LIQUOR = 22; // Heavy drunk effect. Replenishes large amount of health.
+const VRR_ITEM_USETYPE_COFFEE = 23; // Replenishes moderate amount of health.
+const VRR_ITEM_USETYPE_AMMO_ROUND = 23; // Bullet. Loads into magazine. Not used at the moment
+const VRR_ITEM_USETYPE_HANDCUFF = 24; //
+const VRR_ITEM_USETYPE_ROPE = 25; //
+const VRR_ITEM_USETYPE_BLINDFOLD = 26; //
+const VRR_ITEM_USETYPE_TAZER = 27; //
+const VRR_ITEM_USETYPE_ARMOUR = 28; //
+const VRR_ITEM_USETYPE_HEALTH = 29; //
+const VRR_ITEM_USETYPE_AED = 30; //
+const VRR_ITEM_USETYPE_WALKIETALKIE = 31; //
+const VRR_ITEM_USETYPE_BOOMBOX = 32; //
+const VRR_ITEM_USETYPE_EARBUDS = 33; //
+const VRR_ITEM_USETYPE_BADGE = 34; //
+const VRR_ITEM_USETYPE_DRINK = 35; //
+const VRR_ITEM_USETYPE_EXTINGUISHER = 36; //
+const VRR_ITEM_USETYPE_SPRAYPAINT = 37; //
+const VRR_ITEM_USETYPE_PEPPERSPRAY = 38; //
+const VRR_ITEM_USETYPE_FLASHLIGHT = 39; //
+const VRR_ITEM_USETYPE_AIRPLANETICKET = 40; //
+const VRR_ITEM_USETYPE_TRAINTICKET = 41; //
+const VRR_ITEM_USETYPE_VEHUPGRADE_PART = 42; //
+const VRR_ITEM_USETYPE_VEHTIRE = 43; //
+const VRR_ITEM_USETYPE_FUELCAN = 44; //
// Item Drop Types
-const AG_ITEM_DROPTYPE_NONE = 0; // Can't be dropped
-const AG_ITEM_DROPTYPE_OBJECT = 1; // Drops as an object on the ground
-const AG_ITEM_DROPTYPE_PICKUP = 2; // Drops as a pickup
-const AG_ITEM_DROPTYPE_OBJECTLIGHT = 3; // Object that produces an area light effect (lamp, flashlight, etc)
-const AG_ITEM_DROPTYPE_DESTROY = 4; // Will destroy the item on drop (keys mostly but for any tiny object)
-const AG_ITEM_DROPTYPE_OBJECTSTACK = 5; // Stackable objects (crates and such). Will sit on top of closest other stackable
+const VRR_ITEM_DROPTYPE_NONE = 0; // Can't be dropped
+const VRR_ITEM_DROPTYPE_OBJECT = 1; // Drops as an object on the ground
+const VRR_ITEM_DROPTYPE_PICKUP = 2; // Drops as a pickup
+const VRR_ITEM_DROPTYPE_OBJECTLIGHT = 3; // Object that produces an area light effect (lamp, flashlight, etc)
+const VRR_ITEM_DROPTYPE_DESTROY = 4; // Will destroy the item on drop (keys mostly but for any tiny object)
+const VRR_ITEM_DROPTYPE_OBJECTSTACK = 5; // Stackable objects (crates and such). Will sit on top of closest other stackable
// Forensic Types
-const AG_FORENSICS_NONE = 0;
-const AG_FORENSICS_BULLET = 1; // Bullet. The actual tip that hits a target. Has rifling and ballistics information of the weapon.
-const AG_FORENSICS_BLOOD = 2; // Blood. Automatically applied to ground and bullets that hit when somebody is shot
-const AG_FORENSICS_BODY = 3; // Body. A dead body lol
-const AG_FORENSICS_HAIR = 4; // Hair. Automatically applied to
-const AG_FORENSICS_SWEAT = 5; // Sweat. Automatically applied to clothing when worn
-const AG_FORENSICS_SALIVA = 6; // Saliva. Automatically applied to drinks when drank
-const AG_FORENSICS_BULLETCASINGS = 7; // Bullet casings. Automatically dropped when fired from a weapon except when used in a vehicle (driveby)
+const VRR_FORENSICS_NONE = 0;
+const VRR_FORENSICS_BULLET = 1; // Bullet. The actual tip that hits a target. Has rifling and ballistics information of the weapon.
+const VRR_FORENSICS_BLOOD = 2; // Blood. Automatically applied to ground and bullets that hit when somebody is shot
+const VRR_FORENSICS_BODY = 3; // Body. A dead body lol
+const VRR_FORENSICS_HAIR = 4; // Hair. Automatically applied to
+const VRR_FORENSICS_SWEAT = 5; // Sweat. Automatically applied to clothing when worn
+const VRR_FORENSICS_SALIVA = 6; // Saliva. Automatically applied to drinks when drank
+const VRR_FORENSICS_BULLETCASINGS = 7; // Bullet casings. Automatically dropped when fired from a weapon except when used in a vehicle (driveby)
// Account Authentication Methods
-const AG_ACCT_AUTHMETHOD_NONE = 0; // None
-const AG_ACCT_AUTHMETHOD_EMAIL = 1; // Email
-const AG_ACCT_AUTHMETHOD_PHONENUM = 2; // Phone number
-const AG_ACCT_AUTHMETHOD_2FA = 3; // Two factor authentication app (authy, google authenticator, etc)
-const AG_ACCT_AUTHMETHOD_PEBBLE = 4; // Pebble watch (this one's for Vortrex but anybody with a Pebble can use)
-const AG_ACCT_AUTHMETHOD_PHONEAPP = 5; // The Android/iOS companion app (will initially be a web based thing until I can get the apps created)
+const VRR_ACCT_AUTHMETHOD_NONE = 0; // None
+const VRR_ACCT_AUTHMETHOD_EMAIL = 1; // Email
+const VRR_ACCT_AUTHMETHOD_PHONENUM = 2; // Phone number
+const VRR_ACCT_AUTHMETHOD_2FA = 3; // Two factor authentication app (authy, google authenticator, etc)
+const VRR_ACCT_AUTHMETHOD_PEBBLE = 4; // Pebble watch (this one's for Vortrex but anybody with a Pebble can use)
+const VRR_ACCT_AUTHMETHOD_PHONEAPP = 5; // The Android/iOS companion app (will initially be a web based thing until I can get the apps created)
// Police Patrol Types
-const AG_PATROLTYPE_NONE = 0; // None
-const AG_PATROLTYPE_FOOT = 1; // Foot patrol. Officer takes a vehicle to get to their designated area and then walks a beat. More common in LC games
-const AG_PATROLTYPE_VEHICLE = 2; // Vehicle patrol. More common in VC/LS/SF/LV cities.
+const VRR_PATROLTYPE_NONE = 0; // None
+const VRR_PATROLTYPE_FOOT = 1; // Foot patrol. Officer takes a vehicle to get to their designated area and then walks a beat. More common in LC games
+const VRR_PATROLTYPE_VEHICLE = 2; // Vehicle patrol. More common in VC/LS/SF/LV cities.
// Job Route States
-const AG_JOBROUTESTATE_NONE = 0; // None
-const AG_JOBROUTESTATE_INPROGRESS = 1; // Route is in progress. Player is in between stops but not at the last one.
-const AG_JOBROUTESTATE_LASTSTOP = 2; // Player is heading to the last stop on the route
-const AG_JOBROUTESTATE_PAUSED = 3; // Route is paused for some reason. For police, this could be player accepted callout and once finished, patrol route will resume
-const AG_JOBROUTESTATE_ATSTOP = 4; // For bus/trash stops that freeze player, this is the state when they're at one
+const VRR_JOBROUTESTATE_NONE = 0; // None
+const VRR_JOBROUTESTATE_INPROGRESS = 1; // Route is in progress. Player is in between stops but not at the last one.
+const VRR_JOBROUTESTATE_LASTSTOP = 2; // Player is heading to the last stop on the route
+const VRR_JOBROUTESTATE_PAUSED = 3; // Route is paused for some reason. For police, this could be player accepted callout and once finished, patrol route will resume
+const VRR_JOBROUTESTATE_ATSTOP = 4; // For bus/trash stops that freeze player, this is the state when they're at one
// Item Occupied States
-const AG_ITEM_ACTION_NONE = 0; // None
-const AG_ITEM_ACTION_USE = 1; // Using item
-const AG_ITEM_ACTION_PICKUP = 2; // Picking up item
-const AG_ITEM_ACTION_DROP = 3; // Dropping item
-const AG_ITEM_ACTION_SWITCH = 4; // Switching item
-const AG_ITEM_ACTION_PUT = 5; // Putting item (into trunk, dash, crate, etc)
-const AG_ITEM_ACTION_TAKE = 6; // Taking item (from trunk, dash, crate, etc)
+const VRR_ITEM_ACTION_NONE = 0; // None
+const VRR_ITEM_ACTION_USE = 1; // Using item
+const VRR_ITEM_ACTION_PICKUP = 2; // Picking up item
+const VRR_ITEM_ACTION_DROP = 3; // Dropping item
+const VRR_ITEM_ACTION_SWITCH = 4; // Switching item
+const VRR_ITEM_ACTION_PUT = 5; // Putting item (into trunk, dash, crate, etc)
+const VRR_ITEM_ACTION_TAKE = 6; // Taking item (from trunk, dash, crate, etc)
// Ped States
-const AG_PEDSTATE_NONE = 2; // None
-const AG_PEDSTATE_READY = 1; // Ready
-const AG_PEDSTATE_DRIVER = 2; // Driving a vehicle
-const AG_PEDSTATE_PASSENGER = 3; // In a vehicle as passenger
-const AG_PEDSTATE_DEAD = 4; // Dead
-const AG_PEDSTATE_ENTERINGPROPERTY = 5; // Entering a property
-const AG_PEDSTATE_EXITINGPROPERTY = 6; // Exiting a property
-const AG_PEDSTATE_ENTERINGVEHICLE = 7; // Entering a vehicle
-const AG_PEDSTATE_EXITINGVEHICLE = 8; // Exiting a vehicle
-const AG_PEDSTATE_BINDED = 9; // Binded by rope or handcuffs
-const AG_PEDSTATE_TAZED = 10; // Under incapacitating effect of tazer
-const AG_PEDSTATE_INTRUNK = 11; // In vehicle trunk
-const AG_PEDSTATE_INITEM = 12; // In item (crate, box, etc)
-const AG_PEDSTATE_HANDSUP = 13; // Has hands up (surrendering)
-const AG_PEDSTATE_SPAWNING = 14; // Spawning
+const VRR_PEDSTATE_NONE = 2; // None
+const VRR_PEDSTATE_READY = 1; // Ready
+const VRR_PEDSTATE_DRIVER = 2; // Driving a vehicle
+const VRR_PEDSTATE_PASSENGER = 3; // In a vehicle as passenger
+const VRR_PEDSTATE_DEAD = 4; // Dead
+const VRR_PEDSTATE_ENTERINGPROPERTY = 5; // Entering a property
+const VRR_PEDSTATE_EXITINGPROPERTY = 6; // Exiting a property
+const VRR_PEDSTATE_ENTERINGVEHICLE = 7; // Entering a vehicle
+const VRR_PEDSTATE_EXITINGVEHICLE = 8; // Exiting a vehicle
+const VRR_PEDSTATE_BINDED = 9; // Binded by rope or handcuffs
+const VRR_PEDSTATE_TAZED = 10; // Under incapacitating effect of tazer
+const VRR_PEDSTATE_INTRUNK = 11; // In vehicle trunk
+const VRR_PEDSTATE_INITEM = 12; // In item (crate, box, etc)
+const VRR_PEDSTATE_HANDSUP = 13; // Has hands up (surrendering)
+const VRR_PEDSTATE_SPAWNING = 14; // Spawning
-const AG_2FA_STATE_NONE = 0; // None
-const AG_2FA_STATE_CODEINPUT = 1; // Waiting on player to enter code to play
-const AG_2FA_STATE_SETUP_CODETOAPP = 2; // Providing player with a code to put in their auth app
-const AG_2FA_STATE_SETUP_CODEFROMAPP = 3; // Waiting on player to enter code from auth app to set up
+const VRR_2FA_STATE_NONE = 0; // None
+const VRR_2FA_STATE_CODEINPUT = 1; // Waiting on player to enter code to play
+const VRR_2FA_STATE_SETUP_CODETOAPP = 2; // Providing player with a code to put in their auth app
+const VRR_2FA_STATE_SETUP_CODEFROMAPP = 3; // Waiting on player to enter code from auth app to set up
-const AG_FORGOTPASS_STATE_NONE = 0; // None
-const AG_FORGOTPASS_STATE_CODEINPUT = 1; // Waiting on player to enter code sent via email
-const AG_FORGOTPASS_STATE_SETPASS = 2; // Waiting on player to enter new password
+const VRR_FORGOTPASS_STATE_NONE = 0; // None
+const VRR_FORGOTPASS_STATE_CODEINPUT = 1; // Waiting on player to enter code sent via email
+const VRR_FORGOTPASS_STATE_SETPASS = 2; // Waiting on player to enter new password
-const AG_NPC_COND_MATCH_NONE = 0; // None (invalid)
-const AG_NPC_COND_MATCH_EQ = 1; // Must be equal to
-const AG_NPC_COND_MATCH_GT = 2; // Must be greater than
-const AG_NPC_COND_MATCH_LT = 3; // Must be less than
-const AG_NPC_COND_MATCH_GTEQ = 4; // Must be greater than or equal to
-const AG_NPC_COND_MATCH_LTEQ = 5; // Must be less than or equal to
-const AG_NPC_COND_MATCH_CONTAINS = 6; // Must contain string (case insensitive)
-const AG_NPC_COND_MATCH_CONTAINS_CASE = 7; // Must contain string (case sensitive)
-const AG_NPC_COND_MATCH_EXACT = 8; // Must match string exactly (case insensitive)
-const AG_NPC_COND_MATCH_EXACT_CASE = 9; // Must match string exactly (case insensitive)
+const VRR_NPC_COND_MATCH_NONE = 0; // None (invalid)
+const VRR_NPC_COND_MATCH_EQ = 1; // Must be equal to
+const VRR_NPC_COND_MATCH_GT = 2; // Must be greater than
+const VRR_NPC_COND_MATCH_LT = 3; // Must be less than
+const VRR_NPC_COND_MATCH_GTEQ = 4; // Must be greater than or equal to
+const VRR_NPC_COND_MATCH_LTEQ = 5; // Must be less than or equal to
+const VRR_NPC_COND_MATCH_CONTAINS = 6; // Must contain string (case insensitive)
+const VRR_NPC_COND_MATCH_CONTAINS_CASE = 7; // Must contain string (case sensitive)
+const VRR_NPC_COND_MATCH_EXACT = 8; // Must match string exactly (case insensitive)
+const VRR_NPC_COND_MATCH_EXACT_CASE = 9; // Must match string exactly (case insensitive)
-const AG_BIZ_TYPE_NONE = 0; // None (invalid)
-const AG_BIZ_TYPE_NORMAL = 1; // Normal business (sells items)
-const AG_BIZ_TYPE_BANK = 2; // Bank
-const AG_BIZ_TYPE_PUBLIC = 3; // Public business (Government, public service, etc)
\ No newline at end of file
+const VRR_BIZ_TYPE_NONE = 0; // None (invalid)
+const VRR_BIZ_TYPE_NORMAL = 1; // Normal business (sells items)
+const VRR_BIZ_TYPE_BANK = 2; // Bank
+const VRR_BIZ_TYPE_PUBLIC = 3; // Public business (Government, public service, etc)
\ No newline at end of file
diff --git a/scripts/server/database.js b/scripts/server/database.js
index c34076e9..9200357c 100644
--- a/scripts/server/database.js
+++ b/scripts/server/database.js
@@ -14,27 +14,27 @@ let persistentDatabaseConnection = null;
// ===========================================================================
function initDatabaseScript() {
- logToConsole(LOG_INFO, "[Asshat.Database]: Initializing database script ...");
+ logToConsole(LOG_INFO, "[VRR.Database]: Initializing database script ...");
databaseConfig = loadDatabaseConfiguration();
- logToConsole(LOG_INFO, "[Asshat.Database]: Database script initialized successfully!");
+ logToConsole(LOG_INFO, "[VRR.Database]: Database script initialized successfully!");
}
// ===========================================================================
function connectToDatabase() {
if(persistentDatabaseConnection == null) {
- logToConsole(LOG_DEBUG, "[Asshat.Database] Initializing database connection ...");
+ logToConsole(LOG_DEBUG, "[VRR.Database] Initializing database connection ...");
persistentDatabaseConnection = module.mysql.connect(databaseConfig.host, databaseConfig.user, databaseConfig.pass, databaseConfig.name, databaseConfig.port);
if(persistentDatabaseConnection.error) {
- console.warn("[Asshat.Database] Database connection error: " + toString(persistentDatabaseConnection.error));
+ console.warn("[VRR.Database] Database connection error: " + toString(persistentDatabaseConnection.error));
persistentDatabaseConnection = null;
return false;
}
- logToConsole(LOG_DEBUG, "[Asshat.Database] Database connection successful!");
+ logToConsole(LOG_DEBUG, "[VRR.Database] Database connection successful!");
return persistentDatabaseConnection;
} else {
- logToConsole(LOG_DEBUG, "[Asshat.Database] Using existing database connection.");
+ logToConsole(LOG_DEBUG, "[VRR.Database] Using existing database connection.");
return persistentDatabaseConnection;
}
}
@@ -45,9 +45,9 @@ function disconnectFromDatabase(dbConnection) {
if(!databaseConfig.usePersistentConnection) {
try {
dbConnection.close();
- logToConsole(LOG_DEBUG, `[Asshat.Database] Database connection closed successfully`);
+ logToConsole(LOG_DEBUG, `[VRR.Database] Database connection closed successfully`);
} catch(error) {
- logToConsole(LOG_ERROR, `[Asshat.Database] Database connection could not be closed! (Error: ${error})`);
+ logToConsole(LOG_ERROR, `[VRR.Database] Database connection could not be closed! (Error: ${error})`);
}
}
return true;
@@ -56,7 +56,7 @@ function disconnectFromDatabase(dbConnection) {
// ===========================================================================
function queryDatabase(dbConnection, queryString) {
- logToConsole(LOG_DEBUG, `[Asshat.Database] Query string: ${queryString}`);
+ logToConsole(LOG_DEBUG, `[VRR.Database] Query string: ${queryString}`);
return dbConnection.query(queryString);
}
@@ -112,19 +112,19 @@ function quickDatabaseQuery(queryString) {
let dbConnection = connectToDatabase();
let insertId = 0;
if(dbConnection) {
- logToConsole(LOG_DEBUG, `[Asshat.Database] Query string: ${queryString}`);
+ logToConsole(LOG_DEBUG, `[VRR.Database] Query string: ${queryString}`);
let dbQuery = queryDatabase(dbConnection, queryString);
if(getDatabaseInsertId(dbConnection)) {
insertId = getDatabaseInsertId(dbConnection);
- logToConsole(LOG_DEBUG, `[Asshat.Database] Query returned insert id ${insertId}`);
+ logToConsole(LOG_DEBUG, `[VRR.Database] Query returned insert id ${insertId}`);
}
if(dbQuery) {
try {
freeDatabaseQuery(dbQuery);
- logToConsole(LOG_DEBUG, `[Asshat.Database] Query result free'd successfully`);
+ logToConsole(LOG_DEBUG, `[VRR.Database] Query result free'd successfully`);
} catch(error) {
- logToConsole(LOG_ERROR, `[Asshat.Database] Query result could not be free'd! (Error: ${error})`);
+ logToConsole(LOG_ERROR, `[VRR.Database] Query result could not be free'd! (Error: ${error})`);
}
}
@@ -176,9 +176,9 @@ function setConstantsAsGlobalVariablesInDatabase() {
let dbConnection = connectToDatabase();
let entries = Object.entries(global);
for(let i in entries) {
- logToConsole(LOG_DEBUG, `[Asshat.Database] Checking entry ${i} (${entries[i]})`);
- if(toString(i).slice(0, 3).indexOf("AG_") != -1) {
- logToConsole(LOG_DEBUG, `[Asshat.Database] Adding ${i} (${entries[i]}) to database global variables`);
+ logToConsole(LOG_DEBUG, `[VRR.Database] Checking entry ${i} (${entries[i]})`);
+ if(toString(i).slice(0, 3).indexOf("VRR_") != -1) {
+ logToConsole(LOG_DEBUG, `[VRR.Database] Adding ${i} (${entries[i]}) to database global variables`);
}
}
}
diff --git a/scripts/server/developer.js b/scripts/server/developer.js
index 44174703..aba0d297 100644
--- a/scripts/server/developer.js
+++ b/scripts/server/developer.js
@@ -8,7 +8,7 @@
// ===========================================================================
function initDeveloperScript() {
- logToConsole(LOG_INFO, "[Asshat.Developer]: Initializing developer script ...");
+ logToConsole(LOG_INFO, "[VRR.Developer]: Initializing developer script ...");
// Use GTAC command handlers for these since they need to be available on console
//addCommandHandler("sc", executeServerCodeCommand);
@@ -17,7 +17,7 @@ function initDeveloperScript() {
//addCommandHandler("allcmd", simulateCommandForAllPlayersCommand);
//addCommandHandler("addloglvl", setServerLogLevelCommand);
- logToConsole(LOG_INFO, "[Asshat.Developer]: Developer script initialized successfully!");
+ logToConsole(LOG_INFO, "[VRR.Developer]: Developer script initialized successfully!");
return true;
}
diff --git a/scripts/server/discord.js b/scripts/server/discord.js
index 1c122e91..81c6915e 100644
--- a/scripts/server/discord.js
+++ b/scripts/server/discord.js
@@ -8,8 +8,8 @@
// ===========================================================================
function initDiscordScript() {
- logToConsole(LOG_INFO, "[Asshat.Discord]: Initializing discord script ...");
- logToConsole(LOG_INFO, "[Asshat.Discord]: Discord script initialized successfully!");
+ logToConsole(LOG_INFO, "[VRR.Discord]: Initializing discord script ...");
+ logToConsole(LOG_INFO, "[VRR.Discord]: Discord script initialized successfully!");
}
// ===========================================================================
diff --git a/scripts/server/economy.js b/scripts/server/economy.js
index a534eda7..2fd36d66 100644
--- a/scripts/server/economy.js
+++ b/scripts/server/economy.js
@@ -8,8 +8,8 @@
// ===========================================================================
function initEconomyScript() {
- logToConsole(LOG_INFO, "[Asshat.Economy]: Initializing economy script ...");
- logToConsole(LOG_INFO, "[Asshat.Economy]: Economy script initialized successfully!");
+ logToConsole(LOG_INFO, "[VRR.Economy]: Initializing economy script ...");
+ logToConsole(LOG_INFO, "[VRR.Economy]: Economy script initialized successfully!");
}
// ===========================================================================
diff --git a/scripts/server/email.js b/scripts/server/email.js
index 36fe22a0..accc2f1b 100644
--- a/scripts/server/email.js
+++ b/scripts/server/email.js
@@ -8,9 +8,9 @@
// ===========================================================================
function initEmailScript() {
- logToConsole(LOG_INFO, "[Asshat.Email]: Initializing email script ...");
+ logToConsole(LOG_INFO, "[VRR.Email]: Initializing email script ...");
emailConfig = loadEmailConfiguration();
- logToConsole(LOG_INFO, "[Asshat.Email]: Email script initialized successfully!");
+ logToConsole(LOG_INFO, "[VRR.Email]: Email script initialized successfully!");
}
// ===========================================================================
diff --git a/scripts/server/event.js b/scripts/server/event.js
index 5d86e99f..5b6d6fe5 100644
--- a/scripts/server/event.js
+++ b/scripts/server/event.js
@@ -8,9 +8,9 @@
// ===========================================================================
function initEventScript() {
- logToConsole(LOG_INFO, "[Asshat.Event]: Initializing event script ...");
+ logToConsole(LOG_INFO, "[VRR.Event]: Initializing event script ...");
addAllEventHandlers();
- logToConsole(LOG_INFO, "[Asshat.Event]: Event script initialized!");
+ logToConsole(LOG_INFO, "[VRR.Event]: Event script initialized!");
}
// ===========================================================================
@@ -35,7 +35,7 @@ function addAllEventHandlers() {
// ===========================================================================
function onPlayerConnect(event, ipAddress, port) {
- logToConsole(LOG_DEBUG, `[Asshat.Event] Client connecting (IP: ${ipAddress})`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] Client connecting (IP: ${ipAddress})`);
if(isIpAddressBanned(ipAddress)) {
messagePlayerError(client, "You are banned from this server!");
return false;
@@ -57,7 +57,7 @@ function onPlayerJoined(event, client) {
// ===========================================================================
function onPlayerQuit(event, client, quitReasonId) {
- logToConsole(LOG_DEBUG, `[Asshat.Event] ${getPlayerDisplayForConsole(client)} disconnected (${disconnectReasons[quitReasonId]}[${quitReasonId}])`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] ${getPlayerDisplayForConsole(client)} disconnected (${disconnectReasons[quitReasonId]}[${quitReasonId}])`);
updateConnectionLogOnQuit(client, quitReasonId);
if(isPlayerLoggedIn(client)) {
messagePlayerNormal(null, `👋 ${client.name} has left the server (${disconnectReasons[quitReasonId]})`, getColourByName("softYellow"));
@@ -108,7 +108,7 @@ function onProcess(event, deltaTime) {
function onPedEnteringVehicle(event, ped, vehicle, seat) {
if(ped.isType(ELEMENT_PLAYER)) {
let client = getClientFromPlayerElement(ped);
- getPlayerData(client).pedState = AG_PEDSTATE_ENTERINGVEHICLE;
+ getPlayerData(client).pedState = VRR_PEDSTATE_ENTERINGVEHICLE;
if(!getVehicleData(vehicle)) {
return false;
@@ -141,7 +141,7 @@ function onPedExitingVehicle(event, ped, vehicle) {
if(ped.isType(ELEMENT_PLAYER)) {
let client = getClientFromPlayerElement(ped);
- getPlayerData(client).pedState = AG_PEDSTATE_EXITINGVEHICLE;
+ getPlayerData(client).pedState = VRR_PEDSTATE_EXITINGVEHICLE;
}
if(!getVehicleData(vehicle).spawnLocked) {
@@ -153,7 +153,7 @@ function onPedExitingVehicle(event, ped, vehicle) {
// ===========================================================================
function onResourceStart(event, resource) {
- logToConsole(LOG_WARN, `[Asshat.Event] ${resource.name} started!`);
+ logToConsole(LOG_WARN, `[VRR.Event] ${resource.name} started!`);
if(resource != thisResource) {
messageAdmins(`[#FFFFFF]Resource [#AAAAAA]${resource.name} [#FFFFFF]started!`);
@@ -163,7 +163,7 @@ function onResourceStart(event, resource) {
// ===========================================================================
function onResourceStop(event, resource) {
- logToConsole(LOG_WARN, `[Asshat.Event] ${resource.name} stopped!`);
+ logToConsole(LOG_WARN, `[VRR.Event] ${resource.name} stopped!`);
if(resource != thisResource) {
messageAdmins(`[#FFFFFF]Resource [#AAAAAA]${resource.name} [#FFFFFF]stopped!`);
@@ -206,7 +206,7 @@ async function onPlayerEnteredVehicle(client, clientVehicle, seat) {
let vehicle = client.player.vehicle;
if(vehicle.syncer != client.index) {
- if(getPlayerVehicleSeat(client) == AG_VEHSEAT_DRIVER) {
+ if(getPlayerVehicleSeat(client) == VRR_VEHSEAT_DRIVER) {
vehicle.setSyncer(client, true);
}
}
@@ -219,11 +219,11 @@ async function onPlayerEnteredVehicle(client, clientVehicle, seat) {
return false;
}
- logToConsole(LOG_DEBUG, `[Asshat.Event] ${getPlayerDisplayForConsole(client)} entered a ${getVehicleName(vehicle)} (ID: ${vehicle.getData("ag.dataSlot")}, Database ID: ${getVehicleData(vehicle).databaseId})`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] ${getPlayerDisplayForConsole(client)} entered a ${getVehicleName(vehicle)} (ID: ${vehicle.getData("ag.dataSlot")}, Database ID: ${getVehicleData(vehicle).databaseId})`);
getPlayerData(client).lastVehicle = vehicle;
- if(getPlayerVehicleSeat(client) == AG_VEHSEAT_DRIVER) {
+ if(getPlayerVehicleSeat(client) == VRR_VEHSEAT_DRIVER) {
vehicle.engine = getVehicleData(vehicle).engine;
if(getVehicleData(vehicle).buyPrice > 0) {
@@ -253,7 +253,7 @@ async function onPlayerEnteredVehicle(client, clientVehicle, seat) {
let currentSubAccount = getPlayerCurrentSubAccount(client);
if(isPlayerWorking(client)) {
- if(getVehicleData(vehicle).ownerType == AG_VEHOWNER_JOB) {
+ if(getVehicleData(vehicle).ownerType == VRR_VEHOWNER_JOB) {
if(getVehicleData(vehicle).ownerId == getPlayerCurrentSubAccount(client).job) {
getPlayerCurrentSubAccount(client).lastJobVehicle = vehicle;
}
@@ -281,7 +281,7 @@ async function onPlayerEnteredVehicle(client, clientVehicle, seat) {
// ===========================================================================
function onPlayerExitedVehicle(client, vehicle) {
- getPlayerData(client).pedState = AG_PEDSTATE_READY;
+ getPlayerData(client).pedState = VRR_PEDSTATE_READY;
//let vehicle = getPlayerData(client).lastVehicle;
@@ -289,7 +289,7 @@ function onPlayerExitedVehicle(client, vehicle) {
return false;
}
- logToConsole(LOG_DEBUG, `[Asshat.Event] ${getPlayerDisplayForConsole(client)} exited a ${getVehicleName(vehicle)} (ID: ${vehicle.getData("ag.dataSlot")}, Database ID: ${getVehicleData(vehicle).databaseId})`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] ${getPlayerDisplayForConsole(client)} exited a ${getVehicleName(vehicle)} (ID: ${vehicle.getData("ag.dataSlot")}, Database ID: ${getVehicleData(vehicle).databaseId})`);
if(isPlayerWorking(client)) {
if(isPlayerOnJobRoute(client)) {
@@ -306,7 +306,7 @@ function onPlayerExitedVehicle(client, vehicle) {
function onPlayerDeath(client, position) {
logToConsole(LOG_INFO, `${getPlayerDisplayForConsole(client)} died.`);
- getPlayerData(client).pedState = AG_PEDSTATE_DEAD;
+ getPlayerData(client).pedState = VRR_PEDSTATE_DEAD;
updatePlayerSpawnedState(client, false);
setPlayerControlState(client, false);
setTimeout(function() {
@@ -353,108 +353,108 @@ function onPedSpawn(ped) {
// ===========================================================================
function onPlayerSpawn(client) {
- logToConsole(LOG_DEBUG, `[Asshat.Event] Checking for ${getPlayerDisplayForConsole(client)}'s player ped`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] Checking for ${getPlayerDisplayForConsole(client)}'s player ped`);
if(client.player == null) {
- logToConsole(LOG_DEBUG, `[Asshat.Event] ${getPlayerDisplayForConsole(client)}'s player element not set yet. Rechecking ...`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] ${getPlayerDisplayForConsole(client)}'s player element not set yet. Rechecking ...`);
setTimeout(onPlayerSpawn, 500, client);
return false;
}
- logToConsole(LOG_DEBUG, `[Asshat.Event] ${getPlayerDisplayForConsole(client)}'s player ped is valid. Continuing spawn processing ...`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] ${getPlayerDisplayForConsole(client)}'s player ped is valid. Continuing spawn processing ...`);
- logToConsole(LOG_DEBUG, `[Asshat.Event] Checking ${getPlayerDisplayForConsole(client)}'s player data`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] Checking ${getPlayerDisplayForConsole(client)}'s player data`);
if(!getPlayerData(client)) {
- logToConsole(LOG_DEBUG, `[Asshat.Event] ${getPlayerDisplayForConsole(client)}'s player data is invalid. Kicking them from server.`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] ${getPlayerDisplayForConsole(client)}'s player data is invalid. Kicking them from server.`);
client.disconnect();
return false;
}
- logToConsole(LOG_DEBUG, `[Asshat.Event] ${getPlayerDisplayForConsole(client)}'s player data is valid. Continuing spawn processing ...`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] ${getPlayerDisplayForConsole(client)}'s player data is valid. Continuing spawn processing ...`);
if(getServerGame() == GAME_GTA_IV) {
- logToConsole(LOG_DEBUG, `[Asshat.Event] Setting ${getPlayerDisplayForConsole(client)}'s ped body parts and props`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] Setting ${getPlayerDisplayForConsole(client)}'s ped body parts and props`);
setEntityData(client.player, "ag.bodyParts", getPlayerCurrentSubAccount(client).bodyParts, true);
setEntityData(client.player, "ag.bodyProps", getPlayerCurrentSubAccount(client).bodyProps, true);
}
- logToConsole(LOG_DEBUG, `[Asshat.Event] Setting ${getPlayerDisplayForConsole(client)}'s ped scale (${getPlayerCurrentSubAccount(client).pedScale})`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] Setting ${getPlayerDisplayForConsole(client)}'s ped scale (${getPlayerCurrentSubAccount(client).pedScale})`);
setEntityData(client.player, "ag.scale", getPlayerCurrentSubAccount(client).pedScale, true);
if(isPlayerSwitchingCharacter(client) || isPlayerCreatingCharacter(client)) {
- logToConsole(LOG_DEBUG, `[Asshat.Event] ${getPlayerDisplayForConsole(client)}'s ped is being used for character selection/creation. No further spawn processing needed'`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] ${getPlayerDisplayForConsole(client)}'s ped is being used for character selection/creation. No further spawn processing needed'`);
return false;
}
- //logToConsole(LOG_DEBUG, `[Asshat.Event] Setting player skin for ${getPlayerDisplayForConsole(client)} to ${getPlayerCurrentSubAccount(client).skin}`);
+ //logToConsole(LOG_DEBUG, `[VRR.Event] Setting player skin for ${getPlayerDisplayForConsole(client)} to ${getPlayerCurrentSubAccount(client).skin}`);
//setPlayerSkin(client, getPlayerCurrentSubAccount(client).skin);
- //if(getPlayerData(client).pedState != AG_PEDSTATE_READY) {
+ //if(getPlayerData(client).pedState != VRR_PEDSTATE_READY) {
restorePlayerCamera(client);
- logToConsole(LOG_DEBUG, `[Asshat.Event] Storing ${getPlayerDisplayForConsole(client)} ped in client data `);
+ logToConsole(LOG_DEBUG, `[VRR.Event] Storing ${getPlayerDisplayForConsole(client)} ped in client data `);
getPlayerData(client).ped = client.player;
- logToConsole(LOG_DEBUG, `[Asshat.Event] Sending ${getPlayerDisplayForConsole(client)} the 'now playing as' message`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] Sending ${getPlayerDisplayForConsole(client)} the 'now playing as' message`);
messagePlayerAlert(client, `You are now playing as: [#0099FF]${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"));
- logToConsole(LOG_DEBUG, `[Asshat.Event] Updating spawned state for ${getPlayerDisplayForConsole(client)} to true`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] Updating spawned state for ${getPlayerDisplayForConsole(client)} to true`);
updatePlayerSpawnedState(client, true);
- logToConsole(LOG_DEBUG, `[Asshat.Event] Setting player interior for ${getPlayerDisplayForConsole(client)} to ${getPlayerCurrentSubAccount(client).interior}`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] Setting player interior for ${getPlayerDisplayForConsole(client)} to ${getPlayerCurrentSubAccount(client).interior}`);
setPlayerInterior(client, getPlayerCurrentSubAccount(client).interior);
- logToConsole(LOG_DEBUG, `[Asshat.Event] Setting player dimension for ${getPlayerDisplayForConsole(client)} to ${getPlayerCurrentSubAccount(client).dimension}`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] Setting player dimension for ${getPlayerDisplayForConsole(client)} to ${getPlayerCurrentSubAccount(client).dimension}`);
setPlayerDimension(client, getPlayerCurrentSubAccount(client).dimension);
- logToConsole(LOG_DEBUG, `[Asshat.Event] Setting player health for ${getPlayerDisplayForConsole(client)} to ${getPlayerCurrentSubAccount(client).health}`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] Setting player health for ${getPlayerDisplayForConsole(client)} to ${getPlayerCurrentSubAccount(client).health}`);
setPlayerHealth(client, getPlayerCurrentSubAccount(client).health);
- logToConsole(LOG_DEBUG, `[Asshat.Event] Setting player armour for ${getPlayerDisplayForConsole(client)} to ${getPlayerCurrentSubAccount(client).armour}`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] Setting player armour for ${getPlayerDisplayForConsole(client)} to ${getPlayerCurrentSubAccount(client).armour}`);
setPlayerArmour(client, getPlayerCurrentSubAccount(client).armour);
- logToConsole(LOG_DEBUG, `[Asshat.Event] Updating all player name tags`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] Updating all player name tags`);
updateAllPlayerNameTags();
- logToConsole(LOG_DEBUG, `[Asshat.Event] Sending ${getPlayerDisplayForConsole(client)}'s job type to their client (${getJobIndexFromDatabaseId(getPlayerCurrentSubAccount(client))})`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] Sending ${getPlayerDisplayForConsole(client)}'s job type to their client (${getJobIndexFromDatabaseId(getPlayerCurrentSubAccount(client))})`);
sendPlayerJobType(client, getPlayerCurrentSubAccount(client).job);
- logToConsole(LOG_DEBUG, `[Asshat.Event] Enabling all rendering states for ${getPlayerDisplayForConsole(client)}`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] Enabling all rendering states for ${getPlayerDisplayForConsole(client)}`);
setPlayer2DRendering(client, true, true, true, true, true, true);
- logToConsole(LOG_DEBUG, `[Asshat.Event] Sending snow states to ${getPlayerDisplayForConsole(client)}`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] Sending snow states to ${getPlayerDisplayForConsole(client)}`);
updatePlayerSnowState(client);
- logToConsole(LOG_DEBUG, `[Asshat.Event] Sending ground snow excluded models to ${getPlayerDisplayForConsole(client)}`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] Sending ground snow excluded models to ${getPlayerDisplayForConsole(client)}`);
sendExcludedModelsForGroundSnowToPlayer(client);
- logToConsole(LOG_DEBUG, `[Asshat.Event] Sending removed world objects to ${getPlayerDisplayForConsole(client)}`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] Sending removed world objects to ${getPlayerDisplayForConsole(client)}`);
sendRemovedWorldObjectsToPlayer(client);
if(getServerGame() == GAME_GTA_SA) {
- logToConsole(LOG_DEBUG, `[Asshat.Event] Setting player walk and fightstyle for ${getPlayerDisplayForConsole(client)}`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] Setting player walk and fightstyle for ${getPlayerDisplayForConsole(client)}`);
setEntityData(client.player, "ag.walkStyle", getPlayerCurrentSubAccount(client).walkStyle, true);
setEntityData(client.player, "ag.fightStyle", getPlayerCurrentSubAccount(client).fightStyle, true);
}
- logToConsole(LOG_DEBUG, `[Asshat.Event] Updating logo state for ${getPlayerDisplayForConsole(client)}`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] Updating logo state for ${getPlayerDisplayForConsole(client)}`);
if(getServerConfig().showLogo && doesPlayerHaveLogoEnabled(client)) {
updatePlayerShowLogoState(client, true);
}
- logToConsole(LOG_DEBUG, `[Asshat.Event] Caching ${getPlayerDisplayForConsole(client)}'s hotbar items`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] Caching ${getPlayerDisplayForConsole(client)}'s hotbar items`);
cachePlayerHotBarItems(client);
- logToConsole(LOG_DEBUG, `[Asshat.Event] Syncing ${getPlayerDisplayForConsole(client)}'s hotbar`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] Syncing ${getPlayerDisplayForConsole(client)}'s hotbar`);
updatePlayerHotBar(client);
- logToConsole(LOG_DEBUG, `[Asshat.Event] Sending custom keybinds to ${getPlayerDisplayForConsole(client)}`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] Sending custom keybinds to ${getPlayerDisplayForConsole(client)}`);
sendAccountKeyBindsToClient(client);
- logToConsole(LOG_DEBUG, `[Asshat.Event] Setting ${getPlayerDisplayForConsole(client)}'s switchchar state to false`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] Setting ${getPlayerDisplayForConsole(client)}'s switchchar state to false`);
getPlayerData(client).switchingCharacter = false;
setEntityData(client.player, "ag.inBusiness", (getPlayerCurrentSubAccount(client).inBusiness != 0) ? getBusinessIdFromDatabaseId(getPlayerCurrentSubAccount(client).inBusiness) : -1, true);
@@ -462,18 +462,18 @@ function onPlayerSpawn(client) {
if(doesPlayerHaveKeyBindForCommand(client, "enter")) {
let keyId = getPlayerKeyBindForCommand(client, "enter");
- logToConsole(LOG_DEBUG, `[Asshat.Event] Sending custom enter property key ID (${keyId}, ${sdl.getKeyName(keyId)}) to ${getPlayerDisplayForConsole(client)}`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] Sending custom enter property key ID (${keyId}, ${sdl.getKeyName(keyId)}) to ${getPlayerDisplayForConsole(client)}`);
sendPlayerEnterPropertyKey(client, keyId);
}
- logToConsole(LOG_DEBUG, `[Asshat.Event] Setting ${getPlayerDisplayForConsole(client)}'s ped state to ready`);
- getPlayerData(client).pedState = AG_PEDSTATE_READY;
+ logToConsole(LOG_DEBUG, `[VRR.Event] Setting ${getPlayerDisplayForConsole(client)}'s ped state to ready`);
+ getPlayerData(client).pedState = VRR_PEDSTATE_READY;
setTimeout(function() {
syncPlayerProperties(client);
}, 1000);
- logToConsole(LOG_DEBUG, `[Asshat.Event] Syncing ${getPlayerDisplayForConsole(client)}'s cash ${getPlayerCurrentSubAccount(client).cash}`);
+ logToConsole(LOG_DEBUG, `[VRR.Event] Syncing ${getPlayerDisplayForConsole(client)}'s cash ${getPlayerCurrentSubAccount(client).cash}`);
updatePlayerCash(client);
getPlayerData(client).payDayTickStart = sdl.ticks;
diff --git a/scripts/server/fishing.js b/scripts/server/fishing.js
index 7db88e76..1127c196 100644
--- a/scripts/server/fishing.js
+++ b/scripts/server/fishing.js
@@ -67,8 +67,8 @@ let fishingCatchables = [
// ===========================================================================
function initFishingScript() {
- logToConsole(LOG_INFO, "[Asshat.Fishing]: Initializing fishing script ...");
- logToConsole(LOG_INFO, "[Asshat.Fishing]: Fishing script initialized successfully!");
+ logToConsole(LOG_INFO, "[VRR.Fishing]: Initializing fishing script ...");
+ logToConsole(LOG_INFO, "[VRR.Fishing]: Fishing script initialized successfully!");
}
// ===========================================================================
\ No newline at end of file
diff --git a/scripts/server/gui.js b/scripts/server/gui.js
index f9bae11d..9c2dc338 100644
--- a/scripts/server/gui.js
+++ b/scripts/server/gui.js
@@ -8,27 +8,27 @@
// ===========================================================================
function initGUIScript() {
- logToConsole(LOG_INFO, "[Asshat.GUI]: Initializing GUI script ...");
- logToConsole(LOG_INFO, "[Asshat.GUI]: GUI script initialized successfully!");
+ logToConsole(LOG_INFO, "[VRR.GUI]: Initializing GUI script ...");
+ logToConsole(LOG_INFO, "[VRR.GUI]: GUI script initialized successfully!");
}
// ===========================================================================
function playerPromptAnswerNo(client) {
- if(getPlayerData(client).promptType == AG_PROMPT_NONE) {
+ if(getPlayerData(client).promptType == VRR_PROMPT_NONE) {
return false;
}
- logToConsole(LOG_DEBUG, `[Asshat.GUI] ${getPlayerDisplayForConsole(client)} answered NO to their prompt (${getPlayerData(client).promptType})`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] ${getPlayerDisplayForConsole(client)} answered NO to their prompt (${getPlayerData(client).promptType})`);
switch(getPlayerData(client).promptType) {
- case AG_PROMPT_CREATEFIRSTCHAR:
+ case VRR_PROMPT_CREATEFIRSTCHAR:
logToConsole(LOG_DEBUG, `${getPlayerDisplayForConsole(client)} chose not to create a first character. Kicking them from the server ...`);
showPlayerErrorGUI(client, "You don't have a character to play. Goodbye!", "No Characters");
setTimeout(function() { client.disconnect(); }, 5000);
break;
- case AG_PROMPT_BIZORDER:
+ case VRR_PROMPT_BIZORDER:
if(getPlayerData(client).businessOrderAmount > 0) {
if(canPlayerUseGUI(client)) {
showPlayerErrorGUI(client, "You canceled the order.", "Business Order Canceled");
@@ -45,20 +45,20 @@ function playerPromptAnswerNo(client) {
break;
}
- getPlayerData(client).promptType = AG_PROMPT_NONE;
+ getPlayerData(client).promptType = VRR_PROMPT_NONE;
}
// ===========================================================================
function playerPromptAnswerYes(client) {
- if(getPlayerData(client).promptType == AG_PROMPT_NONE) {
+ if(getPlayerData(client).promptType == VRR_PROMPT_NONE) {
return false;
}
- logToConsole(LOG_DEBUG, `[Asshat.GUI] ${getPlayerDisplayForConsole(client)} answered YES to their prompt (${getPlayerData(client).promptType})`);
+ logToConsole(LOG_DEBUG, `[VRR.GUI] ${getPlayerDisplayForConsole(client)} answered YES to their prompt (${getPlayerData(client).promptType})`);
switch(getPlayerData(client).promptType) {
- case AG_PROMPT_CREATEFIRSTCHAR:
+ case VRR_PROMPT_CREATEFIRSTCHAR:
//getPlayerData(client).creatingCharacter = true;
//spawnPlayer(client, getServerConfig().characterSelectPedPosition, getServerConfig().characterSelectPedHeading, allowedSkins[getServerGame()][0][0], getServerConfig().characterSelectInterior, getServerConfig().characterSelectDimension);
//showCharacterSelectCameraToPlayer(client);
@@ -68,19 +68,19 @@ function playerPromptAnswerYes(client) {
showPlayerNewCharacterGUI(client);
break;
- case AG_PROMPT_BIZORDER:
+ case VRR_PROMPT_BIZORDER:
if(getPlayerData(client).businessOrderAmount > 0) {
if(getBusinessData(getPlayerData(client).businessOrderBusiness).till < getPlayerData(client).businessOrderCost) {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] ${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, `[VRR.GUI] ${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)`);
showPlayerErrorGUI(client, "This business doesn't have enough money! Deposit some using /bizdeposit", "Business Order Canceled");
getPlayerData(client).businessOrderAmount = 0;
getPlayerData(client).businessOrderBusiness = false;
getPlayerData(client).businessOrderItem = -1;
getPlayerData(client).businessOrderValue = -1;
} else {
- logToConsole(LOG_DEBUG, `[Asshat.GUI] ${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, `[VRR.GUI] ${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, `You ordered ${getPlayerData(client).businessOrderAmount} ${getItemTypeData(getPlayerData(client).businessOrderItem).name} (${getItemValueDisplay(getPlayerData(client).businessOrderItem, getPlayerData(client).businessOrderValue)}) for ${getPlayerData(client).businessOrderCost}!`, "Business Order Successful");
- createItem(getPlayerData(client).businessOrderItem, getPlayerData(client).businessOrderValue, AG_ITEM_OWNER_BIZFLOOR, getBusinessData(getPlayerData(client).businessOrderBusiness).databaseId, getPlayerData(client).businessOrderAmount);
+ createItem(getPlayerData(client).businessOrderItem, getPlayerData(client).businessOrderValue, VRR_ITEM_OWNER_BIZFLOOR, getBusinessData(getPlayerData(client).businessOrderBusiness).databaseId, getPlayerData(client).businessOrderAmount);
cacheBusinessItems(getPlayerData(client).businessOrderBusiness);
getBusinessData(getPlayerData(client).businessOrderBusiness).till -= getPlayerData(client).businessOrderCost;
getPlayerData(client).businessOrderAmount = 0;
@@ -97,7 +97,7 @@ function playerPromptAnswerYes(client) {
break;
}
- getPlayerData(client).promptType = AG_PROMPT_NONE;
+ getPlayerData(client).promptType = VRR_PROMPT_NONE;
}
// ===========================================================================
diff --git a/scripts/server/help.js b/scripts/server/help.js
index dbef95fc..0650e71d 100644
--- a/scripts/server/help.js
+++ b/scripts/server/help.js
@@ -8,8 +8,8 @@
// ===========================================================================
function initHelpScript() {
- logToConsole(LOG_INFO, "[Asshat.Help]: Initializing help script ...");
- logToConsole(LOG_INFO, "[Asshat.Help]: Help script initialized successfully!");
+ logToConsole(LOG_INFO, "[VRR.Help]: Initializing help script ...");
+ logToConsole(LOG_INFO, "[VRR.Help]: Help script initialized successfully!");
}
// ===========================================================================
diff --git a/scripts/server/house.js b/scripts/server/house.js
index 09bde5c7..1bc32c93 100644
--- a/scripts/server/house.js
+++ b/scripts/server/house.js
@@ -8,7 +8,7 @@
// ===========================================================================
function initHouseScript() {
- logToConsole(LOG_INFO, "[Asshat.House]: Initializing house script ...");
+ logToConsole(LOG_INFO, "[VRR.House]: Initializing house script ...");
getServerData().houses = loadHousesFromDatabase();
if(getServerConfig().createHousePickups) {
@@ -20,14 +20,14 @@ function initHouseScript() {
}
setAllHouseIndexes();
- logToConsole(LOG_INFO, "[Asshat.House]: House script initialized successfully!");
+ logToConsole(LOG_INFO, "[VRR.House]: House script initialized successfully!");
return true;
}
// ===========================================================================
function loadHousesFromDatabase() {
- logToConsole(LOG_INFO, "[Asshat.House]: Loading houses from database ...");
+ logToConsole(LOG_INFO, "[VRR.House]: Loading houses from database ...");
let tempHouses = [];
let dbConnection = connectToDatabase();
let dbAssoc;
@@ -40,21 +40,21 @@ function loadHousesFromDatabase() {
let tempHouseData = new serverClasses.houseData(dbAssoc);
tempHouseData.locations = loadHouseLocationsFromDatabase(tempHouseData.databaseId);
tempHouses.push(tempHouseData);
- logToConsole(LOG_VERBOSE, `[Asshat.House]: House '${tempHouseData.description}' (ID ${tempHouseData.databaseId}) loaded!`);
+ logToConsole(LOG_VERBOSE, `[VRR.House]: House '${tempHouseData.description}' (ID ${tempHouseData.databaseId}) loaded!`);
}
}
freeDatabaseQuery(dbQuery);
}
disconnectFromDatabase(dbConnection);
}
- logToConsole(LOG_INFO, `[Asshat.House]: ${tempHouses.length} houses loaded from database successfully!`);
+ logToConsole(LOG_INFO, `[VRR.House]: ${tempHouses.length} houses loaded from database successfully!`);
return tempHouses;
}
// ===========================================================================
function loadHouseLocationsFromDatabase(houseId) {
- console.log(`[Asshat.House]: Loading locations for business '${getBusinessData(businessId).name}' from database ...`);
+ console.log(`[VRR.House]: Loading locations for business '${getBusinessData(businessId).name}' from database ...`);
let tempHouseLocations = [];
let dbConnection = connectToDatabase();
@@ -68,7 +68,7 @@ function loadHouseLocationsFromDatabase(houseId) {
while(dbAssoc = fetchQueryAssoc(dbQuery)) {
let tempHouseLocationData = new serverClasses.houseLocationData(dbAssoc);
tempHouseLocations.push(tempHouseLocationData);
- console.log(`[Asshat.House]: Location for house '${getHouseData(houseId).name}' loaded from database successfully!`);
+ console.log(`[VRR.House]: Location for house '${getHouseData(houseId).name}' loaded from database successfully!`);
}
}
freeDatabaseQuery(dbQuery);
@@ -76,7 +76,7 @@ function loadHouseLocationsFromDatabase(houseId) {
disconnectFromDatabase(dbConnection);
}
- console.log(`[Asshat.House]: ${tempHouseLocations.length} locations for house '${getHouseData(houseId).name}' loaded from database successfully`);
+ console.log(`[VRR.House]: ${tempHouseLocations.length} locations for house '${getHouseData(houseId).name}' loaded from database successfully`);
return tempHouseLocations;
}
@@ -142,7 +142,7 @@ function setHouseOwnerCommand(command, params, client) {
return false;
}
- getHouseData(houseId).ownerType = AG_HOUSEOWNER_PLAYER;
+ getHouseData(houseId).ownerType = VRR_HOUSEOWNER_PLAYER;
getHouseData(houseId).ownerId = getServerData().clients[newHouseOwner.index].accountData.databaseId;
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set house [#11CC11]${getHouseData(houseId).description} [#FFFFFF]owner to [#AAAAAA]${newHouseOwner.name}`);
}
@@ -164,7 +164,7 @@ function setHouseClanCommand(command, params, client) {
return false;
}
- getHouseData(houseId).ownerType = AG_HOUSEOWNER_CLAN;
+ getHouseData(houseId).ownerType = VRR_HOUSEOWNER_CLAN;
getHouseData(houseId).ownerId = getClanData(clanId).databaseId;
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set house [#11CC11]${getHouseData(houseId).description} [#FFFFFF]owner to the [#FF9900]${getClanData(clanId).name} [#FFFFFF]clan!`);
}
@@ -445,11 +445,11 @@ function getPlayerHouse(client) {
// ===========================================================================
function saveAllHousesToDatabase() {
- logToConsole(LOG_INFO, `[Asshat.House]: Saving all server houses to database ...`);
+ logToConsole(LOG_INFO, `[VRR.House]: Saving all server houses to database ...`);
for(let i in getServerData().houses) {
saveHouseToDatabase(i);
}
- logToConsole(LOG_INFO, `[Asshat.House]: Saving all server houses to database ...`);
+ logToConsole(LOG_INFO, `[VRR.House]: Saving all server houses to database ...`);
}
// ===========================================================================
@@ -457,7 +457,7 @@ function saveAllHousesToDatabase() {
function saveHouseToDatabase(houseId) {
let tempHouseData = getServerData().houses[houseId];
- logToConsole(LOG_VERBOSE, `[Asshat.House]: Saving house '${tempHouseData.databaseId}' to database ...`);
+ logToConsole(LOG_VERBOSE, `[VRR.House]: Saving house '${tempHouseData.databaseId}' to database ...`);
let dbConnection = connectToDatabase();
if(dbConnection) {
let safeHouseDescription = escapeDatabaseString(dbConnection, tempHouseData.description);
@@ -501,7 +501,7 @@ function saveHouseToDatabase(houseId) {
disconnectFromDatabase(dbConnection);
return true;
}
- logToConsole(LOG_VERBOSE, `[Asshat.House]: Saved house '${tempHouseData.description}' to database!`);
+ logToConsole(LOG_VERBOSE, `[VRR.House]: Saved house '${tempHouseData.description}' to database!`);
return false;
}
@@ -511,7 +511,7 @@ function saveHouseToDatabase(houseId) {
function saveHouseLocationToDatabase(houseId, locationId) {
let tempHouseLocationData = getHouseData(houseId).locations[locationId];
- console.log(`[Asshat.House]: Saving house location ${tempHouseLocationData.databaseId} to database ...`);
+ console.log(`[VRR.House]: Saving house location ${tempHouseLocationData.databaseId} to database ...`);
let dbConnection = connectToDatabase();
if(dbConnection) {
if(tempHouseLocationData.databaseId == 0) {
@@ -525,7 +525,7 @@ function saveHouseLocationToDatabase(houseId, locationId) {
disconnectFromDatabase(dbConnection);
return true;
}
- console.log(`[Asshat.house]: Saved house location ${tempHouseLocationData.databaseId} to database!`);
+ console.log(`[VRR.house]: Saved house location ${tempHouseLocationData.databaseId} to database!`);
return false;
}
@@ -565,9 +565,9 @@ function createHouseEntrancePickup(houseId, locationId) {
getHouseData(houseId).locations[locationId].entrancePickup = gta.createPickup(pickupModelId, getHouseData(houseId).locations[locationId].entrancePosition);
getHouseData(houseId).locations[locationId].entrancePickup.onAllDimensions = false;
getHouseData(houseId).locations[locationId].entrancePickup.dimension = getHouseData(houseId).locations[locationId].entranceDimension;
- getHouseData(houseId).locations[locationId].entrancePickup.setData("ag.owner.type", AG_PICKUP_HOUSE_ENTRANCE, false);
+ getHouseData(houseId).locations[locationId].entrancePickup.setData("ag.owner.type", VRR_PICKUP_HOUSE_ENTRANCE, false);
getHouseData(houseId).locations[locationId].entrancePickup.setData("ag.owner.id", houseId, false);
- getHouseData(houseId).locations[locationId].entrancePickup.setData("ag.label.type", AG_LABEL_HOUSE, true);
+ getHouseData(houseId).locations[locationId].entrancePickup.setData("ag.label.type", VRR_LABEL_HOUSE, true);
getHouseData(houseId).locations[locationId].entrancePickup.setData("ag.label.name", getHouseData(houseId).description, true);
getHouseData(houseId).locations[locationId].entrancePickup.setData("ag.label.locked", getHouseData(houseId).locked, true);
if(getHouseData(houseId).buyPrice > 0) {
@@ -590,7 +590,7 @@ function createHouseEntranceBlip(houseId, locationId) {
getHouseData(houseId).locations[locationId].entranceBlip = gta.createBlip(getHouseData(houseId).locations[locationId].entrancePosition, blipModelId, 1, getColourByName("houseGreen"));
getHouseData(houseId).locations[locationId].entranceBlip.onAllDimensions = false;
getHouseData(houseId).locations[locationId].entranceBlip.dimension = getHouseData(houseId).locations[locationId].entranceDimension;
- getHouseData(houseId).locations[locationId].entranceBlip.setData("ag.owner.type", AG_BLIP_HOUSE_ENTRANCE, false);
+ getHouseData(houseId).locations[locationId].entranceBlip.setData("ag.owner.type", VRR_BLIP_HOUSE_ENTRANCE, false);
getHouseData(houseId).locations[locationId].entranceBlip.setData("ag.owner.id", houseId, false);
addToWorld(getHouseData(houseId).locations[locationId].entranceBlip);
}
@@ -610,9 +610,9 @@ function createHouseExitPickup(houseId, locationId) {
getHouseData(houseId).locations[locationId].exitPickup = gta.createPickup(pickupModelId, getHouseData(houseId).locations[locationId].exitPosition);
getHouseData(houseId).locations[locationId].exitPickup.onAllDimensions = false;
getHouseData(houseId).locations[locationId].exitPickup.dimension = getHouseData(houseId).locations[locationId].exitDimension;
- getHouseData(houseId).locations[locationId].exitPickup.setData("ag.owner.type", AG_PICKUP_HOUSE_EXIT, false);
+ getHouseData(houseId).locations[locationId].exitPickup.setData("ag.owner.type", VRR_PICKUP_HOUSE_EXIT, false);
getHouseData(houseId).locations[locationId].exitPickup.setData("ag.owner.id", houseId, false);
- getHouseData(houseId).locations[locationId].exitPickup.setData("ag.label.type", AG_LABEL_EXIT, true);
+ getHouseData(houseId).locations[locationId].exitPickup.setData("ag.label.type", VRR_LABEL_EXIT, true);
addToWorld(getHouseData(houseId).locations[locationId].exitPickup);
}
}
@@ -632,7 +632,7 @@ function createHouseExitBlip(houseId, locationId) {
getHouseData(houseId).locations[locationId].exitBlip = gta.createBlip(getHouseData(houseId).locations[locationId].exitPosition, blipModelId, 1, getColourByName("houseGreen"));
getHouseData(houseId).locations[locationId].exitBlip.onAllDimensions = false;
getHouseData(houseId).locations[locationId].exitBlip.dimension = getHouseData(houseId).locations[locationId].entranceDimension;
- getHouseData(houseId).locations[locationId].exitBlip.setData("ag.owner.type", AG_BLIP_HOUSE_EXIT, false);
+ getHouseData(houseId).locations[locationId].exitBlip.setData("ag.owner.type", VRR_BLIP_HOUSE_EXIT, false);
getHouseData(houseId).locations[locationId].exitBlip.setData("ag.owner.id", houseId, false);
addToWorld(getHouseData(houseId).locations[locationId].exitBlip);
}
@@ -643,19 +643,19 @@ function createHouseExitBlip(houseId, locationId) {
function getHouseOwnerTypeText(ownerType) {
switch(ownerType) {
- case AG_HOUSEOWNER_CLAN:
+ case VRR_HOUSEOWNER_CLAN:
return "clan";
- case AG_HOUSEOWNER_PLAYER:
+ case VRR_HOUSEOWNER_PLAYER:
return "player";
- case AG_BIZOWNER_NONE:
+ case VRR_BIZOWNER_NONE:
return "not owned";
- case AG_BIZOWNER_PUBLIC:
+ case VRR_BIZOWNER_PUBLIC:
return "not owned";
- case AG_BIZOWNER_JOB:
+ case VRR_BIZOWNER_JOB:
return "job";
default:
@@ -679,24 +679,24 @@ function getHouseInfoCommand(command, params, client) {
let ownerName = "Unknown";
switch(getHouseData(houseId).ownerType) {
- case AG_HOUSEOWNER_CLAN:
+ case VRR_HOUSEOWNER_CLAN:
ownerName = getClanData(getHouseData(houseId).ownerId).name;
break;
- case AG_HOUSEOWNER_PLAYER:
+ case VRR_HOUSEOWNER_PLAYER:
let subAccountData = loadSubAccountFromId(getHouseData(houseId).ownerId);
ownerName = `${subAccountData.firstName} ${subAccountData.lastName} [${subAccountData.databaseId}]`;
break;
- case AG_HOUSEOWNER_NONE:
+ case VRR_HOUSEOWNER_NONE:
ownerName = "None";
break;
- case AG_HOUSEOWNER_PUBLIC:
+ case VRR_HOUSEOWNER_PUBLIC:
ownerName = "Public";
break;
- case AG_HOUSEOWNER_JOB:
+ case VRR_HOUSEOWNER_JOB:
ownerName = getJobData(getHouseData(houseId).ownerId).name;
break;
}
@@ -817,7 +817,7 @@ function cacheHouseItems(houseId) {
getHouseData(houseId).itemCache = [];
for(let i in getServerData().items) {
- if(getItemData(i).ownerType == AG_ITEM_OWNER_HOUSE && getItemData(i).ownerId == getHouseData(houseId).databaseId) {
+ if(getItemData(i).ownerType == VRR_ITEM_OWNER_HOUSE && getItemData(i).ownerId == getHouseData(houseId).databaseId) {
getHouseData(houseId).itemCache.push(i);
}
}
diff --git a/scripts/server/item.js b/scripts/server/item.js
index 84ea29b0..62597b06 100644
--- a/scripts/server/item.js
+++ b/scripts/server/item.js
@@ -8,7 +8,7 @@
// ===========================================================================
function initItemScript() {
- logToConsole(LOG_INFO, "[Asshat.Item]: Initializing item script ...");
+ logToConsole(LOG_INFO, "[VRR.Item]: Initializing item script ...");
getServerData().itemTypes = loadItemTypesFromDatabase();
getServerData().items = loadItemsFromDatabase();
@@ -16,7 +16,7 @@ function initItemScript() {
cacheAllGroundItems();
createAllGroundItemObjects();
- logToConsole(LOG_INFO, "[Asshat.Item]: Item script initialized successfully!");
+ logToConsole(LOG_INFO, "[VRR.Item]: Item script initialized successfully!");
return true;
}
@@ -85,7 +85,7 @@ function createItem(itemTypeId, value, ownerType, ownerId, amount=1) {
// ===========================================================================
function createGroundItem(itemTypeId, value, position, dimension = 0) {
- let itemIndex = createItem(itemTypeId, value, AG_ITEM_OWNER_GROUND, 0);
+ let itemIndex = createItem(itemTypeId, value, VRR_ITEM_OWNER_GROUND, 0);
getItemData(itemIndex).position = position;
getItemData(itemIndex).dimension = dimension;
createGroundItemObject(itemIndex);
@@ -198,11 +198,11 @@ function useItemCommand(command, params, client) {
return false;
}
- if(getItemTypeData(getItemData(itemId).itemTypeIndex).useType == AG_ITEM_USETYPE_NONE || getItemTypeData(getItemData(itemId).itemTypeIndex).useType == AG_ITEM_USETYPE_WEAPON) {
+ if(getItemTypeData(getItemData(itemId).itemTypeIndex).useType == VRR_ITEM_USETYPE_NONE || getItemTypeData(getItemData(itemId).itemTypeIndex).useType == VRR_ITEM_USETYPE_WEAPON) {
return false;
}
- getPlayerData(client).itemActionState = AG_ITEM_ACTION_USE;
+ getPlayerData(client).itemActionState = VRR_ITEM_ACTION_USE;
getPlayerData(client).itemActionItem = hotBarSlot;
showPlayerItemUseDelay(client, hotBarSlot);
@@ -259,11 +259,11 @@ function pickupItemCommand(command, params, client) {
return false;
}
- if(getPlayerData(client).itemActionState != AG_ITEM_ACTION_NONE) {
+ if(getPlayerData(client).itemActionState != VRR_ITEM_ACTION_NONE) {
return false;
}
- getPlayerData(client).itemActionState = AG_ITEM_ACTION_PICKUP;
+ getPlayerData(client).itemActionState = VRR_ITEM_ACTION_PICKUP;
getPlayerData(client).itemActionItem = itemId;
showPlayerItemPickupDelay(client, itemId);
@@ -302,12 +302,12 @@ function dropItemCommand(command, params, client) {
return false;
}
- if(getPlayerData(client).itemActionState != AG_ITEM_ACTION_NONE) {
+ if(getPlayerData(client).itemActionState != VRR_ITEM_ACTION_NONE) {
return false;
}
getPlayerData(client).itemActionItem = hotBarSlot;
- getPlayerData(client).itemActionState = AG_ITEM_ACTION_DROP;
+ getPlayerData(client).itemActionState = VRR_ITEM_ACTION_DROP;
showPlayerItemDropDelay(client, itemId);
clearPlayerItemActionStateAfterDelay(client, getGlobalConfig().itemActionStateReset);
@@ -332,12 +332,12 @@ function putItemCommand(command, params, client) {
return false;
}
- if(getPlayerData(client).itemActionState != AG_ITEM_ACTION_NONE) {
+ if(getPlayerData(client).itemActionState != VRR_ITEM_ACTION_NONE) {
return false;
}
getPlayerData(client).itemActionItem = hotBarSlot;
- getPlayerData(client).itemActionState = AG_ITEM_ACTION_PUT;
+ getPlayerData(client).itemActionState = VRR_ITEM_ACTION_PUT;
showPlayerItemPutDelay(client, hotBarSlot);
clearPlayerItemActionStateAfterDelay(client, getGlobalConfig().itemActionStateReset);
@@ -357,17 +357,17 @@ function takeItemCommand(command, params, client) {
let bestOwner = getBestItemToTake(client, itemSlot);
let itemId = bestOwner[2];
- if(bestOwner[1] == AG_ITEM_OWNER_NONE) {
+ if(bestOwner[1] == VRR_ITEM_OWNER_NONE) {
messagePlayerError(client, `You aren't near anything to take items from!`);
return false;
}
- if(getPlayerData(client).itemActionState != AG_ITEM_ACTION_NONE) {
+ if(getPlayerData(client).itemActionState != VRR_ITEM_ACTION_NONE) {
return false;
}
getPlayerData(client).itemActionItem = itemId;
- getPlayerData(client).itemActionState = AG_ITEM_ACTION_TAKE;
+ getPlayerData(client).itemActionState = VRR_ITEM_ACTION_TAKE;
showPlayerItemTakeDelay(client, itemId);
clearPlayerItemActionStateAfterDelay(client, getGlobalConfig().itemActionStateReset);
@@ -503,16 +503,16 @@ function playerUseItem(client, hotBarSlot) {
}
switch(getItemTypeData(getItemData(itemIndex).itemTypeIndex).useType) {
- case AG_ITEM_USETYPE_SKIN:
+ case VRR_ITEM_USETYPE_SKIN:
getPlayerData(client).itemActionItem = itemIndex;
forcePlayerIntoSkinSelect(client);
break;
- case AG_ITEM_USETYPE_WEAPON:
+ case VRR_ITEM_USETYPE_WEAPON:
messagePlayerError(client, `The ${getItemName(itemIndex)} is a weapon. To use it, switch to it from your items. The use key has no effect.`);
break;
- case AG_ITEM_USETYPE_PHONE:
+ case VRR_ITEM_USETYPE_PHONE:
if(getItemData(itemIndex).value == 0) {
let phoneNumber = generateRandomPhoneNumber();
getItemData(itemIndex).value = phoneNumber;
@@ -524,11 +524,11 @@ function playerUseItem(client, hotBarSlot) {
//showPlayerPhoneGUI(client);
break;
- case AG_ITEM_USETYPE_STORAGE:
+ case VRR_ITEM_USETYPE_STORAGE:
showItemInventoryToPlayer(client, itemIndex);
break;
- case AG_ITEM_USETYPE_FOOD:
+ case VRR_ITEM_USETYPE_FOOD:
meActionToNearbyPlayers(client, `takes a bite of their ${getItemName(itemIndex)}`);
deleteItem(itemIndex);
switchPlayerActiveHotBarSlot(client, -1);
@@ -541,7 +541,7 @@ function playerUseItem(client, hotBarSlot) {
//}
break;
- case AG_ITEM_USETYPE_DRINK:
+ case VRR_ITEM_USETYPE_DRINK:
meActionToNearbyPlayers(client, `takes a drink of their ${getItemName(itemIndex)}`);
deleteItem(itemIndex);
switchPlayerActiveHotBarSlot(client, -1);
@@ -556,7 +556,7 @@ function playerUseItem(client, hotBarSlot) {
//}
break;
- case AG_ITEM_USETYPE_ROPE:
+ case VRR_ITEM_USETYPE_ROPE:
closestPlayer = getClosestPlayer(getPlayerPosition(client), client);
if(!getPlayerData(closestPlayer)) {
@@ -588,7 +588,7 @@ function playerUseItem(client, hotBarSlot) {
}
break;
- case AG_ITEM_USETYPE_HANDCUFF:
+ case VRR_ITEM_USETYPE_HANDCUFF:
closestPlayer = getClosestPlayer(getPlayerPosition(client), client);
if(!getPlayerData(closestPlayer)) {
@@ -615,16 +615,16 @@ function playerUseItem(client, hotBarSlot) {
}
break;
- case AG_ITEM_USETYPE_NONE:
+ case VRR_ITEM_USETYPE_NONE:
messagePlayerError(client, `The ${getItemName(itemIndex)} doesn't do anything when you try to use it.`);
break;
- case AG_ITEM_USETYPE_WALKIETALKIE:
+ case VRR_ITEM_USETYPE_WALKIETALKIE:
getItemData(itemIndex).enabled = !getItemData(itemIndex).enabled;
messagePlayerAlert(client, `You turned ${getBoolRedGreenInlineColour(getItemData(itemIndex).enabled)}${toUpperCase(getOnOffFromBool(getItemData(itemIndex).enabled))} [#FFFFFF]your walkie talkie in slot ${getPlayerData(client).activeHotBarSlot+1} [#AAAAAA](${getItemValueDisplayForItem(itemIndex)})`);
break;
- case AG_ITEM_USETYPE_PHONE:
+ case VRR_ITEM_USETYPE_PHONE:
getItemData(itemIndex).enabled = !getItemData(itemIndex).enabled;
if(getItemData(itemIndex).enabled) {
messagePlayerAlert(client, `You turned on your phone in slot ${getPlayerData(client).activeHotBarSlot+1} (${getItemValueDisplayForItem(itemIndex)})`);
@@ -656,7 +656,7 @@ function playerDropItem(client, hotBarSlot) {
getPlayerData(client).hotBarItems[hotBarSlot] = -1;
updatePlayerHotBar(client);
- getItemData(itemId).ownerType = AG_ITEM_OWNER_GROUND;
+ getItemData(itemId).ownerType = VRR_ITEM_OWNER_GROUND;
getItemData(itemId).ownerId = 0;
getItemData(itemId).position = getPlayerPosition(client);
getItemData(itemId).dimension = getPlayerDimension(client);
@@ -673,19 +673,19 @@ function playerPutItem(client, hotBarSlot) {
let bestNewOwner = getBestNewOwnerToPutItem(client);
switch(bestNewOwner[0]) {
- case AG_ITEM_OWNER_HOUSE:
+ case VRR_ITEM_OWNER_HOUSE:
meActionToNearbyPlayers(client, `places ${getProperDeterminerForName(getItemName(itemId))} ${getItemName(itemId)} in the house`);
break;
- case AG_ITEM_OWNER_BIZFLOOR:
+ case VRR_ITEM_OWNER_BIZFLOOR:
meActionToNearbyPlayers(client, `places ${getProperDeterminerForName(getItemName(itemId))} ${getItemName(itemId)} for sale in the business`);
break;
- case AG_ITEM_OWNER_BIZSTORAGE:
+ case VRR_ITEM_OWNER_BIZSTORAGE:
meActionToNearbyPlayers(client, `places ${getProperDeterminerForName(getItemName(itemId))} ${getItemName(itemId)} in the business storage room`);
break;
- case AG_ITEM_OWNER_VEHTRUNK:
+ case VRR_ITEM_OWNER_VEHTRUNK:
meActionToNearbyPlayers(client, `places ${getProperDeterminerForName(getItemName(itemId))} ${getItemName(itemId)} in the ${getVehicleName(bestNewOwner[1])}'s trunk`);
break;
}
@@ -709,7 +709,7 @@ function playerPickupItem(client, itemId) {
let firstSlot = getPlayerFirstEmptyHotBarSlot(client);
if(firstSlot != -1) {
- getItemData(itemId).ownerType = AG_ITEM_OWNER_PLAYER;
+ getItemData(itemId).ownerType = VRR_ITEM_OWNER_PLAYER;
getItemData(itemId).ownerId = getPlayerCurrentSubAccount(client).databaseId;
getItemData(itemId).position = toVector3(0.0, 0.0, 0.0);
getItemData(itemId).dimension = 0;
@@ -724,26 +724,26 @@ function playerPickupItem(client, itemId) {
function playerTakeItem(client, itemId) {
switch(bestOwner[1]) {
- case AG_ITEM_OWNER_HOUSE:
+ case VRR_ITEM_OWNER_HOUSE:
meActionToNearbyPlayers(client, `takes ${getProperDeterminerForName(getItemName(itemId))} ${getItemName(itemId)} from the house`);
break;
- case AG_ITEM_OWNER_BIZFLOOR:
+ case VRR_ITEM_OWNER_BIZFLOOR:
meActionToNearbyPlayers(client, `takes ${getProperDeterminerForName(getItemName(itemId))} ${getItemName(itemId)} from the business`);
break;
- case AG_ITEM_OWNER_BIZSTORAGE:
+ case VRR_ITEM_OWNER_BIZSTORAGE:
meActionToNearbyPlayers(client, `takes ${getProperDeterminerForName(getItemName(itemId))} ${getItemName(itemId)} from the business storage room`);
break;
- case AG_ITEM_OWNER_VEHTRUNK:
+ case VRR_ITEM_OWNER_VEHTRUNK:
meActionToNearbyPlayers(client, `takes ${getProperDeterminerForName(getItemName(itemId))} ${getItemName(itemId)} from the trunk`);
break;
}
let firstSlot = getPlayerFirstEmptyHotBarSlot(client);
if(firstSlot != -1) {
- getItemData(itemId).ownerType = AG_ITEM_OWNER_PLAYER;
+ getItemData(itemId).ownerType = VRR_ITEM_OWNER_PLAYER;
getItemData(itemId).ownerId = getPlayerCurrentSubAccount(client).databaseId;
getPlayerData(client).hotBarItems[firstSlot] = itemId;
@@ -759,7 +759,7 @@ function playerSwitchItem(client, newHotBarSlot) {
}
let currentHotBarSlot = getPlayerData(client).activeHotBarSlot;
- logToConsole(LOG_DEBUG, `[Asshat.Item] ${getPlayerDisplayForConsole(client)} switched from hotbar slot ${currentHotBarSlot} to ${newHotBarSlot}`);
+ logToConsole(LOG_DEBUG, `[VRR.Item] ${getPlayerDisplayForConsole(client)} switched from hotbar slot ${currentHotBarSlot} to ${newHotBarSlot}`);
let currentHotBarItem = -1;
if(currentHotBarSlot != -1) {
@@ -785,20 +785,20 @@ function playerSwitchItem(client, newHotBarSlot) {
if(newHotBarItem != -1) {
if(getItemData(newHotBarItem)) {
- if(getItemTypeData(getItemData(newHotBarItem).itemTypeIndex).useType == AG_ITEM_USETYPE_WEAPON) {
+ if(getItemTypeData(getItemData(newHotBarItem).itemTypeIndex).useType == VRR_ITEM_USETYPE_WEAPON) {
if(getItemData(newHotBarItem).value > 0) {
givePlayerWeapon(client, toInteger(getItemTypeData(getItemData(newHotBarItem).itemTypeIndex).useId), toInteger(getItemData(newHotBarItem).value), true, true);
setPlayerWeaponDamageEnabled(client, true);
- setPlayerWeaponDamageEvent(client, AG_WEAPON_DAMAGE_EVENT_NONE);
+ setPlayerWeaponDamageEvent(client, VRR_WEAPON_DAMAGE_EVENT_NONE);
} else {
messagePlayerError(client, `The ${getItemName(newHotBarItem)} in slot ${newHotBarSlot} has no ammo, and can't be equipped!`);
return false;
}
- } else if(getItemTypeData(getItemData(newHotBarItem).itemTypeIndex).useType == AG_ITEM_USETYPE_TAZER) {
+ } else if(getItemTypeData(getItemData(newHotBarItem).itemTypeIndex).useType == VRR_ITEM_USETYPE_TAZER) {
if(getItemData(newHotBarItem).value > 0) {
givePlayerWeapon(client, toInteger(getItemTypeData(getItemData(newHotBarItem).itemTypeIndex).useId), toInteger(getItemData(newHotBarItem).value), true, true);
setPlayerWeaponDamageEnabled(client, false);
- setPlayerWeaponDamageEvent(client, AG_WEAPON_DAMAGE_EVENT_TAZER);
+ setPlayerWeaponDamageEvent(client, VRR_WEAPON_DAMAGE_EVENT_TAZER);
} else {
messagePlayerError(client, `The ${getItemName(newHotBarItem)} in slot ${newHotBarSlot} has no ammo, and can't be equipped!`);
return false;
@@ -849,7 +849,7 @@ function playerSwitchHotBarSlotCommand(command, params, client) {
return false;
}
- if(getPlayerData(client).itemActionState != AG_ITEM_ACTION_NONE) {
+ if(getPlayerData(client).itemActionState != VRR_ITEM_ACTION_NONE) {
return false;
}
@@ -885,7 +885,7 @@ function cacheAllGroundItems() {
getServerData().groundItemCache = [];
for(let i in getServerData().items) {
- if(getServerData().items[i].ownerType == AG_ITEM_OWNER_GROUND) {
+ if(getServerData().items[i].ownerType == VRR_ITEM_OWNER_GROUND) {
getServerData().groundItemCache.push(i);
}
}
@@ -925,7 +925,7 @@ function cachePlayerHotBarItems(client) {
}
for(let i in getServerData().items) {
- if(getItemData(i).ownerType == AG_ITEM_OWNER_PLAYER) {
+ if(getItemData(i).ownerType == VRR_ITEM_OWNER_PLAYER) {
if(getItemData(i).ownerId == getPlayerCurrentSubAccount(client).databaseId) {
let firstSlot = getPlayerFirstEmptyHotBarSlot(client);
if(firstSlot != -1) {
@@ -940,49 +940,49 @@ function cachePlayerHotBarItems(client) {
function deleteItem(itemId) {
switch(getItemData(itemId).ownerType) {
- case AG_ITEM_OWNER_GROUND:
+ case VRR_ITEM_OWNER_GROUND:
deleteGroundItemObject(itemId);
getServerData().groundItemCache.splice(getServerData().groundItemCache.indexOf(itemId), 1);
break;
- case AG_ITEM_OWNER_PLAYER:
+ case VRR_ITEM_OWNER_PLAYER:
if(getPlayerFromCharacterId(getItemData(itemId).ownerId)) {
getPlayerData(getPlayerFromCharacterId(getItemData(itemId).ownerId)).hotBarItems[getPlayerData(getPlayerFromCharacterId(getItemData(itemId).ownerId)).hotBarItems.indexOf(itemId)] = -1;
updatePlayerHotBar(getPlayerFromCharacterId(getItemData(itemId).ownerId));
}
break;
- case AG_ITEM_OWNER_JOBLOCKER:
+ case VRR_ITEM_OWNER_JOBLOCKER:
if(getPlayerFromCharacterId(getItemData(itemId).ownerId)) {
getPlayerData(getPlayerFromCharacterId(getItemData(itemId).ownerId)).jobLockerCache.splice(getPlayerData(getPlayerFromCharacterId(getItemData(itemId).ownerId)).jobLockerCache.indexOf(itemId), 1);
}
break;
- case AG_ITEM_OWNER_LOCKER:
+ case VRR_ITEM_OWNER_LOCKER:
if(getPlayerFromCharacterId(getItemData(itemId).ownerId)) {
getPlayerData(getPlayerFromCharacterId(getItemData(itemId).ownerId)).lockerCache.splice(getPlayerData(getPlayerFromCharacterId(getItemData(itemId).ownerId)).lockerCache.indexOf(itemId), 1);
}
break;
- case AG_ITEM_OWNER_VEHTRUNK:
+ case VRR_ITEM_OWNER_VEHTRUNK:
if(getVehicleDataIndex(getItemData(itemId).ownerId)) {
getVehicleDataIndex(getItemData(itemId).ownerId).trunkItemCache.splice(getVehicleDataIndex(getItemData(itemId).ownerId).trunkItemCache.indexOf(itemId), 1);
}
break;
- case AG_ITEM_OWNER_BIZFLOOR:
+ case VRR_ITEM_OWNER_BIZFLOOR:
if(getBusinessDataIndex(getItemData(itemId).ownerId)) {
getBusinessDataIndex(getItemData(itemId).ownerId).floorItemCache.splice(getBusinessDataIndex(getItemData(itemId).ownerId).floorItemCache.indexOf(itemId), 1);
}
break;
- case AG_ITEM_OWNER_BIZSTORAGE:
+ case VRR_ITEM_OWNER_BIZSTORAGE:
if(getBusinessDataIndex(getItemData(itemId).ownerId)) {
getBusinessDataIndex(getItemData(itemId).ownerId).storageItemCache.splice(getBusinessDataIndex(getItemData(itemId).ownerId).storageItemCache.indexOf(itemId), 1);
}
break;
- case AG_ITEM_OWNER_HOUSE:
+ case VRR_ITEM_OWNER_HOUSE:
if(getHouseDataIndex(getItemData(itemId).ownerId)) {
getHouseDataIndex(getItemData(itemId).ownerId).itemCache.splice(getHouseDataIndex(getItemData(itemId).ownerId).itemCache.indexOf(itemId), 1);
}
@@ -1004,20 +1004,20 @@ function getBestNewOwnerToPutItem(client) {
let possibleHouse = (isPlayerInAnyHouse(client)) ? getPlayerHouse(client) : getClosestHouseEntrance(getPlayerPosition(client));
if(getHouseData(possibleHouse)) {
- return [AG_ITEM_OWNER_HOUSE, possibleHouse];
+ return [VRR_ITEM_OWNER_HOUSE, possibleHouse];
}
let possibleBusiness = (isPlayerInAnyBusiness(client)) ? getPlayerBusiness(client) : getClosestBusinessEntrance(getPlayerPosition(client));
if(getBusinessData(possibleBusiness)) {
- return [AG_ITEM_OWNER_BIZSTORAGE, possibleBusiness];
+ return [VRR_ITEM_OWNER_BIZSTORAGE, possibleBusiness];
}
let possibleVehicle = getClosestVehicle(position);
if(getDistance(getVehicleTrunkPosition(possibleVehicle), position) <= closestDistance) {
- return [AG_ITEM_OWNER_VEHTRUNK, possibleVehicle];
+ return [VRR_ITEM_OWNER_VEHTRUNK, possibleVehicle];
}
- return [AG_ITEM_OWNER_NONE, 0];
+ return [VRR_ITEM_OWNER_NONE, 0];
}
// ===========================================================================
@@ -1026,14 +1026,14 @@ function getBestItemToTake(client, slot) {
let closestDistance = 100.0;
let position = getPlayerPosition(client);
let itemId = -1;
- let ownerType = AG_ITEM_OWNER_NONE;
+ let ownerType = VRR_ITEM_OWNER_NONE;
let ownerId = 0;
let possibleHouse = (isPlayerInAnyHouse(client)) ? getPlayerHouse(client) : getClosestHouseEntrance(getPlayerPosition(client));
if(getHouseData(possibleHouse)) {
if(typeof getHouseData(possibleHouse).itemCache[slot] != "undefined") {
itemId = getHouseData(possibleHouse).itemCache[slot];
- ownerType = AG_ITEM_OWNER_HOUSE;
+ ownerType = VRR_ITEM_OWNER_HOUSE;
ownerId = possibleHouse;
}
}
@@ -1042,7 +1042,7 @@ function getBestItemToTake(client, slot) {
if(getBusinessData(possibleBusiness)) {
if(typeof getBusinessData(possibleBusiness).floorItemCache[slot] != "undefined") {
itemId = getBusinessData(possibleBusiness).floorItemCache[slot];
- ownerType = AG_ITEM_OWNER_BIZFLOOR;
+ ownerType = VRR_ITEM_OWNER_BIZFLOOR;
ownerId = possibleBusiness;
}
}
@@ -1052,7 +1052,7 @@ function getBestItemToTake(client, slot) {
if(getDistance(getVehicleTrunkPosition(possibleVehicle), position) <= closestDistance) {
if(typeof getVehicleData(possibleVehicle).trunkItemCache[slot] != "undefined") {
itemId = getVehicleData(possibleVehicle).trunkItemCache[slot];
- ownerType = AG_ITEM_OWNER_VEHTRUNK;
+ ownerType = VRR_ITEM_OWNER_VEHTRUNK;
ownerId = possibleVehicle;
}
}
@@ -1131,7 +1131,7 @@ function listItemInventoryCommand(command, params, client) {
return false;
}
- if(getItemTypeData(getItemData(getItemData(itemId).itemCache[i]).itemTypeIndex).useType != AG_ITEM_USETYPE_STORAGE) {
+ if(getItemTypeData(getItemData(getItemData(itemId).itemCache[i]).itemTypeIndex).useType != VRR_ITEM_USETYPE_STORAGE) {
messagePlayerError(client, "This item can't hold anything!");
return false;
}
@@ -1168,7 +1168,7 @@ function saveAllItemsToDatabase() {
function saveItemToDatabase(itemId) {
let tempItemData = getServerData().items[itemId];
- logToConsole(LOG_VERBOSE, `[Asshat.Item]: Saving item '${itemId}' to database ...`);
+ logToConsole(LOG_VERBOSE, `[VRR.Item]: Saving item '${itemId}' to database ...`);
let dbConnection = connectToDatabase();
if(dbConnection) {
if(tempItemData.databaseId == 0) {
@@ -1181,7 +1181,7 @@ function saveItemToDatabase(itemId) {
queryDatabase(dbConnection, dbQueryString);
}
disconnectFromDatabase(dbConnection);
- logToConsole(LOG_VERBOSE, `[Asshat.Item]: Saved item '${tempItemData.name}' to database!`);
+ logToConsole(LOG_VERBOSE, `[VRR.Item]: Saved item '${tempItemData.name}' to database!`);
return true;
}
@@ -1234,32 +1234,32 @@ function getItemTypeIndexFromDatabaseId(databaseId) {
function playerItemActionDelayComplete(client) {
switch(getPlayerData(client).itemActionState) {
- case AG_ITEM_ACTION_USE:
+ case VRR_ITEM_ACTION_USE:
playerUseItem(client, getPlayerData(client).itemActionItem);
break;
- case AG_ITEM_ACTION_DROP:
+ case VRR_ITEM_ACTION_DROP:
playerDropItem(client, getPlayerData(client).itemActionItem);
break;
- case AG_ITEM_ACTION_TAKE:
+ case VRR_ITEM_ACTION_TAKE:
playerTakeItem(client, getPlayerData(client).itemActionItem);
break;
- case AG_ITEM_ACTION_PUT:
+ case VRR_ITEM_ACTION_PUT:
playerPutItem(client, getPlayerData(client).itemActionItem);
break;
- case AG_ITEM_ACTION_PICKUP:
+ case VRR_ITEM_ACTION_PICKUP:
playerPickupItem(client, getPlayerData(client).itemActionItem);
break;
- case AG_ITEM_ACTION_SWITCH:
+ case VRR_ITEM_ACTION_SWITCH:
playerSwitchItem(client, getPlayerData(client).itemActionItem);
break;
}
- getPlayerData(client).itemActionState = AG_ITEM_ACTION_NONE;
+ getPlayerData(client).itemActionState = VRR_ITEM_ACTION_NONE;
getPlayerData(client).itemActionItem = -1;
}
@@ -1275,15 +1275,15 @@ function getItemValueDisplayForItem(itemId) {
// ===========================================================================
function getItemValueDisplay(itemType, value) {
- if(getItemTypeData(itemType).useType == AG_ITEM_USETYPE_SKIN) {
+ if(getItemTypeData(itemType).useType == VRR_ITEM_USETYPE_SKIN) {
return "any";
- } else if(getItemTypeData(itemType).useType == AG_ITEM_USETYPE_FOOD || getItemTypeData(itemType).useType == AG_ITEM_USETYPE_DRINK || getItemTypeData(itemType).useType == AG_ITEM_USETYPE_EXTINGUISHER || getItemTypeData(itemType).useType == AG_ITEM_USETYPE_SPRAYPAINT || getItemTypeData(itemType).useType == AG_ITEM_USETYPE_PEPPERSPRAY) {
+ } else if(getItemTypeData(itemType).useType == VRR_ITEM_USETYPE_FOOD || getItemTypeData(itemType).useType == VRR_ITEM_USETYPE_DRINK || getItemTypeData(itemType).useType == VRR_ITEM_USETYPE_EXTINGUISHER || getItemTypeData(itemType).useType == VRR_ITEM_USETYPE_SPRAYPAINT || getItemTypeData(itemType).useType == VRR_ITEM_USETYPE_PEPPERSPRAY) {
return getPercentage(toString(value), getItemTypeData(itemType).capacity)+"%";
- } else if(getItemTypeData(itemType).useType == AG_ITEM_USETYPE_PHONE) {
+ } else if(getItemTypeData(itemType).useType == VRR_ITEM_USETYPE_PHONE) {
return toString(value);
- } else if(getItemTypeData(itemType).useType == AG_ITEM_USETYPE_WEAPON || getItemTypeData(itemType).useType == AG_ITEM_USETYPE_TAZER) {
+ } else if(getItemTypeData(itemType).useType == VRR_ITEM_USETYPE_WEAPON || getItemTypeData(itemType).useType == VRR_ITEM_USETYPE_TAZER) {
return toString(value)+" rounds";
- } else if(getItemTypeData(itemType).useType == AG_ITEM_USETYPE_WALKIETALKIE) {
+ } else if(getItemTypeData(itemType).useType == VRR_ITEM_USETYPE_WALKIETALKIE) {
return toString(toString(value).slice(0,-2)+"."+toString(value).slice(-1)+"MHz");
} else {
return value;
@@ -1379,7 +1379,7 @@ function getOrderPriceForItemType(itemType) {
// ===========================================================================
function clearPlayerItemActionState(client) {
- getPlayerData(client).itemActionState = AG_ITEM_ACTION_NONE;
+ getPlayerData(client).itemActionState = VRR_ITEM_ACTION_NONE;
}
// ===========================================================================
@@ -1529,7 +1529,7 @@ function showHouseInventoryToPlayer(client, houseId) {
function switchPlayerActiveHotBarSlot(client, slotId) {
getPlayerData(client).itemActionItem = slotId;
- getPlayerData(client).itemActionState = AG_ITEM_ACTION_SWITCH;
+ getPlayerData(client).itemActionState = VRR_ITEM_ACTION_SWITCH;
if(slotId != -1) {
showPlayerItemSwitchDelay(client, slotId);
}
diff --git a/scripts/server/item/handcuff.js b/scripts/server/item/handcuff.js
index f845fcc4..0ec22b2d 100644
--- a/scripts/server/item/handcuff.js
+++ b/scripts/server/item/handcuff.js
@@ -10,27 +10,27 @@
// ===========================================================================
function isPlayerHandCuffed(client) {
- return (getPlayerData(client).pedState == AG_PEDSTATE_BINDED);
+ return (getPlayerData(client).pedState == VRR_PEDSTATE_BINDED);
}
// ===========================================================================
function handCuffPlayer(client) {
- getPlayerData(client).pedState = AG_PEDSTATE_BINDED;
+ getPlayerData(client).pedState = VRR_PEDSTATE_BINDED;
setPlayerControlState(client, false);
}
// ===========================================================================
function unHandCuffPlayer(client) {
- getPlayerData(client).pedState = AG_PEDSTATE_READY;
+ getPlayerData(client).pedState = VRR_PEDSTATE_READY;
setPlayerControlState(client, true);
}
// ===========================================================================
function isPlayerSurrendered(client) {
- return (getPlayerData(client).pedState == AG_PEDSTATE_TAZED || getPlayerData(client).pedState == AG_PEDSTATE_HANDSUP);
+ return (getPlayerData(client).pedState == VRR_PEDSTATE_TAZED || getPlayerData(client).pedState == VRR_PEDSTATE_HANDSUP);
}
// ===========================================================================
\ No newline at end of file
diff --git a/scripts/server/item/phone.js b/scripts/server/item/phone.js
index b23f9fbc..02840c7c 100644
--- a/scripts/server/item/phone.js
+++ b/scripts/server/item/phone.js
@@ -11,7 +11,7 @@
function getItemWithPhoneNumber(phoneNumber) {
for(let i in getServerData().items) {
- if(getItemTypeData(getItemData(i).itemTypeIndex).useType == AG_ITEM_USETYPE_PHONE) {
+ if(getItemTypeData(getItemData(i).itemTypeIndex).useType == VRR_ITEM_USETYPE_PHONE) {
if(getItemData(i).value == phoneNumber) {
return i;
}
diff --git a/scripts/server/item/rope.js b/scripts/server/item/rope.js
index 3f7ba673..8d3ff66a 100644
--- a/scripts/server/item/rope.js
+++ b/scripts/server/item/rope.js
@@ -10,20 +10,20 @@
// ===========================================================================
function isPlayerTied(client) {
- return (getPlayerData(client).pedState == AG_PEDSTATE_BINDED);
+ return (getPlayerData(client).pedState == VRR_PEDSTATE_BINDED);
}
// ===========================================================================
function ropeTiePlayer(client) {
- getPlayerData(client).pedState = AG_PEDSTATE_BINDED;
+ getPlayerData(client).pedState = VRR_PEDSTATE_BINDED;
setPlayerControlState(client, false);
}
// ===========================================================================
function ropeUnTiePlayer(client) {
- getPlayerData(client).pedState = AG_PEDSTATE_READY;
+ getPlayerData(client).pedState = VRR_PEDSTATE_READY;
setPlayerControlState(client, true);
}
diff --git a/scripts/server/item/tazer.js b/scripts/server/item/tazer.js
index dd09a0c6..71cd0aa4 100644
--- a/scripts/server/item/tazer.js
+++ b/scripts/server/item/tazer.js
@@ -10,13 +10,13 @@
// ===========================================================================
function isPlayerTazed(client) {
- return (getPlayerData(client).pedState == AG_PEDSTATE_TAZED);
+ return (getPlayerData(client).pedState == VRR_PEDSTATE_TAZED);
}
// ===========================================================================
function tazePlayer(client) {
- getPlayerData(client).pedState = AG_PEDSTATE_TAZED;
+ getPlayerData(client).pedState = VRR_PEDSTATE_TAZED;
setPlayerControlState(client, false);
setTimeout(function() {
@@ -28,7 +28,7 @@ function tazePlayer(client) {
// ===========================================================================
function unTazePlayer(client) {
- getPlayerData(client).pedState = AG_PEDSTATE_READY;
+ getPlayerData(client).pedState = VRR_PEDSTATE_READY;
setPlayerControlState(client, true);
}
diff --git a/scripts/server/item/walkie-talkie.js b/scripts/server/item/walkie-talkie.js
index 842387c0..bb1c8bec 100644
--- a/scripts/server/item/walkie-talkie.js
+++ b/scripts/server/item/walkie-talkie.js
@@ -10,7 +10,7 @@
// ===========================================================================
function getPlayerActiveWalkieTalkieFrequency(client) {
- let walkieTalkieSlot = getPlayerFirstItemSlotByUseType(client, AG_ITEM_USETYPE_WALKIETALKIE);
+ let walkieTalkieSlot = getPlayerFirstItemSlotByUseType(client, VRR_ITEM_USETYPE_WALKIETALKIE);
if(walkieTalkieSlot != -1) {
if(getItemData(getPlayerData(client).hotBarItems[walkieTalkieSlot])) {
@@ -33,7 +33,7 @@ function walkieTalkieTransmit(radioFrequency, messageText, transmittingPlayer) {
if(isPlayerSpawned(clients[i])) {
if(!isSamePlayer(transmittingPlayer, clients[i])) {
if(getPlayerActiveWalkieTalkieFrequency(clients[i]) == radioFrequency) {
- if(getItemData(getPlayerData(clients[i]).hotBarItems[getPlayerFirstItemSlotByUseType(clients[i], AG_ITEM_USETYPE_WALKIETALKIE)]).enabled) {
+ if(getItemData(getPlayerData(clients[i]).hotBarItems[getPlayerFirstItemSlotByUseType(clients[i], VRR_ITEM_USETYPE_WALKIETALKIE)]).enabled) {
walkieTalkieIncomingToNearbyPlayers(clients[i], messageText);
}
}
@@ -111,7 +111,7 @@ function walkieTalkieChatCommand(command, params, client) {
return false;
}
- let walkieTalkieSlot = getPlayerFirstItemSlotByUseType(client, AG_ITEM_USETYPE_WALKIETALKIE);
+ let walkieTalkieSlot = getPlayerFirstItemSlotByUseType(client, VRR_ITEM_USETYPE_WALKIETALKIE);
if(!getItemData(getPlayerData(client).hotBarItems[walkieTalkieSlot]).enabled) {
messagePlayerError(client, "Please turn on a walkie talkie first!");
return false;
diff --git a/scripts/server/job.js b/scripts/server/job.js
index 68ad69a9..5326911f 100644
--- a/scripts/server/job.js
+++ b/scripts/server/job.js
@@ -8,7 +8,7 @@
// ===========================================================================
function initJobScript() {
- logToConsole(LOG_INFO, "[Asshat.Job]: Initializing job script ...");
+ logToConsole(LOG_INFO, "[VRR.Job]: Initializing job script ...");
getServerData().jobs = loadJobsFromDatabase();
if(getServerConfig().createJobPickups) {
@@ -20,14 +20,14 @@ function initJobScript() {
}
setAllJobDataIndexes();
- logToConsole(LOG_INFO, "[Asshat.Job]: Job script initialized successfully!");
+ logToConsole(LOG_INFO, "[VRR.Job]: Job script initialized successfully!");
return true;
}
// ===========================================================================
function loadJobsFromDatabase() {
- logToConsole(LOG_DEBUG, "[Asshat.Job]: Loading jobs from database ...");
+ logToConsole(LOG_DEBUG, "[VRR.Job]: Loading jobs from database ...");
let tempJobs = [];
let dbConnection = connectToDatabase();
@@ -44,7 +44,7 @@ function loadJobsFromDatabase() {
tempJobData.equipment = loadJobEquipmentsFromDatabase(tempJobData.databaseId);
tempJobData.uniforms = loadJobUniformsFromDatabase(tempJobData.databaseId);
tempJobs.push(tempJobData);
- logToConsole(LOG_DEBUG, `[Asshat.Job]: Job '${tempJobData.name}' loaded from database successfully!`);
+ logToConsole(LOG_DEBUG, `[VRR.Job]: Job '${tempJobData.name}' loaded from database successfully!`);
}
}
freeDatabaseQuery(dbQuery);
@@ -52,7 +52,7 @@ function loadJobsFromDatabase() {
disconnectFromDatabase(dbConnection);
}
- logToConsole(LOG_DEBUG, `[Asshat.Job]: ${tempJobs.length} jobs loaded from database successfully!`);
+ logToConsole(LOG_DEBUG, `[VRR.Job]: ${tempJobs.length} jobs loaded from database successfully!`);
return tempJobs;
}
@@ -83,7 +83,7 @@ function loadAllJobLocationsFromDatabase() {
// ===========================================================================
function loadJobEquipmentsFromDatabase(jobDatabaseId) {
- logToConsole(LOG_DEBUG, `[Asshat.Job]: Loading job equipments for job ${jobDatabaseId} from database ...`);
+ logToConsole(LOG_DEBUG, `[VRR.Job]: Loading job equipments for job ${jobDatabaseId} from database ...`);
let tempJobEquipments = [];
let dbConnection = connectToDatabase();
@@ -98,7 +98,7 @@ function loadJobEquipmentsFromDatabase(jobDatabaseId) {
let tempJobEquipmentData = new serverClasses.jobEquipmentData(dbAssoc);
tempJobEquipmentData.items = loadJobEquipmentItemsFromDatabase(tempJobEquipmentData.databaseId);
tempJobEquipments.push(tempJobEquipmentData);
- logToConsole(LOG_DEBUG, `[Asshat.Job]: Job equipment '${tempJobEquipmentData.name}' loaded from database successfully!`);
+ logToConsole(LOG_DEBUG, `[VRR.Job]: Job equipment '${tempJobEquipmentData.name}' loaded from database successfully!`);
}
}
freeDatabaseQuery(dbQuery);
@@ -106,14 +106,14 @@ function loadJobEquipmentsFromDatabase(jobDatabaseId) {
disconnectFromDatabase(dbConnection);
}
- logToConsole(LOG_DEBUG, `[Asshat.Job]: ${tempJobEquipments.length} job equipments for job ${jobDatabaseId} loaded from database successfully!`);
+ logToConsole(LOG_DEBUG, `[VRR.Job]: ${tempJobEquipments.length} job equipments for job ${jobDatabaseId} loaded from database successfully!`);
return tempJobEquipments;
}
// ===========================================================================
function loadJobLocationsFromDatabase(jobDatabaseId) {
- logToConsole(LOG_DEBUG, `[Asshat.Job]: Loading job locations for job ${jobDatabaseId} from database ...`);
+ logToConsole(LOG_DEBUG, `[VRR.Job]: Loading job locations for job ${jobDatabaseId} from database ...`);
let tempJobLocations = [];
let dbConnection = connectToDatabase();
@@ -127,7 +127,7 @@ function loadJobLocationsFromDatabase(jobDatabaseId) {
while(dbAssoc = fetchQueryAssoc(dbQuery)) {
let tempJobLocationData = new serverClasses.jobLocationData(dbAssoc);
tempJobLocations.push(tempJobLocationData);
- logToConsole(LOG_DEBUG, `[Asshat.Job]: Job location '${tempJobLocationData.databaseId}' loaded from database successfully!`);
+ logToConsole(LOG_DEBUG, `[VRR.Job]: Job location '${tempJobLocationData.databaseId}' loaded from database successfully!`);
}
}
freeDatabaseQuery(dbQuery);
@@ -135,14 +135,14 @@ function loadJobLocationsFromDatabase(jobDatabaseId) {
disconnectFromDatabase(dbConnection);
}
- logToConsole(LOG_DEBUG, `[Asshat.Job]: ${tempJobLocations.length} job locations for job ${jobDatabaseId} loaded from database successfully!`);
+ logToConsole(LOG_DEBUG, `[VRR.Job]: ${tempJobLocations.length} job locations for job ${jobDatabaseId} loaded from database successfully!`);
return tempJobLocations;
}
// ===========================================================================
function loadJobUniformsFromDatabase(jobDatabaseId) {
- logToConsole(LOG_DEBUG, `[Asshat.Job]: Loading job uniforms for job ${jobDatabaseId} from database ...`);
+ logToConsole(LOG_DEBUG, `[VRR.Job]: Loading job uniforms for job ${jobDatabaseId} from database ...`);
let tempJobUniforms = [];
let dbConnection = connectToDatabase();
@@ -156,7 +156,7 @@ function loadJobUniformsFromDatabase(jobDatabaseId) {
while(dbAssoc = fetchQueryAssoc(dbQuery)) {
let tempJobUniformData = new serverClasses.jobUniformData(dbAssoc);
tempJobUniforms.push(tempJobUniformData);
- logToConsole(LOG_DEBUG, `[Asshat.Job]: Job uniform '${tempJobUniformData.databaseId}' loaded from database successfully!`);
+ logToConsole(LOG_DEBUG, `[VRR.Job]: Job uniform '${tempJobUniformData.databaseId}' loaded from database successfully!`);
}
}
freeDatabaseQuery(dbQuery);
@@ -164,14 +164,14 @@ function loadJobUniformsFromDatabase(jobDatabaseId) {
disconnectFromDatabase(dbConnection);
}
- logToConsole(LOG_DEBUG, `[Asshat.Job]: ${tempJobUniforms.length} job uniforms for job ${jobDatabaseId} loaded from database successfully!`);
+ logToConsole(LOG_DEBUG, `[VRR.Job]: ${tempJobUniforms.length} job uniforms for job ${jobDatabaseId} loaded from database successfully!`);
return tempJobUniforms;
}
// ===========================================================================
function loadJobEquipmentItemsFromDatabase(jobEquipmentDatabaseId) {
- logToConsole(LOG_DEBUG, `[Asshat.Job]: Loading job equipment items for job equipment ${jobEquipmentDatabaseId} from database ...`);
+ logToConsole(LOG_DEBUG, `[VRR.Job]: Loading job equipment items for job equipment ${jobEquipmentDatabaseId} from database ...`);
let tempJobEquipmentItems = [];
let dbConnection = connectToDatabase();
@@ -185,7 +185,7 @@ function loadJobEquipmentItemsFromDatabase(jobEquipmentDatabaseId) {
while(dbAssoc = fetchQueryAssoc(dbQuery)) {
let tempJobEquipmentItemData = new serverClasses.jobEquipmentItemData(dbAssoc);
tempJobEquipmentItems.push(tempJobEquipmentItemData);
- logToConsole(LOG_DEBUG, `[Asshat.Job]: Job equipment item '${tempJobEquipmentItemData.databaseId}' loaded from database successfully!`);
+ logToConsole(LOG_DEBUG, `[VRR.Job]: Job equipment item '${tempJobEquipmentItemData.databaseId}' loaded from database successfully!`);
}
}
freeDatabaseQuery(dbQuery);
@@ -193,28 +193,28 @@ function loadJobEquipmentItemsFromDatabase(jobEquipmentDatabaseId) {
disconnectFromDatabase(dbConnection);
}
- logToConsole(LOG_DEBUG, `[Asshat.Job]: ${tempJobEquipmentItems.length} job equipment items for equipment ${jobEquipmentDatabaseId} loaded from database successfully!`);
+ logToConsole(LOG_DEBUG, `[VRR.Job]: ${tempJobEquipmentItems.length} job equipment items for equipment ${jobEquipmentDatabaseId} loaded from database successfully!`);
return tempJobEquipmentItems;
}
// ===========================================================================
function createAllJobBlips() {
- logToConsole(LOG_DEBUG, `[Asshat.Job] Spawning all job location blips ...`);
+ logToConsole(LOG_DEBUG, `[VRR.Job] Spawning all job location blips ...`);
for(let i in getServerData().jobs) {
for(let j in getServerData().jobs[i].locations) {
getServerData().jobs[i].locations[j].blip = gta.createBlip((getServerData().jobs[i].blipModel!=0) ? getServerData().jobs[i].blipModel : 0, getServerData().jobs[i].locations[j].position, 2, getColourByName("yellow"));
addToWorld(getServerData().jobs[i].locations[j].blip);
- logToConsole(LOG_DEBUG, `[Asshat.Job] Job '${getServerData().jobs[i].name}' location blip ${j} spawned!`);
+ logToConsole(LOG_DEBUG, `[VRR.Job] Job '${getServerData().jobs[i].name}' location blip ${j} spawned!`);
}
}
- logToConsole(LOG_DEBUG, `[Asshat.Job] All job location blips spawned!`);
+ logToConsole(LOG_DEBUG, `[VRR.Job] All job location blips spawned!`);
}
// ===========================================================================
function createAllJobPickups() {
- logToConsole(LOG_DEBUG, `[Asshat.Job] Spawning all job location pickups ...`);
+ logToConsole(LOG_DEBUG, `[VRR.Job] Spawning all job location pickups ...`);
let pickupCount = 0;
for(let i in getServerData().jobs) {
if(getServerData().jobs[i].pickupModel != 0) {
@@ -222,19 +222,19 @@ function createAllJobPickups() {
pickupCount++;
getServerData().jobs[i].locations[j].pickup = gta.createPickup(getServerData().jobs[i].pickupModel, getServerData().jobs[i].locations[j].position);
getServerData().jobs[i].locations[j].pickup.onAllDimensions = false;
- setEntityData(getServerData().jobs[i].locations[j].pickup, "ag.owner.type", AG_PICKUP_JOB, false);
+ setEntityData(getServerData().jobs[i].locations[j].pickup, "ag.owner.type", VRR_PICKUP_JOB, false);
setEntityData(getServerData().jobs[i].locations[j].pickup, "ag.owner.id", j, false);
- setEntityData(getServerData().jobs[i].locations[j].pickup, "ag.label.type", AG_LABEL_JOB, true);
+ setEntityData(getServerData().jobs[i].locations[j].pickup, "ag.label.type", VRR_LABEL_JOB, true);
setEntityData(getServerData().jobs[i].locations[j].pickup, "ag.label.name", getServerData().jobs[i].name, true);
setEntityData(getServerData().jobs[i].locations[j].pickup, "ag.label.jobType", getServerData().jobs[i].databaseId, true);
getServerData().jobs[i].locations[j].pickup.dimension = getServerData().jobs[i].locations[j].dimension;
addToWorld(getServerData().jobs[i].locations[j].pickup);
- logToConsole(LOG_DEBUG, `[Asshat.Job] Job '${getServerData().jobs[i].name}' location pickup ${j} spawned!`);
+ logToConsole(LOG_DEBUG, `[VRR.Job] Job '${getServerData().jobs[i].name}' location pickup ${j} spawned!`);
}
}
}
- logToConsole(LOG_DEBUG, `[Asshat.Job] All job location pickups (${pickupCount}) spawned!`);
+ logToConsole(LOG_DEBUG, `[VRR.Job] All job location pickups (${pickupCount}) spawned!`);
}
// ===========================================================================
@@ -250,7 +250,7 @@ function showJobInformationToPlayer(client, jobType) {
}
switch(jobType) {
- case AG_JOB_POLICE:
+ case VRR_JOB_POLICE:
if(!canPlayerUsePoliceJob(client)) {
return false;
}
@@ -263,7 +263,7 @@ function showJobInformationToPlayer(client, jobType) {
messagePlayerInfo(client, "- When finished, use /stopwork to stop working.");
break;
- case AG_JOB_MEDICAL:
+ case VRR_JOB_MEDICAL:
messagePlayerInfo(client, "== Job Help =================================");
messagePlayerInfo(client, "- Paramedics help people by healing them.");
messagePlayerInfo(client, "- Use /startwork at the hospital to work as a Paramedic.");
@@ -272,7 +272,7 @@ function showJobInformationToPlayer(client, jobType) {
messagePlayerInfo(client, "- When finished, use /stopwork to stop working.");
break;
- case AG_JOB_FIRE:
+ case VRR_JOB_FIRE:
if(!canClientUseFireJob(client)) {
return false;
}
@@ -284,7 +284,7 @@ function showJobInformationToPlayer(client, jobType) {
messagePlayerInfo(client, "- When finished, use /stopwork to stop working.");
break;
- case AG_JOB_BUS:
+ case VRR_JOB_BUS:
messagePlayerInfo(client, "== Job Help =================================");
messagePlayerInfo(client, "- Bus Drivers transport people around the city on a route");
messagePlayerInfo(client, "- Use /startwork at the bus depot to work as a Bus Driver.");
@@ -293,7 +293,7 @@ function showJobInformationToPlayer(client, jobType) {
messagePlayerInfo(client, "- When finished, use /stopwork to stop working.");
break;
- case AG_JOB_TAXI:
+ case VRR_JOB_TAXI:
messagePlayerInfo(client, "== Job Help =================================");
messagePlayerInfo(client, "- Taxi Drivers transport people around the city");
messagePlayerInfo(client, "- Use /startwork at the taxi depot to work as a Taxi Driver.");
@@ -303,7 +303,7 @@ function showJobInformationToPlayer(client, jobType) {
messagePlayerInfo(client, "- When finished, use /stopwork to stop working.");
break;
- case AG_JOB_GARBAGE:
+ case VRR_JOB_GARBAGE:
messagePlayerInfo(client, "== Job Help =================================");
messagePlayerInfo(client, "- Garbage Collectors pick up the trash around the city.");
messagePlayerInfo(client, "- Use /startwork at the garbage depot to work as a Garbage Collector.");
@@ -314,10 +314,10 @@ function showJobInformationToPlayer(client, jobType) {
messagePlayerInfo(client, "- When finished, use /stopwork to stop working.");
break;
- case AG_JOB_WEAPON:
+ case VRR_JOB_WEAPON:
break;
- case AG_JOB_DRUG:
+ case VRR_JOB_DRUG:
break;
default:
@@ -341,7 +341,7 @@ function takeJobCommand(command, params, client) {
return false;
}
- if(getPlayerCurrentSubAccount(client).job > AG_JOB_NONE) {
+ if(getPlayerCurrentSubAccount(client).job > VRR_JOB_NONE) {
messagePlayerError(client, `[#FFFFFF]You already have a job! Use [#AAAAAA]/quitjob [#FFFFFF]to quit your current job.`);
return false;
}
@@ -371,7 +371,7 @@ function startWorkingCommand(command, params, client) {
return false;
}
- if(getPlayerCurrentSubAccount(client).job == AG_JOB_NONE) {
+ if(getPlayerCurrentSubAccount(client).job == VRR_JOB_NONE) {
messagePlayerError(client, "You don't have a job!");
messagePlayerInfo(client, "You can get a job by going the yellow points on the map.");
return false;
@@ -428,34 +428,34 @@ function startWorking(client) {
let jobId = getPlayerCurrentSubAccount(client).job;
switch(getJobIndexFromDatabaseId(jobId)) {
- case AG_JOB_POLICE:
+ case VRR_JOB_POLICE:
messagePlayerInfo(client, "Use /uniform and /equip to get your equipment.");
break;
- case AG_JOB_MEDICAL:
+ case VRR_JOB_MEDICAL:
messagePlayerInfo(client, "Use /uniform and /equip to get your equipment.");
break;
- case AG_JOB_FIRE:
+ case VRR_JOB_FIRE:
messagePlayerInfo(client, "Use /uniform and /equip to get your equipment.");
break;
- case AG_JOB_BUS:
+ case VRR_JOB_BUS:
messagePlayerInfo(client, "Get in a bus to get started.");
break;
- case AG_JOB_TAXI:
+ case VRR_JOB_TAXI:
messagePlayerInfo(client, "Get in a taxi to get started.");
break;
- case AG_JOB_GARBAGE:
+ case VRR_JOB_GARBAGE:
messagePlayerInfo(client, "Get in a trash truck to get started.");
break;
- case AG_JOB_WEAPON:
+ case VRR_JOB_WEAPON:
break;
- case AG_JOB_DRUG:
+ case VRR_JOB_DRUG:
break;
default:
@@ -494,10 +494,10 @@ function givePlayerJobEquipment(client, equipmentId) {
for(let i in getJobData(jobId).equipment[equipmentId].items) {
let value = getJobData(jobId).equipment[equipmentId].items[i].value
- if(getItemTypeData(getItemTypeIndexFromDatabaseId(getJobData(jobId).equipment[equipmentId].items[i].itemType)).useType == AG_ITEM_USETYPE_WALKIETALKIE) {
+ if(getItemTypeData(getItemTypeIndexFromDatabaseId(getJobData(jobId).equipment[equipmentId].items[i].itemType)).useType == VRR_ITEM_USETYPE_WALKIETALKIE) {
value = getJobData(jobId).walkieTalkieFrequency;
}
- let itemId = createItem(getItemTypeIndexFromDatabaseId(getJobData(jobId).equipment[equipmentId].items[i].itemType), value, AG_ITEM_OWNER_PLAYER, getPlayerCurrentSubAccount(client).databaseId);
+ let itemId = createItem(getItemTypeIndexFromDatabaseId(getJobData(jobId).equipment[equipmentId].items[i].itemType), value, VRR_ITEM_OWNER_PLAYER, getPlayerCurrentSubAccount(client).databaseId);
getItemData(itemId).needsSaved = false;
let freeSlot = getPlayerFirstEmptyHotBarSlot(client);
getPlayerData(client).hotBarItems[freeSlot] = itemId;
@@ -546,34 +546,34 @@ function stopWorking(client) {
let jobId = getPlayerCurrentSubAccount(client).job;
switch(getJobType(jobId)) {
- case AG_JOB_POLICE:
+ case VRR_JOB_POLICE:
messagePlayerInfo(client, "Your uniform, equipment, and police car have been returned to the police station");
break;
- case AG_JOB_MEDICAL:
+ case VRR_JOB_MEDICAL:
messagePlayerInfo(client, "Your uniform and ambulance have been returned to the hospital");
break;
- case AG_JOB_FIRE:
+ case VRR_JOB_FIRE:
messagePlayerInfo(client, "Your uniform and fire truck have been returned to the fire station");
break;
- case AG_JOB_BUS:
+ case VRR_JOB_BUS:
messagePlayerInfo(client, "Your bus has been returned to the bus depot");
break;
- case AG_JOB_TAXI:
+ case VRR_JOB_TAXI:
messagePlayerInfo(client, "Your taxi has been returned to the taxi depot");
break;
- case AG_JOB_GARBAGE:
+ case VRR_JOB_GARBAGE:
messagePlayerInfo(client, "Your trash truck has been returned to the city landfill");
break;
- case AG_JOB_WEAPON:
+ case VRR_JOB_WEAPON:
break;
- case AG_JOB_DRUG:
+ case VRR_JOB_DRUG:
break;
default:
@@ -619,7 +619,7 @@ function jobUniformCommand(command, params, client) {
//messagePlayerSuccess(client, `You have been given a [#AAAAAA]${uniforms[uniformId-1].name} [#FFFFFF]uniform and you can put it on from your inventory.`);
meActionToNearbyPlayers(client, `puts on ${getProperDeterminerForName(getJobData(jobId).uniforms[uniformId-1].name)} ${getJobData(jobId).uniforms[uniformId-1].name} uniform`);
- //let itemId = createItem(getItemTypeFromParams("Outfit"), getJobData(jobId).uniforms[uniformId-1].skin, AG_ITEM_OWNER_PLAYER, getPlayerCurrentSubAccount(client).databaseId);
+ //let itemId = createItem(getItemTypeFromParams("Outfit"), getJobData(jobId).uniforms[uniformId-1].skin, VRR_ITEM_OWNER_PLAYER, getPlayerCurrentSubAccount(client).databaseId);
//let freeSlot = getPlayerFirstEmptyHotBarSlot(client);
//getPlayerData(client).hotBarItems[freeSlot] = itemId;
//getPlayerData(client).jobEquipmentCache.push(itemId);
@@ -992,7 +992,7 @@ function jobStartRouteCommand(command, params, client) {
return false;
}
- if(!doesPlayerHaveJobType(client, AG_JOB_BUS) && !doesPlayerHaveJobType(client, AG_JOB_GARBAGE)) {
+ if(!doesPlayerHaveJobType(client, VRR_JOB_BUS) && !doesPlayerHaveJobType(client, VRR_JOB_GARBAGE)) {
messagePlayerError(client, "Your job doesn't use a route!");
return false;
}
@@ -1020,7 +1020,7 @@ function jobStopRouteCommand(command, params, client) {
return false;
}
- if(!doesPlayerHaveJobType(client, AG_JOB_BUS) && !doesPlayerHaveJobType(client, AG_JOB_GARBAGE)) {
+ if(!doesPlayerHaveJobType(client, VRR_JOB_BUS) && !doesPlayerHaveJobType(client, VRR_JOB_GARBAGE)) {
messagePlayerError(client, "Your job doesn't use a route!");
return false;
}
@@ -1059,7 +1059,7 @@ function isPlayerWorking(client) {
// ===========================================================================
function startJobRoute(client) {
- if(doesPlayerHaveJobType(client, AG_JOB_BUS)) {
+ if(doesPlayerHaveJobType(client, VRR_JOB_BUS)) {
let busRoute = getRandomBusRoute(getPlayerIsland(client));
getPlayerData(client).jobRoute = busRoute;
getPlayerData(client).jobRouteStop = 0;
@@ -1069,7 +1069,7 @@ function startJobRoute(client) {
getPlayerVehicle(client).colour2 = 1;
showCurrentBusStop(client);
messagePlayerNormal(client, `🚌 You are now driving the [#AAAAAA]${getBusRouteData(getPlayerIsland(client), busRoute).name} [#FFFFFF]bus route! Drive to the green checkpoint.`);
- } else if(doesPlayerHaveJobType(client, AG_JOB_GARBAGE)) {
+ } else if(doesPlayerHaveJobType(client, VRR_JOB_GARBAGE)) {
let garbageRoute = getRandomBusRoute(getPlayerIsland(client));
getPlayerData(client).jobRoute = garbageRoute;
getPlayerData(client).jobRouteStop = 0;
@@ -1088,7 +1088,7 @@ function stopJobRoute(client, successful = false, alertPlayer = true) {
stopReturnToJobVehicleCountdown(client);
sendPlayerStopJobRoute(client);
- if(doesPlayerHaveJobType(client, AG_JOB_BUS)) {
+ if(doesPlayerHaveJobType(client, VRR_JOB_BUS)) {
respawnVehicle(getPlayerData(client).jobRouteVehicle);
getPlayerData(client).jobRouteVehicle = false;
getPlayerData(client).jobRoute = false;
@@ -1098,7 +1098,7 @@ function stopJobRoute(client, successful = false, alertPlayer = true) {
if(alertPlayer) {
messagePlayerAlert(client, `You stopped the ${getBusRouteData(getPlayerData(client).jobRouteIsland, getPlayerData(client).jobRoute).name} bus route! Your bus has been returned to the bus depot.`, getColourByName("yellow"));
}
- } else if(doesPlayerHaveJobType(client, AG_JOB_GARBAGE)) {
+ } else if(doesPlayerHaveJobType(client, VRR_JOB_GARBAGE)) {
respawnVehicle(getPlayerData(client).jobRouteVehicle);
getPlayerData(client).jobRouteVehicle = false;
getPlayerData(client).jobRoute = false;
@@ -1108,7 +1108,7 @@ function stopJobRoute(client, successful = false, alertPlayer = true) {
if(alertPlayer) {
messagePlayerAlert(client, `You stopped the ${getGarbageRouteData(getPlayerData(client).jobRouteIsland, getPlayerData(client).jobRoute).name} garbage route! Your trashmaster has been returned to the bus depot.`, getColourByName("yellow"));
}
- } else if(doesPlayerHaveJobType(client, AG_JOB_POLICE)) {
+ } else if(doesPlayerHaveJobType(client, VRR_JOB_POLICE)) {
respawnVehicle(getPlayerData(client).jobRouteVehicle);
getPlayerData(client).jobRouteVehicle = false;
getPlayerData(client).jobRoute = false;
@@ -1293,7 +1293,7 @@ function saveJobToDatabase(jobData) {
return false;
}
- logToConsole(LOG_DEBUG, `[Asshat.Job]: Saving job ${jobData.name} to database ...`);
+ logToConsole(LOG_DEBUG, `[VRR.Job]: Saving job ${jobData.name} to database ...`);
let dbConnection = connectToDatabase();
if(dbConnection) {
let safeName = escapeDatabaseString(dbConnection, jobData.name);
@@ -1324,7 +1324,7 @@ function saveJobToDatabase(jobData) {
disconnectFromDatabase(dbConnection);
return true;
}
- logToConsole(LOG_DEBUG, `[Asshat.Job]: Saved job ${jobData.name} to database!`);
+ logToConsole(LOG_DEBUG, `[VRR.Job]: Saved job ${jobData.name} to database!`);
return false;
}
@@ -1337,7 +1337,7 @@ function saveJobToDatabase(jobData) {
return false;
}
- console.log(`[Asshat.Job]: Saving job ${jobData.name} to database ...`);
+ console.log(`[VRR.Job]: Saving job ${jobData.name} to database ...`);
let dbConnection = connectToDatabase();
if(dbConnection) {
let safeName = escapeDatabaseString(dbConnection, jobData.name);
@@ -1353,7 +1353,7 @@ function saveJobToDatabase(jobData) {
disconnectFromDatabase(dbConnection);
return true;
}
- console.log(`[Asshat.Job]: Saved job ${jobData.name} to database!`);
+ console.log(`[VRR.Job]: Saved job ${jobData.name} to database!`);
return false;
}
@@ -1366,7 +1366,7 @@ function saveJobLocationToDatabase(jobLocationData) {
return false;
}
- logToConsole(LOG_DEBUG, `[Asshat.Job]: Saving job location ${jobLocationData.databaseId} to database ...`);
+ logToConsole(LOG_DEBUG, `[VRR.Job]: Saving job location ${jobLocationData.databaseId} to database ...`);
let dbConnection = connectToDatabase();
if(dbConnection) {
// If job location hasn't been added to database, ID will be 0
@@ -1382,7 +1382,7 @@ function saveJobLocationToDatabase(jobLocationData) {
disconnectFromDatabase(dbConnection);
return true;
}
- logToConsole(LOG_DEBUG, `[Asshat.Job]: Saved job location ${jobLocationData.databaseId} to database`);
+ logToConsole(LOG_DEBUG, `[VRR.Job]: Saved job location ${jobLocationData.databaseId} to database`);
return false;
}
@@ -1395,7 +1395,7 @@ function saveJobEquipmentToDatabase(jobEquipmentData) {
return false;
}
- logToConsole(LOG_DEBUG, `[Asshat.Job]: Saving job equipment ${jobEquipmentData.databaseId} to database ...`);
+ logToConsole(LOG_DEBUG, `[VRR.Job]: Saving job equipment ${jobEquipmentData.databaseId} to database ...`);
let dbConnection = connectToDatabase();
if(dbConnection) {
let safeName = escapeDatabaseString(dbConnection, jobEquipmentData.name);
@@ -1411,7 +1411,7 @@ function saveJobEquipmentToDatabase(jobEquipmentData) {
disconnectFromDatabase(dbConnection);
return true;
}
- logToConsole(LOG_DEBUG, `[Asshat.Job]: Saved job equipment ${jobEquipmentData.databaseId} to database`);
+ logToConsole(LOG_DEBUG, `[VRR.Job]: Saved job equipment ${jobEquipmentData.databaseId} to database`);
return false;
}
@@ -1424,7 +1424,7 @@ function saveJobEquipmentItemToDatabase(jobEquipmentItemData) {
return false;
}
- logToConsole(LOG_DEBUG, `[Asshat.Job]: Saving job equipment weapon ${jobEquipmentItemData.databaseId} to database ...`);
+ logToConsole(LOG_DEBUG, `[VRR.Job]: Saving job equipment weapon ${jobEquipmentItemData.databaseId} to database ...`);
let dbConnection = connectToDatabase();
if(dbConnection) {
// If job equipment item hasn't been added to database, ID will be 0
@@ -1439,7 +1439,7 @@ function saveJobEquipmentItemToDatabase(jobEquipmentItemData) {
disconnectFromDatabase(dbConnection);
return true;
}
- logToConsole(LOG_DEBUG, `[Asshat.Job]: Saved job equipment weapon ${jobEquipmentItemData.databaseId} to database`);
+ logToConsole(LOG_DEBUG, `[VRR.Job]: Saved job equipment weapon ${jobEquipmentItemData.databaseId} to database`);
return false;
}
@@ -1452,7 +1452,7 @@ function saveJobUniformToDatabase(jobUniformData) {
return false;
}
- logToConsole(LOG_DEBUG, `[Asshat.Job]: Saving job uniform ${jobUniformData.databaseId} to database ...`);
+ logToConsole(LOG_DEBUG, `[VRR.Job]: Saving job uniform ${jobUniformData.databaseId} to database ...`);
let dbConnection = connectToDatabase();
if(dbConnection) {
let safeName = escapeDatabaseString(dbConnection, jobUniformData.name);
@@ -1468,7 +1468,7 @@ function saveJobUniformToDatabase(jobUniformData) {
disconnectFromDatabase(dbConnection);
return true;
}
- logToConsole(LOG_DEBUG, `[Asshat.Job]: Saved job uniform ${jobUniformData.databaseId} to database`);
+ logToConsole(LOG_DEBUG, `[VRR.Job]: Saved job uniform ${jobUniformData.databaseId} to database`);
return false;
}
@@ -1527,9 +1527,9 @@ function createJobLocationPickup(jobId, locationId) {
getJobData(jobId).locations[locationId].pickup = gta.createPickup(pickupModelId, getJobData(jobId).locations[locationId].position, getGameConfig().pickupTypes[getServerGame()].job);
getJobData(jobId).locations[locationId].pickup.dimension = getJobData(jobId).locations[locationId].dimension;
- setEntityData(getServerData().jobs[jobId].locations[locationId].pickup, "ag.owner.type", AG_PICKUP_JOB, false);
+ setEntityData(getServerData().jobs[jobId].locations[locationId].pickup, "ag.owner.type", VRR_PICKUP_JOB, false);
setEntityData(getServerData().jobs[jobId].locations[locationId].pickup, "ag.owner.id", locationId, false);
- setEntityData(getServerData().jobs[jobId].locations[locationId].pickup, "ag.label.type", AG_LABEL_JOB, true);
+ setEntityData(getServerData().jobs[jobId].locations[locationId].pickup, "ag.label.type", VRR_LABEL_JOB, true);
setEntityData(getServerData().jobs[jobId].locations[locationId].pickup, "ag.label.name", getJobData(jobId).name, true);
setEntityData(getServerData().jobs[jobId].locations[locationId].pickup, "ag.label.jobType", getJobData(jobId).databaseId, true);
addToWorld(getJobData(jobId).locations[locationId].pickup);
@@ -1630,11 +1630,11 @@ function playerArrivedAtJobRouteStop(client) {
return false;
}
- if(doesPlayerHaveJobType(client, AG_JOB_BUS)) {
+ if(doesPlayerHaveJobType(client, VRR_JOB_BUS)) {
playerArrivedAtBusStop(client);
- } else if(doesPlayerHaveJobType(client, AG_JOB_GARBAGE)) {
+ } else if(doesPlayerHaveJobType(client, VRR_JOB_GARBAGE)) {
playerArrivedAtGarbageStop(client);
- } else if(doesPlayerHaveJobType(client, AG_JOB_POLICE)) {
+ } else if(doesPlayerHaveJobType(client, VRR_JOB_POLICE)) {
playerArrivedAtPolicePatrolPoint(client);
}
}
diff --git a/scripts/server/job/police.js b/scripts/server/job/police.js
index 0fd610dc..e2c3f155 100644
--- a/scripts/server/job/police.js
+++ b/scripts/server/job/police.js
@@ -20,7 +20,7 @@ let patrolRoutes = [
name: "Staunton Island Sector 1",
island: 0,
payout: 175,
- type: AG_PATROLTYPE_VEHICLE,
+ type: VRR_PATROLTYPE_VEHICLE,
positions: [
toVector3(404.5, -1209.73, 25.8024),
toVector3(334.831, -1388.93, 25.8005),
@@ -90,7 +90,7 @@ function policeTazerCommand(command, params, client) {
return false;
}
- if(!doesPlayerHaveJobType(client, AG_JOB_POLICE)) {
+ if(!doesPlayerHaveJobType(client, VRR_JOB_POLICE)) {
messagePlayerError(client, "You don't have a police job.");
return false;
}
@@ -116,7 +116,7 @@ function policeCuffCommand(command, params, client) {
return false;
}
- if(!doesPlayerHaveJobType(client, AG_JOB_POLICE)) {
+ if(!doesPlayerHaveJobType(client, VRR_JOB_POLICE)) {
messagePlayerError(client, "You don't have a police job.");
return false;
}
@@ -142,7 +142,7 @@ function policeArrestCommand(command, params, client) {
return false;
}
- if(!doesPlayerHaveJobType(client, AG_JOB_POLICE)) {
+ if(!doesPlayerHaveJobType(client, VRR_JOB_POLICE)) {
messagePlayerError(client, "You don't have a police job.");
return false;
}
@@ -168,7 +168,7 @@ function policeSearchCommand(command, params, client) {
return false;
}
- if(!doesPlayerHaveJobType(client, AG_JOB_POLICE)) {
+ if(!doesPlayerHaveJobType(client, VRR_JOB_POLICE)) {
messagePlayerError(client, "You don't have a police job.");
return false;
}
@@ -194,7 +194,7 @@ function policeDragCommand(command, params, client) {
return false;
}
- if(!doesPlayerHaveJobType(client, AG_JOB_POLICE)) {
+ if(!doesPlayerHaveJobType(client, VRR_JOB_POLICE)) {
messagePlayerError(client, "You don't have a police job.");
return false;
}
@@ -220,7 +220,7 @@ function policeDetainCommand(command, params, client) {
return false;
}
- if(!doesPlayerHaveJobType(client, AG_JOB_POLICE)) {
+ if(!doesPlayerHaveJobType(client, VRR_JOB_POLICE)) {
messagePlayerError(client, "You don't have a police job.");
return false;
}
@@ -240,7 +240,7 @@ function playerArivedAtPolicePatrolPoint(client) {
getPlayerData(client).jobRoute = 0;
getPlayerData(client).jobRouteStop = 0;
getPlayerData(client).jobRouteIsland = 0;
- getPlayerData(client).jobRouteState = AG_JOBROUTE_INPROGRESS;
+ getPlayerData(client).jobRouteState = VRR_JOBROUTE_INPROGRESS;
return false;
}
diff --git a/scripts/server/job/taxi.js b/scripts/server/job/taxi.js
index d097ef86..16444587 100644
--- a/scripts/server/job/taxi.js
+++ b/scripts/server/job/taxi.js
@@ -23,7 +23,7 @@ function taxiSetFareCommand(command, params, client) {
return false;
}
- if(!doesPlayerHaveJobType(client, AG_JOB_TAXI)) {
+ if(!doesPlayerHaveJobType(client, VRR_JOB_TAXI)) {
messagePlayerError(client, "You don't have a taxi job.");
return false;
}
diff --git a/scripts/server/keybind.js b/scripts/server/keybind.js
index 5a70260b..b3632b2e 100644
--- a/scripts/server/keybind.js
+++ b/scripts/server/keybind.js
@@ -128,9 +128,9 @@ let bindableKeys = {
// ===========================================================================
function initKeyBindScript() {
- logToConsole(LOG_INFO, "[Asshat.KeyBind]: Initializing key bind script ...");
+ logToConsole(LOG_INFO, "[VRR.KeyBind]: Initializing key bind script ...");
getGlobalConfig().keyBind = loadKeyBindConfiguration();
- logToConsole(LOG_INFO, "[Asshat.KeyBind]: Key bind script initialized!");
+ logToConsole(LOG_INFO, "[VRR.KeyBind]: Key bind script initialized!");
}
// ===========================================================================
@@ -265,7 +265,7 @@ function playerUsedKeyBind(client, key) {
return false;
}
- logToConsole(LOG_DEBUG, `[Asshat.KeyBind] ${getPlayerDisplayForConsole(client)} used keybind ${sdl.getKeyName(key)} (${key})`);
+ logToConsole(LOG_DEBUG, `[VRR.KeyBind] ${getPlayerDisplayForConsole(client)} used keybind ${sdl.getKeyName(key)} (${key})`);
if(doesPlayerHaveKeyBindForKey(client, key)) {
let keyBindData = getPlayerKeyBindForKey(client, key);
if(keyBindData.enabled) {
diff --git a/scripts/server/messaging.js b/scripts/server/messaging.js
index b36a78ff..50155023 100644
--- a/scripts/server/messaging.js
+++ b/scripts/server/messaging.js
@@ -8,8 +8,8 @@
// ===========================================================================
function initMessagingScript() {
- logToConsole(LOG_INFO, "[Asshat.Messaging]: Initializing messaging script ...");
- logToConsole(LOG_INFO, "[Asshat.Messaging]: Messaging script initialized successfully!");
+ logToConsole(LOG_INFO, "[VRR.Messaging]: Initializing messaging script ...");
+ logToConsole(LOG_INFO, "[VRR.Messaging]: Messaging script initialized successfully!");
}
// ===========================================================================
@@ -19,14 +19,14 @@ function messageAdminAction(messageText) {
if(getServerConfig().discordEnabled) {
messageDiscord(`:warning: ${messageText}`);
}
- //logToConsole(LOG_INFO, `[Asshat.Messaging] ADMIN: ${messageText}`);
+ //logToConsole(LOG_INFO, `[VRR.Messaging] ADMIN: ${messageText}`);
}
// ===========================================================================
function messagePlayerNormal(client, messageText, colour = COLOUR_WHITE) {
if(isConsole(client)) {
- logToConsole(LOG_INFO, `[Asshat.Messaging] ${messageText}`);
+ logToConsole(LOG_INFO, `[VRR.Messaging] ${messageText}`);
return true;
}
@@ -45,7 +45,7 @@ function messageAdmins(messageText, colour = COLOUR_WHITE) {
let clients = getClients();
for(let i in clients) {
if(isConsole(clients[i])) {
- logToConsole(LOG_INFO, `[Asshat.Messaging] ADMINS: ${messageText}`);
+ logToConsole(LOG_INFO, `[VRR.Messaging] ADMINS: ${messageText}`);
} else {
if(doesPlayerHaveStaffPermission(clients[i], getStaffFlagValue("basicModeration"))) {
sendChatBoxMessageToPlayer(clients[i], `🛡️ ${messageText}`, getColourByName("softRed"));
@@ -59,7 +59,7 @@ function messageAdmins(messageText, colour = COLOUR_WHITE) {
function messagePlayerError(client, messageText) {
if(isConsole(client)) {
- logToConsole(LOG_INFO, `[Asshat.Messaging] ERROR: ${messageText}`);
+ logToConsole(LOG_INFO, `[VRR.Messaging] ERROR: ${messageText}`);
return true;
}
@@ -74,7 +74,7 @@ function messagePlayerError(client, messageText) {
function messagePlayerSyntax(client, messageText) {
if(isConsole(client)) {
- logToConsole(LOG_INFO, `[Asshat.Messaging] USAGE: ${messageText}`);
+ logToConsole(LOG_INFO, `[VRR.Messaging] USAGE: ${messageText}`);
return true;
}
@@ -89,7 +89,7 @@ function messagePlayerSyntax(client, messageText) {
function messagePlayerAlert(client, messageText) {
if(isConsole(client)) {
- logToConsole(LOG_INFO, `[Asshat.Messaging] ALERT: ${messageText}`);
+ logToConsole(LOG_INFO, `[VRR.Messaging] ALERT: ${messageText}`);
return true;
}
@@ -104,7 +104,7 @@ function messagePlayerAlert(client, messageText) {
function messagePlayerSuccess(client, messageText) {
if(isConsole(client)) {
- logToConsole(LOG_INFO, `[Asshat.Messaging] SUCCESS: ${messageText}`);
+ logToConsole(LOG_INFO, `[VRR.Messaging] SUCCESS: ${messageText}`);
return true;
}
@@ -119,7 +119,7 @@ function messagePlayerSuccess(client, messageText) {
function messagePlayerInfo(client, messageText) {
if(isConsole(client)) {
- logToConsole(LOG_INFO, `[Asshat.Messaging] INFO: ${messageText}`);
+ logToConsole(LOG_INFO, `[VRR.Messaging] INFO: ${messageText}`);
return true;
}
@@ -134,7 +134,7 @@ function messagePlayerInfo(client, messageText) {
function messagePlayerTip(client, messageText) {
if(isConsole(client)) {
- logToConsole(LOG_INFO, `[Asshat.Messaging] TIP: ${messageText}`);
+ logToConsole(LOG_INFO, `[VRR.Messaging] TIP: ${messageText}`);
return true;
}
diff --git a/scripts/server/misc.js b/scripts/server/misc.js
index df30fc51..d6955b52 100644
--- a/scripts/server/misc.js
+++ b/scripts/server/misc.js
@@ -10,8 +10,8 @@
// ===========================================================================
function initMiscScript() {
- logToConsole(LOG_INFO, "[Asshat.Misc]: Initializing misc script ...");
- logToConsole(LOG_INFO, "[Asshat.Misc]: Misc script initialized successfully!");
+ logToConsole(LOG_INFO, "[VRR.Misc]: Initializing misc script ...");
+ logToConsole(LOG_INFO, "[VRR.Misc]: Misc script initialized successfully!");
return true;
}
@@ -127,7 +127,7 @@ function enterExitPropertyCommand(command, params, client) {
return false;
}
clearPlayerStateToEnterExitProperty(client);
- getPlayerData(client).pedState = AG_PEDSTATE_EXITINGPROPERTY;
+ getPlayerData(client).pedState = VRR_PEDSTATE_EXITINGPROPERTY;
meActionToNearbyPlayers(client, "opens the door and exits the house");
fadeCamera(client, false, 1.0);
//disableCityAmbienceForPlayer(client);
@@ -141,7 +141,7 @@ function enterExitPropertyCommand(command, params, client) {
setTimeout(function() {
enableCityAmbienceForPlayer(client);
clearPlayerOwnedPeds(client);
- getPlayerData(client).pedState = AG_PEDSTATE_READY;
+ getPlayerData(client).pedState = VRR_PEDSTATE_READY;
}, 2000);
}, 1000);
}, 1100);
@@ -157,7 +157,7 @@ function enterExitPropertyCommand(command, params, client) {
meActionToNearbyPlayers(client, "tries to open the business door but fails because it's locked");
return false;
}
- getPlayerData(client).pedState = AG_PEDSTATE_EXITINGPROPERTY;
+ getPlayerData(client).pedState = VRR_PEDSTATE_EXITINGPROPERTY;
clearPlayerStateToEnterExitProperty(client)
meActionToNearbyPlayers(client, "opens the door and exits the business");
fadeCamera(client, false, 1.0);
@@ -172,12 +172,12 @@ function enterExitPropertyCommand(command, params, client) {
setTimeout(function() {
enableCityAmbienceForPlayer(client);
clearPlayerOwnedPeds(client);
- getPlayerData(client).pedState = AG_PEDSTATE_READY;
+ getPlayerData(client).pedState = VRR_PEDSTATE_READY;
}, 2000);
}, 1000);
}, 1100);
removeEntityData(client, "ag.inBusiness");
- logToConsole(LOG_DEBUG, `[Asshat.Misc] ${getPlayerDisplayForConsole(client)} entered business ${inBusiness.name}[${inBusiness.index}/${inBusiness.databaseId}]`);
+ logToConsole(LOG_DEBUG, `[VRR.Misc] ${getPlayerDisplayForConsole(client)} entered business ${inBusiness.name}[${inBusiness.index}/${inBusiness.databaseId}]`);
return true;
}
}
@@ -199,7 +199,7 @@ function enterExitPropertyCommand(command, params, client) {
clearPlayerStateToEnterExitProperty(client)
meActionToNearbyPlayers(client, "opens the door and enters the business");
- getPlayerData(client).pedState = AG_PEDSTATE_ENTERINGPROPERTY;
+ getPlayerData(client).pedState = VRR_PEDSTATE_ENTERINGPROPERTY;
fadeCamera(client, false, 1.0);
//disableCityAmbienceForPlayer(client);
setTimeout(function() {
@@ -209,7 +209,7 @@ function enterExitPropertyCommand(command, params, client) {
setPlayerInterior(client, closestBusiness.exitInterior);
setTimeout(function() {
fadeCamera(client, true, 1.0);
- getPlayerData(client).pedState = AG_PEDSTATE_READY;
+ getPlayerData(client).pedState = VRR_PEDSTATE_READY;
}, 1000);
}, 1100);
setEntityData(client, "ag.inBusiness", closestBusinessId, true);
@@ -235,7 +235,7 @@ function enterExitPropertyCommand(command, params, client) {
clearPlayerStateToEnterExitProperty(client)
meActionToNearbyPlayers(client, "opens the door and enters the house");
- getPlayerData(client).pedState = AG_PEDSTATE_ENTERINGPROPERTY;
+ getPlayerData(client).pedState = VRR_PEDSTATE_ENTERINGPROPERTY;
fadeCamera(client, false, 1.0);
//disableCityAmbienceForPlayer(client);
setTimeout(function() {
@@ -245,7 +245,7 @@ function enterExitPropertyCommand(command, params, client) {
setPlayerInterior(client, closestHouse.exitInterior);
setTimeout(function() {
fadeCamera(client, true, 1.0);
- getPlayerData(client).pedState = AG_PEDSTATE_READY;
+ getPlayerData(client).pedState = VRR_PEDSTATE_READY;
}, 1000);
}, 1100);
setEntityData(client, "ag.inHouse", closestHouseId, true)
@@ -324,7 +324,7 @@ function checkPlayerSpawning() {
// ===========================================================================
function showPlayerPrompt(client, promptType, promptMessage, promptTitle) {
- if(promptType == AG_PROMPT_NONE) {
+ if(promptType == VRR_PROMPT_NONE) {
return false;
}
diff --git a/scripts/server/moderation.js b/scripts/server/moderation.js
index b4785a62..f1e931bc 100644
--- a/scripts/server/moderation.js
+++ b/scripts/server/moderation.js
@@ -8,8 +8,8 @@
// ===========================================================================
function initModerationScript() {
- logToConsole(LOG_INFO, "[Asshat.Moderation]: Initializing moderation script ...");
- logToConsole(LOG_INFO, "[Asshat.Moderation]: Moderation script initialized successfully!");
+ logToConsole(LOG_INFO, "[VRR.Moderation]: Initializing moderation script ...");
+ logToConsole(LOG_INFO, "[VRR.Moderation]: Moderation script initialized successfully!");
}
// ===========================================================================
diff --git a/scripts/server/radio.js b/scripts/server/radio.js
index 7bbb00c9..1a6746f0 100644
--- a/scripts/server/radio.js
+++ b/scripts/server/radio.js
@@ -12,16 +12,16 @@ let radioStations = [];
// ===========================================================================
function initRadioScript() {
- logToConsole(LOG_INFO, "[Asshat.Radio]: Initializing radio script ...");
+ logToConsole(LOG_INFO, "[VRR.Radio]: Initializing radio script ...");
radioStations = loadRadioStationsFromDatabase();
- logToConsole(LOG_INFO, "[Asshat.Radio]: Radio script initialized successfully!");
+ logToConsole(LOG_INFO, "[VRR.Radio]: Radio script initialized successfully!");
return true;
}
// ===========================================================================
function loadRadioStationsFromDatabase() {
- logToConsole(LOG_INFO, "[Asshat.Radio]: Loading radio stations from database ...");
+ logToConsole(LOG_INFO, "[VRR.Radio]: Loading radio stations from database ...");
let dbConnection = connectToDatabase();
let tempRadioStations = [];
let dbAssoc;
@@ -38,7 +38,7 @@ function loadRadioStationsFromDatabase() {
disconnectFromDatabase(dbConnection);
}
- logToConsole(LOG_INFO, `[Asshat.Radio]: ${tempRadioStations.length} radio stations loaded from database successfully!`);
+ logToConsole(LOG_INFO, `[VRR.Radio]: ${tempRadioStations.length} radio stations loaded from database successfully!`);
return tempRadioStations;
}
diff --git a/scripts/server/startup.js b/scripts/server/startup.js
index 8349af4d..05c23333 100644
--- a/scripts/server/startup.js
+++ b/scripts/server/startup.js
@@ -79,27 +79,27 @@ function checkForSMTPModule() {
// ===========================================================================
function checkForAllRequiredModules() {
- logToConsole(LOG_DEBUG, "[Asshat.Startup]: Checking for required modules ...");
+ logToConsole(LOG_DEBUG, "[VRR.Startup]: Checking for required modules ...");
if(!checkForHashingModule()) {
- console.warn("[Asshat.Startup]: Hashing module is not loaded!");
- console.warn("[Asshat.Startup]: This resource will now shutdown.");
+ console.warn("[VRR.Startup]: Hashing module is not loaded!");
+ console.warn("[VRR.Startup]: This resource will now shutdown.");
thisResource.stop();
}
if(!checkForMySQLModule()) {
- console.warn("[Asshat.Startup]: MySQL module is not loaded!");
- console.warn("[Asshat.Startup]: This resource will now shutdown.");
+ console.warn("[VRR.Startup]: MySQL module is not loaded!");
+ console.warn("[VRR.Startup]: This resource will now shutdown.");
thisResource.stop();
}
if(!checkForSMTPModule()) {
- console.warn("[Asshat.Startup]: SMTP Email module is not loaded!");
- console.warn("[Asshat.Startup]: This resource will now shutdown.");
+ console.warn("[VRR.Startup]: SMTP Email module is not loaded!");
+ console.warn("[VRR.Startup]: This resource will now shutdown.");
thisResource.stop();
}
- logToConsole(LOG_DEBUG, "[Asshat.Startup]: All required modules loaded!");
+ logToConsole(LOG_DEBUG, "[VRR.Startup]: All required modules loaded!");
return true;
}
diff --git a/scripts/server/subaccount.js b/scripts/server/subaccount.js
index 52f22e99..7ab0a9d0 100644
--- a/scripts/server/subaccount.js
+++ b/scripts/server/subaccount.js
@@ -8,8 +8,8 @@
// ===========================================================================
function initSubAccountScript() {
- logToConsole(LOG_INFO, "[Asshat.SubAccount]: Initializing subaccount script ...");
- logToConsole(LOG_INFO, "[Asshat.SubAccount]: SubAccount script initialized!");
+ logToConsole(LOG_INFO, "[VRR.SubAccount]: Initializing subaccount script ...");
+ logToConsole(LOG_INFO, "[VRR.SubAccount]: SubAccount script initialized!");
}
// ===========================================================================
@@ -169,7 +169,7 @@ function saveSubAccountToDatabase(subAccountData) {
// ===========================================================================
function createSubAccount(accountId, firstName, lastName) {
- logToConsole(LOG_DEBUG, `[Asshat.Account] Attempting to create subaccount ${firstName} ${lastName} in database`);
+ logToConsole(LOG_DEBUG, `[VRR.Account] Attempting to create subaccount ${firstName} ${lastName} in database`);
let dbConnection = connectToDatabase();
let dbQuery = false;
@@ -203,7 +203,7 @@ function showCharacterSelectToClient(client) {
if(doesPlayerHaveAutoSelectLastCharacterEnabled(client)) {
if(getPlayerData(client).subAccounts.length > 0) {
- logToConsole(LOG_DEBUG, `[Asshat.SubAccount] ${getPlayerDisplayForConsole(client)} is being auto-spawned as character ID ${getPlayerLastUsedSubAccount(client)}`);
+ logToConsole(LOG_DEBUG, `[VRR.SubAccount] ${getPlayerDisplayForConsole(client)} is being auto-spawned as character ID ${getPlayerLastUsedSubAccount(client)}`);
selectCharacter(client, getPlayerLastUsedSubAccount(client));
return true;
}
@@ -211,7 +211,7 @@ function showCharacterSelectToClient(client) {
if(getServerConfig().useGUI && doesPlayerHaveGUIEnabled(client)) {
getPlayerData(client).currentSubAccount = 0;
- logToConsole(LOG_DEBUG, `[Asshat.SubAccount] Setting ${getPlayerDisplayForConsole(client)}'s character to ID ${getPlayerData(client).currentSubAccount}`);
+ logToConsole(LOG_DEBUG, `[VRR.SubAccount] Setting ${getPlayerDisplayForConsole(client)}'s character to ID ${getPlayerData(client).currentSubAccount}`);
let tempSubAccount = getPlayerData(client).subAccounts[0];
let clanName = (tempSubAccount.clan != 0) ? getClanData(tempSubAccount.clan).name : "None";
let lastPlayedText = (tempSubAccount.lastLogin != 0) ? `${msToTime(getCurrentUnixTimestamp()-tempSubAccount.lastLogin)} ago` : "Never";
@@ -221,7 +221,7 @@ function showCharacterSelectToClient(client) {
//setTimeout(function() {
// showCharacterSelectCameraToPlayer(client);
//}, 500);
- logToConsole(LOG_DEBUG, `[Asshat.SubAccount] ${getPlayerDisplayForConsole(client)} is being shown the character select GUI`);
+ logToConsole(LOG_DEBUG, `[VRR.SubAccount] ${getPlayerDisplayForConsole(client)} is being shown the character select GUI`);
} else {
//let emojiNumbers = ["➊", "➋", "➌", "➍", "➎", "➏", "➐", "➑", "➒"];
//let emojiNumbers = ["①", "②", "③", "④", "⑤", "⑥", "⑦", "⑧", "⑨"];
@@ -233,7 +233,7 @@ function showCharacterSelectToClient(client) {
let lastPlayedText = (tempSubAccount.lastLogin != 0) ? `${msToTime(getCurrentUnixTimestamp()-tempSubAccount.lastLogin)} ago` : "Never";
messagePlayerNormal(client, `${index+1} • [#BBBBBB]${subAccount.firstName} ${subAccount.lastName} ($${tempSubAccount.cash}, ${lastPlayedText})`);
});
- logToConsole(LOG_DEBUG, `[Asshat.SubAccount] ${getPlayerDisplayForConsole(client)} is being shown the character select/list message (GUI disabled)`);
+ logToConsole(LOG_DEBUG, `[VRR.SubAccount] ${getPlayerDisplayForConsole(client)} is being shown the character select/list message (GUI disabled)`);
}
}
@@ -253,7 +253,7 @@ function checkNewCharacter(client, firstName, lastName) {
lastName = lastName.trim();
if(doesNameContainInvalidCharacters(firstName) || doesNameContainInvalidCharacters(lastName)) {
- logToConsole(LOG_WARN, `[Asshat.Account] Subaccount ${firstName} ${lastName} could not be created (invalid characters in name)`);
+ logToConsole(LOG_WARN, `[VRR.Account] Subaccount ${firstName} ${lastName} could not be created (invalid characters in name)`);
showPlayerNewCharacterFailedGUI(client, "Invalid characters in name!");
return false;
}
@@ -295,7 +295,7 @@ function checkPreviousCharacter(client) {
let lastPlayedText = (tempSubAccount.lastLogin != 0) ? `${getTimeDifferenceDisplay(tempSubAccount.lastLogin, getCurrentUnixTimestamp())} ago` : "Never";
showPlayerCharacterSelectGUI(client, tempSubAccount.firstName, tempSubAccount.lastName, tempSubAccount.cash, clanName, lastPlayedText, tempSubAccount.skin);
- logToConsole(LOG_DEBUG, `[Asshat.SubAccount] Setting ${getPlayerDisplayForConsole(client)}'s character to ID ${getPlayerData(client).currentSubAccount}`);
+ logToConsole(LOG_DEBUG, `[VRR.SubAccount] Setting ${getPlayerDisplayForConsole(client)}'s character to ID ${getPlayerData(client).currentSubAccount}`);
}
}
@@ -316,16 +316,16 @@ function checkNextCharacter(client) {
let lastPlayedText = (tempSubAccount.lastLogin != 0) ? `${getTimeDifferenceDisplay(tempSubAccount.lastLogin, getCurrentUnixTimestamp())} ago` : "Never";
showPlayerCharacterSelectGUI(client, tempSubAccount.firstName, tempSubAccount.lastName, tempSubAccount.cash, clanName, lastPlayedText, tempSubAccount.skin);
- logToConsole(LOG_DEBUG, `[Asshat.SubAccount] Setting ${getPlayerDisplayForConsole(client)}'s character to ID ${getPlayerData(client).currentSubAccount}`);
+ logToConsole(LOG_DEBUG, `[VRR.SubAccount] Setting ${getPlayerDisplayForConsole(client)}'s character to ID ${getPlayerData(client).currentSubAccount}`);
}
}
// ===========================================================================
function selectCharacter(client, characterId = -1) {
- logToConsole(LOG_DEBUG, `[Asshat.SubAccount] ${getPlayerDisplayForConsole(client)} character select called (Character ID ${characterId})`);
+ logToConsole(LOG_DEBUG, `[VRR.SubAccount] ${getPlayerDisplayForConsole(client)} character select called (Character ID ${characterId})`);
if(characterId != -1) {
- logToConsole(LOG_DEBUG, `[Asshat.SubAccount] ${getPlayerDisplayForConsole(client)} provided character ID (${characterId}) to spawn with`);
+ logToConsole(LOG_DEBUG, `[VRR.SubAccount] ${getPlayerDisplayForConsole(client)} provided character ID (${characterId}) to spawn with`);
getPlayerData(client).currentSubAccount = characterId;
}
@@ -339,15 +339,15 @@ function selectCharacter(client, characterId = -1) {
getPlayerData(client).switchingCharacter = false;
- logToConsole(LOG_DEBUG, `[Asshat.SubAccount] Spawning ${getPlayerDisplayForConsole(client)} as character ID ${getPlayerData(client).currentSubAccount} with skin ${skin} (${spawnPosition.x}, ${spawnPosition.y}, ${spawnPosition.z})`);
+ logToConsole(LOG_DEBUG, `[VRR.SubAccount] Spawning ${getPlayerDisplayForConsole(client)} as character ID ${getPlayerData(client).currentSubAccount} with skin ${skin} (${spawnPosition.x}, ${spawnPosition.y}, ${spawnPosition.z})`);
//setPlayerCameraLookAt(client, getPosBehindPos(spawnPosition, spawnHeading, 5), spawnPosition);
- getPlayerData(client).pedState = AG_PEDSTATE_SPAWNING;
+ getPlayerData(client).pedState = VRR_PEDSTATE_SPAWNING;
if(getServerGame() == GAME_GTA_IV) {
spawnPlayer(client, spawnPosition, spawnHeading, skin);
} else {
spawnPlayer(client, spawnPosition, spawnHeading, skin, spawnInterior, spawnDimension);
}
- logToConsole(LOG_DEBUG, `[Asshat.SubAccount] Spawned ${getPlayerDisplayForConsole(client)} as character ID ${getPlayerData(client).currentSubAccount} with skin ${skin} (${spawnPosition.x}, ${spawnPosition.y}, ${spawnPosition.z})`);
+ logToConsole(LOG_DEBUG, `[VRR.SubAccount] Spawned ${getPlayerDisplayForConsole(client)} as character ID ${getPlayerData(client).currentSubAccount} with skin ${skin} (${spawnPosition.x}, ${spawnPosition.y}, ${spawnPosition.z})`);
setTimeout(function() {
onPlayerSpawn(client);
@@ -359,14 +359,14 @@ function selectCharacter(client, characterId = -1) {
// ===========================================================================
function switchCharacterCommand(command, params, client) {
- logToConsole(LOG_DEBUG, `[Asshat.SubAccount] ${getPlayerDisplayForConsole(client)} is requesting to switch characters (current character: ${getCharacterFullName(client)} [${getPlayerData(client).currentSubAccount}/${getPlayerCurrentSubAccount(client).databaseId}])`);
+ logToConsole(LOG_DEBUG, `[VRR.SubAccount] ${getPlayerDisplayForConsole(client)} is requesting to switch characters (current character: ${getCharacterFullName(client)} [${getPlayerData(client).currentSubAccount}/${getPlayerCurrentSubAccount(client).databaseId}])`);
if(!isPlayerSpawned(client)) {
- logToConsole(LOG_WARN, `[Asshat.SubAccount] ${getPlayerDisplayForConsole(client)} is not allowed to switch characters (not spawned)`);
+ logToConsole(LOG_WARN, `[VRR.SubAccount] ${getPlayerDisplayForConsole(client)} is not allowed to switch characters (not spawned)`);
return false;
}
if(isPlayerSwitchingCharacter(client)) {
- logToConsole(LOG_WARN, `[Asshat.SubAccount] ${getPlayerDisplayForConsole(client)} is not allowed to switch characters (already in switch char mode)`);
+ logToConsole(LOG_WARN, `[VRR.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 d39dc6f4..6510831f 100644
--- a/scripts/server/timers.js
+++ b/scripts/server/timers.js
@@ -18,7 +18,7 @@ function updateTimeRule() {
// ===========================================================================
function saveAllServerDataToDatabase() {
- logToConsole(LOG_DEBUG, "[Asshat.Utilities]: Saving all server data to database ...");
+ logToConsole(LOG_DEBUG, "[VRR.Utilities]: Saving all server data to database ...");
saveAllClientsToDatabase();
saveAllClansToDatabase();
saveAllHousesToDatabase();
@@ -26,7 +26,7 @@ function saveAllServerDataToDatabase() {
saveServerConfigToDatabase(getServerConfig());
saveAllVehiclesToDatabase();
saveAllItemsToDatabase();
- logToConsole(LOG_DEBUG, "[Asshat.Utilities]: Saved all server data to database!");
+ logToConsole(LOG_DEBUG, "[VRR.Utilities]: Saved all server data to database!");
}
// ===========================================================================
diff --git a/scripts/server/trigger.js b/scripts/server/trigger.js
index 70b1361d..4662d408 100644
--- a/scripts/server/trigger.js
+++ b/scripts/server/trigger.js
@@ -51,8 +51,8 @@ const triggerTypes = [
// ===========================================================================
function initTriggerScript() {
- logToConsole(LOG_INFO, "[Asshat.Trigger]: Initializing trigger script ...");
- logToConsole(LOG_INFO, "[Asshat.Trigger]: Trigger script initialized successfully!");
+ logToConsole(LOG_INFO, "[VRR.Trigger]: Initializing trigger script ...");
+ logToConsole(LOG_INFO, "[VRR.Trigger]: Trigger script initialized successfully!");
return true;
}
diff --git a/scripts/server/utilities.js b/scripts/server/utilities.js
index 65be22ba..a6a568e0 100644
--- a/scripts/server/utilities.js
+++ b/scripts/server/utilities.js
@@ -100,13 +100,13 @@ function getWeaponModelId(weaponId) {
function getIsland(position) {
if(getServerGame() == GAME_GTA_III) {
if(position.x > 616) {
- return AG_ISLAND_PORTLAND;
+ return VRR_ISLAND_PORTLAND;
} else if(position.x < -283) {
- return AG_ISLAND_SHORESIDEVALE;
+ return VRR_ISLAND_SHORESIDEVALE;
}
- return AG_ISLAND_STAUNTON;
+ return VRR_ISLAND_STAUNTON;
} else {
- return AG_ISLAND_NONE;
+ return VRR_ISLAND_NONE;
}
//return gta.getIslandFromPosition(position);
@@ -1003,7 +1003,7 @@ async function waitUntil(condition) {
// ===========================================================================
function resetClientStuff(client) {
- logToConsole(LOG_DEBUG, `[Asshat.Utilities] Resetting client data for ${getPlayerDisplayForConsole(client)}`);
+ logToConsole(LOG_DEBUG, `[VRR.Utilities] Resetting client data for ${getPlayerDisplayForConsole(client)}`);
if(!getPlayerData(client)) {
return false;
@@ -1096,8 +1096,8 @@ function checkPlayerPedStates() {
if(getPlayerData(clients[i])) {
if(getPlayerData(clients[i]).pedState) {
if(isPlayerInAnyVehicle(clients[i])) {
- if(getPlayerData(clients[i]).pedState == AG_PEDSTATE_EXITINGVEHICLE) {
- getPlayerData(clients[i]).pedState == AG_PEDSTATE_READY;
+ if(getPlayerData(clients[i]).pedState == VRR_PEDSTATE_EXITINGVEHICLE) {
+ getPlayerData(clients[i]).pedState == VRR_PEDSTATE_READY;
}
}
}
diff --git a/scripts/server/vehicle.js b/scripts/server/vehicle.js
index 7e46b62a..ce61fed4 100644
--- a/scripts/server/vehicle.js
+++ b/scripts/server/vehicle.js
@@ -8,17 +8,17 @@
// ===========================================================================
function initVehicleScript() {
- logToConsole(LOG_INFO, "[Asshat.Vehicle]: Initializing vehicle script ...");
+ logToConsole(LOG_INFO, "[VRR.Vehicle]: Initializing vehicle script ...");
getServerData().vehicles = loadVehiclesFromDatabase();
spawnAllVehicles();
- logToConsole(LOG_INFO, "[Asshat.Vehicle]: Vehicle script initialized successfully!");
+ logToConsole(LOG_INFO, "[VRR.Vehicle]: Vehicle script initialized successfully!");
return true;
}
// ===========================================================================
function loadVehiclesFromDatabase() {
- logToConsole(LOG_INFO, "[Asshat.Vehicle]: Loading vehicles from database ...");
+ logToConsole(LOG_INFO, "[VRR.Vehicle]: Loading vehicles from database ...");
let dbConnection = connectToDatabase();
let tempVehicles = [];
let dbAssoc;
@@ -35,19 +35,19 @@ function loadVehiclesFromDatabase() {
disconnectFromDatabase(dbConnection);
}
- logToConsole(LOG_INFO, `[Asshat.Vehicle]: ${tempVehicles.length} vehicles loaded from database successfully!`);
+ logToConsole(LOG_INFO, `[VRR.Vehicle]: ${tempVehicles.length} vehicles loaded from database successfully!`);
return tempVehicles;
}
// ===========================================================================
function saveAllVehiclesToDatabase() {
- logToConsole(LOG_INFO, "[Asshat.Vehicle]: Saving all vehicles to database ...");
+ logToConsole(LOG_INFO, "[VRR.Vehicle]: Saving all vehicles to database ...");
let vehicles = getServerData().vehicles;
for(let i in vehicles) {
saveVehicleToDatabase(vehicles[i]);
}
- logToConsole(LOG_INFO, "[Asshat.Vehicle]: Saved all vehicles to database!");
+ logToConsole(LOG_INFO, "[VRR.Vehicle]: Saved all vehicles to database!");
return true;
}
@@ -65,7 +65,7 @@ function saveVehicleToDatabase(vehicleData) {
return false;
}
- logToConsole(LOG_VERBOSE, `[Asshat.Vehicle]: Saving vehicle ${vehicleData.databaseId} to database ...`);
+ logToConsole(LOG_VERBOSE, `[VRR.Vehicle]: Saving vehicle ${vehicleData.databaseId} to database ...`);
let dbConnection = connectToDatabase();
if(dbConnection) {
if(!vehicleData.spawnLocked) {
@@ -90,7 +90,7 @@ function saveVehicleToDatabase(vehicleData) {
disconnectFromDatabase(dbConnection);
return true;
}
- logToConsole(LOG_VERBOSE, `[Asshat.Vehicle]: Saved vehicle ${vehicleData.vehicle.id} to database!`);
+ logToConsole(LOG_VERBOSE, `[VRR.Vehicle]: Saved vehicle ${vehicleData.vehicle.id} to database!`);
return false;
}
@@ -489,17 +489,17 @@ function doesPlayerHaveVehicleKeys(client, vehicle) {
return true;
}
- if(vehicleData.ownerType == AG_VEHOWNER_PUBLIC) {
+ if(vehicleData.ownerType == VRR_VEHOWNER_PUBLIC) {
return true;
}
- if(vehicleData.ownerType == AG_VEHOWNER_PLAYER) {
+ if(vehicleData.ownerType == VRR_VEHOWNER_PLAYER) {
if(vehicleData.ownerId == getPlayerCurrentSubAccount(client).databaseId) {
return true;
}
}
- if(vehicleData.ownerType == AG_VEHOWNER_CLAN) {
+ if(vehicleData.ownerType == VRR_VEHOWNER_CLAN) {
if(vehicleData.ownerId == getPlayerCurrentSubAccount(client).clan) {
if(vehicleData.clanRank <= getPlayerCurrentSubAccount(client).clanRank) {
return true;
@@ -507,7 +507,7 @@ function doesPlayerHaveVehicleKeys(client, vehicle) {
}
}
- if(vehicleData.ownerType == AG_VEHOWNER_FACTION) {
+ if(vehicleData.ownerType == VRR_VEHOWNER_FACTION) {
if(vehicleData.ownerId == getPlayerCurrentSubAccount(client).faction) {
if(vehicleData.factionRank <= getPlayerCurrentSubAccount(client).factionRank) {
return true;
@@ -515,7 +515,7 @@ function doesPlayerHaveVehicleKeys(client, vehicle) {
}
}
- if(vehicleData.ownerType == AG_VEHOWNER_JOB) {
+ if(vehicleData.ownerType == VRR_VEHOWNER_JOB) {
if(getJobType(vehicleData.ownerId) == getJobType(getPlayerCurrentSubAccount(client).job)) {
return true;
}
@@ -537,13 +537,13 @@ function doesClientOwnVehicle(client, vehicle) {
return true;
}
- if(vehicleData.ownerType == AG_VEHOWNER_PLAYER) {
+ if(vehicleData.ownerType == VRR_VEHOWNER_PLAYER) {
if(vehicleData.ownerId == getPlayerData(client).accountData.databaseId) {
return true;
}
}
- if(vehicleData.ownerType == AG_VEHOWNER_CLAN) {
+ if(vehicleData.ownerType == VRR_VEHOWNER_CLAN) {
if(vehicleData.ownerId == getPlayerCurrentSubAccount(client).clan) {
if(doesPlayerHaveClanPermission(client, "manageVehicles") || doesPlayerHaveClanPermission(client, "owner")) {
return true;
@@ -583,7 +583,7 @@ function setVehicleJobCommand(command, params, client) {
// return false;
//}
- getVehicleData(vehicle).ownerType = AG_VEHOWNER_JOB;
+ getVehicleData(vehicle).ownerType = VRR_VEHOWNER_JOB;
getVehicleData(vehicle).ownerId = jobId;
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set their [#CC22CC]${getVehicleName(vehicle)} [#FFFFFF]owner to the [#FFFF00]${getJobData(jobId).name} [#FFFFFF]job! (Job ID ${jobId})`);
@@ -606,7 +606,7 @@ function setVehicleRankCommand(command, params, client) {
let rankId = params;
- if(getVehicleData(vehicle).ownerType == AG_VEHOWNER_CLAN) {
+ if(getVehicleData(vehicle).ownerType == VRR_VEHOWNER_CLAN) {
rankId = getClanRankFromParams(getVehicleData(vehicle).ownerId, params);
if(!getClanRankData(getVehicleData(vehicle).ownerId, rankId)) {
messagePlayerError(client, "Clan rank not found!");
@@ -614,7 +614,7 @@ function setVehicleRankCommand(command, params, client) {
}
getVehicleData(vehicle).rank = getClanRankData(getVehicleData(vehicle).ownerId, rankId).databaseId;
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set their [#CC22CC]${getVehicleName(vehicle)} [#FFFFFF]rank to [#AAAAAA]${getClanRankData(getVehicleData(vehicle).ownerId, rankId).name} [#FFFFFF]of the [#FF9900]${getClanData(getVehicleData(vehicle).ownerId).name} [#FFFFFFclan!`);
- } else if(getVehicleData(vehicle).ownerType == AG_VEHOWNER_JOB) {
+ } else if(getVehicleData(vehicle).ownerType == VRR_VEHOWNER_JOB) {
getVehicleData(vehicle).rank = rankId;
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set their [#CC22CC]${getVehicleName(vehicle)} [#FFFFFF]rank to [#AAAAAA]${rankId} [#FFFFFF]of the [#FFFF00]${getJobData(getVehicleData(vehicle).ownerId).name} [#FFFFFF]job!`);
}
@@ -636,7 +636,7 @@ function setVehicleClanCommand(command, params, client) {
return false;
}
- getVehicleData(vehicle).ownerType = AG_VEHOWNER_CLAN;
+ getVehicleData(vehicle).ownerType = VRR_VEHOWNER_CLAN;
getVehicleData(vehicle).ownerId = getClanData(clanId).databaseId;
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set their [#CC22CC]${getVehicleName(vehicle)} [#FFFFFF]owner to the [#FF9900]${getClanData(clanId).name} [#FFFFFF]clan`);
@@ -653,7 +653,7 @@ function setVehicleToBusinessCommand(command, params, client) {
let vehicle = getPlayerVehicle(client);
let businessId = toInteger(isPlayerInAnyBusiness(client)) ? getPlayerBusiness(client) : getClosestBusinessEntrance(getPlayerPosition(client));
- getVehicleData(vehicle).ownerType = AG_VEHOWNER_BIZ;
+ getVehicleData(vehicle).ownerType = VRR_VEHOWNER_BIZ;
getVehicleData(vehicle).ownerId = getBusinessData(businessId).databaseId;
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set their [#CC22CC]${getVehicleName(vehicle)} [#FFFFFF]owner to the [#0099FF]${getBusinessData(businessId).name} [#FFFFFF]business`);
@@ -675,7 +675,7 @@ function setVehicleOwnerCommand(command, params, client) {
return false;
}
- getVehicleData(vehicle).ownerType = AG_VEHOWNER_PLAYER;
+ getVehicleData(vehicle).ownerType = VRR_VEHOWNER_PLAYER;
getVehicleData(vehicle).ownerId = getPlayerCurrentSubAccount(targetClient).databaseId;
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set their [#CC22CC]${getVehicleName(vehicle)} [#FFFFFF]owner to [#AAAAAA]${getClientSubAccountName(targetClient)}`);
@@ -743,7 +743,7 @@ function removeVehicleOwnerCommand(command, params, client) {
return false;
}
- getVehicleData(vehicle).ownerType = AG_VEHOWNER_NONE;
+ getVehicleData(vehicle).ownerType = VRR_VEHOWNER_NONE;
getVehicleData(vehicle).ownerId = 0;
messageAdmins(`[#AAAAAA]${client.name} [#FFFFFF]set their [#CC22CC]${getVehicleName(vehicle)} [#FFFFFF]owner to nobody!`);
@@ -771,23 +771,23 @@ function getVehicleInfoCommand(command, params, client) {
let ownerType = "None";
ownerType = toLowerCase(getVehicleOwnerTypeText(vehicleData.ownerType));
switch(vehicleData.ownerType) {
- case AG_VEHOWNER_CLAN:
+ case VRR_VEHOWNER_CLAN:
ownerName = getClanData(vehicleData.ownerId).name;
ownerType = "clan";
break;
- case AG_VEHOWNER_JOB:
+ case VRR_VEHOWNER_JOB:
ownerName = getJobData(vehicleData.ownerId).name;
ownerType = "job";
break;
- case AG_VEHOWNER_PLAYER:
+ case VRR_VEHOWNER_PLAYER:
let subAccountData = loadSubAccountFromId(vehicleData.ownerId);
ownerName = `${subAccountData.firstName} ${subAccountData.lastName} [${subAccountData.databaseId}]`;
ownerType = "player";
break;
- case AG_VEHOWNER_BIZ:
+ case VRR_VEHOWNER_BIZ:
ownerName = getBusinessData(vehicleData.ownerId).name;
ownerType = "business";
break;
@@ -949,16 +949,16 @@ function setVehicleLocked(vehicle, locked) {
function getVehicleOwnerTypeText(ownerType) {
switch(ownerType) {
- case AG_VEHOWNER_CLAN:
+ case VRR_VEHOWNER_CLAN:
return "clan";
- case AG_VEHOWNER_JOB:
+ case VRR_VEHOWNER_JOB:
return "job";
- case AG_VEHOWNER_PLAYER:
+ case VRR_VEHOWNER_PLAYER:
return "player";
- case AG_VEHOWNER_BIZ:
+ case VRR_VEHOWNER_BIZ:
return "business";
default:
@@ -969,7 +969,7 @@ function getVehicleOwnerTypeText(ownerType) {
// ===========================================================================
function isVehicleOwnedByJob(vehicle, jobId) {
- if(getVehicleData(vehicle).ownerType == AG_VEHOWNER_JOB) {
+ if(getVehicleData(vehicle).ownerType == VRR_VEHOWNER_JOB) {
return (getVehicleData(vehicle).ownerId == jobId);
}
return false;
@@ -1004,7 +1004,7 @@ function createNewDealershipVehicle(model, spawnPosition, spawnRotation, price,
tempVehicleData.spawnLocked = true;
tempVehicleData.spawnPosition = spawnPosition;
tempVehicleData.spawnRotation = spawnRotation;
- tempVehicleData.ownerType = AG_VEHOWNER_BIZ;
+ tempVehicleData.ownerType = VRR_VEHOWNER_BIZ;
tempVehicleData.ownerId = dealershipId;
setEntityData(vehicle, "ag.dataSlot", vehicleDataSlot, true);
@@ -1061,7 +1061,7 @@ function checkVehicleBuying() {
takePlayerCash(client, getVehicleData(getPlayerData(clients[i]).buyingVehicle).buyPrice);
updatePlayerCash(clients[i]);
getVehicleData(getPlayerData(clients[i]).buyingVehicle).ownerId = getPlayerCurrentSubAccount(clients[i]).databaseId;
- getVehicleData(getPlayerData(clients[i]).buyingVehicle).ownerType = AG_VEHOWNER_PLAYER;
+ getVehicleData(getPlayerData(clients[i]).buyingVehicle).ownerType = VRR_VEHOWNER_PLAYER;
getVehicleData(getPlayerData(clients[i]).buyingVehicle).buyPrice = 0;
getVehicleData(getPlayerData(clients[i]).buyingVehicle).rentPrice = 0;
getVehicleData(getPlayerData(clients[i]).buyingVehicle).spawnLocked = false;
@@ -1092,9 +1092,9 @@ function checkVehicleBurning() {
function cacheAllVehicleItems() {
for(let i in getServerData().vehicles) {
for(let j in getServerData().items) {
- if(getItemData(j).ownerType == AG_ITEM_OWNER_VEHTRUNK && getItemData(j).ownerId == getServerData().vehicles[i].databaseId) {
+ if(getItemData(j).ownerType == VRR_ITEM_OWNER_VEHTRUNK && getItemData(j).ownerId == getServerData().vehicles[i].databaseId) {
getServerData().vehicles[i].trunkItemCache.push(j);
- } else if(getItemData(j).ownerType == AG_ITEM_OWNER_VEHDASH && getItemData(j).ownerId == getServerData().vehicles[i].databaseId) {
+ } else if(getItemData(j).ownerType == VRR_ITEM_OWNER_VEHDASH && getItemData(j).ownerId == getServerData().vehicles[i].databaseId) {
getServerData().vehicles[i].dashItemCache.push(j);
}
}
diff --git a/scripts/shared/const.js b/scripts/shared/const.js
index 802dca4e..4b884843 100644
--- a/scripts/shared/const.js
+++ b/scripts/shared/const.js
@@ -8,10 +8,10 @@
// ===========================================================================
// Label Types
-const AG_LABEL_JOB = 1;
-const AG_LABEL_BUSINESS = 2;
-const AG_LABEL_HOUSE = 3;
-const AG_LABEL_EXIT = 3;
+const VRR_LABEL_JOB = 1;
+const VRR_LABEL_BUSINESS = 2;
+const VRR_LABEL_HOUSE = 3;
+const VRR_LABEL_EXIT = 3;
// Log Levels
const LOG_ALL = -1;
@@ -23,29 +23,29 @@ const LOG_VERBOSE = 8;
const LOG_DEBUG = 16;
// Weapon Damage Event Types
-const AG_WEAPON_DAMAGE_EVENT_NONE = 0;
-const AG_WEAPON_DAMAGE_EVENT_NORMAL = 1;
-const AG_WEAPON_DAMAGE_EVENT_TAZER = 2;
-const AG_WEAPON_DAMAGE_EVENT_EXTINGUISH = 3;
-const AG_WEAPON_DAMAGE_EVENT_MACE = 4;
+const VRR_WEAPON_DAMAGE_EVENT_NONE = 0;
+const VRR_WEAPON_DAMAGE_EVENT_NORMAL = 1;
+const VRR_WEAPON_DAMAGE_EVENT_TAZER = 2;
+const VRR_WEAPON_DAMAGE_EVENT_EXTINGUISH = 3;
+const VRR_WEAPON_DAMAGE_EVENT_MACE = 4;
// Games
-const AG_GAME_GTA_III = 1;
-const AG_GAME_GTA_VC = 2;
-const AG_GAME_GTA_SA = 3;
-const AG_GAME_GTA_IV = 4;
-const AG_GAME_GTA_V = 50;
+const VRR_GAME_GTA_III = 1;
+const VRR_GAME_GTA_VC = 2;
+const VRR_GAME_GTA_SA = 3;
+const VRR_GAME_GTA_IV = 4;
+const VRR_GAME_GTA_V = 50;
// Key States
-const AG_KEYSTATE_NONE = 0;
-const AG_KEYSTATE_UP = 1;
-const AG_KEYSTATE_DOWN = 2;
-const AG_KEYSTATE_HOLDSHORT = 3;
-const AG_KEYSTATE_HOLDLONG = 4;
+const VRR_KEYSTATE_NONE = 0;
+const VRR_KEYSTATE_UP = 1;
+const VRR_KEYSTATE_DOWN = 2;
+const VRR_KEYSTATE_HOLDSHORT = 3;
+const VRR_KEYSTATE_HOLDLONG = 4;
-const AG_BIZLABEL_INFO_NONE = 0;
-const AG_BIZLABEL_INFO_BUY = 1;
-const AG_BIZLABEL_INFO_ENTER = 2;
-const AG_BIZLABEL_INFO_ENTERVEHICLE = 3;
-const AG_BIZLABEL_INFO_REFUEL = 4;
-const AG_BIZLABEL_INFO_REPAIR = 5;
\ No newline at end of file
+const VRR_BIZLABEL_INFO_NONE = 0;
+const VRR_BIZLABEL_INFO_BUY = 1;
+const VRR_BIZLABEL_INFO_ENTER = 2;
+const VRR_BIZLABEL_INFO_ENTERVEHICLE = 3;
+const VRR_BIZLABEL_INFO_REFUEL = 4;
+const VRR_BIZLABEL_INFO_REPAIR = 5;
\ No newline at end of file