Update header

This commit is contained in:
Vortrex
2022-07-08 14:03:55 -05:00
parent 35251372c5
commit 9539eb20f8
114 changed files with 474 additions and 361 deletions

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: afk.js // FILE: afk.js
// DESC: Provides AFK detection // DESC: Provides AFK detection

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: animation.js // FILE: animation.js
// DESC: Provides animation functions and usage // DESC: Provides animation functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: business.js // FILE: business.js
// DESC: Provides business functions and usage // DESC: Provides business functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: chatbox.js // FILE: chatbox.js
// DESC: Provides extra chatbox features // DESC: Provides extra chatbox features

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: content.js // FILE: content.js
// DESC: Provides connection to extra content resources // DESC: Provides connection to extra content resources
@@ -9,10 +10,10 @@
function getCustomImage(imageName) { function getCustomImage(imageName) {
let contentResource = findResourceByName(getGameConfig().extraContentResource[getGame()]); let contentResource = findResourceByName(getGameConfig().extraContentResource[getGame()]);
if(contentResource != null) { if (contentResource != null) {
if(contentResource.isStarted) { if (contentResource.isStarted) {
let image = contentResource.exports.getCustomImage(imageName); let image = contentResource.exports.getCustomImage(imageName);
if(image != null) { if (image != null) {
return image; return image;
} }
} }
@@ -24,10 +25,10 @@ function getCustomImage(imageName) {
function getCustomFont(fontName) { function getCustomFont(fontName) {
let contentResource = findResourceByName(getGameConfig().extraContentResource[getGame()]); let contentResource = findResourceByName(getGameConfig().extraContentResource[getGame()]);
if(contentResource != null) { if (contentResource != null) {
if(contentResource.isStarted) { if (contentResource.isStarted) {
let font = contentResource.exports.getCustomFont(fontName); let font = contentResource.exports.getCustomFont(fontName);
if(font != null) { if (font != null) {
return font; return font;
} }
} }
@@ -39,10 +40,10 @@ function getCustomFont(fontName) {
function getCustomAudio(audioName) { function getCustomAudio(audioName) {
let contentResource = findResourceByName(getGameConfig().extraContentResource[getGame()]); let contentResource = findResourceByName(getGameConfig().extraContentResource[getGame()]);
if(contentResource != null) { if (contentResource != null) {
if(contentResource.isStarted) { if (contentResource.isStarted) {
let audioFile = contentResource.exports.getCustomAudio(audioName); let audioFile = contentResource.exports.getCustomAudio(audioName);
if(audioFile != null) { if (audioFile != null) {
return audioFile; return audioFile;
} }
} }
@@ -54,8 +55,8 @@ function getCustomAudio(audioName) {
function playCustomAudio(audioName, volume = 0.5, loop = false) { function playCustomAudio(audioName, volume = 0.5, loop = false) {
let contentResource = findResourceByName(getGameConfig().extraContentResource[getGame()]); let contentResource = findResourceByName(getGameConfig().extraContentResource[getGame()]);
if(contentResource != null) { if (contentResource != null) {
if(contentResource.isStarted) { if (contentResource.isStarted) {
contentResource.exports.playCustomAudio(audioName, volume, loop); contentResource.exports.playCustomAudio(audioName, volume, loop);
} }
} }

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: event.js // FILE: event.js
// DESC: Provides handlers for built in GTAC and Asshat-Gaming created events // DESC: Provides handlers for built in GTAC and Asshat-Gaming created events

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: gps.js // FILE: gps.js
// DESC: Provides GPS functions and usage // DESC: Provides GPS functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: gui.js // FILE: gui.js
// DESC: Provides GUI functionality and styles (using MexUI) // DESC: Provides GUI functionality and styles (using MexUI)

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: 2fa.js // FILE: 2fa.js
// DESC: Provides two factor authentication GUI // DESC: Provides two factor authentication GUI

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: bizmgr.js // FILE: bizmgr.js
// DESC: Provides business manager GUI // DESC: Provides business manager GUI

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: changepass.js // FILE: changepass.js
// DESC: Provides change password GUI // DESC: Provides change password GUI

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: charselect.js // FILE: charselect.js
// DESC: Provides character select GUI // DESC: Provides character select GUI

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: clanmgr.js // FILE: clanmgr.js
// DESC: Provides clan manager GUI // DESC: Provides clan manager GUI

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: error.js // FILE: error.js
// DESC: Provides error box GUI // DESC: Provides error box GUI
@@ -17,7 +18,7 @@ let errorDialog = {
function initErrorDialogGUI() { function initErrorDialogGUI() {
logToConsole(LOG_DEBUG, `[VRR.GUI] Creating error GUI ...`); logToConsole(LOG_DEBUG, `[VRR.GUI] Creating error GUI ...`);
errorDialog.window = mexui.window(getScreenWidth()/2-200, getScreenHeight()/2-70, 400, 140, 'ERROR', { errorDialog.window = mexui.window(getScreenWidth() / 2 - 200, getScreenHeight() / 2 - 70, 400, 140, 'ERROR', {
main: { main: {
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha), backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
transitionTime: 500, transitionTime: 500,

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: housemgr.js // FILE: housemgr.js
// DESC: Provides house manager GUI // DESC: Provides house manager GUI

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: info.js // FILE: info.js
// DESC: Provides info dialog box GUI // DESC: Provides info dialog box GUI
@@ -16,8 +17,8 @@ let infoDialog = {
// =========================================================================== // ===========================================================================
function initInfoDialogGUI() { function initInfoDialogGUI() {
logToConsole(LOG_DEBUG, `[VRR.GUI] Creating info dialog GUI ...`); logToConsole(LOG_DEBUG, `[VRR.GUI] Creating info dialog GUI ...`);
infoDialog.window = mexui.window(getScreenWidth()/2-200, getScreenHeight()/2-70, 400, 140, 'Information', { infoDialog.window = mexui.window(getScreenWidth() / 2 - 200, getScreenHeight() / 2 - 70, 400, 140, 'Information', {
main: { main: {
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha), backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
}, },

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: list.js // FILE: list.js
// DESC: Provides simple list GUI // DESC: Provides simple list GUI
@@ -16,8 +17,8 @@ let listDialog = {
// =========================================================================== // ===========================================================================
function initListGUI() { function initListGUI() {
logToConsole(LOG_DEBUG, `[VRR.GUI] Creating list dialog GUI ...`); logToConsole(LOG_DEBUG, `[VRR.GUI] Creating list dialog GUI ...`);
listDialog.window = mexui.window(game.width/2-200, game.height/2-70, 400, 500, 'List', { listDialog.window = mexui.window(game.width / 2 - 200, game.height / 2 - 70, 400, 500, 'List', {
main: { main: {
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha), backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
}, },
@@ -50,21 +51,21 @@ function initListGUI() {
listDialog.listGrid = listDialog.window.grid(5, 25, 390, 450, { listDialog.listGrid = listDialog.window.grid(5, 25, 390, 450, {
main: { main: {
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha), backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
}, },
column: { column: {
lineColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], windowTitleAlpha), lineColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], windowTitleAlpha),
}, },
header: { header: {
backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], windowTitleAlpha-50), backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], windowTitleAlpha - 50),
textColour: toColour(primaryTextColour[0], primaryTextColour[1], primaryTextColour[2], windowTitleAlpha), textColour: toColour(primaryTextColour[0], primaryTextColour[1], primaryTextColour[2], windowTitleAlpha),
}, },
cell: { cell: {
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha), backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
textColour: toColour(primaryTextColour[0], primaryTextColour[1], primaryTextColour[2], windowTitleAlpha), textColour: toColour(primaryTextColour[0], primaryTextColour[1], primaryTextColour[2], windowTitleAlpha),
}, },
row: { row: {
lineColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], windowTitleAlpha), lineColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], windowTitleAlpha),
hover: { hover: {
backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], 120), backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], 120),
} }

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: localechooser.js // FILE: localechooser.js
// DESC: Provides locale chooser GUI // DESC: Provides locale chooser GUI
@@ -19,8 +20,8 @@ let flagImageGap = toVector2(5, 5);
// =========================================================================== // ===========================================================================
function initLocaleChooserGUI() { function initLocaleChooserGUI() {
logToConsole(LOG_DEBUG, `[VRR.GUI] Creating locale chooser GUI ...`); logToConsole(LOG_DEBUG, `[VRR.GUI] Creating locale chooser GUI ...`);
localeChooser.window = mexui.window(game.width/2-200, game.height-150, 60, 60, 'Choose a language', { localeChooser.window = mexui.window(game.width / 2 - 200, game.height - 150, 60, 60, 'Choose a language', {
main: { main: {
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], 0), backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], 0),
}, },
@@ -53,10 +54,10 @@ function closeLocaleChooserGUI() {
// =========================================================================== // ===========================================================================
function showLocaleChooserGUI(position = toVector2(0.0, 0.0)) { function showLocaleChooserGUI(position = toVector2(0.0, 0.0)) {
if(position.x != 0.0 && position.y != 0.0) { if (position.x != 0.0 && position.y != 0.0) {
localeChooser.window.position = position; localeChooser.window.position = position;
} else { } else {
localeChooser.window.position = toVector2((getScreenWidth()/2)-(localeChooser.window.size.x/2), getScreenHeight()-100); localeChooser.window.position = toVector2((getScreenWidth() / 2) - (localeChooser.window.size.x / 2), getScreenHeight() - 100);
} }
//closeAllWindows(); //closeAllWindows();
@@ -68,7 +69,7 @@ function showLocaleChooserGUI(position = toVector2(0.0, 0.0)) {
// =========================================================================== // ===========================================================================
function toggleLocaleChooserGUI() { function toggleLocaleChooserGUI() {
if(localeChooser.window.shown) { if (localeChooser.window.shown) {
closeLocaleChooserGUI(); closeLocaleChooserGUI();
} else { } else {
showLocaleChooserGUI(); showLocaleChooserGUI();
@@ -78,36 +79,36 @@ function toggleLocaleChooserGUI() {
// =========================================================================== // ===========================================================================
function localeChooserSetLocale(localeId) { function localeChooserSetLocale(localeId) {
logToConsole(LOG_DEBUG|LOG_WARN, `[VRR.GUI] Asking server to change locale to ${localeId}`); logToConsole(LOG_DEBUG | LOG_WARN, `[VRR.GUI] Asking server to change locale to ${localeId}`);
sendLocaleSelectToServer(localeId); sendLocaleSelectToServer(localeId);
} }
// =========================================================================== // ===========================================================================
function resetLocaleChooserOptions() { function resetLocaleChooserOptions() {
logToConsole(LOG_DEBUG|LOG_WARN, `[VRR.GUI] Resetting locale chooser options`); logToConsole(LOG_DEBUG | LOG_WARN, `[VRR.GUI] Resetting locale chooser options`);
// let tempLocaleOptions = getServerData().localeOptions; // getAvailableLocaleOptions(); // let tempLocaleOptions = getServerData().localeOptions; // getAvailableLocaleOptions();
let tempLocaleOptions = getAvailableLocaleOptions(); let tempLocaleOptions = getAvailableLocaleOptions();
localeChooser.window.size = toVector2((tempLocaleOptions.length*(flagImageSize.x+flagImageGap.x))+flagImageGap.x, flagImageSize.y+flagImageGap.y*2); localeChooser.window.size = toVector2((tempLocaleOptions.length * (flagImageSize.x + flagImageGap.x)) + flagImageGap.x, flagImageSize.y + flagImageGap.y * 2);
localeChooser.window.position = toVector2((getScreenWidth()/2)-(localeChooser.window.size.x/2), getScreenHeight()-100); localeChooser.window.position = toVector2((getScreenWidth() / 2) - (localeChooser.window.size.x / 2), getScreenHeight() - 100);
for(let i in localeChooser.flagImages) { for (let i in localeChooser.flagImages) {
localeChooser.flagImages[i].remove(); localeChooser.flagImages[i].remove();
} }
for(let i in tempLocaleOptions) { for (let i in tempLocaleOptions) {
let imagePath = `files/images/flags/${tempLocaleOptions[i].flagImageFile}`; let imagePath = `files/images/flags/${tempLocaleOptions[i].flagImageFile}`;
localeChooser.flagImages[i] = localeChooser.window.image((i*(flagImageSize.x+flagImageGap.x))+flagImageGap.x, flagImageGap.y, flagImageSize.x, flagImageSize.y, imagePath, { localeChooser.flagImages[i] = localeChooser.window.image((i * (flagImageSize.x + flagImageGap.x)) + flagImageGap.x, flagImageGap.y, flagImageSize.x, flagImageSize.y, imagePath, {
focused: { focused: {
borderColour: toColour(0, 0, 0, 0), borderColour: toColour(0, 0, 0, 0),
}, },
}, function() { }, function () {
localeChooserSetLocale(tempLocaleOptions[i].id); localeChooserSetLocale(tempLocaleOptions[i].id);
}); });
logToConsole(LOG_DEBUG|LOG_WARN, `[VRR.GUI] Created locale chooser option ${tempLocaleOptions[i].englishName} with image ${imagePath}`); logToConsole(LOG_DEBUG | LOG_WARN, `[VRR.GUI] Created locale chooser option ${tempLocaleOptions[i].englishName} with image ${imagePath}`);
//localeChooser.activeRingImages.push(activeRingImage); //localeChooser.activeRingImages.push(activeRingImage);
} }

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: login.js // FILE: login.js
// DESC: Provides login GUI // DESC: Provides login GUI

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: newchar.js // FILE: newchar.js
// DESC: Provides new character creation GUI // DESC: Provides new character creation GUI

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: register.js // FILE: register.js
// DESC: Provides account registration GUI // DESC: Provides account registration GUI

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: resetpass.js // FILE: resetpass.js
// DESC: Provides password reset GUI // DESC: Provides password reset GUI

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: yesno.js // FILE: yesno.js
// DESC: Provides yes/no prompt dialog GUI // DESC: Provides yes/no prompt dialog GUI

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: house.js // FILE: house.js
// DESC: Provides house functions and usage // DESC: Provides house functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: item.js // FILE: item.js
// DESC: Provides item action and hotbar functions // DESC: Provides item action and hotbar functions
@@ -10,7 +11,7 @@
let itemActionDelayDuration = 0; let itemActionDelayDuration = 0;
let itemActionDelayStart = 0; let itemActionDelayStart = 0;
let itemActionDelayEnabled = false; let itemActionDelayEnabled = false;
let itemActionDelayPosition = toVector2(game.width/2-100, game.height-10); let itemActionDelayPosition = toVector2(game.width / 2 - 100, game.height - 10);
let itemActionDelaySize = toVector2(200, 5); let itemActionDelaySize = toVector2(200, 5);
// =========================================================================== // ===========================================================================
@@ -23,22 +24,22 @@ function initItemScript() {
// =========================================================================== // ===========================================================================
function processItemActionRendering() { function processItemActionRendering() {
if(renderItemActionDelay) { if (renderItemActionDelay) {
if(itemActionDelayEnabled) { if (itemActionDelayEnabled) {
let finishTime = itemActionDelayStart+itemActionDelayDuration; let finishTime = itemActionDelayStart + itemActionDelayDuration;
if(sdl.ticks >= finishTime) { if (sdl.ticks >= finishTime) {
itemActionDelayEnabled = false; itemActionDelayEnabled = false;
itemActionDelayDuration = 0; itemActionDelayDuration = 0;
itemActionDelayStart = 0; itemActionDelayStart = 0;
tellServerItemActionDelayComplete(); tellServerItemActionDelayComplete();
} else { } else {
let currentTick = sdl.ticks-itemActionDelayStart; let currentTick = sdl.ticks - itemActionDelayStart;
let progressPercent = Math.ceil(currentTick*100/itemActionDelayDuration); let progressPercent = Math.ceil(currentTick * 100 / itemActionDelayDuration);
let width = Math.ceil(getPercentage(itemActionDelaySize.x, progressPercent)); let width = Math.ceil(getPercentage(itemActionDelaySize.x, progressPercent));
let backgroundColour = toColour(0, 0, 0, 255); let backgroundColour = toColour(0, 0, 0, 255);
graphics.drawRectangle(null, [itemActionDelayPosition.x-(itemActionDelaySize.x/2)-1, itemActionDelayPosition.y-(itemActionDelaySize.y/2)-1], [itemActionDelaySize.x+2, itemActionDelaySize.y+2], backgroundColour, backgroundColour, backgroundColour, backgroundColour); graphics.drawRectangle(null, [itemActionDelayPosition.x - (itemActionDelaySize.x / 2) - 1, itemActionDelayPosition.y - (itemActionDelaySize.y / 2) - 1], [itemActionDelaySize.x + 2, itemActionDelaySize.y + 2], backgroundColour, backgroundColour, backgroundColour, backgroundColour);
graphics.drawRectangle(null, [itemActionDelayPosition.x-(itemActionDelaySize.x/2), itemActionDelayPosition.y-(itemActionDelaySize.y/2)-2], [width, itemActionDelaySize.y], COLOUR_LIME, COLOUR_LIME, COLOUR_LIME, COLOUR_LIME); graphics.drawRectangle(null, [itemActionDelayPosition.x - (itemActionDelaySize.x / 2), itemActionDelayPosition.y - (itemActionDelaySize.y / 2) - 2], [width, itemActionDelaySize.y], COLOUR_LIME, COLOUR_LIME, COLOUR_LIME, COLOUR_LIME);
} }
} }
} }

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: job.js // FILE: job.js
// DESC: Provides job functions and usage // DESC: Provides job functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: keybind.js // FILE: keybind.js
// DESC: Provides keybind features // DESC: Provides keybind features
@@ -25,13 +26,13 @@ function initKeyBindScript() {
function bindAccountKey(key, keyState) { function bindAccountKey(key, keyState) {
logToConsole(LOG_DEBUG, `[VRR.KeyBind]: Binded key ${toUpperCase(getKeyNameFromId(key))} (${key})`); logToConsole(LOG_DEBUG, `[VRR.KeyBind]: Binded key ${toUpperCase(getKeyNameFromId(key))} (${key})`);
keyBinds.push(toInteger(key)); keyBinds.push(toInteger(key));
bindKey(toInteger(key), keyState, function(event) { bindKey(toInteger(key), keyState, function (event) {
if(isAnyGUIActive()) { if (isAnyGUIActive()) {
return false; return false;
} }
if(hasKeyBindDelayElapsed()) { if (hasKeyBindDelayElapsed()) {
if(canLocalPlayerUseKeyBinds()) { if (canLocalPlayerUseKeyBinds()) {
logToConsole(LOG_DEBUG, `[VRR.KeyBind]: Using keybind for key ${toUpperCase(getKeyNameFromId(key))} (${key})`); logToConsole(LOG_DEBUG, `[VRR.KeyBind]: Using keybind for key ${toUpperCase(getKeyNameFromId(key))} (${key})`);
lastKeyBindUse = sdl.ticks; lastKeyBindUse = sdl.ticks;
tellServerPlayerUsedKeyBind(key); tellServerPlayerUsedKeyBind(key);
@@ -56,7 +57,7 @@ function unBindAccountKey(key) {
// =========================================================================== // ===========================================================================
function hasKeyBindDelayElapsed() { function hasKeyBindDelayElapsed() {
if(sdl.ticks-lastKeyBindUse >= keyBindDelayTime) { if (sdl.ticks - lastKeyBindUse >= keyBindDelayTime) {
return true; return true;
} }
@@ -66,15 +67,15 @@ function hasKeyBindDelayElapsed() {
// =========================================================================== // ===========================================================================
function canLocalPlayerUseKeyBinds() { function canLocalPlayerUseKeyBinds() {
if(isAnyGUIActive()) { if (isAnyGUIActive()) {
return false; return false;
} }
if(!isSpawned) { if (!isSpawned) {
return false; return false;
} }
if(itemActionDelayEnabled) { if (itemActionDelayEnabled) {
return false; return false;
} }
@@ -84,7 +85,7 @@ function canLocalPlayerUseKeyBinds() {
// =========================================================================== // ===========================================================================
function clearKeyBinds() { function clearKeyBinds() {
for(let i in keyBinds) { for (let i in keyBinds) {
unbindKey(keyBinds[i]); unbindKey(keyBinds[i]);
} }
keyBinds = []; keyBinds = [];

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: labels.js // FILE: labels.js
// DESC: Provides functionality for world labels (3D labels) // DESC: Provides functionality for world labels (3D labels)

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: locale.js // FILE: locale.js
// DESC: Provides locale functions and usage // DESC: Provides locale functions and usage
@@ -8,18 +9,18 @@
// =========================================================================== // ===========================================================================
function getLocaleString(stringName, ...args) { function getLocaleString(stringName, ...args) {
if(typeof getServerData().localeStrings[localLocaleId][stringName] == undefined) { if (typeof getServerData().localeStrings[localLocaleId][stringName] == undefined) {
return ""; return "";
} }
let tempString = getServerData().localeStrings[localLocaleId][stringName]; let tempString = getServerData().localeStrings[localLocaleId][stringName];
if(tempString == "" || tempString == null || tempString == undefined) { if (tempString == "" || tempString == null || tempString == undefined) {
return ""; return "";
} }
for(let i = 1; i <= args.length; i++) { for (let i = 1; i <= args.length; i++) {
tempString = tempString.replace(`{${i}}`, args[i-1]); tempString = tempString.replace(`{${i}}`, args[i - 1]);
} }
return tempString; return tempString;
@@ -42,7 +43,7 @@ function loadLocaleConfig() {
function loadAllLocaleStrings() { function loadAllLocaleStrings() {
let localeOptions = getServerData().localeOptions; let localeOptions = getServerData().localeOptions;
for(let i in localeOptions) { for (let i in localeOptions) {
logToConsole(LOG_INFO, `[VRR.Locale] Loading locale strings for ${localeOptions[i].englishName} (${i})`); logToConsole(LOG_INFO, `[VRR.Locale] Loading locale strings for ${localeOptions[i].englishName} (${i})`);
let localeFile = loadTextFile(`locale/${localeOptions[i].stringsFile}`); let localeFile = loadTextFile(`locale/${localeOptions[i].stringsFile}`);
let localeData = JSON.parse(localeFile); let localeData = JSON.parse(localeFile);

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: logo.js // FILE: logo.js
// DESC: Provides logo rendering functions // DESC: Provides logo rendering functions
@@ -8,7 +9,7 @@
// =========================================================================== // ===========================================================================
let logoImage = null; let logoImage = null;
let logoPos = toVector2(game.width-132, game.height-132); let logoPos = toVector2(game.width - 132, game.height - 132);
let logoSize = toVector2(128, 128); let logoSize = toVector2(128, 128);
// =========================================================================== // ===========================================================================
@@ -24,7 +25,7 @@ function initLogoScript() {
function loadLogoImage() { function loadLogoImage() {
let logoStream = openFile(mainLogoPath); let logoStream = openFile(mainLogoPath);
let tempLogoImage = null; let tempLogoImage = null;
if(logoStream != null) { if (logoStream != null) {
tempLogoImage = graphics.loadPNG(logoStream); tempLogoImage = graphics.loadPNG(logoStream);
logoStream.close(); logoStream.close();
} }
@@ -35,8 +36,8 @@ function loadLogoImage() {
// =========================================================================== // ===========================================================================
function processLogoRendering() { function processLogoRendering() {
if(renderLogo) { if (renderLogo) {
if(logoImage != null) { if (logoImage != null) {
graphics.drawRectangle(logoImage, logoPos, logoSize); graphics.drawRectangle(logoImage, logoPos, logoSize);
} }
} }

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: main.js // FILE: main.js
// DESC: Main client script (will be reorganized into individual files later) // DESC: Main client script (will be reorganized into individual files later)

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: messaging.js // FILE: messaging.js
// DESC: Provides messaging/textdraw functions and usage // DESC: Provides messaging/textdraw functions and usage
@@ -33,7 +34,7 @@ function initMessagingScript() {
function loadSmallGameMessageFonts() { function loadSmallGameMessageFonts() {
let tempSmallGameMessageFonts = {}; let tempSmallGameMessageFonts = {};
let fontStream = openFile("files/fonts/pricedown.ttf"); let fontStream = openFile("files/fonts/pricedown.ttf");
if(fontStream != null) { if (fontStream != null) {
tempSmallGameMessageFonts["Pricedown"] = lucasFont.createFont(fontStream, 20.0); tempSmallGameMessageFonts["Pricedown"] = lucasFont.createFont(fontStream, 20.0);
fontStream.close(); fontStream.close();
} }
@@ -49,7 +50,7 @@ function loadSmallGameMessageFonts() {
function loadBigGameMessageFont() { function loadBigGameMessageFont() {
let tempBigGameMessageFonts = {}; let tempBigGameMessageFonts = {};
let fontStream = openFile("files/fonts/pricedown.ttf"); let fontStream = openFile("files/fonts/pricedown.ttf");
if(fontStream != null) { if (fontStream != null) {
tempBigGameMessageFonts["Pricedown"] = lucasFont.createFont(fontStream, 28.0); tempBigGameMessageFonts["Pricedown"] = lucasFont.createFont(fontStream, 28.0);
fontStream.close(); fontStream.close();
} }
@@ -63,10 +64,10 @@ function loadBigGameMessageFont() {
// =========================================================================== // ===========================================================================
function processSmallGameMessageRendering() { function processSmallGameMessageRendering() {
if(renderSmallGameMessage) { if (renderSmallGameMessage) {
if(smallGameMessageText != "") { if (smallGameMessageText != "") {
if(smallGameMessageFonts[smallGameMessageFontName] != null) { if (smallGameMessageFonts[smallGameMessageFontName] != null) {
smallGameMessageFonts[smallGameMessageFontName].render(smallGameMessageText, [0, game.height-90], game.width, 0.5, 0.0, smallGameMessageFonts[smallGameMessageFontName].size, smallGameMessageColour, true, true, false, true); smallGameMessageFonts[smallGameMessageFontName].render(smallGameMessageText, [0, game.height - 90], game.width, 0.5, 0.0, smallGameMessageFonts[smallGameMessageFontName].size, smallGameMessageColour, true, true, false, true);
} }
} }
} }
@@ -76,7 +77,7 @@ function processSmallGameMessageRendering() {
function showSmallGameMessage(text, colour, duration, fontName) { function showSmallGameMessage(text, colour, duration, fontName) {
logToConsole(LOG_DEBUG, `[VRR.Messaging] Showing small game message '${text}' using font ${fontName} for ${duration}ms`); logToConsole(LOG_DEBUG, `[VRR.Messaging] Showing small game message '${text}' using font ${fontName} for ${duration}ms`);
if(smallGameMessageText != "") { if (smallGameMessageText != "") {
clearTimeout(smallGameMessageTimer); clearTimeout(smallGameMessageTimer);
} }
@@ -84,7 +85,7 @@ function showSmallGameMessage(text, colour, duration, fontName) {
smallGameMessageColour = colour; smallGameMessageColour = colour;
smallGameMessageText = text; smallGameMessageText = text;
smallGameMessageTimer = setTimeout(function() { smallGameMessageTimer = setTimeout(function () {
smallGameMessageText = ""; smallGameMessageText = "";
smallGameMessageColour = COLOUR_WHITE; smallGameMessageColour = COLOUR_WHITE;
smallGameMessageTimer = null; smallGameMessageTimer = null;

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: nametags.js // FILE: nametags.js
// DESC: Provides nametag rendering // DESC: Provides nametag rendering

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: connected.js // FILE: connected.js
// DESC: Provides wrapped natives for GTA Connected and Mafia Connected mods // DESC: Provides wrapped natives for GTA Connected and Mafia Connected mods

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: netevents.js // FILE: netevents.js
// DESC: Provides server communication and cross-endpoint network events // DESC: Provides server communication and cross-endpoint network events

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: npc.js // FILE: npc.js
// DESC: Provides NPC functions and processing // DESC: Provides NPC functions and processing

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: radio.js // FILE: radio.js
// DESC: Provides internet streaming radio functions and usage // DESC: Provides internet streaming radio functions and usage
@@ -8,21 +9,21 @@
// =========================================================================== // ===========================================================================
function playStreamingRadio(url, loop, volume, element = false) { function playStreamingRadio(url, loop, volume, element = false) {
if(streamingRadio != null) { if (streamingRadio != null) {
streamingRadio.stop(); streamingRadio.stop();
} }
streamingRadioVolume = volume; streamingRadioVolume = volume;
streamingRadio = audio.createSoundFromURL(url, loop); streamingRadio = audio.createSoundFromURL(url, loop);
streamingRadio.volume = volume/100; streamingRadio.volume = volume / 100;
streamingRadio.play(); streamingRadio.play();
} }
// =========================================================================== // ===========================================================================
function stopStreamingRadio() { function stopStreamingRadio() {
if(streamingRadio != null) { if (streamingRadio != null) {
streamingRadio.stop(); streamingRadio.stop();
} }
streamingRadio = null; streamingRadio = null;
@@ -31,16 +32,16 @@ function stopStreamingRadio() {
// =========================================================================== // ===========================================================================
function setStreamingRadioVolume(volume) { function setStreamingRadioVolume(volume) {
if(streamingRadio != null) { if (streamingRadio != null) {
streamingRadioVolume = volume; streamingRadioVolume = volume;
streamingRadio.volume = volume/100; streamingRadio.volume = volume / 100;
} }
} }
// =========================================================================== // ===========================================================================
function playAudioFile(audioName, loop, volume) { function playAudioFile(audioName, loop, volume) {
findResourceByName("connectedrp-extra").exports.playCustomAudio(audioName, volume/100, loop); findResourceByName("connectedrp-extra").exports.playCustomAudio(audioName, volume / 100, loop);
} }
// =========================================================================== // ===========================================================================

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: scoreboard.js // FILE: scoreboard.js
// DESC: Provides scoreboard features and rendering // DESC: Provides scoreboard features and rendering
@@ -38,63 +39,63 @@ function initScoreBoardListFont() {
// =========================================================================== // ===========================================================================
function processScoreBoardRendering() { function processScoreBoardRendering() {
if(isAnyGUIActive()) { if (isAnyGUIActive()) {
return false; return false;
} }
if(renderScoreBoard) { if (renderScoreBoard) {
if(isKeyDown(SDLK_TAB)) { if (isKeyDown(SDLK_TAB)) {
if(scoreBoardListFont != null && scoreBoardTitleFont != null) { if (scoreBoardListFont != null && scoreBoardTitleFont != null) {
let scoreboardStart = (game.height/2)-(Math.floor(getClients().length/2)*20); let scoreboardStart = (game.height / 2) - (Math.floor(getClients().length / 2) * 20);
let titleSize = scoreBoardTitleFont.measure("PLAYERS", game.width, 0.0, 1.0, 10, false, false); let titleSize = scoreBoardTitleFont.measure("PLAYERS", game.width, 0.0, 1.0, 10, false, false);
scoreBoardTitleFont.render("PLAYERS", [game.width/2, scoreboardStart-50], 0, 0.5, 0.0, scoreBoardTitleFont.size, COLOUR_WHITE, false, false, false, true); scoreBoardTitleFont.render("PLAYERS", [game.width / 2, scoreboardStart - 50], 0, 0.5, 0.0, scoreBoardTitleFont.size, COLOUR_WHITE, false, false, false, true);
titleSize = scoreBoardTitleFont.measure("____________________________", game.width, 0.0, 1.0, 10, false, false); titleSize = scoreBoardTitleFont.measure("____________________________", game.width, 0.0, 1.0, 10, false, false);
scoreBoardTitleFont.render("____________________________", [game.width/2, scoreboardStart-35], 0, 0.5, 0.0, scoreBoardTitleFont.size, COLOUR_WHITE, false, false, false, true); scoreBoardTitleFont.render("____________________________", [game.width / 2, scoreboardStart - 35], 0, 0.5, 0.0, scoreBoardTitleFont.size, COLOUR_WHITE, false, false, false, true);
let clients = getClients(); let clients = getClients();
for(let i in clients) { for (let i in clients) {
if(!clients[i].console) { if (!clients[i].console) {
let name = clients[i].name; let name = clients[i].name;
let colour = COLOUR_WHITE; let colour = COLOUR_WHITE;
let paused = false; let paused = false;
let ping = "-1"; let ping = "-1";
if(typeof playerNames[clients[i].name] != "undefined") { if (typeof playerNames[clients[i].name] != "undefined") {
name = playerNames[clients[i].name]; name = playerNames[clients[i].name];
} }
if(typeof playerPaused[clients[i].name] != "undefined") { if (typeof playerPaused[clients[i].name] != "undefined") {
paused = playerPaused[clients[i].name]; paused = playerPaused[clients[i].name];
} }
if(typeof playerColours[clients[i].name] != "undefined") { if (typeof playerColours[clients[i].name] != "undefined") {
colour = playerColours[clients[i].name]; colour = playerColours[clients[i].name];
} }
if(typeof playerPing[clients[i].name] != "undefined") { if (typeof playerPing[clients[i].name] != "undefined") {
ping = toString(playerPing[clients[i].name]); ping = toString(playerPing[clients[i].name]);
} }
// Player ID // Player ID
let text = String(clients[i].index); let text = String(clients[i].index);
let size = scoreBoardListFont.measure(text, 75, 0.0, 1.0, 10, false, false); let size = scoreBoardListFont.measure(text, 75, 0.0, 1.0, 10, false, false);
scoreBoardListFont.render(text, [game.width/2-100, scoreboardStart + (i*20)], 0, 0.5, 0.0, scoreBoardListFont.size, COLOUR_WHITE, false, false, false, true); scoreBoardListFont.render(text, [game.width / 2 - 100, scoreboardStart + (i * 20)], 0, 0.5, 0.0, scoreBoardListFont.size, COLOUR_WHITE, false, false, false, true);
// Player Name // Player Name
text = name; text = name;
size = scoreBoardListFont.measure(text, 100, 0.0, 1.0, 10, false, false); size = scoreBoardListFont.measure(text, 100, 0.0, 1.0, 10, false, false);
scoreBoardListFont.render(text, [game.width/2, scoreboardStart + (i*20)], 0, 0.5, 0.0, scoreBoardListFont.size, colour, false, false, false, true); scoreBoardListFont.render(text, [game.width / 2, scoreboardStart + (i * 20)], 0, 0.5, 0.0, scoreBoardListFont.size, colour, false, false, false, true);
// Ping // Ping
text = ping; text = ping;
size = scoreBoardListFont.measure(ping, 75, 0.0, 1.0, 10, false, false); size = scoreBoardListFont.measure(ping, 75, 0.0, 1.0, 10, false, false);
scoreBoardListFont.render(ping, [game.width/2+100, scoreboardStart + (i*20)], 0, 0.5, 0.0, scoreBoardListFont.size, COLOUR_WHITE, false, false, false, true); scoreBoardListFont.render(ping, [game.width / 2 + 100, scoreboardStart + (i * 20)], 0, 0.5, 0.0, scoreBoardListFont.size, COLOUR_WHITE, false, false, false, true);
// PAUSED Status (depends on resource "afk") // PAUSED Status (depends on resource "afk")
if(paused == true) { if (paused == true) {
size = scoreBoardListFont.measure("PAUSED", 100, 0.0, 1.0, 10, false, false); size = scoreBoardListFont.measure("PAUSED", 100, 0.0, 1.0, 10, false, false);
scoreBoardListFont.render("PAUSED", [game.width/2+200, scoreboardStart + (i*20)], 0, 0.5, 0.0, scoreBoardListFont.size, pausedColour, false, false, false, true); scoreBoardListFont.render("PAUSED", [game.width / 2 + 200, scoreboardStart + (i * 20)], 0, 0.5, 0.0, scoreBoardListFont.size, pausedColour, false, false, false, true);
} }
} }
} }

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: skin-select.js // FILE: skin-select.js
// DESC: Provides skin-selector functions and usage // DESC: Provides skin-selector functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: startup.js // FILE: startup.js
// DESC: Provides startup/shutdown procedures // DESC: Provides startup/shutdown procedures

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: sync.js // FILE: sync.js
// DESC: Provides some elements and data sync // DESC: Provides some elements and data sync

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: utilities.js // FILE: utilities.js
// DESC: Provides util functions and arrays with data // DESC: Provides util functions and arrays with data

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: vehicle.js // FILE: vehicle.js
// DESC: Provides vehicle functions and arrays with data // DESC: Provides vehicle functions and arrays with data

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: accent.js // FILE: accent.js
// DESC: Provides accent functions and usage // DESC: Provides accent functions and usage
@@ -27,7 +28,7 @@ function doesPlayerHaveAccent(client) {
function getPlayerAccentInlineOutput(client) { function getPlayerAccentInlineOutput(client) {
let outputText = ""; let outputText = "";
if(doesPlayerHaveAccent(client)) { if (doesPlayerHaveAccent(client)) {
outputText = `[${getPlayerAccentText(client)}] `; outputText = `[${getPlayerAccentText(client)}] `;
} }
@@ -37,14 +38,14 @@ function getPlayerAccentInlineOutput(client) {
// =========================================================================== // ===========================================================================
function setAccentCommand(command, params, client) { function setAccentCommand(command, params, client) {
if(areParamsEmpty(params)) { if (areParamsEmpty(params)) {
messagePlayerSyntax(client, getCommandSyntaxText(command)); messagePlayerSyntax(client, getCommandSyntaxText(command));
return false; return false;
} }
let accentId = getAccentFromParams(params); let accentId = getAccentFromParams(params);
if(!accentId) { if (!accentId) {
messagePlayerError(client, getLocaleString(client, "AccentNotFound")); messagePlayerError(client, getLocaleString(client, "AccentNotFound"));
return false; return false;
} }
@@ -64,7 +65,7 @@ function listAccentsCommand(command, params, client) {
let chunkedList = splitArrayIntoChunks(accentList, 8); let chunkedList = splitArrayIntoChunks(accentList, 8);
messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "AccentsListHeader"))); messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "AccentsListHeader")));
for(let i in chunkedList) { for (let i in chunkedList) {
messagePlayerInfo(client, chunkedList[i].join(", ")); messagePlayerInfo(client, chunkedList[i].join(", "));
} }
} }
@@ -72,14 +73,14 @@ function listAccentsCommand(command, params, client) {
// =========================================================================== // ===========================================================================
function getAccentFromParams(params) { function getAccentFromParams(params) {
if(isNaN(params)) { if (isNaN(params)) {
for(let i in getGlobalConfig().accents) { for (let i in getGlobalConfig().accents) {
if(toLowerCase(getGlobalConfig().accents[i]).indexOf(toLowerCase(params)) != -1) { if (toLowerCase(getGlobalConfig().accents[i]).indexOf(toLowerCase(params)) != -1) {
return i; return i;
} }
} }
} else { } else {
if(typeof getGlobalConfig().accents[params] != "undefined") { if (typeof getGlobalConfig().accents[params] != "undefined") {
return toInteger(params); return toInteger(params);
} }
} }
@@ -97,14 +98,14 @@ function reloadAccentConfigurationCommand(command, params, client) {
// =========================================================================== // ===========================================================================
function addAccentCommand(command, params, client) { function addAccentCommand(command, params, client) {
if(areParamsEmpty(params)) { if (areParamsEmpty(params)) {
messagePlayerSyntax(client, getCommandSyntaxText(command)); messagePlayerSyntax(client, getCommandSyntaxText(command));
return false; return false;
} }
let newAccentName = params; let newAccentName = params;
if(getAccentFromParams(newAccentName) != false) { if (getAccentFromParams(newAccentName) != false) {
messagePlayerError(client, `That accent already exists!`) messagePlayerError(client, `That accent already exists!`)
return false; return false;
} }
@@ -117,14 +118,14 @@ function addAccentCommand(command, params, client) {
// =========================================================================== // ===========================================================================
function removeAccentCommand(command, params, client) { function removeAccentCommand(command, params, client) {
if(areParamsEmpty(params)) { if (areParamsEmpty(params)) {
messagePlayerSyntax(client, getCommandSyntaxText(command)); messagePlayerSyntax(client, getCommandSyntaxText(command));
return false; return false;
} }
let newAccentName = params; let newAccentName = params;
if(!getAccentFromParams(newAccentName)) { if (!getAccentFromParams(newAccentName)) {
messagePlayerError(client, `That accent doesn't exist!`) messagePlayerError(client, `That accent doesn't exist!`)
return false; return false;
} }

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: account.js // FILE: account.js
// DESC: Provides account functions and usage // DESC: Provides account functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: animation.js // FILE: animation.js
// DESC: Provides animation functions and usage // DESC: Provides animation functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: anticheat.js // FILE: anticheat.js
// DESC: Provides anticheat functions and usage // DESC: Provides anticheat functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: bans.js // FILE: bans.js
// DESC: Provides ban functions and usage // DESC: Provides ban functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: bank.js // FILE: bank.js
// DESC: Provides banking functions and usage // DESC: Provides banking functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: bitflags.js // FILE: bitflags.js
// DESC: Provides bitwise operations, functions and usage // DESC: Provides bitwise operations, functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: business.js // FILE: business.js
// DESC: Provides business functions and usage // DESC: Provides business functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: chat.js // FILE: chat.js
// DESC: Provides chat functions and usage // DESC: Provides chat functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: clan.js // FILE: clan.js
// DESC: Provides clan functions and usage // DESC: Provides clan functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: client.js // FILE: client.js
// DESC: Provides client communication and cross-endpoint operations // DESC: Provides client communication and cross-endpoint operations

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: command.js // FILE: command.js
// DESC: Provides command data, functions and usage // DESC: Provides command data, functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: config.js // FILE: config.js
// DESC: Provides server configuration // DESC: Provides server configuration

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: core.js // FILE: core.js
// DESC: Provides core data structures, function, and operations // DESC: Provides core data structures, function, and operations

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: crime.js // FILE: crime.js
// DESC: Provides crime data structures, functions, and operations // DESC: Provides crime data structures, functions, and operations
@@ -10,7 +11,7 @@
/** /**
* @class Representing a crime's data. Loaded and saved in the database * @class Representing a crime's data. Loaded and saved in the database
*/ */
class CrimeData { class CrimeData {
constructor(suspectId, crimeType, reporterId = 0) { constructor(suspectId, crimeType, reporterId = 0) {
this.crimeType = crimeType; this.crimeType = crimeType;
this.suspectId = suspectId; this.suspectId = suspectId;

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: database.js // FILE: database.js
// DESC: Provides database handling, functions and usage // DESC: Provides database handling, functions and usage
@@ -24,13 +25,13 @@ function createDatabaseInsertQuery(tableName, data) {
let fields = []; let fields = [];
let values = []; let values = [];
for(let i in data) { for (let i in data) {
if(data[i][1] != "undefined" && data[i][1] != NaN && data[i][0] != 'NaN') { if (data[i][1] != "undefined" && data[i][1] != NaN && data[i][0] != 'NaN') {
if(data[i][1] != "undefined" && data[i][1] != NaN && data[i][1] != 'NaN') { if (data[i][1] != "undefined" && data[i][1] != NaN && data[i][1] != 'NaN') {
fields.push(data[i][0]); fields.push(data[i][0]);
if(typeof data[i][1] == "string") { if (typeof data[i][1] == "string") {
if(data[i][1] == "{UNIXTIMESTAMP}") { if (data[i][1] == "{UNIXTIMESTAMP}") {
values.push("UNIX_TIMESTAMP()"); values.push("UNIX_TIMESTAMP()");
} else { } else {
values.push(`'${data[i][1]}'`); values.push(`'${data[i][1]}'`);
@@ -51,11 +52,11 @@ function createDatabaseInsertQuery(tableName, data) {
function createDatabaseUpdateQuery(tableName, data, whereClause) { function createDatabaseUpdateQuery(tableName, data, whereClause) {
let values = []; let values = [];
for(let i in data) { for (let i in data) {
if(data[i][0] != "undefined" && data[i][0] != NaN && data[i][0] != 'NaN') { if (data[i][0] != "undefined" && data[i][0] != NaN && data[i][0] != 'NaN') {
if(data[i][1] != "undefined" && data[i][1] != NaN && data[i][1] != 'NaN') { if (data[i][1] != "undefined" && data[i][1] != NaN && data[i][1] != 'NaN') {
if(typeof data[i][1] == "string") { if (typeof data[i][1] == "string") {
if(data[i][1] == "{UNIXTIMESTAMP}") { if (data[i][1] == "{UNIXTIMESTAMP}") {
values.push(`${data[i][0]}=UNIX_TIMESTAMP()`); values.push(`${data[i][0]}=UNIX_TIMESTAMP()`);
} else { } else {
values.push(`${data[i][0]}='${data[i][1]}'`); values.push(`${data[i][0]}='${data[i][1]}'`);

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: developer.js // FILE: developer.js
// DESC: Provides developer operation, commands, functions and usage // DESC: Provides developer operation, commands, functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: discord.js // FILE: discord.js
// DESC: Provides discord bridging and connection functions and usage // DESC: Provides discord bridging and connection functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: economy.js // FILE: economy.js
// DESC: Provides economy/financial utils, functions and usage // DESC: Provides economy/financial utils, functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: email.js // FILE: email.js
// DESC: Provides email handling, functions and usage // DESC: Provides email handling, functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: event.js // FILE: event.js
// DESC: Provides handlers for built in GTAC and Asshat-Gaming created events // DESC: Provides handlers for built in GTAC and Asshat-Gaming created events

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: fishing.js // FILE: fishing.js
// DESC: Provides fishing functions and commands // DESC: Provides fishing functions and commands

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: forensics.js // FILE: forensics.js
// DESC: Provides forensics functions and commands (bullet casings, blood, etc) // DESC: Provides forensics functions and commands (bullet casings, blood, etc)

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: gate.js // FILE: gate.js
// DESC: Provides gate functions and commands // DESC: Provides gate functions and commands

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: gps.js // FILE: gps.js
// DESC: Provides GPS functions and commands // DESC: Provides GPS functions and commands

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: gui.js // FILE: gui.js
// DESC: Provides GUI functions and usage // DESC: Provides GUI functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: help.js // FILE: help.js
// DESC: Provides update info, help commands, and documentation // DESC: Provides update info, help commands, and documentation

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: house.js // FILE: house.js
// DESC: Provides house commands, functions, and usage // DESC: Provides house commands, functions, and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: insurance.js // FILE: insurance.js
// DESC: Provides insurance commands, functions, and usage // DESC: Provides insurance commands, functions, and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: item.js // FILE: item.js
// DESC: Provides item functions and usage // DESC: Provides item functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: drink.js // FILE: drink.js
// DESC: Provides features and usage for the drink item type // DESC: Provides features and usage for the drink item type

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: food.js // FILE: food.js
// DESC: Provides features and usage for the food item type // DESC: Provides features and usage for the food item type

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: handcuff.js // FILE: handcuff.js
// DESC: Provides features and usage for the handcuff item type // DESC: Provides features and usage for the handcuff item type

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: phone.js // FILE: phone.js
// DESC: Provides features and usage for the phone item type // DESC: Provides features and usage for the phone item type

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: handcuff.js // FILE: handcuff.js
// DESC: Provides features and usage for the handcuff item type // DESC: Provides features and usage for the handcuff item type

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: tazer.js // FILE: tazer.js
// DESC: Provides features and usage for the tazer item type // DESC: Provides features and usage for the tazer item type

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: walkie-talkie.js // FILE: walkie-talkie.js
// DESC: Provides features and usage for the walkie-talkie item type // DESC: Provides features and usage for the walkie-talkie item type

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: job.js // FILE: job.js
// DESC: Provides job functions and usage // DESC: Provides job functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: bus.js // FILE: bus.js
// DESC: Provides bus driver job functions and usage // DESC: Provides bus driver job functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: drug.js // FILE: drug.js
// DESC: Provides drug runner/dealer job functions and usage // DESC: Provides drug runner/dealer job functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: fire.js // FILE: fire.js
// DESC: Provides firefighter job functions and usage // DESC: Provides firefighter job functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: garbage.js // FILE: garbage.js
// DESC: Provides garbage collector job functions and usage // DESC: Provides garbage collector job functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: medic.js // FILE: medic.js
// DESC: Provides paramedic job functions and usage // DESC: Provides paramedic job functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: pizza-delivery.js // FILE: pizza-delivery.js
// DESC: Provides pizza delivery driver job functions and usage // DESC: Provides pizza delivery driver job functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: police.js // FILE: police.js
// DESC: Provides police officer job functions and usage // DESC: Provides police officer job functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: taxi.js // FILE: taxi.js
// DESC: Provides taxi driver job functions and usage // DESC: Provides taxi driver job functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: weapon.js // FILE: weapon.js
// DESC: Provides weapons dealer job functions and usage // DESC: Provides weapons dealer job functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: keybind.js // FILE: keybind.js
// DESC: Provides keybind handlers and functions // DESC: Provides keybind handlers and functions

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: locale.js // FILE: locale.js
// DESC: Provides locale structures, functions and usage // DESC: Provides locale structures, functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: messaging.js // FILE: messaging.js
// DESC: Provides messaging functions and usage // DESC: Provides messaging functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: misc.js // FILE: misc.js
// DESC: Provides any uncategorized functions and usage // DESC: Provides any uncategorized functions and usage

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: connected.js // FILE: connected.js
// DESC: Provides wrapped natives for GTA Connected and Mafia Connected mods // DESC: Provides wrapped natives for GTA Connected and Mafia Connected mods

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: connected.js // FILE: connected.js
// DESC: Provides wrapped natives for GTA Connected and Mafia Connected mods // DESC: Provides wrapped natives for GTA Connected and Mafia Connected mods

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: netevents.js // FILE: netevents.js
// DESC: Provides client communication and cross-endpoint network events // DESC: Provides client communication and cross-endpoint network events

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: npc.js // FILE: npc.js
// DESC: Provides NPC usage and functions // DESC: Provides NPC usage and functions

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: paintball.js // FILE: paintball.js
// DESC: Provides paintball/airsoft arena functions and commands // DESC: Provides paintball/airsoft arena functions and commands

View File

@@ -1,6 +1,7 @@
// =========================================================================== // ===========================================================================
// Vortrex's Roleplay Resource // Asshat Gaming Roleplay
// https://github.com/VortrexFTW/gtac_roleplay // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: race.js // FILE: race.js
// DESC: Provides racing usage and functions // DESC: Provides racing usage and functions
@@ -19,7 +20,7 @@ function initRaceScript() {
* @return {RaceData} The race's data (class instance) * @return {RaceData} The race's data (class instance)
*/ */
function getRaceData(raceId) { function getRaceData(raceId) {
if(typeof getServerData().races[raceId] != "undefined") { if (typeof getServerData().races[raceId] != "undefined") {
return getServerData().races[raceId]; return getServerData().races[raceId];
} }
return false; return false;
@@ -28,7 +29,7 @@ function getRaceData(raceId) {
// =========================================================================== // ===========================================================================
function setAllRaceDataIndexes() { function setAllRaceDataIndexes() {
for(let i in getServerData().races) { for (let i in getServerData().races) {
getServerData().races[i].index = i; getServerData().races[i].index = i;
} }
} }
@@ -43,11 +44,11 @@ function loadRacesFromDatabase() {
// =========================================================================== // ===========================================================================
function saveRacesToDatabase() { function saveRacesToDatabase() {
if(getServerConfig().devServer) { if (getServerConfig().devServer) {
return false; return false;
} }
for(let i in getServerData().races) { for (let i in getServerData().races) {
saveRaceToDatabase(getServerData().races[i]); saveRaceToDatabase(getServerData().races[i]);
} }
} }
@@ -61,14 +62,14 @@ function saveRaceToDatabase(raceData) {
// =========================================================================== // ===========================================================================
function createRaceCommand(command, params, client) { function createRaceCommand(command, params, client) {
if(areParamsEmpty(params)) { if (areParamsEmpty(params)) {
messagePlayerSyntax(client, getCommandSyntaxText(command)); messagePlayerSyntax(client, getCommandSyntaxText(command));
return false; return false;
} }
let raceId = getRaceFromParams(params); let raceId = getRaceFromParams(params);
if(raceId == false) { if (raceId == false) {
messagePlayerError(client, "A race with that name already exists!"); messagePlayerError(client, "A race with that name already exists!");
return false; return false;
} }
@@ -80,7 +81,7 @@ function createRaceCommand(command, params, client) {
// =========================================================================== // ===========================================================================
function createRaceCommand(command, params, client) { function createRaceCommand(command, params, client) {
if(areParamsEmpty(params)) { if (areParamsEmpty(params)) {
messagePlayerSyntax(client, getCommandSyntaxText(command)); messagePlayerSyntax(client, getCommandSyntaxText(command));
return false; return false;
} }
@@ -95,13 +96,13 @@ function createRaceCommand(command, params, client) {
// =========================================================================== // ===========================================================================
function createRaceLocationCommand(command, params, client) { function createRaceLocationCommand(command, params, client) {
if(areParamsEmpty(params)) { if (areParamsEmpty(params)) {
messagePlayerSyntax(client, getCommandSyntaxText(command)); messagePlayerSyntax(client, getCommandSyntaxText(command));
return false; return false;
} }
let raceId = getPlayerRace(client); let raceId = getPlayerRace(client);
if(raceId == false) { if (raceId == false) {
messagePlayerError(client, "You are not in a race!"); messagePlayerError(client, "You are not in a race!");
return false; return false;
} }
@@ -115,13 +116,13 @@ function createRaceLocationCommand(command, params, client) {
// =========================================================================== // ===========================================================================
function createRaceLocationCommand(command, params, client) { function createRaceLocationCommand(command, params, client) {
if(areParamsEmpty(params)) { if (areParamsEmpty(params)) {
messagePlayerSyntax(client, getCommandSyntaxText(command)); messagePlayerSyntax(client, getCommandSyntaxText(command));
return false; return false;
} }
let raceId = getPlayerRace(client); let raceId = getPlayerRace(client);
if(raceId == false) { if (raceId == false) {
messagePlayerError(client, "You are not in a race!"); messagePlayerError(client, "You are not in a race!");
return false; return false;
} }
@@ -135,7 +136,7 @@ function createRaceLocationCommand(command, params, client) {
// =========================================================================== // ===========================================================================
function stopRacingCommand(command, params, client) { function stopRacingCommand(command, params, client) {
if(!isPlayerInARace(client)) { if (!isPlayerInARace(client)) {
messagePlayerError(client, "You aren't in a race!"); messagePlayerError(client, "You aren't in a race!");
return false; return false;
} }

Some files were not shown because too many files have changed in this diff Show More