From 1992359c3c0ec5f1577bcab80db531dec1e22202 Mon Sep 17 00:00:00 2001
From: Suprise444 <80071391+Suprise444@users.noreply.github.com>
Date: Mon, 2 May 2022 22:48:03 +0200
Subject: [PATCH 01/14] May 2, 2022
---
locale/polish.json | 74 +++++++++++++++++++++++-----------------------
1 file changed, 37 insertions(+), 37 deletions(-)
diff --git a/locale/polish.json b/locale/polish.json
index 02a57f7c..82bb663b 100644
--- a/locale/polish.json
+++ b/locale/polish.json
@@ -353,43 +353,43 @@
"VehicleForRent": "Ten {1} jest do wynajęcia za {2}! Użyj {3} jeżeli chcesz go wynająć",
"ADDED-31JAN2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations.",
- "LoginFailedInvalidPassword": "Invalid password! {1} attempts remaining",
- "LoginFailedNoPassword": "You must enter a password! ! {1} attempts remaining",
- "RegistrationFailedNoPassword": "You must enter a password!",
- "RegistrationFailedNoPasswordConfirm": "You must confirm the password!",
- "RegistrationFailedNoEmail": "You must enter an email!",
- "AccountNameAlreadyRegistered": "Your name is already registered!",
- "AlreadyLoggedIn": "You are already logged in!",
- "RegistrationFailedInvalidEmail": "That email is invalid!",
- "RegistrationFailedPasswordMismatch": "The passwords don't match!",
- "RegistrationFailedCreateError": "Your account couldn't be created!",
- "RegistrationSuccess": "Your account has been created!",
- "RegistrationEmailVerifyReminder": "Don't forget to verify your email! A verification code has been sent to you.",
- "RegistrationCreateCharReminder": "To play on the server, you will need to make a character.",
- "NoCharactersGUIMessage": "You have no characters. Would you like to make one?",
- "NoCharactersGUIWindowTitle": "No characters",
- "NoCharactersChatMessage": "You have no characters. Use {1} to make one.",
- "NeedEmailFor2FA": "You need to add your email to your account to use two-factor authentication.",
- "NeedEmailVerifiedFor2FA": "You need to verify your email to use two-factor authentication.",
- "SetEmailHelpTip": "Use {1} to set your email.",
- "VerifyEmailHelpTip": "Use {1} to verify your email.",
+ "LoginFailedInvalidPassword": "Nieprawidłowe hasło! Pozostało {1} prób",
+ "LoginFailedNoPassword": "Musisz podać hasło! ! Pozostało {1} prób",
+ "RegistrationFailedNoPassword": "Musisz podać hasło!",
+ "RegistrationFailedNoPasswordConfirm": "Musisz potwierdzić hasło!",
+ "RegistrationFailedNoEmail": "Musisz podać adres email!",
+ "AccountNameAlreadyRegistered": "Twoja nazwa jest już zarejestrowana!",
+ "AlreadyLoggedIn": "Jesteś już zalogowany!",
+ "RegistrationFailedInvalidEmail": "Nieprawidłowy adres email!",
+ "RegistrationFailedPasswordMismatch": "Hasła się nie zgadzają!",
+ "RegistrationFailedCreateError": "Nie udało się stworzyć twojego konta!",
+ "RegistrationSuccess": "Twoje konto zostało utworzone!",
+ "RegistrationEmailVerifyReminder": "Nie zapomnij zweryfikować swojego adresu email! Kod werifikacyjny został wysłany na twój adres email.",
+ "RegistrationCreateCharReminder": "Aby zagrać na serwerze, musisz stworzyć postać.",
+ "NoCharactersGUIMessage": "Nie masz postaci. Czy chciałbyś ją stworzyć?",
+ "NoCharactersGUIWindowTitle": "Brak postaci",
+ "NoCharactersChatMessage": "Nie masz postaci. Użyj {1} aby ją stworzyć.",
+ "NeedEmailFor2FA": "Musisz przypisać adres email do swojego konta, aby używać weryfikacji dwuetapowej.",
+ "NeedEmailVerifiedFor2FA": "Musisz zweryfikować swój adres email, aby używać weryfikacji dwuetapowej",
+ "SetEmailHelpTip": "Użyj {1} aby ustawić swój adres email.",
+ "VerifyEmailHelpTip": "Użyj {1} aby zweryfikować swój adres email.",
"ADDED-13FEB2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations.",
- "NearbyRadio": "Nearby radio",
- "FromRadio": "From radio",
- "ToRadio": "To radio",
- "NeedToEnterPropertyCommand": "You need to enter the {1} first! Use {2} to enter and exit",
- "NeedToEnterPropertyKeyPress": "You need to enter the {1} first! Press {2} to enter and exit",
- "InventoryFullCantCarry": "You don't have any space to carry this (full inventory)!",
- "NotEnoughCashNeedAmountMore": "You don't have enough money! You need {1} more!",
- "AmountMustBeMoreThan": "The amount must be more than {1}!",
- "WeaponBanned": "You are not allowed to buy or use weapons!",
- "TimeNotNumber": "The time must be a number",
- "HeaderDefaultBusinessItemTypes": "Business Item Templates",
- "FixingStuck": "Fixing your position and virtual world ...",
- "CantUseCommandYet": "You must wait before you can use this command again!",
- "NotATester": "You are not a tester!",
- "AccessDenied": "AccessDenied",
- "InvalidSkin": "That skin is invalid!",
- "HeaderInteriorTypes": "Interiors"
+ "NearbyRadio": "Pobliskie radio",
+ "FromRadio": "Z radia",
+ "ToRadio": "Do radia",
+ "NeedToEnterPropertyCommand": "Musisz najpierw wejść do {1}! Użyj {2} aby wejść lub wyjść",
+ "NeedToEnterPropertyKeyPress": "Musisz najpierw wejść do {1}! Naciśnij {2} aby wejść lub wyjść",
+ "InventoryFullCantCarry": "Nie masz miejsca aby to podnieść (pełny ekwipunek)!",
+ "NotEnoughCashNeedAmountMore": "Nie masz wystarczająco miejsca! Potrzebujesz jeszcze {1}!",
+ "AmountMustBeMoreThan": "Wartość musi być większa od {1}!",
+ "WeaponBanned": "Nie możesz używać ani kupować broni!",
+ "TimeNotNumber": "Czas musi być numerem",
+ "HeaderDefaultBusinessItemTypes": "Wzory przedmiotów biznesowych",
+ "FixingStuck": "Naprawianie twojej pozycji i świata wirtualnego ...",
+ "CantUseCommandYet": "Musisz poczekać zanim znowu użyjesz tej komendy!",
+ "NotATester": "Nie jesteś testerem!",
+ "AccessDenied": "OdmowaDostępu",
+ "InvalidSkin": "Ta skórka jest nieprawidłowa!",
+ "HeaderInteriorTypes": "Wnętrza"
}
From 49d212b9fd799c308499c1f55f914505e295847e Mon Sep 17 00:00:00 2001
From: Vortrex <3858226+VortrexFTW@users.noreply.github.com>
Date: Tue, 26 Jul 2022 02:18:13 -0500
Subject: [PATCH 02/14] Backup current script state
---
scripts/client/netevents.js | 417 ++++++++++++
scripts/server/crime.js | 22 +
scripts/server/forensics.js | 20 +
scripts/server/gps.js | 148 +++++
scripts/server/insurance.js | 40 ++
scripts/server/netevents.js | 1235 +++++++++++++++++++++++++++++++++++
6 files changed, 1882 insertions(+)
create mode 100644 scripts/client/netevents.js
create mode 100644 scripts/server/crime.js
create mode 100644 scripts/server/forensics.js
create mode 100644 scripts/server/gps.js
create mode 100644 scripts/server/insurance.js
create mode 100644 scripts/server/netevents.js
diff --git a/scripts/client/netevents.js b/scripts/client/netevents.js
new file mode 100644
index 00000000..0cadc35a
--- /dev/null
+++ b/scripts/client/netevents.js
@@ -0,0 +1,417 @@
+// ===========================================================================
+// Vortrex's Roleplay Resource
+// https://github.com/VortrexFTW/gtac_roleplay
+// ===========================================================================
+// FILE: netevents.js
+// DESC: Provides server communication and cross-endpoint network events
+// TYPE: Client (JavaScript)
+// ===========================================================================
+
+function initServerScript() {
+ logToConsole(LOG_DEBUG, "[VRR.Server]: Initializing server script ...");
+ addAllNetworkHandlers();
+ logToConsole(LOG_DEBUG, "[VRR.Server]: Server script initialized!");
+}
+
+// ===========================================================================
+
+function addAllNetworkHandlers() {
+ logToConsole(LOG_DEBUG, "[VRR.Server]: Adding network handlers ...");
+
+ // Chat history
+ addNetworkEventHandler("m", receiveChatBoxMessageFromServer); // Not prefixed with VRR to make it as small as possible
+ addNetworkEventHandler("vrr.chatScrollLines", setChatScrollLines);
+ addNetworkEventHandler("vrr.chatAutoHideDelay", setChatAutoHideDelay);
+
+ // Messaging (like textdraws and stuff)
+ addNetworkEventHandler("vrr.smallGameMessage", showSmallGameMessage);
+
+ // Job
+ addNetworkEventHandler("vrr.job", receiveJobFromServer);
+ addNetworkEventHandler("vrr.working", setLocalPlayerWorkingState);
+ addNetworkEventHandler("vrr.jobType", setLocalPlayerJobType);
+ addNetworkEventHandler("vrr.showJobRouteLocation", showJobRouteLocation);
+ addNetworkEventHandler("vrr.hideJobRouteLocation", hideJobRouteLocation);
+
+ // Local player states and values
+ addNetworkEventHandler("vrr.restoreCamera", restoreLocalCamera);
+ addNetworkEventHandler("vrr.cameraLookAt", setLocalCameraLookAt);
+ addNetworkEventHandler("vrr.freeze", setLocalPlayerFrozenState);
+ addNetworkEventHandler("vrr.control", setLocalPlayerControlState);
+ addNetworkEventHandler("vrr.fadeCamera", fadeLocalCamera);
+ addNetworkEventHandler("vrr.removeFromVehicle", removeLocalPlayerFromVehicle);
+ addNetworkEventHandler("vrr.clearWeapons", clearLocalPlayerWeapons);
+ addNetworkEventHandler("vrr.giveWeapon", giveLocalPlayerWeapon);
+ addNetworkEventHandler("vrr.position", setLocalPlayerPosition);
+ addNetworkEventHandler("vrr.heading", setLocalPlayerHeading);
+ addNetworkEventHandler("vrr.interior", setLocalPlayerInterior);
+ addNetworkEventHandler("vrr.spawned", onServerSpawnedLocalPlayer);
+ addNetworkEventHandler("vrr.money", setLocalPlayerCash);
+ addNetworkEventHandler("vrr.armour", setLocalPlayerArmour);
+ addNetworkEventHandler("vrr.localPlayerSkin", setLocalPlayerSkin);
+ addNetworkEventHandler("vrr.pedSpeak", makeLocalPlayerPedSpeak);
+ addNetworkEventHandler("vrr.infiniteRun", setLocalPlayerInfiniteRun);
+ addNetworkEventHandler("vrr.playerCop", setLocalPlayerAsCopState);
+ addNetworkEventHandler("vrr.health", setLocalPlayerHealth);
+ addNetworkEventHandler("vrr.wantedLevel", setLocalPlayerWantedLevel);
+ addNetworkEventHandler("vrr.playerPedId", sendLocalPlayerNetworkIdToServer);
+ addNetworkEventHandler("vrr.ped", setLocalPlayerPedPartsAndProps);
+ addNetworkEventHandler("vrr.spawn", serverRequestedLocalPlayerSpawn);
+ addNetworkEventHandler("vrr.clearPedState", clearLocalPedState);
+ addNetworkEventHandler("vrr.drunkEffect", setLocalPlayerDrunkEffect);
+ addNetworkEventHandler("vrr.deleteLocalPlayerPed", deleteLocalPlayerPed);
+
+ // Vehicle
+ addNetworkEventHandler("vrr.vehicle", receiveVehicleFromServer);
+ addNetworkEventHandler("vrr.veh.lights", setVehicleLights);
+ addNetworkEventHandler("vrr.veh.engine", setVehicleEngine);
+ addNetworkEventHandler("vrr.veh.repair", repairVehicle);
+
+ // Radio
+ addNetworkEventHandler("vrr.radioStream", playStreamingRadio);
+ addNetworkEventHandler("vrr.audioFileStream", playAudioFile);
+ addNetworkEventHandler("vrr.stopRadioStream", stopStreamingRadio);
+ addNetworkEventHandler("vrr.radioVolume", setStreamingRadioVolume);
+
+ // Key Bindings
+ addNetworkEventHandler("vrr.delKeyBind", unBindAccountKey);
+ addNetworkEventHandler("vrr.addKeyBind", bindAccountKey);
+ addNetworkEventHandler("vrr.clearKeyBinds", clearKeyBinds);
+
+ // Weapon Damage
+ addNetworkEventHandler("vrr.weaponDamageEnabled", setPlayerWeaponDamageEnabled);
+ addNetworkEventHandler("vrr.weaponDamageEvent", setPlayerWeaponDamageEvent);
+
+ // GUI
+ addNetworkEventHandler("vrr.showRegistration", showRegistrationGUI);
+ addNetworkEventHandler("vrr.showNewCharacter", showNewCharacterGUI);
+ addNetworkEventHandler("vrr.showLogin", showLoginGUI);
+ addNetworkEventHandler("vrr.2fa", showTwoFactorAuthGUI);
+ addNetworkEventHandler("vrr.showResetPasswordCodeInput", resetPasswordCodeInputGUI);
+ addNetworkEventHandler("vrr.showResetPasswordEmailInput", resetPasswordEmailInputGUI);
+ addNetworkEventHandler("vrr.showChangePassword", showChangePasswordGUI);
+ addNetworkEventHandler("vrr.showCharacterSelect", showCharacterSelectGUI);
+ addNetworkEventHandler("vrr.switchCharacterSelect", switchCharacterSelectGUI);
+ addNetworkEventHandler("vrr.showError", showErrorGUI);
+ addNetworkEventHandler("vrr.showInfo", showInfoGUI);
+ addNetworkEventHandler("vrr.showPrompt", showYesNoPromptGUI);
+ addNetworkEventHandler("vrr.loginSuccess", loginSuccess);
+ addNetworkEventHandler("vrr.characterSelectSuccess", characterSelectSuccess);
+ addNetworkEventHandler("vrr.loginFailed", loginFailed);
+ addNetworkEventHandler("vrr.registrationSuccess", registrationSuccess);
+ addNetworkEventHandler("vrr.registrationFailed", registrationFailed);
+ addNetworkEventHandler("vrr.newCharacterFailed", newCharacterFailed);
+ addNetworkEventHandler("vrr.changePassword", showChangePasswordGUI);
+ addNetworkEventHandler("vrr.showLocaleChooser", showLocaleChooserGUI);
+ addNetworkEventHandler("vrr.guiColour", setGUIColours);
+
+ // Business
+ addNetworkEventHandler("vrr.business", receiveBusinessFromServer);
+
+ // House
+ addNetworkEventHandler("vrr.house", receiveHouseFromServer);
+
+ // GPS
+ addNetworkEventHandler("vrr.showGPSBlip", showGPSLocation);
+
+ // Locale
+ addNetworkEventHandler("vrr.locale", setLocale);
+ addNetworkEventHandler("vrr.localeChooser", toggleLocaleChooserGUI);
+
+ // Misc
+ addNetworkEventHandler("vrr.mouseCursor", toggleMouseCursor);
+ addNetworkEventHandler("vrr.mouseCamera", toggleMouseCamera);
+ addNetworkEventHandler("vrr.clearPeds", clearLocalPlayerOwnedPeds);
+ addNetworkEventHandler("vrr.passenger", enterVehicleAsPassenger);
+ addNetworkEventHandler("vrr.logo", setServerLogoRenderState);
+ addNetworkEventHandler("vrr.ambience", setCityAmbienceState);
+ addNetworkEventHandler("vrr.runCode", runClientCode);
+ addNetworkEventHandler("vrr.minuteDuration", setMinuteDuration);
+ addNetworkEventHandler("vrr.snow", setSnowState);
+ addNetworkEventHandler("vrr.enterPropertyKey", setEnterPropertyKey);
+ addNetworkEventHandler("vrr.skinSelect", toggleSkinSelect);
+ addNetworkEventHandler("vrr.hotbar", updatePlayerHotBar);
+ addNetworkEventHandler("vrr.showItemActionDelay", showItemActionDelay);
+ addNetworkEventHandler("vrr.set2DRendering", set2DRendering);
+ addNetworkEventHandler("vrr.mouseCameraForce", setMouseCameraState);
+ addNetworkEventHandler("vrr.logLevel", setLogLevel);
+ addNetworkEventHandler("vrr.hideAllGUI", hideAllGUI);
+ addNetworkEventHandler("vrr.nametag", updatePlayerNameTag);
+ addNetworkEventHandler("vrr.nametagDistance", setNameTagDistance);
+ addNetworkEventHandler("vrr.ping", updatePlayerPing);
+ addNetworkEventHandler("vrr.anim", makePedPlayAnimation);
+ addNetworkEventHandler("vrr.stopAnim", makePedStopAnimation);
+ addNetworkEventHandler("vrr.forceAnim", forcePedAnimation);
+ addNetworkEventHandler("vrr.clientInfo", serverRequestedClientInfo);
+ addNetworkEventHandler("vrr.interiorLights", updateInteriorLightsState);
+ addNetworkEventHandler("vrr.cutsceneInterior", setCutsceneInterior);
+ addNetworkEventHandler("vrr.syncElement", forceSyncElementProperties);
+ addNetworkEventHandler("vrr.elementPosition", setElementPosition);
+ addNetworkEventHandler("vrr.elementCollisions", setElementCollisionsEnabled);
+ addNetworkEventHandler("vrr.vehBuyState", setVehiclePurchaseState);
+ addNetworkEventHandler("vrr.holdObject", makePedHoldObject);
+}
+
+// ===========================================================================
+
+function sendResourceReadySignalToServer() {
+ sendNetworkEventToServer("vrr.clientReady");
+}
+
+// ===========================================================================
+
+function sendResourceStartedSignalToServer() {
+ sendNetworkEventToServer("vrr.clientStarted");
+}
+
+// ===========================================================================
+
+function sendResourceStoppedSignalToServer() {
+ if (isConnected) {
+ sendNetworkEventToServer("vrr.clientStopped");
+ }
+}
+
+// ===========================================================================
+
+function set2DRendering(hudState, labelState, smallGameMessageState, scoreboardState, hotBarState, 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;
+
+ if (getGame() == VRR_GAME_GTA_IV) {
+ natives.displayCash(hudState);
+ natives.displayAmmo(hudState);
+ natives.displayHud(hudState);
+ natives.displayRadar(hudState);
+ natives.displayAreaName(hudState);
+ } else {
+ if (typeof setHUDEnabled != "undefined") {
+ setHUDEnabled(hudState);
+ }
+ }
+
+ renderLabels = labelState;
+ renderSmallGameMessage = smallGameMessageState;
+ renderScoreBoard = scoreboardState;
+ renderHotBar = hotBarState;
+ renderItemActionDelay = itemActionDelayState;
+}
+
+// ===========================================================================
+
+function onServerSpawnedLocalPlayer(state) {
+ logToConsole(LOG_DEBUG, `[VRR.Main] Setting spawned state to ${state}`);
+ isSpawned = state;
+ setUpInitialGame();
+ if (state) {
+ setTimeout(function () {
+ calledDeathEvent = false;
+ }, 1000);
+
+ getElementsByType(ELEMENT_PED).filter(ped => !ped.isType(ELEMENT_PLAYER)).forEach(ped => {
+ syncCivilianProperties(ped);
+ });
+
+ getElementsByType(ELEMENT_PLAYER).forEach(player => {
+ syncPlayerProperties(player);
+ });
+
+ getElementsByType(ELEMENT_VEHICLE).forEach(vehicle => {
+ syncVehicleProperties(vehicle);
+ });
+ }
+}
+
+// ===========================================================================
+
+function tellServerPlayerUsedKeyBind(key) {
+ sendNetworkEventToServer("vrr.useKeyBind", key);
+}
+
+// ===========================================================================
+
+function tellServerPlayerArrivedAtJobRouteLocation() {
+ sendNetworkEventToServer("vrr.arrivedAtJobRouteLocation");
+}
+
+// ===========================================================================
+
+function tellServerItemActionDelayComplete() {
+ sendNetworkEventToServer("vrr.itemActionDelayComplete");
+}
+
+// ===========================================================================
+
+function sendServerClientInfo() {
+ let clientVersion = "0.0.0.0";
+ if (typeof CLIENT_VERSION_MAJOR != "undefined") {
+ clientVersion = `${CLIENT_VERSION_MAJOR}.${CLIENT_VERSION_MINOR}.${CLIENT_VERSION_PATCH}.${CLIENT_VERSION_BUILD}`;
+ }
+ sendNetworkEventToServer("vrr.clientInfo", clientVersion, game.width, game.height);
+}
+
+// ===========================================================================
+
+function sendServerNewAFKStatus(state) {
+ sendNetworkEventToServer("vrr.afk", state);
+}
+
+// ===========================================================================
+
+function anchorBoat(vehicleId) {
+
+}
+
+// ===========================================================================
+
+function setEnterPropertyKey(key) {
+ enterPropertyKey = key;
+}
+
+// ===========================================================================
+
+function serverRequestedClientInfo() {
+ sendServerClientInfo();
+}
+
+// ===========================================================================
+
+function updateInteriorLightsState(state) {
+ interiorLightsEnabled = state;
+}
+
+// ===========================================================================
+
+function forceSyncElementProperties(elementId) {
+ if (getElementFromId(elementId) == null) {
+ return false;
+ }
+
+ syncElementProperties(getElementFromId(elementId));
+}
+
+// ===========================================================================
+
+function setElementCollisionsEnabled(elementId, state) {
+ if (getElementFromId(elementId) == null) {
+ return false;
+ }
+
+ getElementFromId(elementId).collisionsEnabled = state;
+}
+
+// ===========================================================================
+
+function setLocalPlayerArmour(armour) {
+ if (typeof localPlayer.armour != "undefined") {
+ localPlayer.armour = armour;
+ }
+}
+
+// ===========================================================================
+
+function setLocalPlayerWantedLevel(wantedLevel) {
+ forceWantedLevel = toInteger(wantedLevel);
+}
+
+// ===========================================================================
+
+function setLogLevel(level) {
+ logLevel = level;
+}
+
+// ===========================================================================
+
+function setLocalPlayerInfiniteRun(state) {
+ if (localPlayer != null) {
+ if (getGame() == VRR_GAME_GTA_III || getGame() == VRR_GAME_GTA_VC) {
+ game.SET_PLAYER_NEVER_GETS_TIRED(game.GET_PLAYER_ID(), boolToInt(state));
+ }
+ }
+}
+
+// ===========================================================================
+
+function setLocalPlayerSkin(skinId) {
+ logToConsole(LOG_INFO, `[VRR.Server] Setting locale player skin to ${skinId}`);
+ if (getGame() == VRR_GAME_GTA_IV) {
+ natives.changePlayerModel(natives.getPlayerId(), skinId);
+ } else {
+ localPlayer.skin = skinId;
+ }
+}
+
+// ===========================================================================
+
+function makePedHoldObject(pedId, modelIndex) {
+ if (getGame() == VRR_GAME_GTA_IV) {
+ natives.givePedAmbientObject(natives.getPedFromNetworkId(pedId), getGameConfig().objects[getGame()][modelIndex][1])
+ }
+}
+
+// ===========================================================================
+
+function sendLocalPlayerNetworkIdToServer() {
+ sendNetworkEventToServer("vrr.playerPedId", natives.getNetworkIdFromPed(localPlayer));
+}
+
+// ===========================================================================
+
+function setCutsceneInterior(cutsceneName) {
+ if (getGame() == VRR_GAME_GTA_IV) {
+ if (cutsceneName == "") {
+ natives.clearCutscene();
+ } else {
+ if (natives.isInteriorScene()) {
+ natives.clearCutscene();
+ }
+ natives.initCutscene(cutsceneName);
+ }
+ }
+}
+
+// ===========================================================================
+
+function makeLocalPlayerPedSpeak(speechName) {
+ if (getGame() == VRR_GAME_GTA_IV) {
+ // if player is in vehicle, allow megaphone (if last arg is "1", it will cancel megaphone echo)
+ // Only speeches with _MEGAPHONE will have the bullhorn effect
+ // Afaik it only works on police voices anyway
+ if (localPlayer.vehicle != null) {
+ natives.sayAmbientSpeech(localPlayer, speechName, true, false, 0);
+ } else {
+ natives.sayAmbientSpeech(localPlayer, speechName, true, false, 1);
+ }
+ } else if (getGame() == VRR_GAME_GTA_III || getGame() == VRR_GAME_GTA_VC) {
+ // Don't have a way to get the ped ref ID and can't use ped in arg
+ //game.SET_CHAR_SAY(game.GET_PLAYER_ID(), int);
+ }
+}
+
+// ===========================================================================
+
+function setLocalPlayerAsCopState(state) {
+ if (getGame() == VRR_GAME_GTA_IV) {
+ natives.setPlayerAsCop(natives.getPlayerId(), state);
+ natives.setPoliceIgnorePlayer(natives.getPlayerId(), state);
+ }
+}
+
+// ===========================================================================
+
+function serverRequestedLocalPlayerSpawn(skinId, position) {
+ if (getGame() == VRR_GAME_GTA_IV) {
+ natives.createPlayer(skinId, position);
+ //if(isCustomCameraSupported()) {
+ // game.restoreCamera(true);
+ //}
+ }
+}
+
+// ===========================================================================
+
+function sendLocaleSelectToServer(localeId) {
+ sendNetworkEventToServer("vrr.localeSelect", localeId);
+}
+
+// ===========================================================================
\ No newline at end of file
diff --git a/scripts/server/crime.js b/scripts/server/crime.js
new file mode 100644
index 00000000..1df467c3
--- /dev/null
+++ b/scripts/server/crime.js
@@ -0,0 +1,22 @@
+// ===========================================================================
+// Vortrex's Roleplay Resource
+// https://github.com/VortrexFTW/gtac_roleplay
+// ===========================================================================
+// FILE: crime.js
+// DESC: Provides crime data structures, functions, and operations
+// TYPE: Server (JavaScript)
+// ===========================================================================
+
+/**
+ * @class Representing a crime's data. Loaded and saved in the database
+ */
+ class CrimeData {
+ constructor(suspectId, crimeType, reporterId = 0) {
+ this.crimeType = crimeType;
+ this.suspectId = suspectId;
+ this.reporterId = reporterId;
+ this.whenCommitted = 0;
+ this.whenReported = 0;
+ this.databaseId = 0;
+ }
+};
\ No newline at end of file
diff --git a/scripts/server/forensics.js b/scripts/server/forensics.js
new file mode 100644
index 00000000..840a969f
--- /dev/null
+++ b/scripts/server/forensics.js
@@ -0,0 +1,20 @@
+// ===========================================================================
+// Vortrex's Roleplay Resource
+// https://github.com/VortrexFTW/gtac_roleplay
+// ===========================================================================
+// FILE: forensics.js
+// DESC: Provides forensics functions and commands (bullet casings, blood, etc)
+// TYPE: Server (JavaScript)
+// ===========================================================================
+
+// Forensic Types
+const VRR_FORENSICS_NONE = 0;
+const VRR_FORENSICS_BULLET = 1; // Bullet. The actual tip that hits a target. Has rifling and ballistics information of the weapon.
+const VRR_FORENSICS_BLOOD = 2; // Blood. Automatically applied to ground and bullets that hit 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)
+
+// ===========================================================================
\ No newline at end of file
diff --git a/scripts/server/gps.js b/scripts/server/gps.js
new file mode 100644
index 00000000..69d47321
--- /dev/null
+++ b/scripts/server/gps.js
@@ -0,0 +1,148 @@
+// ===========================================================================
+// Vortrex's Roleplay Resource
+// https://github.com/VortrexFTW/gtac_roleplay
+// ===========================================================================
+// FILE: gps.js
+// DESC: Provides GPS functions and commands
+// TYPE: Server (JavaScript)
+// ===========================================================================
+
+// GPS State Types
+const VRR_GPS_TYPE_NONE = 0; // None (invalid)
+const VRR_GPS_TYPE_BUSINESS = 1; // Business
+const VRR_GPS_TYPE_POLICE = 2; // Police Station
+const VRR_GPS_TYPE_HOSPITAL = 3; // Hospital
+const VRR_GPS_TYPE_JOB = 4; // Job
+const VRR_GPS_TYPE_GAMELOC = 5; // Game Location
+
+// ===========================================================================
+
+function gpsCommand(command, params, client) {
+ messagePlayerNormal(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderBusinessList")));
+
+ let locationType = VRR_GPS_TYPE_NONE;
+ let useType = VRR_ITEM_USETYPE_NONE;
+ let blipColour = "white";
+
+ switch(toLowerCase(params)) {
+ case "police":
+ blipColour = "businessBlue"
+ locationType = VRR_GPS_TYPE_POLICE;
+ break;
+
+ case "hospital":
+ blipColour = "businessBlue"
+ locationType = VRR_GPS_TYPE_HOSPITAL;
+ break;
+
+ case "job":
+ blipColour = "businessBlue"
+ locationType = VRR_GPS_TYPE_JOB;
+ break;
+
+ case "skin":
+ case "skins":
+ case "clothes":
+ case "player":
+ blipColour = "businessBlue"
+ locationType = VRR_GPS_TYPE_BUSINESS;
+ useType = VRR_ITEM_USETYPE_SKIN;
+ break;
+
+ case "gun":
+ case "guns":
+ case "weapon":
+ case "weapons":
+ case "wep":
+ case "weps":
+ blipColour = "businessBlue"
+ locationType = VRR_GPS_TYPE_BUSINESS;
+ useType = VRR_ITEM_USETYPE_WEAPON;
+ break;
+
+ case "food":
+ case "eat":
+ blipColour = "businessBlue"
+ locationType = VRR_GPS_TYPE_BUSINESS;
+ useType = VRR_ITEM_USETYPE_FOOD;
+ break;
+
+ case "drink":
+ blipColour = "businessBlue"
+ locationType = VRR_GPS_TYPE_BUSINESS;
+ useType = VRR_ITEM_USETYPE_DRINK;
+ break;
+
+ case "alcohol":
+ case "booze":
+ case "bar":
+ blipColour = "businessBlue"
+ locationType = VRR_GPS_TYPE_BUSINESS;
+ useType = VRR_ITEM_USETYPE_ALCOHOL;
+ break;
+
+ case "repair":
+ case "carrepair":
+ case "vehrepair":
+ case "spray":
+ case "fix":
+ blipColour = "businessBlue"
+ locationType = VRR_GPS_TYPE_BUSINESS;
+ useType = VRR_ITEM_USETYPE_VEHREPAIR;
+ break;
+
+ case "vehiclecolour":
+ case "vehcolour":
+ case "carcolour":
+ case "colour":
+ blipColour = "businessBlue"
+ locationType = VRR_GPS_TYPE_BUSINESS;
+ useType = VRR_ITEM_USETYPE_VEHCOLOUR;
+ break;
+
+ default: {
+ let itemTypeId = getItemTypeFromParams(params);
+ if(getItemTypeData(itemTypeId) != false) {
+ locationType = VRR_GPS_TYPE_BUSINESS;
+ blipColour = "businessBlue";
+ useType = getItemTypeData(itemTypeId).useType;
+ } else {
+ let gameLocationId = getGameLocationFromParams(params);
+ if(gameLocationId != false) {
+ position = getGameConfig().locations[getServerGame()][gameLocationId][1]
+ }
+ }
+ }
+ }
+
+ if(locationType == VRR_GPS_TYPE_NONE) {
+ messagePlayerError(client, getLocaleString(client, "InvalidGPSLocation"));
+ return false;
+ }
+
+ if(locationType == VRR_GPS_TYPE_BUSINESS) {
+ let businessId = getClosestBusinessWithBuyableItemOfUseType(useType);
+ if(!businessId) {
+ messagePlayerError(client, getLocaleString(client, "NoBusinessWithItemType"));
+ return false;
+ }
+
+ if(!getBusinessData(businessId)) {
+ messagePlayerError(client, getLocaleString(client, "NoBusinessWithItemType"));
+ return false;
+ }
+
+ hideAllBlipsForPlayerGPS(client);
+ blinkGenericGPSBlipForPlayer(client, getBusinessData(businessId).entrancePosition, getBusinessData(businessId).entranceBlipModel, getColourByType(blipColour), 10);
+ messagePlayerSuccess(client, "Look for the blinking icon on your mini map");
+ }
+
+ if(locationType == VRR_GPS_TYPE_GAMELOC) {
+ hideAllBlipsForPlayerGPS(client);
+ blinkGenericGPSBlipForPlayer(client, position, 0, getColourByType(blipColour), 10);
+ messagePlayerSuccess(client, "Look for the blinking icon on your mini map");
+ return true;
+ }
+}
+
+// ===========================================================================
\ No newline at end of file
diff --git a/scripts/server/insurance.js b/scripts/server/insurance.js
new file mode 100644
index 00000000..35aee21f
--- /dev/null
+++ b/scripts/server/insurance.js
@@ -0,0 +1,40 @@
+// ===========================================================================
+// Vortrex's Roleplay Resource
+// https://github.com/VortrexFTW/gtac_roleplay
+// ===========================================================================
+// FILE: insurance.js
+// DESC: Provides insurance commands, functions, and usage
+// TYPE: Server (JavaScript)
+// ===========================================================================
+
+// Insurance Account Owner Types
+const VRR_INS_ACCT_OWNER_NONE = 0; // None
+const VRR_INS_ACCT_OWNER_PLAYER = 1; // Player owns insurance company
+const VRR_INS_ACCT_OWNER_BIZ = 2; // Business owns insurance company
+const VRR_INS_ACCT_OWNER_CLAN = 3; // Clan owns insurance company
+
+// ===========================================================================
+
+// Insurance Account Entity Types
+const VRR_INS_ACCT_ENTITY_NONE = 0; // None
+const VRR_INS_ACCT_ENTITY_PLAYER_HEALTH = 1; // Health Insurance
+const VRR_INS_ACCT_ENTITY_PLAYER_LIFE = 2; // Life Insurance
+const VRR_INS_ACCT_ENTITY_VEH = 3; // Vehicle Insurance
+const VRR_INS_ACCT_ENTITY_BIZ = 4; // Business Insurance
+const VRR_INS_ACCT_ENTITY_HOUSE = 5; // House Insurance
+
+// ===========================================================================
+
+// Insurance Account History Types
+const VRR_INS_ACCT_HISTORY_NONE = 0; // None
+const VRR_INS_ACCT_HISTORY_PLAYER_MEDICAL = 1; // Medical insurance was used (player disease/injury)
+const VRR_INS_ACCT_HISTORY_PLAYER_DEATH = 2; // Life insurance was used (player death)
+const VRR_INS_ACCT_HISTORY_VEH_DAMAGE = 3; // Vehicle was damaged, but not destroyed
+const VRR_INS_ACCT_HISTORY_VEH_WRECKED = 4; // Vehicle was completely destroyed
+const VRR_INS_ACCT_HISTORY_VEH_THEFT = 5; // Vehicle was stolen
+const VRR_INS_ACCT_HISTORY_BIZ_DAMAGE = 6; // Business was damaged (broken items/window/door)
+const VRR_INS_ACCT_HISTORY_BIZ_THEFT = 7; // Business was stolen from
+const VRR_INS_ACCT_HISTORY_HOUSE_DAMAGE = 8; // House was damaged
+const VRR_INS_ACCT_HISTORY_HOUSE_THEFT = 9; // House was stolen from
+
+// ===========================================================================
\ No newline at end of file
diff --git a/scripts/server/netevents.js b/scripts/server/netevents.js
new file mode 100644
index 00000000..864f50e2
--- /dev/null
+++ b/scripts/server/netevents.js
@@ -0,0 +1,1235 @@
+// ===========================================================================
+// Vortrex's Roleplay Resource
+// https://github.com/VortrexFTW/gtac_roleplay
+// ===========================================================================
+// FILE: netevents.js
+// DESC: Provides client communication and cross-endpoint network events
+// TYPE: Server (JavaScript)
+// ===========================================================================
+
+function initNetworkEventsScript() {
+ logToConsole(LOG_DEBUG, "[VRR.Client]: Initializing client script ...");
+ addAllNetworkEventHandlers();
+ logToConsole(LOG_DEBUG, "[VRR.Client]: Client script initialized!");
+}
+
+// ===========================================================================
+
+function addAllNetworkEventHandlers() {
+ logToConsole(LOG_DEBUG, "[VRR.Client]: Adding network handlers ...");
+
+ // KeyBind
+ addNetworkEventHandler("vrr.useKeyBind", playerUsedKeyBind);
+
+ // GUI
+ addNetworkEventHandler("vrr.promptAnswerNo", playerPromptAnswerNo);
+ addNetworkEventHandler("vrr.promptAnswerYes", playerPromptAnswerYes);
+ addNetworkEventHandler("vrr.toggleGUI", playerToggledGUI);
+ addNetworkEventHandler("vrr.2fa", checkPlayerTwoFactorAuthentication);
+
+ // AFK
+ addNetworkEventHandler("vrr.afk", playerChangeAFKState);
+
+ // Event
+ addNetworkEventHandler("vrr.pickup", onPlayerNearPickup);
+ addNetworkEventHandler("vrr.enteredSphere", onPlayerEnteredSphere);
+ addNetworkEventHandler("vrr.exitedSphere", onPlayerExitedSphere);
+ addNetworkEventHandler("vrr.playerDeath", onPlayerDeath);
+ addNetworkEventHandler("vrr.onPlayerEnterVehicle", onPlayerEnteredVehicle);
+ addNetworkEventHandler("vrr.onPlayerExitVehicle", onPlayerExitedVehicle);
+
+ // Job
+ addNetworkEventHandler("vrr.arrivedAtJobRouteLocation", playerArrivedAtJobRouteLocation);
+
+ // Client
+ addNetworkEventHandler("vrr.clientReady", playerClientReady);
+ addNetworkEventHandler("vrr.guiReady", playerGUIReady);
+ addNetworkEventHandler("vrr.clientStarted", playerClientStarted);
+ addNetworkEventHandler("vrr.clientStopped", playerClientStopped);
+
+ // Account
+ addNetworkEventHandler("vrr.checkLogin", checkLogin);
+ addNetworkEventHandler("vrr.checkRegistration", checkRegistration);
+ addNetworkEventHandler("vrr.checkResetPassword", checkAccountResetPasswordRequest);
+ addNetworkEventHandler("vrr.checkChangePassword", checkAccountChangePassword);
+
+ // Developer
+ addNetworkEventHandler("vrr.runCodeSuccess", clientRunCodeSuccess);
+ addNetworkEventHandler("vrr.runCodeFail", clientRunCodeFail);
+
+ // SubAccount
+ addNetworkEventHandler("vrr.checkNewCharacter", checkNewCharacter);
+ addNetworkEventHandler("vrr.nextCharacter", checkNextCharacter);
+ addNetworkEventHandler("vrr.previousCharacter", checkPreviousCharacter);
+ addNetworkEventHandler("vrr.selectCharacter", selectCharacter);
+
+ // Item
+ addNetworkEventHandler("vrr.itemActionDelayComplete", playerItemActionDelayComplete);
+ addNetworkEventHandler("vrr.weaponDamage", playerDamagedByPlayer);
+
+ // Locale
+ addNetworkEventHandler("vrr.localeSelect", playerSelectedNewLocale);
+
+ // Misc
+ addNetworkEventHandler("vrr.plr.pos", updatePositionInPlayerData);
+ addNetworkEventHandler("vrr.plr.rot", updateHeadingInPlayerData);
+ addNetworkEventHandler("vrr.skinSelected", playerFinishedSkinSelection);
+ addNetworkEventHandler("vrr.clientInfo", updateConnectionLogOnClientInfoReceive);
+ addNetworkEventHandler("vrr.vehBuyState", receiveVehiclePurchaseStateUpdateFromClient);
+ addNetworkEventHandler("vrr.playerPedId", receivePlayerPedNetworkId);
+ addNetworkEventHandler("vrr.playerCop", setPlayerAsCopState);
+}
+
+// ===========================================================================
+
+function updatePlayerNameTag(client) {
+ //logToConsole(LOG_DEBUG, `[VRR.Client] Sending ${getPlayerDisplayForConsole(client)}'s updated nametag to all players`);
+ sendNetworkEventToPlayer("vrr.nametag", null, getPlayerName(client), getPlayerNameForNameTag(client), getPlayerColour(client), getPlayerData(client).afk, getPlayerPing(client));
+}
+
+// ===========================================================================
+
+function updateAllPlayerNameTags() {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending updated nametags to all players`);
+ let clients = getClients();
+ for (let i in clients) {
+ updatePlayerNameTag(clients[i]);
+ }
+}
+
+// ===========================================================================
+
+function updatePlayerPing(client) {
+ //logToConsole(LOG_DEBUG, `[VRR.Client] Sending ${getPlayerDisplayForConsole(client)}'s ping to all players`);
+ sendNetworkEventToPlayer("vrr.ping", null, getPlayerName(client), getPlayerPing(client));
+}
+
+// ===========================================================================
+
+function playerClientReady(client) {
+ playerResourceReady[client.index] = true;
+ logToConsole(LOG_DEBUG, `[VRR.Client] ${getPlayerDisplayForConsole(client)}'s client resources are downloaded and ready! Started: ${getYesNoFromBool(playerResourceStarted[client.index])}`);
+ if (playerResourceStarted[client.index] == true) {
+ initClient(client);
+ }
+}
+
+// ===========================================================================
+
+function playerGUIReady(client) {
+ playerGUI[client.index] = true;
+ logToConsole(LOG_DEBUG, `[VRR.Client] ${getPlayerDisplayForConsole(client)}'s client GUI is initialized and ready!`);
+}
+
+// ===========================================================================
+
+function playerClientStarted(client) {
+ playerResourceStarted[client.index] = true;
+ logToConsole(LOG_DEBUG, `[VRR.Client] ${getPlayerDisplayForConsole(client)}'s client resources are started and running! Ready: ${getYesNoFromBool(playerResourceReady[client.index])}`);
+ if (playerResourceReady[client.index] == true) {
+ initClient(client);
+ }
+}
+
+// ===========================================================================
+
+function playerClientStopped(client) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] ${getPlayerDisplayForConsole(client)}'s client resources have stopped (possibly error?). Kicking them from the server ...`);
+ getPlayerData(targetClient).customDisconnectReason = `Kicked - Client script verification failed. Possible hacks.`;
+ disconnectPlayer(client);
+}
+
+// ===========================================================================
+
+function showGameMessage(client, text, colour, duration, fontName = "Pricedown") {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Showing game message to ${getPlayerDisplayForConsole(client)} (${text}) for ${duration} milliseconds`);
+ sendNetworkEventToPlayer("vrr.smallGameMessage", client, text, colour, duration, fontName);
+}
+
+// ===========================================================================
+
+function enableCityAmbienceForPlayer(client, clearElements = false) {
+ //if(server.getCVar("civilians") == false) {
+ // return false;
+ //}
+
+ //logToConsole(LOG_DEBUG, `[VRR.Client] Setting ${getPlayerDisplayForConsole(client)}'s city ambience to ${toUpperCase(getOnOffFromBool(false))}`);
+ //sendNetworkEventToPlayer("vrr.ambience", client, true);
+}
+
+// ===========================================================================
+
+function disableCityAmbienceForPlayer(client, clearElements = false) {
+ //if(server.getCVar("civilians") == true) {
+ // return false;
+ //}
+
+ //logToConsole(LOG_DEBUG, `[VRR.Client] Setting ${getPlayerDisplayForConsole(client)}'s city ambience to ${toUpperCase(getOnOffFromBool(false))}`);
+ //sendNetworkEventToPlayer("vrr.ambience", client, false, clearElements);
+}
+
+// ===========================================================================
+
+function clearPlayerOwnedPeds(client) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Clearing peds owned by ${getPlayerDisplayForConsole(client)}`);
+ sendNetworkEventToPlayer("vrr.clearPeds", client);
+}
+
+// ===========================================================================
+
+function updatePlayerSpawnedState(client, state) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Setting ${getPlayerDisplayForConsole(client)}'s spawned state ${toUpperCase(getOnOffFromBool(state))}`);
+ getPlayerData(client).spawned = true;
+ sendNetworkEventToPlayer("vrr.spawned", client, state);
+}
+
+// ===========================================================================
+
+function setPlayerControlState(client, state) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Setting ${getPlayerDisplayForConsole(client)}'s control state ${toUpperCase(getOnOffFromBool(state))}`);
+ sendNetworkEventToPlayer("vrr.control", client, state, !state);
+}
+
+// ===========================================================================
+
+function updatePlayerShowLogoState(client, state) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Setting ${getPlayerDisplayForConsole(client)}'s logo state ${toUpperCase(getOnOffFromBool(state))}`);
+ sendNetworkEventToPlayer("vrr.logo", client, state);
+}
+
+// ===========================================================================
+
+function restorePlayerCamera(client) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Restoring ${getPlayerDisplayForConsole(client)}'s camera`);
+ sendNetworkEventToPlayer("vrr.restoreCamera", client);
+}
+
+// ===========================================================================
+
+function setPlayer2DRendering(client, hudState = false, labelState = false, smallGameMessageState = false, scoreboardState = false, hotBarState = false, itemActionDelayState = false) {
+ sendNetworkEventToPlayer("vrr.set2DRendering", client, hudState, labelState, smallGameMessageState, scoreboardState, hotBarState, itemActionDelayState);
+}
+
+// ===========================================================================
+
+function syncPlayerProperties(client) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending signal to sync ${getPlayerDisplayForConsole(client)}'s player ped properties`);
+ sendNetworkEventToPlayer("vrr.syncElement", null, getPlayerPed(client).id);
+}
+
+// ===========================================================================
+
+function updatePlayerSnowState(client) {
+ if (isSnowSupported(getGame())) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Setting ${getPlayerDisplayForConsole(client)}'s snow state (Falling: ${toUpperCase(getOnOffFromBool(getServerConfig().fallingSnow))}, Ground: ${toUpperCase(getOnOffFromBool(getServerConfig().groundSnow))})`);
+ sendNetworkEventToPlayer("vrr.snow", client, getServerConfig().fallingSnow, getServerConfig().groundSnow);
+ }
+}
+
+// ===========================================================================
+
+function updatePlayerHotBar(client) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending updated hotbar data to ${getPlayerDisplayForConsole(client)}`);
+ let tempHotBarItems = [];
+ for (let i in getPlayerData(client).hotBarItems) {
+ let itemImage = "";
+ let itemValue = 0;
+ let itemExists = false;
+ if (getPlayerData(client).hotBarItems[i] != -1) {
+ if (getItemData(getPlayerData(client).hotBarItems[i])) {
+ let itemData = getItemData(getPlayerData(client).hotBarItems[i]);
+ let itemTypeData = getItemTypeData(itemData.itemTypeIndex);
+ itemExists = true;
+ itemImage = itemTypeData.hotbarImage;
+ itemValue = itemData.value;
+ }
+ }
+ tempHotBarItems.push([i, itemExists, itemImage, itemValue]);
+ }
+ sendNetworkEventToPlayer("vrr.hotbar", client, getPlayerData(client).activeHotBarSlot, tempHotBarItems);
+}
+
+// ===========================================================================
+
+function setPlayerWeaponDamageEnabled(client, state) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending weapon damage state for ${getPlayerDisplayForConsole(client)} to all players`);
+ sendNetworkEventToPlayer("vrr.weaponDamageEnabled", null, getPlayerName(client), state);
+}
+
+// ===========================================================================
+
+function setPlayerWeaponDamageEvent(client, eventType) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending weapon damage event (${eventType}) for ${getPlayerDisplayForConsole(client)} to all players`);
+ sendNetworkEventToPlayer("vrr.weaponDamageEvent", null, getPlayerName(client), eventType);
+ getPlayerData(client).weaponDamageEvent = eventType;
+}
+
+// ===========================================================================
+
+function sendJobRouteLocationToPlayer(client, position, colour) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending job route stop data to ${getPlayerDisplayForConsole(client)}`);
+ sendNetworkEventToPlayer("vrr.showJobRouteLocation", client, position, colour);
+}
+
+// ===========================================================================
+
+function showPlayerLoginSuccessGUI(client) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending login success GUI signal to ${getPlayerDisplayForConsole(client)}`);
+ sendNetworkEventToPlayer("vrr.loginSuccess", client);
+}
+
+// ===========================================================================
+
+function showPlayerLoginFailedGUI(client, errorMessage) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending login failed GUI signal to ${getPlayerDisplayForConsole(client)}`);
+ sendNetworkEventToPlayer("vrr.loginFailed", client, errorMessage);
+}
+
+// ===========================================================================
+
+function showPlayerRegistrationSuccessGUI(client) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending registration success GUI signal to ${getPlayerDisplayForConsole(client)}`);
+ sendNetworkEventToPlayer("vrr.registrationSuccess", client);
+}
+
+// ===========================================================================
+
+function showPlayerRegistrationFailedGUI(client, errorMessage) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending registration failed GUI signal to ${getPlayerDisplayForConsole(client)}`);
+ sendNetworkEventToPlayer("vrr.registrationFailed", client, errorMessage);
+}
+
+// ===========================================================================
+
+function sendPlayerGUIColours(client) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending GUI colours to ${getPlayerDisplayForConsole(client)}`);
+ sendNetworkEventToPlayer("vrr.guiColour", client, getServerConfig().guiColourPrimary[0], getServerConfig().guiColourPrimary[1], getServerConfig().guiColourPrimary[2], getServerConfig().guiColourSecondary[0], getServerConfig().guiColourSecondary[1], getServerConfig().guiColourSecondary[2], getServerConfig().guiTextColourPrimary[0], getServerConfig().guiTextColourPrimary[1], getServerConfig().guiTextColourPrimary[2]);
+}
+
+// ===========================================================================
+
+function sendPlayerGUIInit(client) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending GUI init signal to ${getPlayerDisplayForConsole(client)}`);
+ sendNetworkEventToPlayer("vrr.guiInit", client);
+}
+
+// ===========================================================================
+
+function showPlayerLoginGUI(client, errorMessage = "") {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending show login GUI signal to ${getPlayerDisplayForConsole(client)}`);
+ sendNetworkEventToPlayer("vrr.showLogin", client);
+}
+
+// ===========================================================================
+
+function showPlayerRegistrationGUI(client, errorMessage = "") {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending show registration GUI signal to ${getPlayerDisplayForConsole(client)}`);
+ sendNetworkEventToPlayer("vrr.showRegistration", client);
+}
+
+// ===========================================================================
+
+function showPlayerNewCharacterGUI(client) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending show new character GUI signal to ${getPlayerDisplayForConsole(client)}`);
+ sendNetworkEventToPlayer("vrr.showNewCharacter", client);
+}
+
+// ===========================================================================
+
+function showPlayerChangePasswordGUI(client, errorMessage = "") {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending show change password GUI signal to ${getPlayerDisplayForConsole(client)}`);
+ sendNetworkEventToPlayer("vrr.showChangePassword", client, errorMessage);
+}
+
+// ===========================================================================
+
+function showPlayerResetPasswordCodeInputGUI(client) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending show reset password code input GUI signal to ${getPlayerDisplayForConsole(client)}`);
+ sendNetworkEventToPlayer("vrr.showResetPasswordCodeInput", client);
+}
+
+// ===========================================================================
+
+function showPlayerResetPasswordEmailInputGUI(client) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending show reset password email input GUI signal to ${getPlayerDisplayForConsole(client)}`);
+ sendNetworkEventToPlayer("vrr.showResetPasswordEmailInput", client);
+}
+
+// ===========================================================================
+
+function showPlayerCharacterSelectGUI(client, firstName, lastName, cash, clan, lastPlayed, skin) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending character select GUI signal to ${getPlayerDisplayForConsole(client)}`);
+ sendNetworkEventToPlayer("vrr.showCharacterSelect", client, firstName, lastName, cash, clan, lastPlayed, skin);
+}
+
+// ===========================================================================
+
+function updatePlayerCharacterSelectGUI(client, firstName, lastName, cash, clan, lastPlayed, skin) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending update character select GUI signal to ${getPlayerDisplayForConsole(client)}`);
+ sendNetworkEventToPlayer("vrr.switchCharacterSelect", client, firstName, lastName, cash, clan, lastPlayed, skin);
+}
+
+// ===========================================================================
+
+function showPlayerCharacterSelectSuccessGUI(client) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending character select success GUI signal to ${getPlayerDisplayForConsole(client)}`);
+ sendNetworkEventToPlayer("vrr.characterSelectSuccess", client);
+}
+
+// ===========================================================================
+
+function showPlayerCharacterSelectFailedGUI(client) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending character select failed GUI signal to ${getPlayerDisplayForConsole(client)}`);
+ sendNetworkEventToPlayer("vrr.characterSelectFailed", client);
+}
+
+// ===========================================================================
+
+function showPlayerPromptGUI(client, promptMessage, promptTitle, yesButtonText = "Yes", noButtonText = "No") {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending show prompt GUI signal to ${getPlayerDisplayForConsole(client)} (Title: ${promptTitle}, Message: ${promptMessage}, YesButton: ${yesButtonText}, NoButton: ${noButtonText})`);
+ sendNetworkEventToPlayer("vrr.showPrompt", client, promptMessage, promptTitle, yesButtonText, noButtonText);
+}
+
+// ===========================================================================
+
+function showPlayerInfoGUI(client, infoMessage, infoTitle, buttonText = "OK") {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending show info GUI signal to ${getPlayerDisplayForConsole(client)} (Title: ${infoTitle}, Message: ${infoMessage})`);
+ sendNetworkEventToPlayer("vrr.showInfo", client, infoMessage, infoTitle, buttonText);
+}
+
+// ===========================================================================
+
+function showPlayerErrorGUI(client, errorMessage, errorTitle, buttonText = "OK") {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending show error GUI signal to ${getPlayerDisplayForConsole(client)} (Title: ${errorTitle}, Message: ${errorMessage})`);
+ sendNetworkEventToPlayer("vrr.showError", client, errorMessage, errorTitle, buttonText);
+}
+
+// ===========================================================================
+
+function sendRunCodeToClient(client, code, returnTo) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending runcode to ${getPlayerDisplayForConsole(client)} (returnTo: ${getPlayerDisplayForConsole(getClientFromIndex(returnTo))}, Code: ${code})`);
+ sendNetworkEventToPlayer("vrr.runCode", client, code, getPlayerId(returnTo));
+}
+
+// ===========================================================================
+
+function sendPlayerWorkingState(client, state) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending working state (${toUpperCase(getYesNoFromBool(state))}) to ${getPlayerDisplayForConsole(client)}`);
+ sendNetworkEventToPlayer("vrr.working", client, state);
+}
+
+// ===========================================================================
+
+function sendPlayerJobType(client, jobType) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending job type (${jobType}) to ${getPlayerDisplayForConsole(client)}`);
+ sendNetworkEventToPlayer("vrr.jobType", client, jobType);
+}
+
+// ===========================================================================
+
+function sendPlayerStopJobRoute(client) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending signal to abort job route to ${getPlayerDisplayForConsole(client)}`);
+ sendNetworkEventToPlayer("vrr.hideJobRouteLocation", client);
+}
+
+// ===========================================================================
+
+function sendPlayerMouseCameraToggle(client) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending signal to toggle mouse camera ${getPlayerDisplayForConsole(client)}`);
+ sendNetworkEventToPlayer("vrr.mouseCamera", client);
+}
+
+// ===========================================================================
+
+function setPlayerMouseCameraState(client, state) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending signal to toggle mouse camera ${getPlayerDisplayForConsole(client)}`);
+ sendNetworkEventToPlayer("vrr.mouseCameraForce", client, state);
+}
+
+// ===========================================================================
+
+function sendPlayerMouseCursorToggle(client) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending signal to toggle mouse cursor ${getPlayerDisplayForConsole(client)}`);
+ sendNetworkEventToPlayer("vrr.mouseCursor", client);
+}
+
+// ===========================================================================
+
+function sendAddAccountKeyBindToClient(client, key, keyState) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending added keybind to ${getPlayerDisplayForConsole(client)} (Key: ${toUpperCase(getKeyNameFromId(key))}, State: ${(keyState) ? "down" : "up"})`);
+ sendNetworkEventToPlayer("vrr.addKeyBind", client, toInteger(key), (keyState) ? KEYSTATE_DOWN : KEYSTATE_UP);
+}
+
+// ===========================================================================
+
+function sendClearKeyBindsToClient(client, key, keyState) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending added keybind to ${getPlayerDisplayForConsole(client)} (Key: ${toUpperCase(getKeyNameFromId(key))}, State: ${(keyState) ? "down" : "up"})`);
+ sendNetworkEventToPlayer("vrr.clearKeyBinds", client);
+}
+
+// ===========================================================================
+
+function sendRemoveAccountKeyBindToClient(client, key) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending deleted keybind to ${getPlayerDisplayForConsole(client)} (Key: ${toUpperCase(getKeyNameFromId(key))})`);
+ sendNetworkEventToPlayer("vrr.delKeyBind", client, toInteger(key));
+}
+
+// ===========================================================================
+
+function sendPlayerSetPosition(client, position) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending set position signal to ${getPlayerDisplayForConsole(client)} (Position: ${position.x}, ${position.y}, ${position.z})`);
+ sendNetworkEventToPlayer("vrr.position", client, position);
+}
+
+// ===========================================================================
+
+function sendPlayerSetHeading(client, heading) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending set heading signal to ${getPlayerDisplayForConsole(client)} (Heading: ${heading})`);
+ sendNetworkEventToPlayer("vrr.heading", client, heading);
+}
+
+// ===========================================================================
+
+function sendPlayerSetInterior(client, interior) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending set interior signal to ${getPlayerDisplayForConsole(client)} (Interior: ${interior})`);
+ sendNetworkEventToPlayer("vrr.interior", client, interior);
+}
+
+// ===========================================================================
+
+function sendPlayerFrozenState(client, state) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending set frozen signal to ${getPlayerDisplayForConsole(client)} (State: ${toUpperCase(getYesNoFromBool(state))})`);
+ sendNetworkEventToPlayer("vrr.frozen", client, state);
+}
+
+// ===========================================================================
+
+function clearPlayerWeapons(client, clearData = true) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending signal to ${getPlayerDisplayForConsole(client)} to clear weapons`);
+ sendNetworkEventToPlayer("vrr.clearWeapons", client, clearData);
+}
+
+// ===========================================================================
+
+function showPlayerNewCharacterFailedGUI(client, errorMessage) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending new character failed GUI signal to ${getPlayerDisplayForConsole(client)}`);
+ sendNetworkEventToPlayer("vrr.newCharacterFailed", client, errorMessage);
+}
+
+// ===========================================================================
+
+function sendPlayerRemoveFromVehicle(client) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Sending remove from vehicle signal to ${getPlayerDisplayForConsole(client)}`);
+ sendNetworkEventToPlayer("vrr.removeFromVehicle", client);
+}
+
+// ===========================================================================
+
+function sendChatBoxMessageToPlayer(client, messageText, colour) {
+ //messageClient(messageText, client, colour);
+ sendNetworkEventToPlayer("m", client, messageText, colour);
+}
+
+// ===========================================================================
+
+function showPlayerItemTakeDelay(client, itemId) {
+ if (getItemData(itemId)) {
+ let delay = getItemTypeData(getItemData(itemId).itemTypeIndex).pickupDelay;
+ if (delay > 0) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Showing item TAKE delay to ${getPlayerDisplayForConsole(client)} (${delay} milliseconds)`);
+ sendNetworkEventToPlayer("vrr.showItemActionDelay", client, delay);
+ } else {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Showing item TAKE delay to ${getPlayerDisplayForConsole(client)} (instant)`);
+ playerItemActionDelayComplete(client);
+ }
+ }
+}
+
+// ===========================================================================
+
+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, `[VRR.Client] Showing item USE delay to ${getPlayerDisplayForConsole(client)} (${delay} milliseconds)`);
+ sendNetworkEventToPlayer("vrr.showItemActionDelay", client, delay);
+ } else {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Showing item USE delay to ${getPlayerDisplayForConsole(client)} (instant)`);
+ playerItemActionDelayComplete(client);
+ }
+ }
+}
+
+// ===========================================================================
+
+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, `[VRR.Client] Showing item DROP delay to ${getPlayerDisplayForConsole(client)} (${delay} milliseconds)`);
+ sendNetworkEventToPlayer("vrr.showItemActionDelay", client, delay);
+ } else {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Showing item DROP delay to ${getPlayerDisplayForConsole(client)} (instant)`);
+ playerItemActionDelayComplete(client);
+ }
+ }
+}
+
+// ===========================================================================
+
+function showPlayerItemPickupDelay(client, itemId) {
+ if (getItemData(itemId)) {
+ let delay = getItemTypeData(getItemData(itemId).itemTypeIndex).pickupDelay;
+ if (delay > 0) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Showing item PICKUP delay to ${getPlayerDisplayForConsole(client)} (${delay} milliseconds)`);
+ sendNetworkEventToPlayer("vrr.showItemActionDelay", client, delay);
+ } else {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Showing item PICKUP delay to ${getPlayerDisplayForConsole(client)} (instant)`);
+ playerItemActionDelayComplete(client);
+ }
+ }
+}
+
+// ===========================================================================
+
+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, `[VRR.Client] Showing item PUT delay to ${getPlayerDisplayForConsole(client)} (${delay} milliseconds)`);
+ sendNetworkEventToPlayer("vrr.showItemActionDelay", client, delay);
+ } else {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Showing item PUT delay to ${getPlayerDisplayForConsole(client)} (instant)`);
+ playerItemActionDelayComplete(client);
+ }
+ }
+}
+
+// ===========================================================================
+
+function showPlayerItemSwitchDelay(client, itemSlot) {
+ if (itemSlot != -1) {
+ if (getPlayerData(client).hotBarItems[itemSlot] != -1) {
+ let delay = getItemTypeData(getItemData(getPlayerData(client).hotBarItems[itemSlot]).itemTypeIndex).switchDelay;
+ if (delay > 0) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Showing item switch delay to ${getPlayerDisplayForConsole(client)} (${delay} milliseconds)`);
+ sendNetworkEventToPlayer("vrr.showItemActionDelay", client, delay);
+ } else {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Showing item switch delay to ${getPlayerDisplayForConsole(client)} (instant)`);
+ playerItemActionDelayComplete(client);
+ }
+ } else {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Showing item switch delay to ${getPlayerDisplayForConsole(client)} (instant)`);
+ playerItemActionDelayComplete(client);
+ }
+ } else {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Showing item switch delay to ${getPlayerDisplayForConsole(client)} (instant)`);
+ playerSwitchItem(client, itemSlot);
+ }
+}
+
+// ===========================================================================
+
+function sendPlayerDrunkEffect(client, amount, duration) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Setting drunk effect for ${getPlayerDisplayForConsole(client)} to ${amount} for ${duration} milliseconds`);
+ sendNetworkEventToPlayer("vrr.drunkEffect", client, amount, duration);
+}
+
+// ===========================================================================
+
+function sendPlayerClearPedState(client) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Clearing ped state for ${getPlayerDisplayForConsole(client)}`);
+ sendNetworkEventToPlayer("vrr.clearPedState", client);
+}
+
+// ===========================================================================
+
+function playerDamagedByPlayer(client, damagerEntityName, weaponId, pedPiece, healthLoss) {
+ let damagerEntity = getPlayerFromParams(damagerEntityName);
+
+ if (isNull(damagerEntity)) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] ${getPlayerDisplayForConsole(client)}'s damager entity from ID is null`);
+ return false;
+ }
+
+ logToConsole(LOG_DEBUG, `[VRR.Client] ${getPlayerDisplayForConsole(client)} was damaged by ${damagerEntity}`);
+
+ if (isNull(damagerEntity)) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] ${getPlayerDisplayForConsole(client)}'s damager client is INVALID`);
+ return false;
+ }
+
+ if (!getPlayerData(damagerEntity) || !getPlayerData(client)) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] ${getPlayerDisplayForConsole(client)}'s damager's client data is INVALID`);
+ return false;
+ }
+
+ logToConsole(LOG_DEBUG, `[VRR.Client] ${getPlayerDisplayForConsole(client)}'s damager is ${getPlayerDisplayForConsole(damagerEntity)}`);
+
+ switch (getPlayerData(damagerEntity).weaponDamageEvent) {
+ 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, `[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);
+ }
+ break;
+
+ case VRR_WEAPON_DAMAGE_EVENT_EXTINGUISH:
+ break;
+
+ case VRR_WEAPON_DAMAGE_EVENT_MACE:
+ break;
+
+ case VRR_WEAPON_DAMAGE_EVENT_NORMAL:
+ logToConsole(LOG_DEBUG, `[VRR.Client] ${getPlayerDisplayForConsole(client)}'s damager ${getPlayerDisplayForConsole(damagerEntity)} caused ${healthLoss} damage (damage reduction makes it ${(healthLoss * getPlayerData(client).incomingDamageMultiplier)})`);
+ setPlayerHealth(client, getPlayerHealth(client) - (healthLoss * getPlayerData(client).incomingDamageMultiplier));
+ break;
+
+ default:
+ logToConsole(LOG_DEBUG, `[VRR.Client] ${getPlayerDisplayForConsole(client)}'s damager ${getPlayerDisplayForConsole(damagerEntity)} caused ${healthLoss} damage (damage reduction makes it ${(healthLoss * getPlayerData(client).incomingDamageMultiplier)})`);
+ setPlayerHealth(client, getPlayerHealth(client) - (healthLoss * getPlayerData(client).incomingDamageMultiplier));
+ break;
+ }
+}
+
+// ===========================================================================
+
+function setPlayerCameraLookAt(client, cameraPosition, lookAtPosition) {
+ sendNetworkEventToPlayer("vrr.cameraLookAt", client, cameraPosition, lookAtPosition);
+}
+
+// ===========================================================================
+
+function sendTimeMinuteDurationToPlayer(client, minuteDuration) {
+ sendNetworkEventToPlayer("vrr.minuteDuration", client, minuteDuration);
+}
+
+// ===========================================================================
+
+function updatePositionInPlayerData(client, position) {
+ getPlayerData(client).syncPosition = position;
+}
+
+// ===========================================================================
+
+function updateHeadingInPlayerData(client, heading) {
+ getPlayerData(client).syncHeading = heading;
+}
+
+// ===========================================================================
+
+function updatePositionInVehicleData(client, vehicle, position) {
+ getVehicleData(vehicle).syncPosition = position;
+}
+
+// ===========================================================================
+
+function updateHeadingInVehicleData(client, vehicle, heading) {
+ getVehicleData(vehicle).syncHeading = heading;
+}
+
+// ===========================================================================
+
+function forcePlayerIntoSkinSelect(client) {
+ if (typeof getGameConfig().skinChangePosition[getGame()] != "undefined") {
+ getPlayerData(client).returnToPosition = getPlayerPosition(client);
+ getPlayerData(client).returnToHeading = getPlayerHeading(client);
+ getPlayerData(client).returnToInterior = getPlayerInterior(client);
+ getPlayerData(client).returnToDimension = getPlayerDimension(client);
+ getPlayerData(client).returnToType = VRR_RETURNTO_TYPE_SKINSELECT;
+
+ setPlayerPosition(client, getGameConfig().skinChangePosition[getGame()][0]);
+ setPlayerHeading(client, getGameConfig().skinChangePosition[getGame()][1]);
+ setPlayerInterior(client, getGameConfig().skinChangePosition[getGame()][2]);
+ setPlayerDimension(client, getPlayerId(client) + 500);
+ }
+
+ sendNetworkEventToPlayer("vrr.skinSelect", client, true);
+}
+
+// ===========================================================================
+
+function updatePlayerCash(client) {
+ sendNetworkEventToPlayer("vrr.money", client, getPlayerCurrentSubAccount(client).cash);
+}
+
+// ===========================================================================
+
+function sendAllPoliceStationBlips(client) {
+ if (getGameConfig().blipSprites[getGame()].policeStation != -1) {
+ let tempBlips = [];
+ for (let i in getServerData().policeStations[getGame()]) {
+ tempBlips.push([
+ getGameConfig().blipSprites[getGame()].policeStation,
+ getServerData().policeStations[getGame()][i].position.x,
+ getServerData().policeStations[getGame()][i].position.y,
+ getServerData().policeStations[getGame()][i].position.z,
+ 3,
+ getColourByName("policeBlue"),
+ ]);
+ }
+ sendNetworkEventToPlayer("vrr.blips", client, tempBlips);
+ }
+}
+
+// ===========================================================================
+
+function sendAllFireStationBlips(client) {
+ if (getGameConfig().blipSprites[getGame()].fireStation != -1) {
+ let tempBlips = [];
+ for (let i in getServerData().fireStations[getGame()]) {
+ tempBlips.push([
+ getGameConfig().blipSprites[getGame()].fireStation,
+ getServerData().fireStations[getGame()][i].position.x,
+ getServerData().fireStations[getGame()][i].position.y,
+ getServerData().fireStations[getGame()][i].position.z,
+ 3,
+ getColourByName("firefighterRed"),
+ ]);
+ }
+ sendNetworkEventToPlayer("vrr.blips", client, tempBlips);
+ }
+}
+
+// ===========================================================================
+
+function sendAllHospitalBlips(client) {
+ if (getGameConfig().blipSprites[getGame()].hospital != -1) {
+ let tempBlips = [];
+ for (let i in getServerData().hospitals[getGame()]) {
+ tempBlips.push([
+ getGameConfig().blipSprites[getGame()].hospital,
+ getServerData().hospitals[getGame()][i].position.x,
+ getServerData().hospitals[getGame()][i].position.y,
+ getServerData().hospitals[getGame()][i].position.z,
+ 3,
+ getColourByName("medicPink"),
+ ]);
+ }
+ sendNetworkEventToPlayer("vrr.blips", client, tempBlips);
+ }
+}
+
+// ===========================================================================
+
+function sendAllAmmunationBlips(client) {
+ if (getGameConfig().blipSprites[getGame()].ammunation != -1) {
+ let tempBlips = [];
+ for (let i in getServerData().ammunations[getGame()]) {
+ tempBlips.push([
+ getGameConfig().blipSprites[getGame()].ammunation,
+ getServerData().ammunations[getGame()][i].position.x,
+ getServerData().ammunations[getGame()][i].position.y,
+ getServerData().ammunations[getGame()][i].position.z,
+ 3,
+ 0
+ ]);
+ }
+ sendNetworkEventToPlayer("vrr.blips", client, tempBlips);
+ }
+}
+
+// ===========================================================================
+
+function sendAllPayAndSprayBlips(client) {
+ if (getGameConfig().blipSprites[getGame()].payAndSpray != -1) {
+ let tempBlips = [];
+ for (let i in getServerData().payAndSprays[getGame()]) {
+ tempBlips.push([
+ getGameConfig().blipSprites[getGame()].payAndSpray,
+ getServerData().payAndSprays[getGame()][i].position.x,
+ getServerData().payAndSprays[getGame()][i].position.y,
+ getServerData().payAndSprays[getGame()][i].position.z,
+ 3,
+ 0
+ ]);
+ }
+ sendNetworkEventToPlayer("vrr.blips", client, tempBlips);
+ }
+}
+
+// ===========================================================================
+
+function sendAllFuelStationBlips(client) {
+ if (getGameConfig().blipSprites[getGame()].fuelStation != -1) {
+ let tempBlips = [];
+ for (let i in getServerData().fuelStations[getGame()]) {
+ tempBlips.push([
+ getGameConfig().blipSprites[getGame()].fuelStation,
+ getServerData().fuelStations[getGame()][i].position.x,
+ getServerData().fuelStations[getGame()][i].position.y,
+ getServerData().fuelStations[getGame()][i].position.z,
+ 3,
+ getColourByName("burntOrange"),
+ ]);
+ }
+ sendNetworkEventToPlayer("vrr.blips", client, tempBlips);
+ }
+}
+
+// ===========================================================================
+
+function sendPlayerSetHealth(client, health) {
+ sendNetworkEventToPlayer("vrr.health", client, toInteger(health));
+}
+
+// ===========================================================================
+
+function sendPlayerSetArmour(client, armour) {
+ sendNetworkEventToPlayer("vrr.armour", client, armour);
+}
+
+// ===========================================================================
+
+function playerFinishedSkinSelection(client, allowedSkinIndex) {
+ sendNetworkEventToPlayer("vrr.skinSelect", client, false);
+ if (allowedSkinIndex == -1) {
+ messagePlayerAlert(client, "You canceled the skin change.");
+ restorePlayerCamera(client);
+
+ if (getPlayerData(client).returnToPosition != null && getPlayerData(client).returnToType == VRR_RETURNTO_TYPE_SKINSELECT) {
+ setPlayerPosition(client, getPlayerData(client).returnToPosition);
+ setPlayerHeading(client, getPlayerData(client).returnToHeading);
+ setPlayerInterior(client, getPlayerData(client).returnToInterior);
+ setPlayerDimension(client, getPlayerData(client).returnToDimension);
+
+ getPlayerData(client).returnToPosition = null;
+ getPlayerData(client).returnToHeading = null;
+ getPlayerData(client).returnToInterior = null;
+ getPlayerData(client).returnToDimension = null;
+ }
+ return false;
+ } else {
+ getPlayerCurrentSubAccount(client).skin = getSkinIndexFromModel(getServerData().allowedSkins[allowedSkinIndex][0]);
+ if (isPlayerWorking(client)) {
+ messagePlayerAlert(client, "Your new skin has been saved but won't be shown until you stop working.");
+ setPlayerSkin(client, getJobData(getPlayerCurrentSubAccount(client).job).uniforms[getPlayerData(client).jobUniform].skinId);
+ } else {
+ setPlayerSkin(client, getPlayerCurrentSubAccount(client).skin);
+ }
+
+ if (getPlayerData(client).returnToPosition != null && getPlayerData(client).returnToType == VRR_RETURNTO_TYPE_SKINSELECT) {
+ setPlayerPosition(client, getPlayerData(client).returnToPosition);
+ setPlayerHeading(client, getPlayerData(client).returnToHeading);
+ setPlayerInterior(client, getPlayerData(client).returnToInterior);
+ setPlayerDimension(client, getPlayerData(client).returnToDimension);
+
+ getPlayerData(client).returnToPosition = null;
+ getPlayerData(client).returnToHeading = null;
+ getPlayerData(client).returnToInterior = null;
+ getPlayerData(client).returnToDimension = null;
+ }
+
+ restorePlayerCamera(client);
+ setPlayerControlState(client, true);
+
+ deleteItem(getPlayerData(client).itemActionItem);
+ switchPlayerActiveHotBarSlot(client, -1);
+ cachePlayerHotBarItems(client);
+
+ meActionToNearbyPlayers(client, `changes their skin to ${getServerData().allowedSkins[allowedSkinIndex][1]}`);
+ }
+}
+
+// ===========================================================================
+
+function sendPlayerChatScrollLines(client, amount) {
+ sendNetworkEventToPlayer("vrr.chatScrollLines", client, amount);
+}
+
+// ===========================================================================
+
+function sendPlayerChatAutoHideDelay(client, delay) {
+ sendNetworkEventToPlayer("vrr.chatAutoHideDelay", client, delay);
+}
+
+// ===========================================================================
+
+function playRadioStreamForPlayer(client, streamURL, loop = true, volume = 0, element = false) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Forcing ${getPlayerDisplayForConsole(client)} to stream ${streamURL}`);
+ sendNetworkEventToPlayer("vrr.radioStream", client, streamURL, loop, volume, element);
+}
+
+// ===========================================================================
+
+function playAudioFileForPlayer(client, audioName, loop = true, volume = 0, element = false) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Forcing ${getPlayerDisplayForConsole(client)} to play audio ${audioName}`);
+ sendNetworkEventToPlayer("vrr.audioFileStream", client, audioName, loop, volume);
+}
+
+// ===========================================================================
+
+function stopRadioStreamForPlayer(client) {
+ logToConsole(LOG_DEBUG, `[VRR.Client] Forcing ${getPlayerDisplayForConsole(client)} to stop their radio stream`);
+ sendNetworkEventToPlayer("vrr.stopRadioStream", client);
+}
+
+// ===========================================================================
+
+function setPlayerStreamingRadioVolume(client, volumeLevel, elementId = false) {
+ getPlayerData(client).accountData.streamingRadioVolume = volumeLevel;
+ getPlayerData(client).streamingRadioElement = elementId;
+ sendNetworkEventToPlayer("vrr.radioVolume", client, volumeLevel, elementId);
+}
+
+// ===========================================================================
+
+function setVehicleLightsState(vehicle, state) {
+ setEntityData(vehicle, "vrr.lights", getVehicleData(vehicle).lights);
+ sendNetworkEventToPlayer("vrr.veh.lights", null, vehicle.id, state);
+}
+
+// ===========================================================================
+
+function sendPlayerEnterPropertyKey(client, key) {
+ sendNetworkEventToPlayer("vrr.enterPropertyKey", client, key);
+}
+
+// ===========================================================================
+
+function makePedPlayAnimation(ped, animationSlot, positionOffset) {
+ setEntityData(ped, "vrr.anim", animationSlot, true);
+ sendNetworkEventToPlayer("vrr.anim", null, getPedForNetworkEvent(ped), animationSlot, positionOffset);
+}
+
+// ===========================================================================
+
+function makePedStopAnimation(ped) {
+ removeEntityData(ped, "vrr.anim");
+ sendNetworkEventToPlayer("vrr.stopAnim", null, getPedForNetworkEvent(ped));
+}
+
+// ===========================================================================
+
+function forcePedAnimation(ped, animationSlot, positionOffset = 0) {
+ addEntityData(ped, "vrr.anim", animationSlot, true);
+ sendNetworkEventToPlayer("vrr.forceAnim", null, getPedForNetworkEvent(ped), animationSlot, positionOffset);
+}
+
+// ===========================================================================
+
+function hideAllPlayerGUI(client) {
+ sendNetworkEventToPlayer("vrr.hideAllGUI", client);
+}
+
+// ===========================================================================
+
+function requestClientInfo(client) {
+ sendNetworkEventToPlayer("vrr.clientInfo", client);
+}
+
+// ===========================================================================
+
+function updateInteriorLightsForPlayer(client, state) {
+ sendNetworkEventToPlayer("vrr.interiorLights", client, state);
+}
+
+// ===========================================================================
+
+function forcePlayerToSyncElementProperties(client, element) {
+ sendNetworkEventToPlayer("vrr.syncElement", client, element.id);
+}
+
+// ===========================================================================
+
+function sendPlayerPedPartsAndProps(client) {
+ let bodyParts = getPlayerCurrentSubAccount(client).bodyParts;
+ let bodyProps = getPlayerCurrentSubAccount(client).bodyProps;
+
+ sendNetworkEventToPlayer("vrr.ped", client, [bodyParts.hair, bodyParts.head, bodyParts.upper, bodyParts.lower], [bodyProps.hair, bodyProps.eyes, bodyProps.head, bodyProps.leftHand, bodyProps.rightHand, bodyProps.leftWrist, bodyProps.rightWrist, bodyParts.hip, bodyProps.leftFoot, bodyProps.rightFoot]);
+}
+
+// ===========================================================================
+
+function onPlayerNearPickup(client, pickupId) {
+ getPlayerData(client).currentPickup = getElementFromId(pickupId);
+}
+
+// ===========================================================================
+
+function updateAllInteriorVehiclesForPlayer(client, interior, dimension) {
+ for (let i in getServerData().vehicles) {
+ if (getServerData().vehicles[i].vehicle != false) {
+ if (getServerData().vehicles[i].interior == interior && getServerData().vehicles[i].dimension == dimension) {
+ forcePlayerToSyncElementProperties(client, getServerData().vehicles[i].vehicle);
+ }
+ }
+ }
+}
+
+// ===========================================================================
+
+function setPlayerBuyingVehicleState(client, state, vehicleId, position) {
+ if (getGlobalConfig().useServerSideVehiclePurchaseCheck == false) {
+ sendNetworkEventToPlayer("vrr.vehBuyState", client, state, vehicleId, position);
+ }
+}
+
+// ==========================================================================
+
+function receiveVehiclePurchaseStateUpdateFromClient(client, state) {
+ if (getGlobalConfig().useServerSideVehiclePurchaseCheck == false) {
+ checkVehiclePurchasing(client);
+ }
+}
+
+// ===========================================================================
+
+function sendPlayerLogLevel(client, tempLogLevel = logLevel) {
+ sendNetworkEventToPlayer("vrr.logLevel", client, tempLogLevel);
+}
+
+// ==========================================================================
+
+function setPlayerInfiniteRun(client, state) {
+ sendNetworkEventToPlayer("vrr.infiniteRun", client, state);
+}
+
+// ==========================================================================
+
+function sendBusinessToPlayer(client, businessId, name, entrancePosition, blipModel, pickupModel, hasInterior, hasItems) {
+ sendNetworkEventToPlayer("vrr.business", client, businessId, name, entrancePosition, blipModel, pickupModel, hasInterior, hasItems);
+}
+
+// ==========================================================================
+
+function sendHouseToPlayer(client, houseId, description, entrancePosition, blipModel, pickupModel, hasInterior) {
+ sendNetworkEventToPlayer("vrr.house", client, houseId, description, entrancePosition, blipModel, pickupModel, hasInterior);
+}
+
+// ==========================================================================
+
+function sendJobToPlayer(client, jobId, jobLocationId, name, position) {
+ sendNetworkEventToPlayer("vrr.job", client, jobId, jobLocationId, name, position);
+}
+
+// ==========================================================================
+
+function sendVehicleToPlayer(client, vehicleId, model, position, heading, colour1, colour2, colour3, colour4) {
+ sendNetworkEventToPlayer("vrr.vehicle", client, vehicleId, model, position, heading, colour1, colour2, colour3, colour4);
+}
+
+// ==========================================================================
+
+function sendAllBusinessesToPlayer(client) {
+ let businesses = getServerData().businesses;
+ for (let i in businesses) {
+ sendBusinessToPlayer(client, businesses[i].index, businesses[i].name, businesses[i].entrancePosition, businesses[i].entranceBlipModel, businesses[i].entrancePickupModel, businesses[i].hasInterior, false);
+ }
+}
+
+// ==========================================================================
+
+function sendAllHousesToPlayer(client) {
+ let houses = getServerData().houses;
+ for (let i in houses) {
+ sendHouseToPlayer(client, houses[i].index, houses[i].entrancePosition, houses[i].entranceBlipModel, houses[i].entrancePickupModel, houses[i].hasInterior);
+ }
+}
+
+// ==========================================================================
+
+function sendAllJobsToPlayer(client) {
+ let jobs = getServerData().jobs;
+ for (let i in jobs) {
+ for (let j in jobs[i].locations) {
+ sendJobToPlayer(client, jobs[i].index, jobs[i].locations[j].index, jobs[i].name, jobs[i].locations[j].position, jobs[i].blipModel);
+ }
+ }
+}
+
+// ==========================================================================
+
+function sendAllVehiclesToPlayer(client) {
+ let vehicles = getServerData().vehicles;
+ for (let i in vehicles) {
+ sendVehicleToPlayer(client, vehicles[i].index, vehicles[i].model, vehicles[i].syncPosition, vehicles[i].syncHeading, vehicles[i].colour1, vehicles[i].colour2, vehicles[i].colour3, vehicles[i].colour4);
+ }
+}
+
+// ==========================================================================
+
+function makePlayerHoldObjectModel(client, modelIndex) {
+ sendNetworkEventToPlayer("vrr.holdObject", client, getPlayerData(client).ped, modelIndex);
+}
+
+// ==========================================================================
+
+function receivePlayerPedNetworkId(client, pedId) {
+ getPlayerData(client).ped = pedId;
+}
+
+// ==========================================================================
+
+function requestPlayerPedNetworkId(client) {
+ sendNetworkEventToPlayer("vrr.playerPedId", client);
+}
+
+// ==========================================================================
+
+function setPlayerInCutsceneInterior(client, cutsceneName) {
+ getPlayerData(client).interiorCutscene = cutsceneName;
+ sendNetworkEventToPlayer("vrr.cutsceneInterior", client, cutsceneName);
+}
+
+// ==========================================================================
+
+function makePlayerPedSpeak(client, pedSpeechName) {
+ sendNetworkEventToPlayer("vrr.pedSpeak", client, pedSpeechName);
+}
+
+// ==========================================================================
+
+function setPlayerAsCopState(client, state) {
+ sendNetworkEventToPlayer("vrr.playerCop", client, state);
+}
+
+// ==========================================================================
+
+function tellPlayerToSpawn(client, skinId, position) {
+ sendNetworkEventToPlayer("vrr.spawn", client, skinId, position);
+}
+
+// ==========================================================================
+
+function sendNameTagDistanceToClient(client, distance) {
+ sendNetworkEventToPlayer("vrr.nameTagDistance", client, distance);
+}
+
+// ==========================================================================
+
+function sendGPSBlipToPlayer(client, position, colour) {
+ sendNetworkEventToPlayer("vrr.showGPSBlip", client, position, colour);
+}
+
+// ==========================================================================
+
+function playerSelectedNewLocale(client, localeId) {
+ getPlayerData(client).locale = localeId;
+ sendPlayerLocaleId(client, localeId);
+}
+
+// ==========================================================================
+
+function sendPlayerLocaleId(client, localeId) {
+ sendNetworkEventToPlayer("vrr.locale", client, localeId);
+}
+
+// ==========================================================================
+
+function showLocaleChooserForPlayer(client) {
+ sendNetworkEventToPlayer("vrr.localeChooser", client);
+}
+
+// ==========================================================================
+
+function sendPlayerLocaleStrings(client) {
+ let strings = getGlobalConfig().locale.sendStringsToClient;
+ for (let i in strings) {
+ sendNetworkEventToPlayer("vrr.localeString", client, strings[i], getLocaleString(client, strings[i]));
+ }
+}
+
+// ==========================================================================
\ No newline at end of file
From d8f5b04df25f46be9b881e978975dd9668a75181 Mon Sep 17 00:00:00 2001
From: Vortrex <3858226+VortrexFTW@users.noreply.github.com>
Date: Mon, 19 Dec 2022 10:36:10 -0600
Subject: [PATCH 03/14] Update README.md
---
README.md | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/README.md b/README.md
index 0daecd31..11bb1a2e 100644
--- a/README.md
+++ b/README.md
@@ -6,13 +6,13 @@ This is Vortrex's Roleplay Resource
## Setup
* Download the server from the [downloads page](https://gtaconnected.com/downloads) of the GTA Connected website.
* Download this resource via git clone or directly from GitHub with the green zip download button.
-* Add this resource as-is into a resource folder of your choice inside the resources directory of your server. I named my resource folder "gtac_roleplay"
+* Add this resource as-is into a resource folder of your choice inside the resources directory of your server.
* Add the resource to the server config. You should also disable a lot of the cvars in the config too. I only have traffic, civilians, planes, and bigmap enabled.
* Download the required modules and add them to your server config. See list of modules below.
* Import the database to your MySQL server, and edit database.json in the resource's config folder with the info to connect to the database.
* (Optional) Edit the email SMTP connection info. Without this, the email features will be disabled.
* Start the server and connect. Register your account, make a character, and disconnect.
-* Edit your account in the database (get your account ID from the acct_main table and then edit the four entries in acct_svr for your account, changing acct_svr_staff_flags to negative 1 (-1) ... **you must not be connected to the server when doing this**
+* Edit your account in the database (get your account ID from the acct_main table and then edit the four entries in acct_svr for your account, changing `acct_svr_staff_flags` to negative 1 (-1) ... **you must not be connected to the server when doing this**
* You now have full admin. Enjoy the resource!
## Modules
@@ -31,20 +31,20 @@ This is Vortrex's Roleplay Resource
* 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 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.
+* All communications from server <-> client are handled in each side's `netevents.js` script files via utils
+* All server and client events are handled in each side's `event.js` script files, sometimes with utils.
### Database Style
-* Always use lowercase.
-* Shorten prefix names to four characters or less (i.e. acct=account, veh=vehicle)
+* Always use lowercase names for tables and fields
+* Try to shorten prefix names to four characters or less (i.e. acct=account, veh=vehicle)
* Add an underscore between each word
* Append _main to any tables that store primary data (i.e. acct_main, ban_main, etc)
* Prefix field names with the table name, except for _main tables (i.e. acct_id, job_loc_id)
-* Tables use primary index on their ID column.
-* Tables use both secondary indexes & cascading foreign key links to any ID that points to another table
+* Tables use primary key on their ID column
+* Tables use both secondary keys & cascading foreign key links to any ID that points to another table
### Notes
* The resource is designed to load the script files first, then initialize after that's done.
* 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.
-* Bitwise values are used for several different aspects related to permissions. The value of -1 is **always** used as "*all flags*" for that set.
+* Bitwise values are used for several different aspects, mostly related to permissions.
+* Bitwise value of -1 is **always** used as "*all flags*" for that set. For admin permissions, -1 is god-tier admin level
From 6f04a6e2dd558ecaca52649d29364f2dca01f39c Mon Sep 17 00:00:00 2001
From: Vortrex <3858226+VortrexFTW@users.noreply.github.com>
Date: Mon, 23 Jan 2023 13:27:37 -0600
Subject: [PATCH 04/14] Update IDEAS.md
---
IDEAS.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/IDEAS.md b/IDEAS.md
index 5c4236f2..f53332d8 100644
--- a/IDEAS.md
+++ b/IDEAS.md
@@ -1,7 +1,7 @@
# Ideas
**NOTICE: Most of these ideas are totally random and some might be unrealistic. Every time I thought of something, I just immediately threw it into this file. I never checked to see if I had already added it, so there may be duplicates or similar entries spread out and unorganized.**
-
+---
### Businesses
*Inspiration from GTA Online*
* Nightclubs
@@ -12,7 +12,7 @@
* Garages
* Casinos
---
-### Interactive peds with each one having a background story, characteristics, certain people or groups they like/dislike
+### Interactive peds with each one having a background story, characteristics, certain people or groups they like/dislike
*Inspiration from Skyrim and many other RPGs*
* Procedurally generated?
@@ -477,4 +477,4 @@ In-world indicator too, when player gets close and is in line of sight
### Item/Object pickup and move
*Inspiration from the 3D Fallout games*
-Fallout 3 and New Vegas have a neat feature where you can "grab" an object and fling it around while the key is pressed. Could be implemented for items in GTACRP servers
\ No newline at end of file
+Fallout 3 and New Vegas have a neat feature where you can "grab" an object and fling it around while the key is pressed. Could be implemented for items in GTACRP servers
From 821257db344ff989d8ca2f482d36ef172a729a5c Mon Sep 17 00:00:00 2001
From: Vortrex <3858226+VortrexFTW@users.noreply.github.com>
Date: Mon, 23 Jan 2023 13:27:57 -0600
Subject: [PATCH 05/14] Update IDEAS.md
---
IDEAS.md | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/IDEAS.md b/IDEAS.md
index f53332d8..893e22e3 100644
--- a/IDEAS.md
+++ b/IDEAS.md
@@ -2,8 +2,9 @@
**NOTICE: Most of these ideas are totally random and some might be unrealistic. Every time I thought of something, I just immediately threw it into this file. I never checked to see if I had already added it, so there may be duplicates or similar entries spread out and unorganized.**
---
-### Businesses
+### Businesses
*Inspiration from GTA Online*
+
* Nightclubs
* Executive Offices
* Warehouses
From 139bb780644d42f3aa9cc3c11abb425db25449e6 Mon Sep 17 00:00:00 2001
From: Vortrex <3858226+VortrexFTW@users.noreply.github.com>
Date: Mon, 23 Jan 2023 13:32:20 -0600
Subject: [PATCH 06/14] Create COMMANDS.md
---
COMMANDS.md | 194 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 194 insertions(+)
create mode 100644 COMMANDS.md
diff --git a/COMMANDS.md b/COMMANDS.md
new file mode 100644
index 00000000..4e046cdb
--- /dev/null
+++ b/COMMANDS.md
@@ -0,0 +1,194 @@
+## Player Commands
+
+### Account
+ * /login
+ * /register
+ * /changepass
+ * /setemail
+ * /verifyemail
+
+### Character
+ * /newchar /usechar /switchchar
+ * /autolastchar
+
+### Settings
+ * /logo
+ * /gui
+ * /lang
+ * /notips
+ * /loginalert
+ * /scrolllines
+ * /chatautohide
+ * /chatfilter
+ * /chatemoji
+ * /chattime
+
+### Chat
+ * /me
+ * /do
+ * /s
+ * /shout
+ * /talk
+ * /local
+ * /l
+ * /w
+ * /whisper
+ * /clanchat
+ * /clan
+ * /c
+ * /m
+ * /dm
+ * /reply
+
+### Items
+ * /i
+ * /item
+ * /pickup
+ * /=--drop
+ * /put
+ * /take
+ * /use
+ * /inv
+ * /inventory
+ * /items
+ * /houseitems
+ * /bizstorage
+ * /bizfloor
+ * /buylist
+ * /power
+ * /freq
+ * /radio
+ * /r
+
+### Vehicle
+ * /nearveh
+ * /oldveh
+ * /lastveh
+ * /oldcar
+ * /lastcar
+ * /engine
+ * /siren
+ * /lights
+ * /vehclan
+ * /vehbiz
+ * /vehrank
+ * /vehinfo
+ * /vehrent
+ * /vehrentprice
+ * /vehbuyprice
+ * /vehstoprent
+ * /vehbuy
+ * /vehcolour
+ * /vehlivery
+ * /vehrepair
+ * /passenger
+
+### Business
+ * /bizbuy
+ * /bizfee
+ * /biztill
+ * /bizbalance
+ * /bizwithdraw
+ * /bizdeposit
+ * /buy
+ * /bizstock
+ * /bizstore
+ * /bizorder
+ * /bizitemprice
+ * /bizname
+ * /bizowner
+ * /bizrank
+ * /bizclan
+ * /bizbuyprice
+ * /bizinfo
+ * /bizflooritems
+ * /bizstorageitems
+ * /bizdealership
+ * /bizpaintball
+
+### Clan
+ * /clans
+ * /clanchat
+ * /c
+ * /clanranks
+ * /clanflags
+ * /clanaddrank
+ * /clandelrank
+ * /clansetrank
+ * /clanowner
+ * /clantag
+ * /clanranktag
+ * /clanmembertag
+ * /clanrankname
+ * /clanranklevel
+ * /clanmembertitle
+ * /clanaddrankflag
+ * /clanrankflags
+ * /clandelrankflag
+ * /clanaddmemberflag
+ * /clandelmemberflag
+
+### House
+ * /houseinfo
+ * /housebuy
+ * /houseclan
+ * /houseowner
+ * /housebuyprice
+ * /houserentprice
+
+### Keybinds
+ * /bindkey
+ * /unbindkey
+ * /keybinds
+
+### Misc
+ * /idea
+ * /bug
+ * /pos
+ * /enter
+ * /cursor
+ * /yes
+ * /no
+ * /help
+ * /suicide
+ * /lights
+ * /lock
+ * /admins
+ * /mousecam
+ * /cursor
+ * /speak
+ * /gps
+ * /stuck
+
+### Job
+ * /takejob
+ * /startwork
+ * /stopwork
+ * /startjob
+ * /stopjob
+ * /quitjob
+ * /uniform
+ * /equip
+ * /department
+ * /d
+ * /fare
+ * /detain
+ * /drag
+ * /search
+ * /startroute
+ * /stoproute
+ * /jobinfo
+ * /joblocinfo
+
+### Animation
+ * /anim
+ * /an
+ * /e
+ * /anims
+ * /animlist
+ * /stopanim
+
+### Radio
+ * /radiostation
+ * /radiostations
+ * /radiovolume
From 761e6d00efeac935438e872210a1a477c131fccd Mon Sep 17 00:00:00 2001
From: Vortrex <3858226+VortrexFTW@users.noreply.github.com>
Date: Sat, 28 Jan 2023 10:39:29 -0600
Subject: [PATCH 07/14] Update README.md
---
README.md | 3 +++
1 file changed, 3 insertions(+)
diff --git a/README.md b/README.md
index 11bb1a2e..f1543572 100644
--- a/README.md
+++ b/README.md
@@ -10,6 +10,7 @@ This is Vortrex's Roleplay Resource
* Add the resource to the server config. You should also disable a lot of the cvars in the config too. I only have traffic, civilians, planes, and bigmap enabled.
* Download the required modules and add them to your server config. See list of modules below.
* Import the database to your MySQL server, and edit database.json in the resource's config folder with the info to connect to the database.
+* Edit `svr_main` table, and set the `svr_game` and `svr_port` to your server's info. Game ID numbers are found [here](https://wiki.gtaconnected.com/GameIdentifiers)
* (Optional) Edit the email SMTP connection info. Without this, the email features will be disabled.
* Start the server and connect. Register your account, make a character, and disconnect.
* Edit your account in the database (get your account ID from the acct_main table and then edit the four entries in acct_svr for your account, changing `acct_svr_staff_flags` to negative 1 (-1) ... **you must not be connected to the server when doing this**
@@ -42,9 +43,11 @@ This is Vortrex's Roleplay Resource
* Prefix field names with the table name, except for _main tables (i.e. acct_id, job_loc_id)
* Tables use primary key on their ID column
* Tables use both secondary keys & cascading foreign key links to any ID that points to another table
+* Prefix table names with func_ if they are a custom function or procedure
### Notes
* The resource is designed to load the script files first, then initialize after that's done.
+* The resource is designed to run on multiple servers. Each server needs a row in `svr_main` table with matching port and [game ID](https://wiki.gtaconnected.com/GameIdentifiers)
* 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.
* Bitwise values are used for several different aspects, mostly related to permissions.
* Bitwise value of -1 is **always** used as "*all flags*" for that set. For admin permissions, -1 is god-tier admin level
From 44b625cc296e5f88a52ce4447580377c72f217f0 Mon Sep 17 00:00:00 2001
From: Vortrex <3858226+VortrexFTW@users.noreply.github.com>
Date: Sat, 28 Jan 2023 10:44:30 -0600
Subject: [PATCH 08/14] Update README.md
---
README.md | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index f1543572..3ae14123 100644
--- a/README.md
+++ b/README.md
@@ -3,6 +3,13 @@
### Description
This is Vortrex's Roleplay Resource
+### Supported Games and Multiplayer Mods
+* GTA III (on [GTA Connected](https://gtaconnected.com/))
+* GTA VC (on [GTA Connected](https://gtaconnected.com/))
+* GTA SA (on [GTA Connected](https://gtaconnected.com/))
+* GTA IV (on [GTA Connected](https://gtaconnected.com/))
+* Mafia: The City of Lost Heaven (on [Mafia Connected](https://mafiaconnected.com/))
+
## Setup
* Download the server from the [downloads page](https://gtaconnected.com/downloads) of the GTA Connected website.
* Download this resource via git clone or directly from GitHub with the green zip download button.
@@ -10,7 +17,7 @@ This is Vortrex's Roleplay Resource
* Add the resource to the server config. You should also disable a lot of the cvars in the config too. I only have traffic, civilians, planes, and bigmap enabled.
* Download the required modules and add them to your server config. See list of modules below.
* Import the database to your MySQL server, and edit database.json in the resource's config folder with the info to connect to the database.
-* Edit `svr_main` table, and set the `svr_game` and `svr_port` to your server's info. Game ID numbers are found [here](https://wiki.gtaconnected.com/GameIdentifiers)
+* Edit `svr_main` table, and set the `svr_game` and `svr_port` to your server's info. Game ID numbers are [here](https://wiki.gtaconnected.com/GameIdentifiers)
* (Optional) Edit the email SMTP connection info. Without this, the email features will be disabled.
* Start the server and connect. Register your account, make a character, and disconnect.
* Edit your account in the database (get your account ID from the acct_main table and then edit the four entries in acct_svr for your account, changing `acct_svr_staff_flags` to negative 1 (-1) ... **you must not be connected to the server when doing this**
From 6a5baf53d4bc55fc166021644071029a61370eac Mon Sep 17 00:00:00 2001
From: Vortrex <3858226+VortrexFTW@users.noreply.github.com>
Date: Tue, 7 Feb 2023 15:10:17 -0600
Subject: [PATCH 09/14] Fix db defaults
---
database.sql | 50 +++++++++++++++++++++++++-------------------------
1 file changed, 25 insertions(+), 25 deletions(-)
diff --git a/database.sql b/database.sql
index 800381b5..c9a2f316 100644
--- a/database.sql
+++ b/database.sql
@@ -358,7 +358,7 @@ CREATE TABLE IF NOT EXISTS `biz_main` (
`biz_till` int(11) NOT NULL DEFAULT '0',
`biz_entrance_fee` int(11) NOT NULL DEFAULT '0',
`biz_deleted` tinyint(1) NOT NULL DEFAULT '0',
- `biz_who_deleted` int(11) NOT NULL DEFAULT '479',
+ `biz_who_deleted` int(11) NOT NULL DEFAULT '1',
`biz_when_deleted` bigint(20) NOT NULL DEFAULT '0',
`biz_has_interior` tinyint(1) NOT NULL DEFAULT '0',
`biz_interior_lights` tinyint(4) NOT NULL DEFAULT '1',
@@ -420,9 +420,9 @@ CREATE TABLE IF NOT EXISTS `clan_main` (
`clan_owner` int(11) NOT NULL DEFAULT '0',
`clan_created` int(11) NOT NULL DEFAULT '0',
`clan_deleted` tinyint(4) NOT NULL DEFAULT '0',
- `clan_who_deleted` int(11) NOT NULL DEFAULT '479',
+ `clan_who_deleted` int(11) NOT NULL DEFAULT '1',
`clan_when_deleted` bigint(20) NOT NULL DEFAULT '0',
- `clan_who_added` int(11) NOT NULL DEFAULT '479',
+ `clan_who_added` int(11) NOT NULL DEFAULT '1',
`clan_when_added` bigint(20) NOT NULL DEFAULT '0',
`clan_motd` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`clan_col_r` int(11) NOT NULL DEFAULT '255',
@@ -634,7 +634,7 @@ CREATE TABLE IF NOT EXISTS `house_main` (
`house_custom_interior` tinyint(4) NOT NULL DEFAULT '0',
`house_deleted` tinyint(4) NOT NULL DEFAULT '0',
`house_when_deleted` bigint(20) NOT NULL DEFAULT '0',
- `house_who_deleted` int(11) NOT NULL DEFAULT '479',
+ `house_who_deleted` int(11) NOT NULL DEFAULT '1',
`house_tax_exempt` tinyint(4) NOT NULL DEFAULT '0',
`house_radio_station` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`house_id`) USING BTREE,
@@ -793,9 +793,9 @@ CREATE TABLE IF NOT EXISTS `item_main` (
`item_value` int(11) NOT NULL DEFAULT '0',
`item_enabled` tinyint(4) NOT NULL DEFAULT '0',
`item_deleted` tinyint(4) NOT NULL DEFAULT '0',
- `item_who_deleted` int(11) NOT NULL DEFAULT '479',
+ `item_who_deleted` int(11) NOT NULL DEFAULT '1',
`item_when_deleted` bigint(20) NOT NULL DEFAULT '0',
- `item_who_added` int(11) NOT NULL DEFAULT '479',
+ `item_who_added` int(11) NOT NULL DEFAULT '1',
`item_when_added` bigint(20) NOT NULL DEFAULT '0',
PRIMARY KEY (`item_id`),
KEY `item_server` (`item_server`),
@@ -855,9 +855,9 @@ CREATE TABLE IF NOT EXISTS `item_type` (
`item_type_anim_put` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'none',
`item_type_anim_pickup` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'none',
`item_type_deleted` tinyint(4) NOT NULL DEFAULT '0',
- `item_type_who_deleted` int(11) NOT NULL DEFAULT '479',
+ `item_type_who_deleted` int(11) NOT NULL DEFAULT '1',
`item_type_when_deleted` bigint(20) NOT NULL DEFAULT '0',
- `item_type_who_added` int(11) NOT NULL DEFAULT '479',
+ `item_type_who_added` int(11) NOT NULL DEFAULT '1',
`item_type_when_added` bigint(20) NOT NULL DEFAULT '0',
PRIMARY KEY (`item_type_id`),
KEY `item_type_server` (`item_type_server`),
@@ -2307,9 +2307,9 @@ CREATE TABLE IF NOT EXISTS `job_equip` (
`job_equip_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
`job_equip_enabled` tinyint(1) NOT NULL DEFAULT '1',
`job_equip_deleted` tinyint(1) NOT NULL DEFAULT '1',
- `job_equip_who_deleted` int(11) NOT NULL DEFAULT '479',
+ `job_equip_who_deleted` int(11) NOT NULL DEFAULT '1',
`job_equip_when_deleted` bigint(20) NOT NULL DEFAULT '0',
- `job_equip_who_added` int(11) NOT NULL DEFAULT '479',
+ `job_equip_who_added` int(11) NOT NULL DEFAULT '1',
`job_equip_when_added` bigint(20) NOT NULL DEFAULT '0',
PRIMARY KEY (`job_equip_id`),
KEY `job_equip_job` (`job_equip_job`),
@@ -2330,9 +2330,9 @@ CREATE TABLE IF NOT EXISTS `job_equip_item` (
`job_equip_item_value` int(11) NOT NULL DEFAULT '0',
`job_equip_item_enabled` tinyint(1) NOT NULL DEFAULT '1',
`job_equip_item_deleted` tinyint(1) NOT NULL DEFAULT '0',
- `job_equip_item_who_deleted` int(11) NOT NULL DEFAULT '479',
+ `job_equip_item_who_deleted` int(11) NOT NULL DEFAULT '1',
`job_equip_item_when_deleted` bigint(20) NOT NULL DEFAULT '0',
- `job_equip_item_who_added` int(11) NOT NULL DEFAULT '479',
+ `job_equip_item_who_added` int(11) NOT NULL DEFAULT '1',
`job_equip_item_when_added` bigint(20) NOT NULL DEFAULT '0',
PRIMARY KEY (`job_equip_item_id`) USING BTREE,
KEY `job_equip_item_equip` (`job_equip_item_equip`),
@@ -2360,9 +2360,9 @@ CREATE TABLE IF NOT EXISTS `job_loc` (
`job_loc_vw` int(11) NOT NULL DEFAULT '0',
`job_loc_name` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`job_loc_deleted` tinyint(4) NOT NULL DEFAULT '0',
- `job_loc_who_deleted` int(11) NOT NULL DEFAULT '479',
+ `job_loc_who_deleted` int(11) NOT NULL DEFAULT '1',
`job_loc_when_deleted` bigint(20) NOT NULL DEFAULT '0',
- `job_loc_who_added` int(11) NOT NULL DEFAULT '479',
+ `job_loc_who_added` int(11) NOT NULL DEFAULT '1',
`job_loc_when_added` bigint(20) NOT NULL DEFAULT '0',
PRIMARY KEY (`job_loc_id`),
KEY `job_loc_job` (`job_loc_job`),
@@ -2394,9 +2394,9 @@ CREATE TABLE IF NOT EXISTS `job_main` (
`job_wl` tinyint(4) NOT NULL DEFAULT '0',
`job_bl` tinyint(4) NOT NULL DEFAULT '0',
`job_deleted` tinyint(4) NOT NULL DEFAULT '0',
- `job_who_deleted` int(11) NOT NULL DEFAULT '479',
+ `job_who_deleted` int(11) NOT NULL DEFAULT '1',
`job_when_deleted` bigint(20) NOT NULL DEFAULT '0',
- `job_who_added` int(11) NOT NULL DEFAULT '479',
+ `job_who_added` int(11) NOT NULL DEFAULT '1',
`job_when_added` bigint(20) NOT NULL DEFAULT '0',
PRIMARY KEY (`job_id`),
KEY `job_server` (`job_server`),
@@ -2421,9 +2421,9 @@ CREATE TABLE IF NOT EXISTS `job_rank` (
`job_rank_flags` int(11) NOT NULL DEFAULT '0',
`job_rank_pay` int(11) NOT NULL DEFAULT '0',
`job_rank_deleted` int(11) NOT NULL DEFAULT '0',
- `job_rank_who_deleted` int(11) NOT NULL DEFAULT '479',
+ `job_rank_who_deleted` int(11) NOT NULL DEFAULT '1',
`job_rank_when_deleted` bigint(20) NOT NULL DEFAULT '0',
- `job_rank_who_added` int(11) NOT NULL DEFAULT '479',
+ `job_rank_who_added` int(11) NOT NULL DEFAULT '1',
`job_rank_when_added` bigint(20) NOT NULL DEFAULT '0',
PRIMARY KEY (`job_rank_id`),
KEY `fk_job_rank_job` (`job_rank_job`),
@@ -2452,9 +2452,9 @@ CREATE TABLE IF NOT EXISTS `job_route` (
`job_route_pay` int(11) NOT NULL DEFAULT '0',
`job_route_enabled` tinyint(4) NOT NULL DEFAULT '1',
`job_route_deleted` tinyint(4) NOT NULL DEFAULT '0',
- `job_route_who_deleted` int(11) NOT NULL DEFAULT '479',
+ `job_route_who_deleted` int(11) NOT NULL DEFAULT '1',
`job_route_when_deleted` bigint(20) NOT NULL DEFAULT '0',
- `job_route_who_added` int(11) NOT NULL DEFAULT '479',
+ `job_route_who_added` int(11) NOT NULL DEFAULT '1',
`job_route_when_added` bigint(20) NOT NULL DEFAULT '0',
PRIMARY KEY (`job_route_id`),
KEY `fk_job_route_job` (`job_route_job`),
@@ -2481,9 +2481,9 @@ CREATE TABLE IF NOT EXISTS `job_route_loc` (
`job_route_loc_delay` int(11) NOT NULL DEFAULT '0',
`job_route_loc_pay` int(11) NOT NULL DEFAULT '0',
`job_route_loc_deleted` tinyint(4) NOT NULL DEFAULT '0',
- `job_route_loc_who_deleted` int(11) NOT NULL DEFAULT '479',
+ `job_route_loc_who_deleted` int(11) NOT NULL DEFAULT '1',
`job_route_loc_when_deleted` bigint(20) NOT NULL DEFAULT '0',
- `job_route_loc_who_added` int(11) NOT NULL DEFAULT '479',
+ `job_route_loc_who_added` int(11) NOT NULL DEFAULT '1',
`job_route_loc_when_added` bigint(20) NOT NULL DEFAULT '0',
`job_route_loc_goto_msg` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`job_route_loc_arrive_msg` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
@@ -2507,9 +2507,9 @@ CREATE TABLE IF NOT EXISTS `job_uniform` (
`job_uniform_minrank` int(11) NOT NULL DEFAULT '0',
`job_uniform_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Unnamed',
`job_uniform_deleted` tinyint(4) NOT NULL DEFAULT '0',
- `job_uniform_who_deleted` int(11) NOT NULL DEFAULT '479',
+ `job_uniform_who_deleted` int(11) NOT NULL DEFAULT '1',
`job_uniform_when_deleted` bigint(20) NOT NULL DEFAULT '0',
- `job_uniform_who_added` int(11) NOT NULL DEFAULT '479',
+ `job_uniform_who_added` int(11) NOT NULL DEFAULT '1',
`job_uniform_when_added` bigint(20) NOT NULL DEFAULT '0',
PRIMARY KEY (`job_uniform_id`),
KEY `job_uniform_job` (`job_uniform_job`),
@@ -3119,7 +3119,7 @@ CREATE TABLE IF NOT EXISTS `veh_main` (
`veh_ins_acct` tinyint(1) NOT NULL DEFAULT '0',
`veh_price` int(11) NOT NULL DEFAULT '0',
`veh_deleted` tinyint(1) NOT NULL DEFAULT '0',
- `veh_who_deleted` int(11) NOT NULL DEFAULT '479',
+ `veh_who_deleted` int(11) NOT NULL DEFAULT '1',
`veh_when_deleted` bigint(20) NOT NULL DEFAULT '0',
`veh_flags` int(11) NOT NULL DEFAULT '0',
`veh_spawn_lock` tinyint(1) NOT NULL DEFAULT '0',
From 30120d0640845276d1349d780052c47c0df93eba Mon Sep 17 00:00:00 2001
From: Vortrex <3858226+VortrexFTW@users.noreply.github.com>
Date: Tue, 7 Feb 2023 15:10:23 -0600
Subject: [PATCH 10/14] Rename
---
meta.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta.xml b/meta.xml
index 1ca42fd2..a61384ee 100644
--- a/meta.xml
+++ b/meta.xml
@@ -1,5 +1,5 @@
-
+
From b6ffbf0381580d48256e3acb4b69987224d734c5 Mon Sep 17 00:00:00 2001
From: Vortrex <3858226+VortrexFTW@users.noreply.github.com>
Date: Tue, 7 Feb 2023 15:10:49 -0600
Subject: [PATCH 11/14] Console output prefix
---
scripts/client/afk.js | 4 ++--
scripts/client/animation.js | 4 ++--
scripts/client/business.js | 4 ++--
scripts/client/chat.js | 4 ++--
scripts/client/cursor.js | 4 ++--
scripts/client/event.js | 4 ++--
scripts/client/gui.js | 4 ++--
scripts/client/gui/newchar.js | 4 ++--
scripts/client/item.js | 4 ++--
scripts/client/job.js | 4 ++--
scripts/client/keybind.js | 4 ++--
scripts/client/label.js | 16 ++++++++--------
scripts/client/logo.js | 4 ++--
scripts/client/messaging.js | 6 +++---
scripts/client/nametag.js | 4 ++--
scripts/client/netevents.js | 6 +++---
scripts/client/scoreboard.js | 4 ++--
scripts/client/skin-select.js | 4 ++--
scripts/server/account.js | 8 ++++----
scripts/server/animation.js | 4 ++--
scripts/server/anticheat.js | 4 ++--
scripts/server/ban.js | 4 ++--
scripts/server/bitflag.js | 4 ++--
scripts/server/business.js | 10 +++++-----
scripts/server/chat.js | 4 ++--
scripts/server/clan.js | 8 ++++----
scripts/server/client.js | 4 ++--
scripts/server/command.js | 4 ++--
scripts/server/config.js | 28 ++++++++++++++--------------
scripts/server/core.js | 2 +-
scripts/server/database.js | 4 ++--
scripts/server/developer.js | 4 ++--
scripts/server/discord.js | 4 ++--
scripts/server/economy.js | 4 ++--
scripts/server/email.js | 4 ++--
scripts/server/event.js | 4 ++--
scripts/server/fishing.js | 4 ++--
scripts/server/gate.js | 2 +-
scripts/server/gui.js | 4 ++--
scripts/server/house.js | 6 +++---
scripts/server/item.js | 4 ++--
scripts/server/job.js | 6 +++---
scripts/server/keybind.js | 4 ++--
scripts/server/locale.js | 4 ++--
scripts/server/messaging.js | 4 ++--
scripts/server/misc.js | 4 ++--
scripts/server/netevents.js | 6 +++---
scripts/server/npc.js | 4 ++--
scripts/server/paintball.js | 4 ++--
scripts/server/prompt.js | 4 ++--
scripts/server/property.js | 10 +++++-----
scripts/server/race.js | 4 ++--
scripts/server/radio.js | 6 +++---
scripts/server/staff.js | 4 ++--
scripts/server/startup.js | 18 +++++++++---------
scripts/server/timers.js | 6 +++---
scripts/server/trigger.js | 4 ++--
scripts/server/vehicle.js | 10 +++++-----
58 files changed, 159 insertions(+), 159 deletions(-)
diff --git a/scripts/client/afk.js b/scripts/client/afk.js
index e0299442..c324d9d1 100644
--- a/scripts/client/afk.js
+++ b/scripts/client/afk.js
@@ -9,8 +9,8 @@
// Init AFK script
function initAFKScript() {
- logToConsole(LOG_DEBUG, "[AGRP.AFK]: Initializing AFK script ...");
- logToConsole(LOG_DEBUG, "[AGRP.AFK]: AFK script initialized!");
+ logToConsole(LOG_DEBUG, "[V.RP.AFK]: Initializing AFK script ...");
+ logToConsole(LOG_DEBUG, "[V.RP.AFK]: AFK script initialized!");
}
// ===========================================================================
diff --git a/scripts/client/animation.js b/scripts/client/animation.js
index 48119767..26048a48 100644
--- a/scripts/client/animation.js
+++ b/scripts/client/animation.js
@@ -8,8 +8,8 @@
// ===========================================================================
function initAnimationScript() {
- logToConsole(LOG_DEBUG, "[AGRP.Animation]: Initializing animation script ...");
- logToConsole(LOG_DEBUG, "[AGRP.Animation]: Animation script initialized!");
+ logToConsole(LOG_DEBUG, "[V.RP.Animation]: Initializing animation script ...");
+ logToConsole(LOG_DEBUG, "[V.RP.Animation]: Animation script initialized!");
}
// ===========================================================================
diff --git a/scripts/client/business.js b/scripts/client/business.js
index d52ad960..6643b880 100644
--- a/scripts/client/business.js
+++ b/scripts/client/business.js
@@ -29,8 +29,8 @@ class BusinessData {
// ===========================================================================
function initBusinessScript() {
- logToConsole(LOG_DEBUG, "[AGRP.Business]: Initializing business script ...");
- logToConsole(LOG_INFO, "[AGRP.Business]: Business script initialized!");
+ logToConsole(LOG_DEBUG, "[V.RP.Business]: Initializing business script ...");
+ logToConsole(LOG_INFO, "[V.RP.Business]: Business script initialized!");
}
// ===========================================================================
diff --git a/scripts/client/chat.js b/scripts/client/chat.js
index 2d1a5e23..3480a592 100644
--- a/scripts/client/chat.js
+++ b/scripts/client/chat.js
@@ -28,11 +28,11 @@ let scrollDownKey = false;
// ===========================================================================
function initChatBoxScript() {
- logToConsole(LOG_DEBUG, "[AGRP.Chat]: Initializing chat script ...");
+ logToConsole(LOG_DEBUG, "[V.RP.Chat]: Initializing chat script ...");
scrollUpKey = getKeyIdFromParams("pageup");
scrollDownKey = getKeyIdFromParams("pagedown");
bindChatBoxKeys();
- logToConsole(LOG_INFO, "[AGRP.Chat]: Chat script initialized!");
+ logToConsole(LOG_INFO, "[V.RP.Chat]: Chat script initialized!");
}
// ===========================================================================
diff --git a/scripts/client/cursor.js b/scripts/client/cursor.js
index 7e19c4fb..b893769c 100644
--- a/scripts/client/cursor.js
+++ b/scripts/client/cursor.js
@@ -14,14 +14,14 @@ let cursorSize = toVector2(16.0, 24.0);
// ===========================================================================
function initCursorScript() {
- logToConsole(LOG_DEBUG, "[AGRP.Cursor]: Initializing cursor script ...");
+ logToConsole(LOG_DEBUG, "[V.RP.Cursor]: Initializing cursor script ...");
let cursorStream = openFile(cursorImagePath);
if (cursorStream != null) {
cursorImage = graphics.loadPNG(cursorStream);
cursorStream.close();
}
- logToConsole(LOG_INFO, "[AGRP.Cursor]: Cursor script initialized!");
+ logToConsole(LOG_INFO, "[V.RP.Cursor]: Cursor script initialized!");
}
// ===========================================================================
diff --git a/scripts/client/event.js b/scripts/client/event.js
index dc3645a8..e42cb5b2 100644
--- a/scripts/client/event.js
+++ b/scripts/client/event.js
@@ -8,9 +8,9 @@
// ===========================================================================
function initEventScript() {
- logToConsole(LOG_DEBUG, "[AGRP.Event]: Initializing event script ...");
+ logToConsole(LOG_DEBUG, "[V.RP.Event]: Initializing event script ...");
addAllEventHandlers();
- logToConsole(LOG_DEBUG, "[AGRP.Event]: Event script initialized!");
+ logToConsole(LOG_DEBUG, "[V.RP.Event]: Event script initialized!");
}
// ===========================================================================
diff --git a/scripts/client/gui.js b/scripts/client/gui.js
index 0dc05e8c..daae9a6e 100644
--- a/scripts/client/gui.js
+++ b/scripts/client/gui.js
@@ -40,8 +40,8 @@ let creatingCharacter = false;
// ===========================================================================
function initGUIScript() {
- logToConsole(LOG_DEBUG, "[AGRP.GUI]: Initializing GUI script ...");
- logToConsole(LOG_DEBUG, "[AGRP.GUI]: GUI script initialized!");
+ logToConsole(LOG_DEBUG, "[V.RP.GUI]: Initializing GUI script ...");
+ logToConsole(LOG_DEBUG, "[V.RP.GUI]: GUI script initialized!");
}
// ===========================================================================
diff --git a/scripts/client/gui/newchar.js b/scripts/client/gui/newchar.js
index e39b1b98..c4719303 100644
--- a/scripts/client/gui/newchar.js
+++ b/scripts/client/gui/newchar.js
@@ -20,7 +20,7 @@ let newCharacter = {
function initNewCharacterGUI() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating new character GUI ...`);
- newCharacter.window = mexui.window(getScreenWidth() / 2 - 130, getScreenHeight() / 2 - 115, 300, 230, 'NEW CHARACTER', {
+ newCharacter.window = mexui.window(getScreenWidth() / 2 - 150, getScreenHeight() / 2 - 115, 300, 230, 'NEW CHARACTER', {
main: {
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
transitionTime: 500,
@@ -42,7 +42,7 @@ function initNewCharacterGUI() {
newCharacter.window.titleBarShown = false;
newCharacter.window.titleBarHeight = 30;
- newCharacter.mainLogoImage = newCharacter.window.image(80, 20, 80, 80, mainLogoPath, {
+ newCharacter.mainLogoImage = newCharacter.window.image(100, 10, 100, 100, mainLogoPath, {
focused: {
borderColour: toColour(0, 0, 0, 0),
},
diff --git a/scripts/client/item.js b/scripts/client/item.js
index 8b5d07fa..f5404695 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, "[AGRP.Item]: Initializing item script ...");
- logToConsole(LOG_DEBUG, "[AGRP.Item]: Item script initialized!");
+ logToConsole(LOG_DEBUG, "[V.RP.Item]: Initializing item script ...");
+ logToConsole(LOG_DEBUG, "[V.RP.Item]: Item script initialized!");
}
// ===========================================================================
diff --git a/scripts/client/job.js b/scripts/client/job.js
index 5932c441..a6ed7139 100644
--- a/scripts/client/job.js
+++ b/scripts/client/job.js
@@ -35,8 +35,8 @@ class JobData {
// ===========================================================================
function initJobScript() {
- logToConsole(LOG_DEBUG, "[AGRP.Job]: Initializing job script ...");
- logToConsole(LOG_DEBUG, "[AGRP.Job]: Job script initialized!");
+ logToConsole(LOG_DEBUG, "[V.RP.Job]: Initializing job script ...");
+ logToConsole(LOG_DEBUG, "[V.RP.Job]: Job script initialized!");
}
// ===========================================================================
diff --git a/scripts/client/keybind.js b/scripts/client/keybind.js
index 29be6d32..dc3f4237 100644
--- a/scripts/client/keybind.js
+++ b/scripts/client/keybind.js
@@ -16,8 +16,8 @@ let keyBindLongHoldDuration = 1500;
// ===========================================================================
function initKeyBindScript() {
- logToConsole(LOG_DEBUG, "[AGRP.KeyBind]: Initializing key bind script ...");
- logToConsole(LOG_DEBUG, "[AGRP.KeyBind]: Key bind script initialized!");
+ logToConsole(LOG_DEBUG, "[V.RP.KeyBind]: Initializing key bind script ...");
+ logToConsole(LOG_DEBUG, "[V.RP.KeyBind]: Key bind script initialized!");
}
// ===========================================================================
diff --git a/scripts/client/label.js b/scripts/client/label.js
index b9b5daa8..47b3f599 100644
--- a/scripts/client/label.js
+++ b/scripts/client/label.js
@@ -30,12 +30,12 @@ let jobHelpColour = toColour(234, 198, 126, 255);
// ===========================================================================
function initLabelScript() {
- logToConsole(LOG_DEBUG, "[AGRP.Label]: Initializing label script ...");
+ logToConsole(LOG_DEBUG, "[V.RP.Label]: Initializing label script ...");
propertyLabelNameFont = initLabelPropertyNameFont();
propertyLabelLockedFont = initLabelPropertyLockedFont();
jobNameLabelFont = initLabelJobNameFont();
jobHelpLabelFont = initLabelJobHelpFont();
- logToConsole(LOG_DEBUG, "[AGRP.Label]: Label script initialized!");
+ logToConsole(LOG_DEBUG, "[V.RP.Label]: Label script initialized!");
}
// ===========================================================================
@@ -79,12 +79,12 @@ function renderPropertyEntranceLabel(name, position, locked, isBusiness, price,
if (getGame() == V_GAME_GTA_IV) {
if (!natives.doesViewportExist(natives.getGameViewportId())) {
- logToConsole(LOG_INFO, "[AGRP.Label]: Game viewport does not exist!");
+ logToConsole(LOG_INFO, "[V.RP.Label]: Game viewport does not exist!");
return false;
}
if (!natives.isViewportActive(natives.getGameViewportId())) {
- logToConsole(LOG_INFO, "[AGRP.Label]: Game viewport is not active!");
+ logToConsole(LOG_INFO, "[V.RP.Label]: Game viewport is not active!");
return false;
}
}
@@ -220,12 +220,12 @@ function renderPropertyExitLabel(position) {
if (getGame() == V_GAME_GTA_IV) {
if (!natives.doesViewportExist(natives.getGameViewportId())) {
- logToConsole(LOG_INFO, "[AGRP.Label]: Game viewport does not exist!");
+ logToConsole(LOG_INFO, "[V.RP.Label]: Game viewport does not exist!");
return false;
}
if (!natives.isViewportActive(natives.getGameViewportId())) {
- logToConsole(LOG_INFO, "[AGRP.Label]: Game viewport is not active!");
+ logToConsole(LOG_INFO, "[V.RP.Label]: Game viewport is not active!");
return false;
}
}
@@ -265,12 +265,12 @@ function renderJobLabel(name, position, jobType) {
if (getGame() == V_GAME_GTA_IV) {
if (!natives.doesViewportExist(natives.getGameViewportId())) {
- logToConsole(LOG_INFO, "[AGRP.Label]: Game viewport does not exist!");
+ logToConsole(LOG_INFO, "[V.RP.Label]: Game viewport does not exist!");
return false;
}
if (!natives.isViewportActive(natives.getGameViewportId())) {
- logToConsole(LOG_INFO, "[AGRP.Label]: Game viewport is not active!");
+ logToConsole(LOG_INFO, "[V.RP.Label]: Game viewport is not active!");
return false;
}
}
diff --git a/scripts/client/logo.js b/scripts/client/logo.js
index fffc47b6..178d709c 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, "[AGRP.Logo]: Initializing logo script ...");
+ logToConsole(LOG_DEBUG, "[V.RP.Logo]: Initializing logo script ...");
//logoImage = loadLogoImage();
- logToConsole(LOG_DEBUG, "[AGRP.Logo]: Logo script initialized!");
+ logToConsole(LOG_DEBUG, "[V.RP.Logo]: Logo script initialized!");
}
// ===========================================================================
diff --git a/scripts/client/messaging.js b/scripts/client/messaging.js
index 73371669..20f7f459 100644
--- a/scripts/client/messaging.js
+++ b/scripts/client/messaging.js
@@ -22,10 +22,10 @@ let smallGameMessageTimer = null;
// ===========================================================================
function initMessagingScript() {
- logToConsole(LOG_DEBUG, "[AGRP.Messaging]: Initializing messaging script ...");
+ logToConsole(LOG_DEBUG, "[V.RP.Messaging]: Initializing messaging script ...");
smallGameMessageFonts = loadSmallGameMessageFonts();
bigGameMessageFonts = loadSmallGameMessageFonts();
- logToConsole(LOG_DEBUG, "[AGRP.Messaging]: Messaging script initialized!");
+ logToConsole(LOG_DEBUG, "[V.RP.Messaging]: Messaging script initialized!");
}
// ===========================================================================
@@ -75,7 +75,7 @@ function loadBigGameMessageFont() {
// ===========================================================================
function processSmallGameMessageRendering() {
- logToConsole(LOG_VERBOSE, "[AGRP.Messaging]: Processing small game message rendering ...");
+ logToConsole(LOG_VERBOSE, "[V.RP.Messaging]: Processing small game message rendering ...");
if (renderSmallGameMessage) {
if (smallGameMessageText != "") {
logToConsole(LOG_VERBOSE, `[AGRP.Messaging]: Rendering small game message: ${smallGameMessageText}`);
diff --git a/scripts/client/nametag.js b/scripts/client/nametag.js
index 04964621..40323a4a 100644
--- a/scripts/client/nametag.js
+++ b/scripts/client/nametag.js
@@ -22,10 +22,10 @@ let playerPing = {};
// ===========================================================================
function initNameTagScript() {
- logToConsole(LOG_DEBUG, "[AGRP.NameTag]: Initializing nametag script ...");
+ logToConsole(LOG_DEBUG, "[V.RP.NameTag]: Initializing nametag script ...");
nametagFont = loadNameTagFont();
afkStatusFont = loadPausedStatusFont();
- logToConsole(LOG_DEBUG, "[AGRP.NameTag]: Nametag script initialized!");
+ logToConsole(LOG_DEBUG, "[V.RP.NameTag]: Nametag script initialized!");
}
// ===========================================================================
diff --git a/scripts/client/netevents.js b/scripts/client/netevents.js
index 93bd5afc..71a4fb71 100644
--- a/scripts/client/netevents.js
+++ b/scripts/client/netevents.js
@@ -8,14 +8,14 @@
// ===========================================================================
function initNetworkEventsScript() {
- logToConsole(LOG_DEBUG, "[AGRP.NetEvents]: Initializing server script ...");
- logToConsole(LOG_DEBUG, "[AGRP.NetEvents]: Server script initialized!");
+ logToConsole(LOG_DEBUG, "[V.RP.NetEvents]: Initializing server script ...");
+ logToConsole(LOG_DEBUG, "[V.RP.NetEvents]: Server script initialized!");
}
// ===========================================================================
function addAllNetworkHandlers() {
- logToConsole(LOG_DEBUG, "[AGRP.Server]: Adding network handlers ...");
+ logToConsole(LOG_DEBUG, "[V.RP.Server]: Adding network handlers ...");
// Chat Box
addNetworkEventHandler("m", receiveChatBoxMessageFromServer); // Not prefixed with VRR to make it as small as possible
diff --git a/scripts/client/scoreboard.js b/scripts/client/scoreboard.js
index 8c254995..92ac1748 100644
--- a/scripts/client/scoreboard.js
+++ b/scripts/client/scoreboard.js
@@ -17,10 +17,10 @@ let scoreboardKey = SDLK_TAB;
// ===========================================================================
function initScoreBoardScript() {
- logToConsole(LOG_DEBUG, "[AGRP.ScoreBoard]: Initializing scoreboard script ...");
+ logToConsole(LOG_DEBUG, "[V.RP.ScoreBoard]: Initializing scoreboard script ...");
scoreBoardTitleFont = initScoreBoardTitleFont();
scoreBoardListFont = initScoreBoardListFont();
- logToConsole(LOG_DEBUG, "[AGRP.ScoreBoard]: Scoreboard script initialized!");
+ logToConsole(LOG_DEBUG, "[V.RP.ScoreBoard]: Scoreboard script initialized!");
}
// ===========================================================================
diff --git a/scripts/client/skin-select.js b/scripts/client/skin-select.js
index 65de3352..33c5f0bf 100644
--- a/scripts/client/skin-select.js
+++ b/scripts/client/skin-select.js
@@ -23,10 +23,10 @@ let skinSelectHeading = null;
// ===========================================================================
function initSkinSelectScript() {
- logToConsole(LOG_DEBUG, "[AGRP.SkinSelect]: Initializing skin selector script ...");
+ logToConsole(LOG_DEBUG, "[V.RP.SkinSelect]: Initializing skin selector script ...");
skinSelectMessageFontTop = loadSkinSelectMessageFontTop();
skinSelectMessageFontBottom = loadSkinSelectMessageFontBottom();
- logToConsole(LOG_DEBUG, "[AGRP.SkinSelect]: Skin selector script initialized!");
+ logToConsole(LOG_DEBUG, "[V.RP.SkinSelect]: Skin selector script initialized!");
}
// ===========================================================================
diff --git a/scripts/server/account.js b/scripts/server/account.js
index 020ad3b9..95a8e75f 100644
--- a/scripts/server/account.js
+++ b/scripts/server/account.js
@@ -194,8 +194,8 @@ class AccountStaffNoteData {
// ===========================================================================
function initAccountScript() {
- logToConsole(LOG_DEBUG, "[AGRP.Account]: Initializing account script ...");
- logToConsole(LOG_DEBUG, "[AGRP.Account]: Account script initialized!");
+ logToConsole(LOG_DEBUG, "[V.RP.Account]: Initializing account script ...");
+ logToConsole(LOG_DEBUG, "[V.RP.Account]: Account script initialized!");
}
// ===========================================================================
@@ -1403,11 +1403,11 @@ function isValidEmailAddress(emailAddress) {
// ===========================================================================
function saveAllPlayersToDatabase() {
- logToConsole(LOG_DEBUG, "[AGRP.Account]: Saving all clients to database ...");
+ logToConsole(LOG_DEBUG, "[V.RP.Account]: Saving all clients to database ...");
getClients().forEach(function (client) {
savePlayerToDatabase(client);
});
- logToConsole(LOG_DEBUG, "[AGRP.Account]: All clients saved to database successfully!");
+ logToConsole(LOG_DEBUG, "[V.RP.Account]: All clients saved to database successfully!");
}
// ===========================================================================
diff --git a/scripts/server/animation.js b/scripts/server/animation.js
index 93341de7..e10249a6 100644
--- a/scripts/server/animation.js
+++ b/scripts/server/animation.js
@@ -8,8 +8,8 @@
// ===========================================================================
function initAnimationScript() {
- logToConsole(LOG_DEBUG, "[AGRP.Animation]: Initializing animation script ...");
- logToConsole(LOG_DEBUG, "[AGRP.Animation]: Animation script initialized!");
+ logToConsole(LOG_DEBUG, "[V.RP.Animation]: Initializing animation script ...");
+ logToConsole(LOG_DEBUG, "[V.RP.Animation]: Animation script initialized!");
}
// ===========================================================================
diff --git a/scripts/server/anticheat.js b/scripts/server/anticheat.js
index 3a89c451..e31101af 100644
--- a/scripts/server/anticheat.js
+++ b/scripts/server/anticheat.js
@@ -8,8 +8,8 @@
// ===========================================================================
function initAntiCheatScript() {
- logToConsole(LOG_DEBUG, "[AGRP.AntiCheat]: Initializing anticheat script ...");
- logToConsole(LOG_DEBUG, "[AGRP.AntiCheat]: Anticheat script initialized!");
+ logToConsole(LOG_DEBUG, "[V.RP.AntiCheat]: Initializing anticheat script ...");
+ logToConsole(LOG_DEBUG, "[V.RP.AntiCheat]: Anticheat script initialized!");
}
// ===========================================================================
diff --git a/scripts/server/ban.js b/scripts/server/ban.js
index 07eafb1a..2e26ee6b 100644
--- a/scripts/server/ban.js
+++ b/scripts/server/ban.js
@@ -38,8 +38,8 @@ class BanData {
// ===========================================================================
function initBanScript() {
- logToConsole(LOG_INFO, "[AGRP.Ban]: Initializing ban script ...");
- logToConsole(LOG_INFO, "[AGRP.Ban]: Ban script initialized!");
+ logToConsole(LOG_INFO, "[V.RP.Ban]: Initializing ban script ...");
+ logToConsole(LOG_INFO, "[V.RP.Ban]: Ban script initialized!");
}
// ===========================================================================
diff --git a/scripts/server/bitflag.js b/scripts/server/bitflag.js
index 077f47e4..a26bdbb7 100644
--- a/scripts/server/bitflag.js
+++ b/scripts/server/bitflag.js
@@ -280,7 +280,7 @@ let serverBitFlagKeys = {
// ===========================================================================
function initBitFlagScript() {
- logToConsole(LOG_DEBUG, "[AGRP.BitFlag]: Initializing bit flag script ...");
+ logToConsole(LOG_DEBUG, "[V.RP.BitFlag]: Initializing bit flag script ...");
serverBitFlags.staffFlags = createBitFlagTable(serverBitFlagKeys.staffFlagKeys);
serverBitFlags.moderationFlags = createBitFlagTable(serverBitFlagKeys.moderationFlagKeys);
serverBitFlags.accountSettingsFlags = createBitFlagTable(serverBitFlagKeys.accountSettingsFlagKeys);
@@ -294,7 +294,7 @@ function initBitFlagScript() {
serverBitFlags.npcTriggerResponseTypes = createBitFlagTable(serverBitFlagKeys.npcTriggerResponseTypeKeys);
serverBitFlags.seenActionTips = createBitFlagTable(serverBitFlagKeys.seenActionTipsKeys);
serverBitFlags.jobRankFlags = createBitFlagTable(serverBitFlagKeys.jobRankKeys);
- logToConsole(LOG_INFO, "[AGRP.BitFlag]: Bit flag script initialized successfully!");
+ logToConsole(LOG_INFO, "[V.RP.BitFlag]: Bit flag script initialized successfully!");
return true;
}
diff --git a/scripts/server/business.js b/scripts/server/business.js
index 72bc7ca4..6af6e9cd 100644
--- a/scripts/server/business.js
+++ b/scripts/server/business.js
@@ -188,8 +188,8 @@ class BusinessGameScriptData {
// ===========================================================================
function initBusinessScript() {
- logToConsole(LOG_INFO, "[AGRP.Business]: Initializing business script ...");
- logToConsole(LOG_INFO, "[AGRP.Business]: Business script initialized successfully!");
+ logToConsole(LOG_INFO, "[V.RP.Business]: Initializing business script ...");
+ logToConsole(LOG_INFO, "[V.RP.Business]: Business script initialized successfully!");
return true;
}
@@ -212,7 +212,7 @@ function loadBusinessFromId(businessId) {
// ===========================================================================
function loadBusinessesFromDatabase() {
- logToConsole(LOG_INFO, "[AGRP.Business]: Loading businesses from database ...");
+ logToConsole(LOG_INFO, "[V.RP.Business]: Loading businesses from database ...");
let tempBusinesses = [];
let dbConnection = connectToDatabase();
@@ -2826,11 +2826,11 @@ function getBusinessFloorFirstFreeItemSlot(businessId) {
// Caches all items for all businesses
function cacheAllBusinessItems() {
- logToConsole(LOG_DEBUG, "[AGRP.Business] Caching all business items ...");
+ logToConsole(LOG_DEBUG, "[V.RP.Business] Caching all business items ...");
for (let i in getServerData().businesses) {
cacheBusinessItems(i);
}
- logToConsole(LOG_DEBUG, "[AGRP.Business] Cached all business items successfully!");
+ logToConsole(LOG_DEBUG, "[V.RP.Business] Cached all business items successfully!");
}
// ===========================================================================
diff --git a/scripts/server/chat.js b/scripts/server/chat.js
index a4d0ed41..9c63fcb0 100644
--- a/scripts/server/chat.js
+++ b/scripts/server/chat.js
@@ -8,8 +8,8 @@
// ===========================================================================
function initChatScript() {
- logToConsole(LOG_INFO, "[AGRP.Chat]: Initializing chat script ...");
- logToConsole(LOG_INFO, "[AGRP.Chat]: Chat script initialized successfully!");
+ logToConsole(LOG_INFO, "[V.RP.Chat]: Initializing chat script ...");
+ logToConsole(LOG_INFO, "[V.RP.Chat]: Chat script initialized successfully!");
return true;
}
diff --git a/scripts/server/clan.js b/scripts/server/clan.js
index 5032d66f..766d7e43 100644
--- a/scripts/server/clan.js
+++ b/scripts/server/clan.js
@@ -109,15 +109,15 @@ class ClanMemberData {
// ===========================================================================
function initClanScript() {
- logToConsole(LOG_INFO, "[AGRP.Clan]: Initializing clans script ...");
- logToConsole(LOG_INFO, "[AGRP.Clan]: Clan script initialized successfully!");
+ logToConsole(LOG_INFO, "[V.RP.Clan]: Initializing clans script ...");
+ logToConsole(LOG_INFO, "[V.RP.Clan]: Clan script initialized successfully!");
return true;
}
// ===========================================================================
function loadClansFromDatabase() {
- logToConsole(LOG_INFO, "[AGRP.Clan]: Loading clans from database ...");
+ logToConsole(LOG_INFO, "[V.RP.Clan]: Loading clans from database ...");
let tempClans = [];
let dbConnection = connectToDatabase();
@@ -145,7 +145,7 @@ function loadClansFromDatabase() {
// ===========================================================================
function loadClanMembersFromDatabase() {
- logToConsole(LOG_INFO, "[AGRP.Clan]: Loading clans from database ...");
+ logToConsole(LOG_INFO, "[V.RP.Clan]: Loading clans from database ...");
let tempClans = [];
let dbConnection = connectToDatabase();
diff --git a/scripts/server/client.js b/scripts/server/client.js
index 41420ebe..5fc37401 100644
--- a/scripts/server/client.js
+++ b/scripts/server/client.js
@@ -155,8 +155,8 @@ class ClientData {
// ===========================================================================
function initClientScript() {
- logToConsole(LOG_DEBUG, "[AGRP.Client]: Initializing client script ...");
- logToConsole(LOG_DEBUG, "[AGRP.Client]: Client script initialized!");
+ logToConsole(LOG_DEBUG, "[V.RP.Client]: Initializing client script ...");
+ logToConsole(LOG_DEBUG, "[V.RP.Client]: Client script initialized!");
}
// ===========================================================================
diff --git a/scripts/server/command.js b/scripts/server/command.js
index f9c64c45..e425d1f4 100644
--- a/scripts/server/command.js
+++ b/scripts/server/command.js
@@ -43,8 +43,8 @@ let serverCommands = [];
// ===========================================================================
function initCommandScript() {
- logToConsole(LOG_INFO, "[AGRP.Command]: Initializing commands script ...");
- logToConsole(LOG_INFO, "[AGRP.Command]: Initialized commands script!");
+ logToConsole(LOG_INFO, "[V.RP.Command]: Initializing commands script ...");
+ logToConsole(LOG_INFO, "[V.RP.Command]: Initialized commands script!");
}
// ===========================================================================
diff --git a/scripts/server/config.js b/scripts/server/config.js
index 2c073dfb..bc016af3 100644
--- a/scripts/server/config.js
+++ b/scripts/server/config.js
@@ -255,14 +255,14 @@ let globalConfig = {
// ===========================================================================
function initConfigScript() {
- logToConsole(LOG_INFO, "[AGRP.Config]: Initializing config script ...");
- logToConsole(LOG_INFO, "[AGRP.Config]: Config script initialized!");
+ logToConsole(LOG_INFO, "[V.RP.Config]: Initializing config script ...");
+ logToConsole(LOG_INFO, "[V.RP.Config]: Config script initialized!");
}
// ===========================================================================
function loadGlobalConfig() {
- logToConsole(LOG_DEBUG, "[AGRP.Config] Loading global configuration ...");
+ logToConsole(LOG_DEBUG, "[V.RP.Config] Loading global configuration ...");
try {
getGlobalConfig().database = loadDatabaseConfig();
} catch (error) {
@@ -312,7 +312,7 @@ function loadGlobalConfig() {
thisResource.stop();
}
- logToConsole(LOG_DEBUG, "[AGRP.Config] Loaded global configuration successfully!");
+ logToConsole(LOG_DEBUG, "[V.RP.Config] Loaded global configuration successfully!");
}
// ===========================================================================
@@ -373,8 +373,8 @@ function loadServerConfigFromId(tempServerId) {
// ===========================================================================
function applyConfigToServer(tempServerConfig) {
- logToConsole(LOG_INFO, "[AGRP.Config]: Applying server config ...");
- logToConsole(LOG_DEBUG, "[AGRP.Config]: Server config applied successfully!");
+ logToConsole(LOG_INFO, "[V.RP.Config]: Applying server config ...");
+ logToConsole(LOG_DEBUG, "[V.RP.Config]: Server config applied successfully!");
updateServerGameTime();
@@ -980,7 +980,7 @@ function getServerIntroMusicURL() {
// ===========================================================================
function loadLocaleConfig() {
- logToConsole(LOG_DEBUG, "[AGRP.Config] Loading locale configuration");
+ logToConsole(LOG_DEBUG, "[V.RP.Config] Loading locale configuration");
let localeConfig = JSON.parse(loadTextFile(`config/locale.json`));
if (localeConfig != null) {
return localeConfig;
@@ -990,7 +990,7 @@ function loadLocaleConfig() {
// ===========================================================================
function loadEconomyConfig() {
- logToConsole(LOG_DEBUG, "[AGRP.Config] Loading economy configuration");
+ logToConsole(LOG_DEBUG, "[V.RP.Config] Loading economy configuration");
let economyConfig = JSON.parse(loadTextFile(`config/economy.json`));
if (economyConfig != null) {
return economyConfig;
@@ -1000,7 +1000,7 @@ function loadEconomyConfig() {
// ===========================================================================
function loadAccentConfig() {
- logToConsole(LOG_DEBUG, "[AGRP.Config] Loading accents configuration");
+ logToConsole(LOG_DEBUG, "[V.RP.Config] Loading accents configuration");
let accentConfig = JSON.parse(loadTextFile(`config/accents.json`));
if (accentConfig != null) {
return accentConfig;
@@ -1010,7 +1010,7 @@ function loadAccentConfig() {
// ===========================================================================
function loadDiscordConfig() {
- logToConsole(LOG_DEBUG, "[AGRP.Config] Loading discord configuration");
+ logToConsole(LOG_DEBUG, "[V.RP.Config] Loading discord configuration");
let discordConfig = JSON.parse(loadTextFile(`config/discord.json`));
if (discordConfig != null) {
return discordConfig;
@@ -1021,7 +1021,7 @@ function loadDiscordConfig() {
// ===========================================================================
function loadDatabaseConfig() {
- logToConsole(LOG_DEBUG, "[AGRP.Config] Loading database configuration");
+ logToConsole(LOG_DEBUG, "[V.RP.Config] Loading database configuration");
let databaseConfig = JSON.parse(loadTextFile("config/database.json"));
if (databaseConfig != null) {
return databaseConfig;
@@ -1032,7 +1032,7 @@ function loadDatabaseConfig() {
// ===========================================================================
function loadKeyBindConfig() {
- logToConsole(LOG_DEBUG, "[AGRP.Config] Loading keybind configuration");
+ logToConsole(LOG_DEBUG, "[V.RP.Config] Loading keybind configuration");
let keyBindConfig = JSON.parse(loadTextFile("config/keybind.json"));
if (keyBindConfig != null) {
return keyBindConfig;
@@ -1043,7 +1043,7 @@ function loadKeyBindConfig() {
// ===========================================================================
function loadEmailConfig() {
- logToConsole(LOG_DEBUG, "[AGRP.Config] Loading email configuration");
+ logToConsole(LOG_DEBUG, "[V.RP.Config] Loading email configuration");
let emailConfig = JSON.parse(loadTextFile("config/email.json"));
if (emailConfig != null) {
return emailConfig;
@@ -1126,7 +1126,7 @@ function getDatabaseConfig() {
// ===========================================================================
function loadServerConfig() {
- logToConsole(LOG_DEBUG, "[AGRP.Config] Loading server configuration");
+ logToConsole(LOG_DEBUG, "[V.RP.Config] Loading server configuration");
if (toInteger(server.getCVar("agrp_devserver")) == 1) {
serverConfig = loadServerConfigFromGame(getGame());
diff --git a/scripts/server/core.js b/scripts/server/core.js
index 5cebb221..5be5bb3f 100644
--- a/scripts/server/core.js
+++ b/scripts/server/core.js
@@ -9,7 +9,7 @@
let scriptVersion = "1.3";
let serverStartTime = 0;
-let logLevel = LOG_INFO;
+let logLevel = LOG_INFO | LOG_DEBUG | LOG_VERBOSE;
let playerResourceReady = new Array(server.maxClients).fill(false);
let playerResourceStarted = new Array(server.maxClients).fill(false);
diff --git a/scripts/server/database.js b/scripts/server/database.js
index 0ed6b53a..5529b8ed 100644
--- a/scripts/server/database.js
+++ b/scripts/server/database.js
@@ -14,8 +14,8 @@ let persistentDatabaseConnection = null;
// ===========================================================================
function initDatabaseScript() {
- logToConsole(LOG_INFO, "[AGRP.Database]: Initializing database script ...");
- logToConsole(LOG_INFO, "[AGRP.Database]: Database script initialized successfully!");
+ logToConsole(LOG_INFO, "[V.RP.Database]: Initializing database script ...");
+ logToConsole(LOG_INFO, "[V.RP.Database]: Database script initialized successfully!");
}
// ===========================================================================
diff --git a/scripts/server/developer.js b/scripts/server/developer.js
index 834e06cb..85786975 100644
--- a/scripts/server/developer.js
+++ b/scripts/server/developer.js
@@ -8,7 +8,7 @@
// ===========================================================================
function initDeveloperScript() {
- logToConsole(LOG_INFO, "[AGRP.Developer]: Initializing developer script ...");
+ logToConsole(LOG_INFO, "[V.RP.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, "[AGRP.Developer]: Developer script initialized successfully!");
+ logToConsole(LOG_INFO, "[V.RP.Developer]: Developer script initialized successfully!");
return true;
}
diff --git a/scripts/server/discord.js b/scripts/server/discord.js
index 2a907d63..a4a62abc 100644
--- a/scripts/server/discord.js
+++ b/scripts/server/discord.js
@@ -15,8 +15,8 @@ const V_DISCORD_WEBHOOK_ADMIN = 2;
// ===========================================================================
function initDiscordScript() {
- logToConsole(LOG_INFO, "[AGRP.Discord]: Initializing discord script ...");
- logToConsole(LOG_INFO, "[AGRP.Discord]: Discord script initialized successfully!");
+ logToConsole(LOG_INFO, "[V.RP.Discord]: Initializing discord script ...");
+ logToConsole(LOG_INFO, "[V.RP.Discord]: Discord script initialized successfully!");
}
// ===========================================================================
diff --git a/scripts/server/economy.js b/scripts/server/economy.js
index d1c83fff..50661d2a 100644
--- a/scripts/server/economy.js
+++ b/scripts/server/economy.js
@@ -8,8 +8,8 @@
// ===========================================================================
function initEconomyScript() {
- logToConsole(LOG_INFO, "[AGRP.Economy]: Initializing economy script ...");
- logToConsole(LOG_INFO, "[AGRP.Economy]: Economy script initialized successfully!");
+ logToConsole(LOG_INFO, "[V.RP.Economy]: Initializing economy script ...");
+ logToConsole(LOG_INFO, "[V.RP.Economy]: Economy script initialized successfully!");
}
// ===========================================================================
diff --git a/scripts/server/email.js b/scripts/server/email.js
index 4063a96f..1e4b0121 100644
--- a/scripts/server/email.js
+++ b/scripts/server/email.js
@@ -15,8 +15,8 @@ const V_EMAIL_METHOD_GET_REQUEST = "http"; // Use HTTP request (httpGet to cu
// ===========================================================================
function initEmailScript() {
- logToConsole(LOG_INFO, "[AGRP.Email]: Initializing email script ...");
- logToConsole(LOG_INFO, "[AGRP.Email]: Email script initialized successfully!");
+ logToConsole(LOG_INFO, "[V.RP.Email]: Initializing email script ...");
+ logToConsole(LOG_INFO, "[V.RP.Email]: Email script initialized successfully!");
}
// ===========================================================================
diff --git a/scripts/server/event.js b/scripts/server/event.js
index 0a772cd5..97e8e701 100644
--- a/scripts/server/event.js
+++ b/scripts/server/event.js
@@ -8,9 +8,9 @@
// ===========================================================================
function initEventScript() {
- logToConsole(LOG_INFO, "[AGRP.Event]: Initializing event script ...");
+ logToConsole(LOG_INFO, "[V.RP.Event]: Initializing event script ...");
addAllEventHandlers();
- logToConsole(LOG_INFO, "[AGRP.Event]: Event script initialized!");
+ logToConsole(LOG_INFO, "[V.RP.Event]: Event script initialized!");
}
// ===========================================================================
diff --git a/scripts/server/fishing.js b/scripts/server/fishing.js
index b108f875..550d8b64 100644
--- a/scripts/server/fishing.js
+++ b/scripts/server/fishing.js
@@ -86,8 +86,8 @@ let fishingParticleEffects = {
// ===========================================================================
function initFishingScript() {
- logToConsole(LOG_INFO, "[AGRP.Fishing]: Initializing fishing script ...");
- logToConsole(LOG_INFO, "[AGRP.Fishing]: Fishing script initialized successfully!");
+ logToConsole(LOG_INFO, "[V.RP.Fishing]: Initializing fishing script ...");
+ logToConsole(LOG_INFO, "[V.RP.Fishing]: Fishing script initialized successfully!");
}
// ===========================================================================
diff --git a/scripts/server/gate.js b/scripts/server/gate.js
index 23e42fc5..2ed68b43 100644
--- a/scripts/server/gate.js
+++ b/scripts/server/gate.js
@@ -235,7 +235,7 @@ function saveGateToDatabase(gateId) {
// ===========================================================================
function loadGatesFromDatabase() {
- logToConsole(LOG_INFO, "[AGRP.Gate]: Loading gates from database ...");
+ logToConsole(LOG_INFO, "[V.RP.Gate]: Loading gates from database ...");
let tempGates = [];
let dbConnection = connectToDatabase();
diff --git a/scripts/server/gui.js b/scripts/server/gui.js
index 63b43cc7..a3aaf915 100644
--- a/scripts/server/gui.js
+++ b/scripts/server/gui.js
@@ -8,8 +8,8 @@
// ===========================================================================
function initGUIScript() {
- logToConsole(LOG_INFO, "[AGRP.GUI]: Initializing GUI script ...");
- logToConsole(LOG_INFO, "[AGRP.GUI]: GUI script initialized successfully!");
+ logToConsole(LOG_INFO, "[V.RP.GUI]: Initializing GUI script ...");
+ logToConsole(LOG_INFO, "[V.RP.GUI]: GUI script initialized successfully!");
}
// ===========================================================================
diff --git a/scripts/server/house.js b/scripts/server/house.js
index 1e863ac3..7785dcc9 100644
--- a/scripts/server/house.js
+++ b/scripts/server/house.js
@@ -167,15 +167,15 @@ class HouseGameScriptData {
// ===========================================================================
function initHouseScript() {
- logToConsole(LOG_INFO, "[AGRP.House]: Initializing house script ...");
- logToConsole(LOG_INFO, "[AGRP.House]: House script initialized successfully!");
+ logToConsole(LOG_INFO, "[V.RP.House]: Initializing house script ...");
+ logToConsole(LOG_INFO, "[V.RP.House]: House script initialized successfully!");
return true;
}
// ===========================================================================
function loadHousesFromDatabase() {
- logToConsole(LOG_INFO, "[AGRP.House]: Loading houses from database ...");
+ logToConsole(LOG_INFO, "[V.RP.House]: Loading houses from database ...");
let tempHouses = [];
let dbConnection = connectToDatabase();
let dbAssoc = [];
diff --git a/scripts/server/item.js b/scripts/server/item.js
index 27bccbe4..08bc49f5 100644
--- a/scripts/server/item.js
+++ b/scripts/server/item.js
@@ -280,8 +280,8 @@ let itemRecipes = [
// ===========================================================================
function initItemScript() {
- logToConsole(LOG_DEBUG, "[AGRP.Item]: Initializing item script ...");
- logToConsole(LOG_INFO, "[AGRP.Item]: Item script initialized successfully!");
+ logToConsole(LOG_DEBUG, "[V.RP.Item]: Initializing item script ...");
+ logToConsole(LOG_INFO, "[V.RP.Item]: Item script initialized successfully!");
return true;
}
diff --git a/scripts/server/job.js b/scripts/server/job.js
index c707ac79..2594ea2b 100644
--- a/scripts/server/job.js
+++ b/scripts/server/job.js
@@ -528,15 +528,15 @@ let jobRouteLocationTypes = {
// ===========================================================================
function initJobScript() {
- logToConsole(LOG_DEBUG, "[AGRP.Job]: Initializing job script ...");
- logToConsole(LOG_INFO, "[AGRP.Job]: Job script initialized successfully!");
+ logToConsole(LOG_DEBUG, "[V.RP.Job]: Initializing job script ...");
+ logToConsole(LOG_INFO, "[V.RP.Job]: Job script initialized successfully!");
return true;
}
// ===========================================================================
function loadJobsFromDatabase() {
- logToConsole(LOG_DEBUG, "[AGRP.Job]: Loading jobs from database ...");
+ logToConsole(LOG_DEBUG, "[V.RP.Job]: Loading jobs from database ...");
let tempJobs = [];
let dbConnection = connectToDatabase();
diff --git a/scripts/server/keybind.js b/scripts/server/keybind.js
index fe6e5aed..f2ae5111 100644
--- a/scripts/server/keybind.js
+++ b/scripts/server/keybind.js
@@ -35,8 +35,8 @@ class KeyBindData {
// ===========================================================================
function initKeyBindScript() {
- logToConsole(LOG_DEBUG, "[AGRP.KeyBind]: Initializing key bind script ...");
- logToConsole(LOG_INFO, "[AGRP.KeyBind]: Key bind script initialized!");
+ logToConsole(LOG_DEBUG, "[V.RP.KeyBind]: Initializing key bind script ...");
+ logToConsole(LOG_INFO, "[V.RP.KeyBind]: Key bind script initialized!");
}
// ===========================================================================
diff --git a/scripts/server/locale.js b/scripts/server/locale.js
index 52bfbbaa..36e2859f 100644
--- a/scripts/server/locale.js
+++ b/scripts/server/locale.js
@@ -27,8 +27,8 @@ let englishLocale = 0;
// ===========================================================================
function initLocaleScript() {
- logToConsole(LOG_DEBUG, "[AGRP.Locale]: Initializing locale script ...");
- logToConsole(LOG_INFO, "[AGRP.Locale]: Locale script initialized!");
+ logToConsole(LOG_DEBUG, "[V.RP.Locale]: Initializing locale script ...");
+ logToConsole(LOG_INFO, "[V.RP.Locale]: Locale script initialized!");
}
// ===========================================================================
diff --git a/scripts/server/messaging.js b/scripts/server/messaging.js
index 211c59b7..d6340183 100644
--- a/scripts/server/messaging.js
+++ b/scripts/server/messaging.js
@@ -9,8 +9,8 @@
// ===========================================================================
function initMessagingScript() {
- logToConsole(LOG_INFO, "[AGRP.Messaging]: Initializing messaging script ...");
- logToConsole(LOG_INFO, "[AGRP.Messaging]: Messaging script initialized successfully!");
+ logToConsole(LOG_INFO, "[V.RP.Messaging]: Initializing messaging script ...");
+ logToConsole(LOG_INFO, "[V.RP.Messaging]: Messaging script initialized successfully!");
}
// ===========================================================================
diff --git a/scripts/server/misc.js b/scripts/server/misc.js
index 5d0a8e66..aad6faef 100644
--- a/scripts/server/misc.js
+++ b/scripts/server/misc.js
@@ -54,8 +54,8 @@ const V_PROPERTY_TYPE_HOUSE = 2; // House
// ===========================================================================
function initMiscScript() {
- logToConsole(LOG_DEBUG, "[AGRP.Misc]: Initializing misc script ...");
- logToConsole(LOG_INFO, "[AGRP.Misc]: Misc script initialized successfully!");
+ logToConsole(LOG_DEBUG, "[V.RP.Misc]: Initializing misc script ...");
+ logToConsole(LOG_INFO, "[V.RP.Misc]: Misc script initialized successfully!");
return true;
}
diff --git a/scripts/server/netevents.js b/scripts/server/netevents.js
index 1f39770b..297f29ff 100644
--- a/scripts/server/netevents.js
+++ b/scripts/server/netevents.js
@@ -8,14 +8,14 @@
// ===========================================================================
function initNetworkEventsScript() {
- logToConsole(LOG_DEBUG, "[AGRP.NetEvents]: Initializing network events script ...");
- logToConsole(LOG_INFO, "[AGRP.NetEvents]: Network events script initialized!");
+ logToConsole(LOG_DEBUG, "[V.RP.NetEvents]: Initializing network events script ...");
+ logToConsole(LOG_INFO, "[V.RP.NetEvents]: Network events script initialized!");
}
// ===========================================================================
function addAllNetworkEventHandlers() {
- logToConsole(LOG_DEBUG, "[AGRP.Client]: Adding network handlers ...");
+ logToConsole(LOG_DEBUG, "[V.RP.Client]: Adding network handlers ...");
// KeyBind
addNetworkEventHandler("v.rp.useKeyBind", playerUsedKeyBind);
diff --git a/scripts/server/npc.js b/scripts/server/npc.js
index 04bee12a..c15af387 100644
--- a/scripts/server/npc.js
+++ b/scripts/server/npc.js
@@ -205,8 +205,8 @@ class NPCTriggerResponseData {
// ===========================================================================
function initNPCScript() {
- logToConsole(LOG_DEBUG, "[AGRP.NPC]: Initializing NPC script ...");
- logToConsole(LOG_INFO, "[AGRP.NPC]: NPC script initialized successfully!");
+ logToConsole(LOG_DEBUG, "[V.RP.NPC]: Initializing NPC script ...");
+ logToConsole(LOG_INFO, "[V.RP.NPC]: NPC script initialized successfully!");
}
// ===========================================================================
diff --git a/scripts/server/paintball.js b/scripts/server/paintball.js
index 1b40924d..77d6ee7b 100644
--- a/scripts/server/paintball.js
+++ b/scripts/server/paintball.js
@@ -49,8 +49,8 @@ let paintBallItemNames = {
// ===========================================================================
function initPaintBallScript() {
- logToConsole(LOG_DEBUG, "[AGRP.PaintBall]: Initializing paintball script ...");
- logToConsole(LOG_DEBUG, "[AGRP.PaintBall]: Paintball script initialized successfully!");
+ logToConsole(LOG_DEBUG, "[V.RP.PaintBall]: Initializing paintball script ...");
+ logToConsole(LOG_DEBUG, "[V.RP.PaintBall]: Paintball script initialized successfully!");
}
// ===========================================================================
diff --git a/scripts/server/prompt.js b/scripts/server/prompt.js
index fe5def97..08f1a377 100644
--- a/scripts/server/prompt.js
+++ b/scripts/server/prompt.js
@@ -21,8 +21,8 @@ const V_PROMPT_RESETKEYBINDS = 8;
// ===========================================================================
function initPromptScript() {
- logToConsole(LOG_INFO, "[AGRP.Prompt]: Initializing Prompt script ...");
- logToConsole(LOG_INFO, "[AGRP.Prompt]: Prompt script initialized successfully!");
+ logToConsole(LOG_INFO, "[V.RP.Prompt]: Initializing Prompt script ...");
+ logToConsole(LOG_INFO, "[V.RP.Prompt]: Prompt script initialized successfully!");
}
// ===========================================================================
diff --git a/scripts/server/property.js b/scripts/server/property.js
index 2217314c..da8f986c 100644
--- a/scripts/server/property.js
+++ b/scripts/server/property.js
@@ -151,8 +151,8 @@ class PropertyLocationData {
// ===========================================================================
function initPropertyScript() {
- logToConsole(LOG_INFO, "[AGRP.Property]: Initializing property script ...");
- logToConsole(LOG_INFO, "[AGRP.Property]: Property script initialized successfully!");
+ logToConsole(LOG_INFO, "[V.RP.Property]: Initializing property script ...");
+ logToConsole(LOG_INFO, "[V.RP.Property]: Property script initialized successfully!");
return true;
}
@@ -176,7 +176,7 @@ function loadPropertyFromId(propertyIndex) {
// ===========================================================================
function loadPropertiesFromDatabase() {
- logToConsole(LOG_INFO, "[AGRP.Property]: Loading properties from database ...");
+ logToConsole(LOG_INFO, "[V.RP.Property]: Loading properties from database ...");
let tempProperties = [];
let dbConnection = connectToDatabase();
@@ -2255,11 +2255,11 @@ function getPropertyFloorFirstFreeItemSlot(propertyIndex) {
// Caches all items for all businesses
function cacheAllPropertyItems() {
- logToConsole(LOG_DEBUG, "[AGRP.Property] Caching all business items ...");
+ logToConsole(LOG_DEBUG, "[V.RP.Property] Caching all business items ...");
for (let i in getServerData().properties) {
cachePropertyItems(i);
}
- logToConsole(LOG_DEBUG, "[AGRP.Property] Cached all business items successfully!");
+ logToConsole(LOG_DEBUG, "[V.RP.Property] Cached all business items successfully!");
}
// ===========================================================================
diff --git a/scripts/server/race.js b/scripts/server/race.js
index 85f9325f..994b7ec9 100644
--- a/scripts/server/race.js
+++ b/scripts/server/race.js
@@ -8,8 +8,8 @@
// ===========================================================================
function initRaceScript() {
- logToConsole(LOG_INFO, "[AGRP.Race]: Initializing race script ...");
- logToConsole(LOG_INFO, "[AGRP.Race]: Race script initialized successfully!");
+ logToConsole(LOG_INFO, "[V.RP.Race]: Initializing race script ...");
+ logToConsole(LOG_INFO, "[V.RP.Race]: Race script initialized successfully!");
}
// ===========================================================================
diff --git a/scripts/server/radio.js b/scripts/server/radio.js
index c8a92976..65369014 100644
--- a/scripts/server/radio.js
+++ b/scripts/server/radio.js
@@ -29,15 +29,15 @@ class RadioStationData {
// ===========================================================================
function initRadioScript() {
- logToConsole(LOG_INFO, "[AGRP.Radio]: Initializing radio script ...");
- logToConsole(LOG_INFO, "[AGRP.Radio]: Radio script initialized successfully!");
+ logToConsole(LOG_INFO, "[V.RP.Radio]: Initializing radio script ...");
+ logToConsole(LOG_INFO, "[V.RP.Radio]: Radio script initialized successfully!");
return true;
}
// ===========================================================================
function loadRadioStationsFromDatabase() {
- logToConsole(LOG_INFO, "[AGRP.Radio]: Loading radio stations from database ...");
+ logToConsole(LOG_INFO, "[V.RP.Radio]: Loading radio stations from database ...");
let dbConnection = connectToDatabase();
let tempRadioStations = [];
let dbAssoc = [];
diff --git a/scripts/server/staff.js b/scripts/server/staff.js
index 0abbe37d..97d5aa80 100644
--- a/scripts/server/staff.js
+++ b/scripts/server/staff.js
@@ -8,8 +8,8 @@
// ===========================================================================
function initStaffScript() {
- logToConsole(LOG_INFO, "[AGRP.Staff]: Initializing staff script ...");
- logToConsole(LOG_INFO, "[AGRP.Staff]: Staff script initialized successfully!");
+ logToConsole(LOG_INFO, "[V.RP.Staff]: Initializing staff script ...");
+ logToConsole(LOG_INFO, "[V.RP.Staff]: Staff script initialized successfully!");
}
// ===========================================================================
diff --git a/scripts/server/startup.js b/scripts/server/startup.js
index 435d71bb..f0c3e6ee 100644
--- a/scripts/server/startup.js
+++ b/scripts/server/startup.js
@@ -98,33 +98,33 @@ function checkForSMTPModule() {
// ===========================================================================
function checkForAllRequiredModules() {
- logToConsole(LOG_DEBUG, "[AGRP.Startup]: Checking for required modules ...");
+ logToConsole(LOG_DEBUG, "[V.RP.Startup]: Checking for required modules ...");
if (!checkForHashingModule()) {
- logToConsole(LOG_WARN, "[AGRP.Startup]: Hashing module is not loaded!");
- logToConsole(LOG_ERROR, "[AGRP.Startup]: This server will now shutdown.");
+ logToConsole(LOG_WARN, "[V.RP.Startup]: Hashing module is not loaded!");
+ logToConsole(LOG_ERROR, "[V.RP.Startup]: This server will now shutdown.");
shutdownServer();
}
if (!checkForMySQLModule()) {
- logToConsole(LOG_WARN, "[AGRP.Startup]: MySQL module is not loaded!");
- logToConsole(LOG_ERROR, "[AGRP.Startup]: This server will now shutdown.");
+ logToConsole(LOG_WARN, "[V.RP.Startup]: MySQL module is not loaded!");
+ logToConsole(LOG_ERROR, "[V.RP.Startup]: This server will now shutdown.");
shutdownServer();
}
//if (!checkForSMTPModule()) {
- // logToConsole(LOG_WARN, "[AGRP.Startup]: SMTP Email module is not loaded!");
- // logToConsole(LOG_WARN, "[AGRP.Startup]: Email features will NOT be available!");
+ // logToConsole(LOG_WARN, "[V.RP.Startup]: SMTP Email module is not loaded!");
+ // logToConsole(LOG_WARN, "[V.RP.Startup]: Email features will NOT be available!");
//}
- logToConsole(LOG_DEBUG, "[AGRP.Startup]: All required modules loaded!");
+ logToConsole(LOG_DEBUG, "[V.RP.Startup]: All required modules loaded!");
return true;
}
// ===========================================================================
function loadServerDataFromDatabase() {
- logToConsole(LOG_INFO, "[AGRP.Config]: Loading server data ...");
+ logToConsole(LOG_INFO, "[V.RP.Config]: Loading server data ...");
// Always load these regardless of "test server" status
getServerData().localeStrings = loadAllLocaleStrings();
diff --git a/scripts/server/timers.js b/scripts/server/timers.js
index 04462e92..bc3c8911 100644
--- a/scripts/server/timers.js
+++ b/scripts/server/timers.js
@@ -16,7 +16,7 @@ function saveServerDataToDatabase() {
return false;
}
- logToConsole(LOG_DEBUG, "[AGRP.Utilities]: Saving all server data to database ...");
+ logToConsole(LOG_DEBUG, "[V.RP.Utilities]: Saving all server data to database ...");
try {
saveAllPlayersToDatabase();
@@ -84,7 +84,7 @@ function saveServerDataToDatabase() {
logToConsole(LOG_ERROR, `Could not save server config to database: ${error}`);
}
- logToConsole(LOG_DEBUG, "[AGRP.Utilities]: Saved all server data to database!");
+ logToConsole(LOG_DEBUG, "[V.RP.Utilities]: Saved all server data to database!");
}
// ===========================================================================
@@ -210,7 +210,7 @@ function updatePings() {
// ===========================================================================
function checkServerGameTime() {
- //logToConsole(LOG_DEBUG | LOG_WARN, "[AGRP.Timers] Checking server game time");
+ //logToConsole(LOG_DEBUG | LOG_WARN, "[V.RP.Timers] Checking server game time");
//if (isGameFeatureSupported("time")) {
// return false;
diff --git a/scripts/server/trigger.js b/scripts/server/trigger.js
index df03dbc1..fda24b2c 100644
--- a/scripts/server/trigger.js
+++ b/scripts/server/trigger.js
@@ -217,8 +217,8 @@ class TriggerResponseData {
// ===========================================================================
function initTriggerScript() {
- logToConsole(LOG_INFO, "[AGRP.Trigger]: Initializing trigger script ...");
- logToConsole(LOG_INFO, "[AGRP.Trigger]: Trigger script initialized successfully!");
+ logToConsole(LOG_INFO, "[V.RP.Trigger]: Initializing trigger script ...");
+ logToConsole(LOG_INFO, "[V.RP.Trigger]: Trigger script initialized successfully!");
return true;
}
diff --git a/scripts/server/vehicle.js b/scripts/server/vehicle.js
index 14a261a4..87595454 100644
--- a/scripts/server/vehicle.js
+++ b/scripts/server/vehicle.js
@@ -169,15 +169,15 @@ class VehicleData {
// ===========================================================================
function initVehicleScript() {
- logToConsole(LOG_INFO, "[AGRP.Vehicle]: Initializing vehicle script ...");
- logToConsole(LOG_INFO, "[AGRP.Vehicle]: Vehicle script initialized successfully!");
+ logToConsole(LOG_INFO, "[V.RP.Vehicle]: Initializing vehicle script ...");
+ logToConsole(LOG_INFO, "[V.RP.Vehicle]: Vehicle script initialized successfully!");
return true;
}
// ===========================================================================
function loadVehiclesFromDatabase() {
- logToConsole(LOG_INFO, "[AGRP.Vehicle]: Loading vehicles from database ...");
+ logToConsole(LOG_INFO, "[V.RP.Vehicle]: Loading vehicles from database ...");
let dbConnection = connectToDatabase();
let tempVehicles = [];
let dbAssoc;
@@ -204,14 +204,14 @@ function saveAllVehiclesToDatabase() {
return false;
}
- logToConsole(LOG_DEBUG, "[AGRP.Vehicle]: Saving all server vehicles to database ...");
+ logToConsole(LOG_DEBUG, "[V.RP.Vehicle]: Saving all server vehicles to database ...");
let vehicles = getServerData().vehicles;
for (let i in vehicles) {
if (vehicles[i].needsSaved) {
saveVehicleToDatabase(i);
}
}
- logToConsole(LOG_INFO, "[AGRP.Vehicle]: Saved all server vehicles to database!");
+ logToConsole(LOG_INFO, "[V.RP.Vehicle]: Saved all server vehicles to database!");
return true;
}
From ebcc79b13565b9fcec3069642532e2c7dde43c13 Mon Sep 17 00:00:00 2001
From: Vortrex <3858226+VortrexFTW@users.noreply.github.com>
Date: Tue, 7 Feb 2023 15:10:59 -0600
Subject: [PATCH 12/14] Fix subaccount default server data
---
scripts/server/subaccount.js | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/scripts/server/subaccount.js b/scripts/server/subaccount.js
index 15e0ec96..5924f23f 100644
--- a/scripts/server/subaccount.js
+++ b/scripts/server/subaccount.js
@@ -122,8 +122,8 @@ class SubAccountData {
// ===========================================================================
function initSubAccountScript() {
- logToConsole(LOG_DEBUG, "[AGRP.SubAccount]: Initializing subaccount script ...");
- logToConsole(LOG_INFO, "[AGRP.SubAccount]: SubAccount script initialized!");
+ logToConsole(LOG_DEBUG, "[V.RP.SubAccount]: Initializing subaccount script ...");
+ logToConsole(LOG_INFO, "[V.RP.SubAccount]: SubAccount script initialized!");
}
// ===========================================================================
@@ -354,7 +354,7 @@ function createSubAccount(accountId, firstName, lastName) {
//if(dbQuery) {
if (getDatabaseInsertId(dbConnection) > 0) {
let dbInsertId = getDatabaseInsertId(dbConnection);
- createDefaultSubAccountServerData(dbInsertId, getServerConfig().newCharacter.skin);
+ createDefaultSubAccountServerData(dbInsertId);
let tempSubAccount = loadSubAccountFromId(dbInsertId);
return tempSubAccount;
}
@@ -681,15 +681,13 @@ function setFightStyleCommand(command, params, client) {
// ===========================================================================
-function createDefaultSubAccountServerData(databaseId, thisServerSkin) {
- for (let i = 1; i <= 5; i++) {
- if (i == getServerId()) {
- let dbQueryString = `INSERT INTO sacct_svr (sacct_svr_sacct, sacct_svr_server, sacct_svr_skin) VALUES (${databaseId}, ${i}, ${thisServerSkin})`;
- quickDatabaseQuery(dbQueryString);
- } else {
- let dbQueryString = `INSERT INTO sacct_svr (sacct_svr_sacct, sacct_svr_server, sacct_svr_skin) VALUES (${databaseId}, ${i}, -1)`;
- quickDatabaseQuery(dbQueryString);
- }
+function createDefaultSubAccountServerData(databaseId) {
+ let dbConnection = connectToDatabase();
+ let serversAssoc = fetchQueryAssoc(dbConnection, "SELECT * FROM svr_main");
+
+ for (let i in serversAssoc) {
+ let dbQueryString = `INSERT INTO sacct_svr (sacct_svr_sacct, sacct_svr_server, sacct_svr_skin) VALUES (${databaseId}, ${i}, ${serversAssoc[i]["svr_newchar_skin"]})`;
+ quickDatabaseQuery(dbQueryString);
}
}
From 0593c36a069436c0fa15a1db9fbe01b414633cec Mon Sep 17 00:00:00 2001
From: Vortrex <3858226+VortrexFTW@users.noreply.github.com>
Date: Tue, 7 Feb 2023 15:35:26 -0600
Subject: [PATCH 13/14] Use server ID when creating char server data
---
scripts/server/subaccount.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/server/subaccount.js b/scripts/server/subaccount.js
index 5924f23f..b552ef5e 100644
--- a/scripts/server/subaccount.js
+++ b/scripts/server/subaccount.js
@@ -686,7 +686,7 @@ function createDefaultSubAccountServerData(databaseId) {
let serversAssoc = fetchQueryAssoc(dbConnection, "SELECT * FROM svr_main");
for (let i in serversAssoc) {
- let dbQueryString = `INSERT INTO sacct_svr (sacct_svr_sacct, sacct_svr_server, sacct_svr_skin) VALUES (${databaseId}, ${i}, ${serversAssoc[i]["svr_newchar_skin"]})`;
+ let dbQueryString = `INSERT INTO sacct_svr (sacct_svr_sacct, sacct_svr_server, sacct_svr_skin) VALUES (${databaseId}, ${serversAssoc[i]["svr_id"]}, ${serversAssoc[i]["svr_newchar_skin"]})`;
quickDatabaseQuery(dbQueryString);
}
}
From 529a6bb3a0b396fbce6329791d53d9ca3b148b35 Mon Sep 17 00:00:00 2001
From: Vortrex <3858226+VortrexFTW@users.noreply.github.com>
Date: Tue, 7 Feb 2023 15:35:41 -0600
Subject: [PATCH 14/14] Remove everybody from vehicle before stopping rent
---
scripts/server/vehicle.js | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/scripts/server/vehicle.js b/scripts/server/vehicle.js
index 87595454..81cc79d0 100644
--- a/scripts/server/vehicle.js
+++ b/scripts/server/vehicle.js
@@ -1453,7 +1453,10 @@ function stopRentingVehicle(client) {
let vehicle = getPlayerData(client).rentingVehicle;
getPlayerData(client).rentingVehicle = false;
getVehicleData(vehicle).rentedBy = false;
- respawnVehicle(vehicle);
+ removeAllOccupantsFromVehicle(vehicle);
+ setTimeout(function () {
+ respawnVehicle(vehicle);
+ }, 1000);
}
// ===========================================================================