Update header
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: afk.js
|
||||
// DESC: Provides AFK detection
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: animation.js
|
||||
// DESC: Provides animation functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: business.js
|
||||
// DESC: Provides business functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: chatbox.js
|
||||
// DESC: Provides extra chatbox features
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: content.js
|
||||
// DESC: Provides connection to extra content resources
|
||||
@@ -9,10 +10,10 @@
|
||||
|
||||
function getCustomImage(imageName) {
|
||||
let contentResource = findResourceByName(getGameConfig().extraContentResource[getGame()]);
|
||||
if(contentResource != null) {
|
||||
if(contentResource.isStarted) {
|
||||
if (contentResource != null) {
|
||||
if (contentResource.isStarted) {
|
||||
let image = contentResource.exports.getCustomImage(imageName);
|
||||
if(image != null) {
|
||||
if (image != null) {
|
||||
return image;
|
||||
}
|
||||
}
|
||||
@@ -24,10 +25,10 @@ function getCustomImage(imageName) {
|
||||
|
||||
function getCustomFont(fontName) {
|
||||
let contentResource = findResourceByName(getGameConfig().extraContentResource[getGame()]);
|
||||
if(contentResource != null) {
|
||||
if(contentResource.isStarted) {
|
||||
if (contentResource != null) {
|
||||
if (contentResource.isStarted) {
|
||||
let font = contentResource.exports.getCustomFont(fontName);
|
||||
if(font != null) {
|
||||
if (font != null) {
|
||||
return font;
|
||||
}
|
||||
}
|
||||
@@ -39,10 +40,10 @@ function getCustomFont(fontName) {
|
||||
|
||||
function getCustomAudio(audioName) {
|
||||
let contentResource = findResourceByName(getGameConfig().extraContentResource[getGame()]);
|
||||
if(contentResource != null) {
|
||||
if(contentResource.isStarted) {
|
||||
if (contentResource != null) {
|
||||
if (contentResource.isStarted) {
|
||||
let audioFile = contentResource.exports.getCustomAudio(audioName);
|
||||
if(audioFile != null) {
|
||||
if (audioFile != null) {
|
||||
return audioFile;
|
||||
}
|
||||
}
|
||||
@@ -54,8 +55,8 @@ function getCustomAudio(audioName) {
|
||||
|
||||
function playCustomAudio(audioName, volume = 0.5, loop = false) {
|
||||
let contentResource = findResourceByName(getGameConfig().extraContentResource[getGame()]);
|
||||
if(contentResource != null) {
|
||||
if(contentResource.isStarted) {
|
||||
if (contentResource != null) {
|
||||
if (contentResource.isStarted) {
|
||||
contentResource.exports.playCustomAudio(audioName, volume, loop);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: event.js
|
||||
// DESC: Provides handlers for built in GTAC and Asshat-Gaming created events
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: gps.js
|
||||
// DESC: Provides GPS functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: gui.js
|
||||
// DESC: Provides GUI functionality and styles (using MexUI)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: 2fa.js
|
||||
// DESC: Provides two factor authentication GUI
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: bizmgr.js
|
||||
// DESC: Provides business manager GUI
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: changepass.js
|
||||
// DESC: Provides change password GUI
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: charselect.js
|
||||
// DESC: Provides character select GUI
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: clanmgr.js
|
||||
// DESC: Provides clan manager GUI
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: error.js
|
||||
// DESC: Provides error box GUI
|
||||
@@ -17,7 +18,7 @@ let errorDialog = {
|
||||
|
||||
function initErrorDialogGUI() {
|
||||
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: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
transitionTime: 500,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: housemgr.js
|
||||
// DESC: Provides house manager GUI
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: info.js
|
||||
// DESC: Provides info dialog box GUI
|
||||
@@ -16,8 +17,8 @@ let infoDialog = {
|
||||
// ===========================================================================
|
||||
|
||||
function initInfoDialogGUI() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Creating info dialog GUI ...`);
|
||||
infoDialog.window = mexui.window(getScreenWidth()/2-200, getScreenHeight()/2-70, 400, 140, 'Information', {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Creating info dialog GUI ...`);
|
||||
infoDialog.window = mexui.window(getScreenWidth() / 2 - 200, getScreenHeight() / 2 - 70, 400, 140, 'Information', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
},
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: list.js
|
||||
// DESC: Provides simple list GUI
|
||||
@@ -16,8 +17,8 @@ let listDialog = {
|
||||
// ===========================================================================
|
||||
|
||||
function initListGUI() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Creating list dialog GUI ...`);
|
||||
listDialog.window = mexui.window(game.width/2-200, game.height/2-70, 400, 500, 'List', {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Creating list dialog GUI ...`);
|
||||
listDialog.window = mexui.window(game.width / 2 - 200, game.height / 2 - 70, 400, 500, 'List', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
},
|
||||
@@ -50,21 +51,21 @@ function initListGUI() {
|
||||
|
||||
listDialog.listGrid = listDialog.window.grid(5, 25, 390, 450, {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
},
|
||||
column: {
|
||||
lineColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], windowTitleAlpha),
|
||||
lineColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], windowTitleAlpha),
|
||||
},
|
||||
header: {
|
||||
backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], windowTitleAlpha-50),
|
||||
textColour: toColour(primaryTextColour[0], primaryTextColour[1], primaryTextColour[2], windowTitleAlpha),
|
||||
header: {
|
||||
backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], windowTitleAlpha - 50),
|
||||
textColour: toColour(primaryTextColour[0], primaryTextColour[1], primaryTextColour[2], windowTitleAlpha),
|
||||
},
|
||||
cell: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
textColour: toColour(primaryTextColour[0], primaryTextColour[1], primaryTextColour[2], windowTitleAlpha),
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
textColour: toColour(primaryTextColour[0], primaryTextColour[1], primaryTextColour[2], windowTitleAlpha),
|
||||
},
|
||||
row: {
|
||||
lineColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], windowTitleAlpha),
|
||||
lineColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], windowTitleAlpha),
|
||||
hover: {
|
||||
backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], 120),
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: localechooser.js
|
||||
// DESC: Provides locale chooser GUI
|
||||
@@ -19,8 +20,8 @@ let flagImageGap = toVector2(5, 5);
|
||||
// ===========================================================================
|
||||
|
||||
function initLocaleChooserGUI() {
|
||||
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', {
|
||||
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', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], 0),
|
||||
},
|
||||
@@ -53,10 +54,10 @@ function closeLocaleChooserGUI() {
|
||||
// ===========================================================================
|
||||
|
||||
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;
|
||||
} 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();
|
||||
@@ -68,7 +69,7 @@ function showLocaleChooserGUI(position = toVector2(0.0, 0.0)) {
|
||||
// ===========================================================================
|
||||
|
||||
function toggleLocaleChooserGUI() {
|
||||
if(localeChooser.window.shown) {
|
||||
if (localeChooser.window.shown) {
|
||||
closeLocaleChooserGUI();
|
||||
} else {
|
||||
showLocaleChooserGUI();
|
||||
@@ -78,36 +79,36 @@ function toggleLocaleChooserGUI() {
|
||||
// ===========================================================================
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
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 = getAvailableLocaleOptions();
|
||||
|
||||
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.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);
|
||||
|
||||
for(let i in localeChooser.flagImages) {
|
||||
for (let i in localeChooser.flagImages) {
|
||||
localeChooser.flagImages[i].remove();
|
||||
}
|
||||
|
||||
for(let i in tempLocaleOptions) {
|
||||
for (let i in tempLocaleOptions) {
|
||||
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: {
|
||||
borderColour: toColour(0, 0, 0, 0),
|
||||
},
|
||||
}, function() {
|
||||
}, function () {
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: login.js
|
||||
// DESC: Provides login GUI
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: newchar.js
|
||||
// DESC: Provides new character creation GUI
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: register.js
|
||||
// DESC: Provides account registration GUI
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: resetpass.js
|
||||
// DESC: Provides password reset GUI
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: yesno.js
|
||||
// DESC: Provides yes/no prompt dialog GUI
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: house.js
|
||||
// DESC: Provides house functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: item.js
|
||||
// DESC: Provides item action and hotbar functions
|
||||
@@ -10,7 +11,7 @@
|
||||
let itemActionDelayDuration = 0;
|
||||
let itemActionDelayStart = 0;
|
||||
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);
|
||||
|
||||
// ===========================================================================
|
||||
@@ -23,22 +24,22 @@ function initItemScript() {
|
||||
// ===========================================================================
|
||||
|
||||
function processItemActionRendering() {
|
||||
if(renderItemActionDelay) {
|
||||
if(itemActionDelayEnabled) {
|
||||
let finishTime = itemActionDelayStart+itemActionDelayDuration;
|
||||
if(sdl.ticks >= finishTime) {
|
||||
if (renderItemActionDelay) {
|
||||
if (itemActionDelayEnabled) {
|
||||
let finishTime = itemActionDelayStart + itemActionDelayDuration;
|
||||
if (sdl.ticks >= finishTime) {
|
||||
itemActionDelayEnabled = false;
|
||||
itemActionDelayDuration = 0;
|
||||
itemActionDelayStart = 0;
|
||||
tellServerItemActionDelayComplete();
|
||||
} else {
|
||||
let currentTick = sdl.ticks-itemActionDelayStart;
|
||||
let progressPercent = Math.ceil(currentTick*100/itemActionDelayDuration);
|
||||
let currentTick = sdl.ticks - itemActionDelayStart;
|
||||
let progressPercent = Math.ceil(currentTick * 100 / itemActionDelayDuration);
|
||||
let width = Math.ceil(getPercentage(itemActionDelaySize.x, progressPercent));
|
||||
|
||||
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), 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) - 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: job.js
|
||||
// DESC: Provides job functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: keybind.js
|
||||
// DESC: Provides keybind features
|
||||
@@ -25,13 +26,13 @@ function initKeyBindScript() {
|
||||
function bindAccountKey(key, keyState) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.KeyBind]: Binded key ${toUpperCase(getKeyNameFromId(key))} (${key})`);
|
||||
keyBinds.push(toInteger(key));
|
||||
bindKey(toInteger(key), keyState, function(event) {
|
||||
if(isAnyGUIActive()) {
|
||||
bindKey(toInteger(key), keyState, function (event) {
|
||||
if (isAnyGUIActive()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(hasKeyBindDelayElapsed()) {
|
||||
if(canLocalPlayerUseKeyBinds()) {
|
||||
if (hasKeyBindDelayElapsed()) {
|
||||
if (canLocalPlayerUseKeyBinds()) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.KeyBind]: Using keybind for key ${toUpperCase(getKeyNameFromId(key))} (${key})`);
|
||||
lastKeyBindUse = sdl.ticks;
|
||||
tellServerPlayerUsedKeyBind(key);
|
||||
@@ -56,7 +57,7 @@ function unBindAccountKey(key) {
|
||||
// ===========================================================================
|
||||
|
||||
function hasKeyBindDelayElapsed() {
|
||||
if(sdl.ticks-lastKeyBindUse >= keyBindDelayTime) {
|
||||
if (sdl.ticks - lastKeyBindUse >= keyBindDelayTime) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -66,15 +67,15 @@ function hasKeyBindDelayElapsed() {
|
||||
// ===========================================================================
|
||||
|
||||
function canLocalPlayerUseKeyBinds() {
|
||||
if(isAnyGUIActive()) {
|
||||
if (isAnyGUIActive()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!isSpawned) {
|
||||
if (!isSpawned) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(itemActionDelayEnabled) {
|
||||
if (itemActionDelayEnabled) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -84,7 +85,7 @@ function canLocalPlayerUseKeyBinds() {
|
||||
// ===========================================================================
|
||||
|
||||
function clearKeyBinds() {
|
||||
for(let i in keyBinds) {
|
||||
for (let i in keyBinds) {
|
||||
unbindKey(keyBinds[i]);
|
||||
}
|
||||
keyBinds = [];
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: labels.js
|
||||
// DESC: Provides functionality for world labels (3D labels)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: locale.js
|
||||
// DESC: Provides locale functions and usage
|
||||
@@ -8,18 +9,18 @@
|
||||
// ===========================================================================
|
||||
|
||||
function getLocaleString(stringName, ...args) {
|
||||
if(typeof getServerData().localeStrings[localLocaleId][stringName] == undefined) {
|
||||
if (typeof getServerData().localeStrings[localLocaleId][stringName] == undefined) {
|
||||
return "";
|
||||
}
|
||||
|
||||
let tempString = getServerData().localeStrings[localLocaleId][stringName];
|
||||
|
||||
if(tempString == "" || tempString == null || tempString == undefined) {
|
||||
if (tempString == "" || tempString == null || tempString == undefined) {
|
||||
return "";
|
||||
}
|
||||
|
||||
for(let i = 1; i <= args.length; i++) {
|
||||
tempString = tempString.replace(`{${i}}`, args[i-1]);
|
||||
for (let i = 1; i <= args.length; i++) {
|
||||
tempString = tempString.replace(`{${i}}`, args[i - 1]);
|
||||
}
|
||||
|
||||
return tempString;
|
||||
@@ -42,7 +43,7 @@ function loadLocaleConfig() {
|
||||
|
||||
function loadAllLocaleStrings() {
|
||||
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})`);
|
||||
let localeFile = loadTextFile(`locale/${localeOptions[i].stringsFile}`);
|
||||
let localeData = JSON.parse(localeFile);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: logo.js
|
||||
// DESC: Provides logo rendering functions
|
||||
@@ -8,7 +9,7 @@
|
||||
// ===========================================================================
|
||||
|
||||
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);
|
||||
|
||||
// ===========================================================================
|
||||
@@ -24,7 +25,7 @@ function initLogoScript() {
|
||||
function loadLogoImage() {
|
||||
let logoStream = openFile(mainLogoPath);
|
||||
let tempLogoImage = null;
|
||||
if(logoStream != null) {
|
||||
if (logoStream != null) {
|
||||
tempLogoImage = graphics.loadPNG(logoStream);
|
||||
logoStream.close();
|
||||
}
|
||||
@@ -35,8 +36,8 @@ function loadLogoImage() {
|
||||
// ===========================================================================
|
||||
|
||||
function processLogoRendering() {
|
||||
if(renderLogo) {
|
||||
if(logoImage != null) {
|
||||
if (renderLogo) {
|
||||
if (logoImage != null) {
|
||||
graphics.drawRectangle(logoImage, logoPos, logoSize);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: main.js
|
||||
// DESC: Main client script (will be reorganized into individual files later)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: messaging.js
|
||||
// DESC: Provides messaging/textdraw functions and usage
|
||||
@@ -33,7 +34,7 @@ function initMessagingScript() {
|
||||
function loadSmallGameMessageFonts() {
|
||||
let tempSmallGameMessageFonts = {};
|
||||
let fontStream = openFile("files/fonts/pricedown.ttf");
|
||||
if(fontStream != null) {
|
||||
if (fontStream != null) {
|
||||
tempSmallGameMessageFonts["Pricedown"] = lucasFont.createFont(fontStream, 20.0);
|
||||
fontStream.close();
|
||||
}
|
||||
@@ -49,7 +50,7 @@ function loadSmallGameMessageFonts() {
|
||||
function loadBigGameMessageFont() {
|
||||
let tempBigGameMessageFonts = {};
|
||||
let fontStream = openFile("files/fonts/pricedown.ttf");
|
||||
if(fontStream != null) {
|
||||
if (fontStream != null) {
|
||||
tempBigGameMessageFonts["Pricedown"] = lucasFont.createFont(fontStream, 28.0);
|
||||
fontStream.close();
|
||||
}
|
||||
@@ -63,10 +64,10 @@ function loadBigGameMessageFont() {
|
||||
// ===========================================================================
|
||||
|
||||
function processSmallGameMessageRendering() {
|
||||
if(renderSmallGameMessage) {
|
||||
if(smallGameMessageText != "") {
|
||||
if(smallGameMessageFonts[smallGameMessageFontName] != null) {
|
||||
smallGameMessageFonts[smallGameMessageFontName].render(smallGameMessageText, [0, game.height-90], game.width, 0.5, 0.0, smallGameMessageFonts[smallGameMessageFontName].size, smallGameMessageColour, true, true, false, true);
|
||||
if (renderSmallGameMessage) {
|
||||
if (smallGameMessageText != "") {
|
||||
if (smallGameMessageFonts[smallGameMessageFontName] != null) {
|
||||
smallGameMessageFonts[smallGameMessageFontName].render(smallGameMessageText, [0, game.height - 90], game.width, 0.5, 0.0, smallGameMessageFonts[smallGameMessageFontName].size, smallGameMessageColour, true, true, false, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -76,7 +77,7 @@ function processSmallGameMessageRendering() {
|
||||
|
||||
function showSmallGameMessage(text, colour, duration, fontName) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Messaging] Showing small game message '${text}' using font ${fontName} for ${duration}ms`);
|
||||
if(smallGameMessageText != "") {
|
||||
if (smallGameMessageText != "") {
|
||||
clearTimeout(smallGameMessageTimer);
|
||||
}
|
||||
|
||||
@@ -84,7 +85,7 @@ function showSmallGameMessage(text, colour, duration, fontName) {
|
||||
smallGameMessageColour = colour;
|
||||
smallGameMessageText = text;
|
||||
|
||||
smallGameMessageTimer = setTimeout(function() {
|
||||
smallGameMessageTimer = setTimeout(function () {
|
||||
smallGameMessageText = "";
|
||||
smallGameMessageColour = COLOUR_WHITE;
|
||||
smallGameMessageTimer = null;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: nametags.js
|
||||
// DESC: Provides nametag rendering
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: connected.js
|
||||
// DESC: Provides wrapped natives for GTA Connected and Mafia Connected mods
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: netevents.js
|
||||
// DESC: Provides server communication and cross-endpoint network events
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: npc.js
|
||||
// DESC: Provides NPC functions and processing
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: radio.js
|
||||
// DESC: Provides internet streaming radio functions and usage
|
||||
@@ -8,21 +9,21 @@
|
||||
// ===========================================================================
|
||||
|
||||
function playStreamingRadio(url, loop, volume, element = false) {
|
||||
if(streamingRadio != null) {
|
||||
if (streamingRadio != null) {
|
||||
streamingRadio.stop();
|
||||
}
|
||||
|
||||
streamingRadioVolume = volume;
|
||||
|
||||
streamingRadio = audio.createSoundFromURL(url, loop);
|
||||
streamingRadio.volume = volume/100;
|
||||
streamingRadio.volume = volume / 100;
|
||||
streamingRadio.play();
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function stopStreamingRadio() {
|
||||
if(streamingRadio != null) {
|
||||
if (streamingRadio != null) {
|
||||
streamingRadio.stop();
|
||||
}
|
||||
streamingRadio = null;
|
||||
@@ -31,16 +32,16 @@ function stopStreamingRadio() {
|
||||
// ===========================================================================
|
||||
|
||||
function setStreamingRadioVolume(volume) {
|
||||
if(streamingRadio != null) {
|
||||
if (streamingRadio != null) {
|
||||
streamingRadioVolume = volume;
|
||||
streamingRadio.volume = volume/100;
|
||||
streamingRadio.volume = volume / 100;
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function playAudioFile(audioName, loop, volume) {
|
||||
findResourceByName("connectedrp-extra").exports.playCustomAudio(audioName, volume/100, loop);
|
||||
findResourceByName("connectedrp-extra").exports.playCustomAudio(audioName, volume / 100, loop);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: scoreboard.js
|
||||
// DESC: Provides scoreboard features and rendering
|
||||
@@ -38,63 +39,63 @@ function initScoreBoardListFont() {
|
||||
// ===========================================================================
|
||||
|
||||
function processScoreBoardRendering() {
|
||||
if(isAnyGUIActive()) {
|
||||
if (isAnyGUIActive()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(renderScoreBoard) {
|
||||
if(isKeyDown(SDLK_TAB)) {
|
||||
if(scoreBoardListFont != null && scoreBoardTitleFont != null) {
|
||||
let scoreboardStart = (game.height/2)-(Math.floor(getClients().length/2)*20);
|
||||
if (renderScoreBoard) {
|
||||
if (isKeyDown(SDLK_TAB)) {
|
||||
if (scoreBoardListFont != null && scoreBoardTitleFont != null) {
|
||||
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);
|
||||
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);
|
||||
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();
|
||||
for(let i in clients) {
|
||||
if(!clients[i].console) {
|
||||
for (let i in clients) {
|
||||
if (!clients[i].console) {
|
||||
let name = clients[i].name;
|
||||
let colour = COLOUR_WHITE;
|
||||
let paused = false;
|
||||
let ping = "-1";
|
||||
|
||||
if(typeof playerNames[clients[i].name] != "undefined") {
|
||||
if (typeof playerNames[clients[i].name] != "undefined") {
|
||||
name = playerNames[clients[i].name];
|
||||
}
|
||||
|
||||
if(typeof playerPaused[clients[i].name] != "undefined") {
|
||||
if (typeof playerPaused[clients[i].name] != "undefined") {
|
||||
paused = playerPaused[clients[i].name];
|
||||
}
|
||||
|
||||
if(typeof playerColours[clients[i].name] != "undefined") {
|
||||
if (typeof playerColours[clients[i].name] != "undefined") {
|
||||
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]);
|
||||
}
|
||||
|
||||
// Player ID
|
||||
let text = String(clients[i].index);
|
||||
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
|
||||
text = name;
|
||||
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
|
||||
text = ping;
|
||||
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")
|
||||
if(paused == true) {
|
||||
if (paused == true) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: skin-select.js
|
||||
// DESC: Provides skin-selector functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: startup.js
|
||||
// DESC: Provides startup/shutdown procedures
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: sync.js
|
||||
// DESC: Provides some elements and data sync
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: utilities.js
|
||||
// DESC: Provides util functions and arrays with data
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: vehicle.js
|
||||
// DESC: Provides vehicle functions and arrays with data
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: accent.js
|
||||
// DESC: Provides accent functions and usage
|
||||
@@ -27,7 +28,7 @@ function doesPlayerHaveAccent(client) {
|
||||
|
||||
function getPlayerAccentInlineOutput(client) {
|
||||
let outputText = "";
|
||||
if(doesPlayerHaveAccent(client)) {
|
||||
if (doesPlayerHaveAccent(client)) {
|
||||
outputText = `[${getPlayerAccentText(client)}] `;
|
||||
}
|
||||
|
||||
@@ -37,14 +38,14 @@ function getPlayerAccentInlineOutput(client) {
|
||||
// ===========================================================================
|
||||
|
||||
function setAccentCommand(command, params, client) {
|
||||
if(areParamsEmpty(params)) {
|
||||
if (areParamsEmpty(params)) {
|
||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||
return false;
|
||||
}
|
||||
|
||||
let accentId = getAccentFromParams(params);
|
||||
|
||||
if(!accentId) {
|
||||
if (!accentId) {
|
||||
messagePlayerError(client, getLocaleString(client, "AccentNotFound"));
|
||||
return false;
|
||||
}
|
||||
@@ -64,7 +65,7 @@ function listAccentsCommand(command, params, client) {
|
||||
let chunkedList = splitArrayIntoChunks(accentList, 8);
|
||||
|
||||
messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "AccentsListHeader")));
|
||||
for(let i in chunkedList) {
|
||||
for (let i in chunkedList) {
|
||||
messagePlayerInfo(client, chunkedList[i].join(", "));
|
||||
}
|
||||
}
|
||||
@@ -72,14 +73,14 @@ function listAccentsCommand(command, params, client) {
|
||||
// ===========================================================================
|
||||
|
||||
function getAccentFromParams(params) {
|
||||
if(isNaN(params)) {
|
||||
for(let i in getGlobalConfig().accents) {
|
||||
if(toLowerCase(getGlobalConfig().accents[i]).indexOf(toLowerCase(params)) != -1) {
|
||||
if (isNaN(params)) {
|
||||
for (let i in getGlobalConfig().accents) {
|
||||
if (toLowerCase(getGlobalConfig().accents[i]).indexOf(toLowerCase(params)) != -1) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(typeof getGlobalConfig().accents[params] != "undefined") {
|
||||
if (typeof getGlobalConfig().accents[params] != "undefined") {
|
||||
return toInteger(params);
|
||||
}
|
||||
}
|
||||
@@ -97,14 +98,14 @@ function reloadAccentConfigurationCommand(command, params, client) {
|
||||
// ===========================================================================
|
||||
|
||||
function addAccentCommand(command, params, client) {
|
||||
if(areParamsEmpty(params)) {
|
||||
if (areParamsEmpty(params)) {
|
||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||
return false;
|
||||
}
|
||||
|
||||
let newAccentName = params;
|
||||
|
||||
if(getAccentFromParams(newAccentName) != false) {
|
||||
if (getAccentFromParams(newAccentName) != false) {
|
||||
messagePlayerError(client, `That accent already exists!`)
|
||||
return false;
|
||||
}
|
||||
@@ -117,14 +118,14 @@ function addAccentCommand(command, params, client) {
|
||||
// ===========================================================================
|
||||
|
||||
function removeAccentCommand(command, params, client) {
|
||||
if(areParamsEmpty(params)) {
|
||||
if (areParamsEmpty(params)) {
|
||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||
return false;
|
||||
}
|
||||
|
||||
let newAccentName = params;
|
||||
|
||||
if(!getAccentFromParams(newAccentName)) {
|
||||
if (!getAccentFromParams(newAccentName)) {
|
||||
messagePlayerError(client, `That accent doesn't exist!`)
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: account.js
|
||||
// DESC: Provides account functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: animation.js
|
||||
// DESC: Provides animation functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: anticheat.js
|
||||
// DESC: Provides anticheat functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: bans.js
|
||||
// DESC: Provides ban functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: bank.js
|
||||
// DESC: Provides banking functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: bitflags.js
|
||||
// DESC: Provides bitwise operations, functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: business.js
|
||||
// DESC: Provides business functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: chat.js
|
||||
// DESC: Provides chat functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: clan.js
|
||||
// DESC: Provides clan functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: client.js
|
||||
// DESC: Provides client communication and cross-endpoint operations
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: command.js
|
||||
// DESC: Provides command data, functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: config.js
|
||||
// DESC: Provides server configuration
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: core.js
|
||||
// DESC: Provides core data structures, function, and operations
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: crime.js
|
||||
// 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 CrimeData {
|
||||
class CrimeData {
|
||||
constructor(suspectId, crimeType, reporterId = 0) {
|
||||
this.crimeType = crimeType;
|
||||
this.suspectId = suspectId;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: database.js
|
||||
// DESC: Provides database handling, functions and usage
|
||||
@@ -24,13 +25,13 @@ function createDatabaseInsertQuery(tableName, data) {
|
||||
let fields = [];
|
||||
let values = [];
|
||||
|
||||
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][1] != 'NaN') {
|
||||
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][1] != 'NaN') {
|
||||
fields.push(data[i][0]);
|
||||
|
||||
if(typeof data[i][1] == "string") {
|
||||
if(data[i][1] == "{UNIXTIMESTAMP}") {
|
||||
if (typeof data[i][1] == "string") {
|
||||
if (data[i][1] == "{UNIXTIMESTAMP}") {
|
||||
values.push("UNIX_TIMESTAMP()");
|
||||
} else {
|
||||
values.push(`'${data[i][1]}'`);
|
||||
@@ -51,11 +52,11 @@ function createDatabaseInsertQuery(tableName, data) {
|
||||
function createDatabaseUpdateQuery(tableName, data, whereClause) {
|
||||
let values = [];
|
||||
|
||||
for(let i in data) {
|
||||
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(typeof data[i][1] == "string") {
|
||||
if(data[i][1] == "{UNIXTIMESTAMP}") {
|
||||
for (let i in data) {
|
||||
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 (typeof data[i][1] == "string") {
|
||||
if (data[i][1] == "{UNIXTIMESTAMP}") {
|
||||
values.push(`${data[i][0]}=UNIX_TIMESTAMP()`);
|
||||
} else {
|
||||
values.push(`${data[i][0]}='${data[i][1]}'`);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: developer.js
|
||||
// DESC: Provides developer operation, commands, functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: discord.js
|
||||
// DESC: Provides discord bridging and connection functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: economy.js
|
||||
// DESC: Provides economy/financial utils, functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: email.js
|
||||
// DESC: Provides email handling, functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: event.js
|
||||
// DESC: Provides handlers for built in GTAC and Asshat-Gaming created events
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: fishing.js
|
||||
// DESC: Provides fishing functions and commands
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: forensics.js
|
||||
// DESC: Provides forensics functions and commands (bullet casings, blood, etc)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: gate.js
|
||||
// DESC: Provides gate functions and commands
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: gps.js
|
||||
// DESC: Provides GPS functions and commands
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: gui.js
|
||||
// DESC: Provides GUI functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: help.js
|
||||
// DESC: Provides update info, help commands, and documentation
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: house.js
|
||||
// DESC: Provides house commands, functions, and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: insurance.js
|
||||
// DESC: Provides insurance commands, functions, and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: item.js
|
||||
// DESC: Provides item functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: drink.js
|
||||
// DESC: Provides features and usage for the drink item type
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: food.js
|
||||
// DESC: Provides features and usage for the food item type
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: handcuff.js
|
||||
// DESC: Provides features and usage for the handcuff item type
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: phone.js
|
||||
// DESC: Provides features and usage for the phone item type
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: handcuff.js
|
||||
// DESC: Provides features and usage for the handcuff item type
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: tazer.js
|
||||
// DESC: Provides features and usage for the tazer item type
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: walkie-talkie.js
|
||||
// DESC: Provides features and usage for the walkie-talkie item type
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: job.js
|
||||
// DESC: Provides job functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: bus.js
|
||||
// DESC: Provides bus driver job functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: drug.js
|
||||
// DESC: Provides drug runner/dealer job functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: fire.js
|
||||
// DESC: Provides firefighter job functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: garbage.js
|
||||
// DESC: Provides garbage collector job functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: medic.js
|
||||
// DESC: Provides paramedic job functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: pizza-delivery.js
|
||||
// DESC: Provides pizza delivery driver job functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: police.js
|
||||
// DESC: Provides police officer job functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: taxi.js
|
||||
// DESC: Provides taxi driver job functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: weapon.js
|
||||
// DESC: Provides weapons dealer job functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: keybind.js
|
||||
// DESC: Provides keybind handlers and functions
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: locale.js
|
||||
// DESC: Provides locale structures, functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: messaging.js
|
||||
// DESC: Provides messaging functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: misc.js
|
||||
// DESC: Provides any uncategorized functions and usage
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: connected.js
|
||||
// DESC: Provides wrapped natives for GTA Connected and Mafia Connected mods
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: connected.js
|
||||
// DESC: Provides wrapped natives for GTA Connected and Mafia Connected mods
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: netevents.js
|
||||
// DESC: Provides client communication and cross-endpoint network events
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: npc.js
|
||||
// DESC: Provides NPC usage and functions
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: paintball.js
|
||||
// DESC: Provides paintball/airsoft arena functions and commands
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// ===========================================================================
|
||||
// FILE: race.js
|
||||
// DESC: Provides racing usage and functions
|
||||
@@ -19,7 +20,7 @@ function initRaceScript() {
|
||||
* @return {RaceData} The race's data (class instance)
|
||||
*/
|
||||
function getRaceData(raceId) {
|
||||
if(typeof getServerData().races[raceId] != "undefined") {
|
||||
if (typeof getServerData().races[raceId] != "undefined") {
|
||||
return getServerData().races[raceId];
|
||||
}
|
||||
return false;
|
||||
@@ -28,7 +29,7 @@ function getRaceData(raceId) {
|
||||
// ===========================================================================
|
||||
|
||||
function setAllRaceDataIndexes() {
|
||||
for(let i in getServerData().races) {
|
||||
for (let i in getServerData().races) {
|
||||
getServerData().races[i].index = i;
|
||||
}
|
||||
}
|
||||
@@ -43,11 +44,11 @@ function loadRacesFromDatabase() {
|
||||
// ===========================================================================
|
||||
|
||||
function saveRacesToDatabase() {
|
||||
if(getServerConfig().devServer) {
|
||||
if (getServerConfig().devServer) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for(let i in getServerData().races) {
|
||||
for (let i in getServerData().races) {
|
||||
saveRaceToDatabase(getServerData().races[i]);
|
||||
}
|
||||
}
|
||||
@@ -61,14 +62,14 @@ function saveRaceToDatabase(raceData) {
|
||||
// ===========================================================================
|
||||
|
||||
function createRaceCommand(command, params, client) {
|
||||
if(areParamsEmpty(params)) {
|
||||
if (areParamsEmpty(params)) {
|
||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||
return false;
|
||||
}
|
||||
|
||||
let raceId = getRaceFromParams(params);
|
||||
|
||||
if(raceId == false) {
|
||||
if (raceId == false) {
|
||||
messagePlayerError(client, "A race with that name already exists!");
|
||||
return false;
|
||||
}
|
||||
@@ -80,7 +81,7 @@ function createRaceCommand(command, params, client) {
|
||||
// ===========================================================================
|
||||
|
||||
function createRaceCommand(command, params, client) {
|
||||
if(areParamsEmpty(params)) {
|
||||
if (areParamsEmpty(params)) {
|
||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||
return false;
|
||||
}
|
||||
@@ -95,13 +96,13 @@ function createRaceCommand(command, params, client) {
|
||||
// ===========================================================================
|
||||
|
||||
function createRaceLocationCommand(command, params, client) {
|
||||
if(areParamsEmpty(params)) {
|
||||
if (areParamsEmpty(params)) {
|
||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||
return false;
|
||||
}
|
||||
|
||||
let raceId = getPlayerRace(client);
|
||||
if(raceId == false) {
|
||||
if (raceId == false) {
|
||||
messagePlayerError(client, "You are not in a race!");
|
||||
return false;
|
||||
}
|
||||
@@ -115,13 +116,13 @@ function createRaceLocationCommand(command, params, client) {
|
||||
// ===========================================================================
|
||||
|
||||
function createRaceLocationCommand(command, params, client) {
|
||||
if(areParamsEmpty(params)) {
|
||||
if (areParamsEmpty(params)) {
|
||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||
return false;
|
||||
}
|
||||
|
||||
let raceId = getPlayerRace(client);
|
||||
if(raceId == false) {
|
||||
if (raceId == false) {
|
||||
messagePlayerError(client, "You are not in a race!");
|
||||
return false;
|
||||
}
|
||||
@@ -135,7 +136,7 @@ function createRaceLocationCommand(command, params, client) {
|
||||
// ===========================================================================
|
||||
|
||||
function stopRacingCommand(command, params, client) {
|
||||
if(!isPlayerInARace(client)) {
|
||||
if (!isPlayerInARace(client)) {
|
||||
messagePlayerError(client, "You aren't in a race!");
|
||||
return false;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user