Prefix
This commit is contained in:
@@ -22,7 +22,7 @@ function makePedPlayAnimation(pedId, animationSlot, positionOffset) {
|
||||
}
|
||||
|
||||
let animationData = getAnimationData(animationSlot);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Animation] Playing animation ${animationData[0]} for ped ${pedId}`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Animation] Playing animation ${animationData[0]} for ped ${pedId}`);
|
||||
|
||||
let freezePlayer = false;
|
||||
switch (animationData.moveType) {
|
||||
|
||||
@@ -36,7 +36,7 @@ function initBusinessScript() {
|
||||
// ===========================================================================
|
||||
|
||||
function receiveBusinessFromServer(businessId, name, entrancePosition, blipModel, pickupModel, buyPrice, rentPrice, hasInterior, locked, hasItems, entranceFee) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Business] Received business ${businessId} (${name}) from server`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Business] Received business ${businessId} (${name}) from server`);
|
||||
|
||||
if (!areServerElementsSupported() || getGame() == V_GAME_MAFIA_ONE || getGame() == V_GAME_GTA_IV) {
|
||||
if (getBusinessData(businessId) != false) {
|
||||
@@ -62,10 +62,10 @@ function receiveBusinessFromServer(businessId, name, entrancePosition, blipModel
|
||||
}
|
||||
}
|
||||
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Business] Business ${businessId} already exists. Checking blip ...`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Business] Business ${businessId} already exists. Checking blip ...`);
|
||||
if (blipModel == -1) {
|
||||
if (businessData.blipId != -1) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Business] Business ${businessId}'s blip has been removed by the server`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Business] Business ${businessId}'s blip has been removed by the server`);
|
||||
if (getGame() == V_GAME_GTA_IV) {
|
||||
natives.removeBlipAndClearIndex(getBusinessData(businessId).blipId);
|
||||
} else {
|
||||
@@ -75,11 +75,11 @@ function receiveBusinessFromServer(businessId, name, entrancePosition, blipModel
|
||||
//businesses.splice(businessData.index, 1);
|
||||
//setAllBusinessDataIndexes();
|
||||
} else {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Business] Business ${businessId}'s blip is unchanged`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Business] Business ${businessId}'s blip is unchanged`);
|
||||
}
|
||||
} else {
|
||||
if (businessData.blipId != -1) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Business] Business ${businessId}'s blip has been changed by the server`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Business] Business ${businessId}'s blip has been changed by the server`);
|
||||
if (getGame() == V_GAME_GTA_IV) {
|
||||
natives.setBlipCoordinates(businessData.blipId, businessData.entrancePosition);
|
||||
natives.changeBlipSprite(businessData.blipId, businessData.blipModel);
|
||||
@@ -92,20 +92,20 @@ function receiveBusinessFromServer(businessId, name, entrancePosition, blipModel
|
||||
if (blipId != -1) {
|
||||
tempBusinessData.blipId = blipId;
|
||||
}
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Business] Business ${businessId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Business] Business ${businessId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Business] Business ${businessId} doesn't exist. Adding ...`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Business] Business ${businessId} doesn't exist. Adding ...`);
|
||||
let tempBusinessData = new BusinessData(businessId, name, entrancePosition, blipModel, pickupModel, hasInterior, hasItems);
|
||||
if (blipModel != -1) {
|
||||
let blipId = createGameBlip(tempBusinessData.blipModel, tempBusinessData.entrancePosition, tempBusinessData.name);
|
||||
if (blipId != -1) {
|
||||
tempBusinessData.blipId = blipId;
|
||||
}
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Business] Business ${businessId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Business] Business ${businessId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`);
|
||||
} else {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Business] Business ${businessId} has no blip.`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Business] Business ${businessId} has no blip.`);
|
||||
}
|
||||
getServerData().businesses.push(tempBusinessData);
|
||||
setAllBusinessDataIndexes();
|
||||
|
||||
@@ -52,7 +52,7 @@ function unBindChatBoxKeys() {
|
||||
// ===========================================================================
|
||||
|
||||
function receiveChatBoxMessageFromServer(messageString, colour, hour, minute, second) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Chat]: Received chatbox message from server: ${messageString}`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Chat]: Received chatbox message from server: ${messageString}`);
|
||||
|
||||
// Just in case it's hidden by auto hide
|
||||
//setChatWindowEnabled(true);
|
||||
@@ -77,16 +77,16 @@ function receiveChatBoxMessageFromServer(messageString, colour, hour, minute, se
|
||||
outputString = `${timeStampString}${messageString}`;
|
||||
}
|
||||
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Chat]: Changed colours in string: ${outputString}`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Chat]: Changed colours in string: ${outputString}`);
|
||||
outputString = replaceColoursInMessage(`${outputString}`);
|
||||
|
||||
if (chatEmojiEnabled == true) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Chat]: Enabled emoji in string: ${outputString}`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Chat]: Enabled emoji in string: ${outputString}`);
|
||||
outputString = replaceEmojiInMessage(outputString);
|
||||
}
|
||||
|
||||
if (profanityFilterEnabled == true) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Chat]: Removed profanity in string: ${outputString}`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Chat]: Removed profanity in string: ${outputString}`);
|
||||
outputString = replaceProfanityInMessage(outputString);
|
||||
}
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ function onResourceStart(event, resource) {
|
||||
}
|
||||
|
||||
if (resource == thisResource) {
|
||||
logToConsole(LOG_DEBUG | LOG_WARN, `[AGRP.Event] onResourceStart called - Sending signal to server`);
|
||||
logToConsole(LOG_DEBUG | LOG_WARN, `[V.RP.Event] onResourceStart called - Sending signal to server`);
|
||||
localPlayerMoneyInterval = setInterval(updateLocalPlayerMoney, 1000 * 5);
|
||||
sendResourceStartedSignalToServer();
|
||||
}
|
||||
@@ -83,7 +83,7 @@ function onResourceStart(event, resource) {
|
||||
|
||||
function onResourceStop(event, resource) {
|
||||
if (resource == thisResource) {
|
||||
logToConsole(LOG_DEBUG | LOG_WARN, `[AGRP.Event] onResourceStop called - Sending signal to server`);
|
||||
logToConsole(LOG_DEBUG | LOG_WARN, `[V.RP.Event] onResourceStop called - Sending signal to server`);
|
||||
sendResourceStoppedSignalToServer();
|
||||
}
|
||||
}
|
||||
@@ -92,7 +92,7 @@ function onResourceStop(event, resource) {
|
||||
|
||||
function onResourceReady(event, resource) {
|
||||
if (resource == thisResource) {
|
||||
logToConsole(LOG_DEBUG | LOG_WARN, `[AGRP.Event] onResourceReady called - Sending signal to server`);
|
||||
logToConsole(LOG_DEBUG | LOG_WARN, `[V.RP.Event] onResourceReady called - Sending signal to server`);
|
||||
loadLocaleConfig();
|
||||
sendResourceReadySignalToServer();
|
||||
}
|
||||
@@ -101,7 +101,7 @@ function onResourceReady(event, resource) {
|
||||
// ===========================================================================
|
||||
|
||||
function onProcess(event, deltaTime) {
|
||||
logToConsole(LOG_VERBOSE, `[AGRP.Event] onProcess`);
|
||||
logToConsole(LOG_VERBOSE, `[V.RP.Event] onProcess`);
|
||||
if (localPlayer == null) {
|
||||
return false;
|
||||
}
|
||||
@@ -136,7 +136,7 @@ function onKeyUp(event, keyCode, scanCode, keyModifiers) {
|
||||
// ===========================================================================
|
||||
|
||||
function onDrawnHUD(event) {
|
||||
logToConsole(LOG_VERBOSE, `[AGRP.Event] HUD drawn`);
|
||||
logToConsole(LOG_VERBOSE, `[V.RP.Event] HUD drawn`);
|
||||
processMouseCursorRendering();
|
||||
|
||||
if (!renderHUD) {
|
||||
@@ -160,7 +160,7 @@ function onDrawnHUD(event) {
|
||||
// ===========================================================================
|
||||
|
||||
function onPedWasted(event, wastedPed, killerPed, weapon, pedPiece) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Event] Ped ${wastedPed.name} died`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Event] Ped ${wastedPed.name} died`);
|
||||
wastedPed.clearWeapons();
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@ function onElementStreamIn(event, element) {
|
||||
// ===========================================================================
|
||||
|
||||
function onPedExitedVehicle(event, ped, vehicle, seat) {
|
||||
//logToConsole(LOG_DEBUG, `[AGRP.Event] Local player exited vehicle`);
|
||||
//logToConsole(LOG_DEBUG, `[V.RP.Event] Local player exited vehicle`);
|
||||
//sendNetworkEventToServer("v.rp.onPlayerExitVehicle", getVehicleForNetworkEvent(vehicle), seat);
|
||||
|
||||
cruiseControlEnabled = false;
|
||||
@@ -197,7 +197,7 @@ function onPedExitedVehicle(event, ped, vehicle, seat) {
|
||||
// ===========================================================================
|
||||
|
||||
function onPedExitingVehicle(event, ped, vehicle, seat) {
|
||||
//logToConsole(LOG_DEBUG, `[AGRP.Event] Local player exited vehicle`);
|
||||
//logToConsole(LOG_DEBUG, `[V.RP.Event] Local player exited vehicle`);
|
||||
//sendNetworkEventToServer("v.rp.onPlayerExitVehicle", getVehicleForNetworkEvent(vehicle), seat);
|
||||
|
||||
if (localPlayer != null) {
|
||||
@@ -211,7 +211,7 @@ function onPedExitingVehicle(event, ped, vehicle, seat) {
|
||||
// ===========================================================================
|
||||
|
||||
function onPedEnteredVehicle(event, ped, vehicle, seat) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Event] Ped entered vehicle`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Event] Ped entered vehicle`);
|
||||
//sendNetworkEventToServer("v.rp.onPlayerEnterVehicle", getVehicleForNetworkEvent(vehicle), seat);
|
||||
|
||||
cruiseControlEnabled = false;
|
||||
@@ -239,7 +239,7 @@ function onPedEnteredVehicle(event, ped, vehicle, seat) {
|
||||
function onPedInflictDamage(event, damagedEntity, damagerEntity, weaponId, healthLoss, pedPiece) {
|
||||
//let damagerEntityString = (!isNull(damagedEntity)) ? `${damagerEntity.name} (${damagerEntity.name}, ${damagerEntity.type} - ${typeof damagerEntity})` : `Unknown ped`;
|
||||
//let damagedEntityString = (!isNull(damagedEntity)) ? `${damagedEntity.name} (${damagedEntity.name}, ${damagedEntity.type} - ${typeof damagedEntity})` : `Unknown ped`;
|
||||
//logToConsole(LOG_DEBUG, `[AGRP.Event] ${damagerEntityString} damaged ${damagedEntityString}'s '${pedPiece} with weapon ${weaponId}`);
|
||||
//logToConsole(LOG_DEBUG, `[V.RP.Event] ${damagerEntityString} damaged ${damagedEntityString}'s '${pedPiece} with weapon ${weaponId}`);
|
||||
if (!isNull(damagedEntity) && !isNull(damagerEntity)) {
|
||||
if (damagedEntity.isType(ELEMENT_PLAYER)) {
|
||||
if (damagedEntity == localPlayer) {
|
||||
|
||||
@@ -16,7 +16,7 @@ let gpsBlipBlinkTimer = null;
|
||||
// ===========================================================================
|
||||
|
||||
function showGPSLocation(position, colour) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GPS] Showing gps location`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GPS] Showing gps location`);
|
||||
if (getMultiplayerMod() == V_MPMOD_GTAC) {
|
||||
if (getGame() == V_GAME_GTA_SA) {
|
||||
// Server-side spheres don't show in GTA SA for some reason.
|
||||
|
||||
@@ -47,7 +47,7 @@ function initGUIScript() {
|
||||
// ===========================================================================
|
||||
|
||||
function initGUI() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Initializing GUI ...`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Initializing GUI ...`);
|
||||
|
||||
initLoginGUI();
|
||||
initRegisterGUI();
|
||||
@@ -73,7 +73,7 @@ function initGUI() {
|
||||
closeAllWindows();
|
||||
guiReady = true;
|
||||
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] All GUI created successfully!`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] All GUI created successfully!`);
|
||||
|
||||
sendNetworkEventToServer("v.rp.guiReady", true);
|
||||
};
|
||||
@@ -81,7 +81,7 @@ function initGUI() {
|
||||
// ===========================================================================
|
||||
|
||||
function closeAllWindows() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Closing all GUI windows`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Closing all GUI windows`);
|
||||
infoDialog.window.shown = false;
|
||||
yesNoDialog.window.shown = false;
|
||||
errorDialog.window.shown = false;
|
||||
@@ -208,7 +208,7 @@ function isAnyGUIActive() {
|
||||
// ===========================================================================
|
||||
|
||||
function setGUIColours(red1, green1, blue1, red2, green2, blue2, red3, green3, blue3) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Received new GUI colours from server: ${red1}, ${green1}, ${blue1} / ${red2}, ${green2}, ${blue2} / ${red3}, ${green3}, ${blue3}`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Received new GUI colours from server: ${red1}, ${green1}, ${blue1} / ${red2}, ${green2}, ${blue2} / ${red3}, ${green3}, ${blue3}`);
|
||||
primaryColour = [red1, green1, blue1];
|
||||
secondaryColour = [red2, green2, blue2];
|
||||
primaryTextColour = [red3, green3, blue3];
|
||||
@@ -228,45 +228,45 @@ function hideAllGUI() {
|
||||
// ===========================================================================
|
||||
|
||||
function processGUIKeyPress(keyCode) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Processing key press: ${keyCode}`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Processing key press: ${keyCode}`);
|
||||
|
||||
if (!guiReady) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!isAnyGUIActive()) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] GUI is not active. Cancelling keypress processing.`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] GUI is not active. Cancelling keypress processing.`);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (keyCode == SDLK_RETURN || keyCode == SDLK_RETURN2) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Key press is submit (${guiSubmitKey})`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Key press is submit (${guiSubmitKey})`);
|
||||
if (guiSubmitKey != false) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Calling submit key function`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Calling submit key function`);
|
||||
guiSubmitKey.call();
|
||||
}
|
||||
} else if (keyCode == getKeyIdFromParams("left") || keyCode == getKeyIdFromParams("a")) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Key press is left (${guiLeftKey})`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Key press is left (${guiLeftKey})`);
|
||||
if (guiLeftKey != false) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Calling left key function`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Calling left key function`);
|
||||
guiLeftKey.call();
|
||||
}
|
||||
} else if (keyCode == getKeyIdFromParams("right") || keyCode == getKeyIdFromParams("d")) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Key press is right (${guiRightKey})`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Key press is right (${guiRightKey})`);
|
||||
if (guiRightKey != false) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Calling right key function`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Calling right key function`);
|
||||
guiRightKey.call();
|
||||
}
|
||||
} else if (keyCode == getKeyIdFromParams("down") || keyCode == getKeyIdFromParams("s")) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Key press is down (${guiDownKey})`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Key press is down (${guiDownKey})`);
|
||||
if (guiDownKey != false) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Calling down key function`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Calling down key function`);
|
||||
guiDownKey.call();
|
||||
}
|
||||
} else if (keyCode == getKeyIdFromParams("up") || keyCode == getKeyIdFromParams("w")) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Key press is up (${guiUpKey})`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Key press is up (${guiUpKey})`);
|
||||
if (guiUpKey != false) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Calling up key function`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Calling up key function`);
|
||||
guiUpKey.call();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ let twoFactorAuth = {
|
||||
// ===========================================================================
|
||||
|
||||
function initTwoFactorAuthenticationGUI() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating two factor auth GUI ...`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Creating two factor auth GUI ...`);
|
||||
twoFactorAuth.window = mexui.window(game.width / 2 - 150, game.height / 2 - 129, 300, 258, 'LOGIN', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
@@ -94,14 +94,14 @@ function initTwoFactorAuthenticationGUI() {
|
||||
},
|
||||
}, checkTwoFactorAuth);
|
||||
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created two factor auth GUI`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Created two factor auth GUI`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showTwoFactorAuthGUI() {
|
||||
closeAllWindows();
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing two-factor authentication window`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing two-factor authentication window`);
|
||||
setChatWindowEnabled(false);
|
||||
mexui.setInput(true);
|
||||
twoFactorAuth.window.shown = true;
|
||||
@@ -112,7 +112,7 @@ function showTwoFactorAuthGUI() {
|
||||
// ===========================================================================
|
||||
|
||||
function twoFactorAuthFailed(errorMessage) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports two-factor authentication failed. Reason: ${errorMessage}`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Server reports two-factor authentication failed. Reason: ${errorMessage}`);
|
||||
twoFactorAuth.messageLabel.text = errorMessage;
|
||||
twoFactorAuth.messageLabel.styles.main.textColour = toColour(180, 32, 32, 255);
|
||||
twoFactorAuth.codeInput.text = "";
|
||||
@@ -121,14 +121,14 @@ function twoFactorAuthFailed(errorMessage) {
|
||||
// ===========================================================================
|
||||
|
||||
function twoFactorAuthSuccess() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports two-factor authentication was successful`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Server reports two-factor authentication was successful`);
|
||||
closeAllWindows();
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function checkTwoFactorAuth() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Checking two-factor authentication with server ...`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Checking two-factor authentication with server ...`);
|
||||
sendNetworkEventToServer("v.rp.2fa", twoFactorAuth.codeInput.lines[0]);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ let passwordChange = {
|
||||
// ===========================================================================
|
||||
|
||||
function initChangePasswordGUI() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating password change GUI ...`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Creating password change GUI ...`);
|
||||
passwordChange.window = mexui.window(game.width / 2 - 130, game.height / 2 - 125, 300, 250, 'Change Password', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
@@ -110,13 +110,13 @@ function initChangePasswordGUI() {
|
||||
borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], buttonAlpha),
|
||||
},
|
||||
}, checkChangePassword);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created change password GUI`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Created change password GUI`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function passwordChangeFailed(errorMessage) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports change password failed. Reason: ${errorMessage}`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Server reports change password failed. Reason: ${errorMessage}`);
|
||||
passwordChange.messageLabel.text = errorMessage;
|
||||
passwordChange.messageLabel.styles.main.textColour = toColour(180, 32, 32, 255);
|
||||
passwordChange.passwordInput.text = "";
|
||||
@@ -127,14 +127,14 @@ function passwordChangeFailed(errorMessage) {
|
||||
// ===========================================================================
|
||||
|
||||
function checkChangePassword() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Checking password change with server ...`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Checking password change with server ...`);
|
||||
sendNetworkEventToServer("v.rp.checkChangePassword", passwordChange.passwordInput.lines[0], passwordChange.confirmPasswordInput.lines[0]);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showChangePasswordGUI(errorMessage) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing change password window`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing change password window`);
|
||||
closeAllWindows();
|
||||
setChatWindowEnabled(false);
|
||||
mexui.setInput(true);
|
||||
@@ -149,7 +149,7 @@ function showChangePasswordGUI(errorMessage) {
|
||||
// ===========================================================================
|
||||
|
||||
function passwordChangeSuccess() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports password change was successful`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Server reports password change was successful`);
|
||||
guiSubmitKey = false;
|
||||
closeAllWindows();
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ let characterSelect = {
|
||||
// ===========================================================================
|
||||
|
||||
function initCharacterSelectGUI() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating character select GUI ...`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Creating character select GUI ...`);
|
||||
characterSelect.window = mexui.window(game.width / 2 - 215, game.height / 2 - 83, 430, 190, 'SELECT CHARACTER', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
@@ -150,14 +150,14 @@ function initCharacterSelectGUI() {
|
||||
borderColour: toColour(0, 0, 0, 0),
|
||||
}
|
||||
});
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created character select GUI`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Created character select GUI`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showCharacterSelectGUI(firstName, lastName, cash, clan, lastPlayed, skinId) {
|
||||
closeAllWindows();
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing character selection window`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing character selection window`);
|
||||
setChatWindowEnabled(false);
|
||||
mexui.setInput(true);
|
||||
characterSelect.nameText.text = `${firstName} ${lastName}`;
|
||||
@@ -178,35 +178,35 @@ function showCharacterSelectGUI(firstName, lastName, cash, clan, lastPlayed, ski
|
||||
|
||||
function showNewCharacter() {
|
||||
closeAllWindows();
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing new character dialog window`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing new character dialog window`);
|
||||
showNewCharacterGUI();
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function selectNextCharacter() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Requesting next character info from server for character select window`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Requesting next character info from server for character select window`);
|
||||
sendNetworkEventToServer("v.rp.nextCharacter");
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function selectPreviousCharacter() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Requesting previous character info from server for character select window`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Requesting previous character info from server for character select window`);
|
||||
sendNetworkEventToServer("v.rp.previousCharacter");
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function selectThisCharacter() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Tell server the current shown character was selected in character select window`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Tell server the current shown character was selected in character select window`);
|
||||
sendNetworkEventToServer("v.rp.selectCharacter");
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function switchCharacterSelectGUI(firstName, lastName, cash, clan, lastPlayed, skinId) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Updating character info with data from server`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Updating character info with data from server`);
|
||||
setChatWindowEnabled(false);
|
||||
characterSelect.window.shown = false;
|
||||
characterSelect.nameText.text = `${firstName} ${lastName}`;
|
||||
@@ -229,7 +229,7 @@ function switchCharacterSelectGUI(firstName, lastName, cash, clan, lastPlayed, s
|
||||
// ===========================================================================
|
||||
|
||||
function characterSelectSuccess() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports character selection was successful`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Server reports character selection was successful`);
|
||||
closeAllWindows();
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ let errorDialog = {
|
||||
// ===========================================================================
|
||||
|
||||
function initErrorDialogGUI() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating error GUI ...`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Creating error GUI ...`);
|
||||
errorDialog.window = mexui.window(getScreenWidth() / 2 - 200, getScreenHeight() / 2 - 70, 400, 140, 'ERROR', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
@@ -58,14 +58,14 @@ function initErrorDialogGUI() {
|
||||
borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], 255),
|
||||
},
|
||||
}, closeErrorDialog);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created error GUI ...`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Created error GUI ...`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showErrorGUI(errorMessage, errorTitle, buttonText) {
|
||||
closeAllWindows();
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing error window. Error: ${errorTitle} - ${errorMessage}`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing error window. Error: ${errorTitle} - ${errorMessage}`);
|
||||
setChatWindowEnabled(false);
|
||||
mexui.setInput(true);
|
||||
errorDialog.messageLabel.text = errorMessage;
|
||||
@@ -77,7 +77,7 @@ function showErrorGUI(errorMessage, errorTitle, buttonText) {
|
||||
// ===========================================================================
|
||||
|
||||
function closeErrorDialog() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Closing error dialog`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Closing error dialog`);
|
||||
errorDialog.window.shown = false;
|
||||
mexui.setInput(false);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ let fiveCardPokerGUI = {
|
||||
|
||||
function initFiveCardPokerGUI() {
|
||||
// Render a five card poker game in MexUI
|
||||
//logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating five-card poker GUI ...`);
|
||||
//logToConsole(LOG_DEBUG, `[V.RP.GUI] Creating five-card poker GUI ...`);
|
||||
fiveCardPokerGUI.window = mexui.window(game.width / 2 - 200, game.height - 150, 400, 400, 'Five Card Poker', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], 0),
|
||||
@@ -33,7 +33,7 @@ function initFiveCardPokerGUI() {
|
||||
|
||||
fiveCardPokerGUI.window.shown = false;
|
||||
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created five card poker GUI`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Created five card poker GUI`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -22,7 +22,7 @@ let dealerCards = [];
|
||||
|
||||
function initBlackJackGUI() {
|
||||
// Render a blackjack game in MexUI
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating blackjack GUI ...`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Creating blackjack GUI ...`);
|
||||
blackJackGUI.window = mexui.window(game.width / 2 - 200, game.height - 150, 400, 400, 'Blackjack', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], 0),
|
||||
@@ -42,7 +42,7 @@ function initBlackJackGUI() {
|
||||
|
||||
blackJackGUI.window.shown = false;
|
||||
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created blackjack GUI`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Created blackjack GUI`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -16,7 +16,7 @@ let infoDialog = {
|
||||
// ===========================================================================
|
||||
|
||||
function initInfoDialogGUI() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating info dialog GUI ...`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Creating info dialog GUI ...`);
|
||||
infoDialog.window = mexui.window(getScreenWidth() / 2 - 200, getScreenHeight() / 2 - 70, 400, 140, 'Information', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
@@ -57,13 +57,13 @@ function initInfoDialogGUI() {
|
||||
borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], 255),
|
||||
},
|
||||
}, closeInfoDialog);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created info dialog GUI`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Created info dialog GUI`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function closeInfoDialog() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Closing info dialog`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Closing info dialog`);
|
||||
infoDialog.window.shown = false;
|
||||
mexui.setInput(false);
|
||||
}
|
||||
@@ -72,7 +72,7 @@ function closeInfoDialog() {
|
||||
|
||||
function showInfoGUI(infoMessage, infoTitle, buttonText) {
|
||||
closeAllWindows();
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing info dialog window. Info: ${infoTitle} - ${infoMessage}`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing info dialog window. Info: ${infoTitle} - ${infoMessage}`);
|
||||
mexui.setInput(true);
|
||||
infoDialog.messageLabel.text = infoMessage;
|
||||
infoDialog.okayButton.text = buttonText;
|
||||
|
||||
@@ -25,7 +25,7 @@ function initInventoryGUI() {
|
||||
// ===========================================================================
|
||||
|
||||
function closeAllInventoryGUI() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Closing all inventory GUI`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Closing all inventory GUI`);
|
||||
for (let i in inventoryGUI) {
|
||||
inventoryGUI[i].window.shown = false;
|
||||
}
|
||||
@@ -36,7 +36,7 @@ function closeAllInventoryGUI() {
|
||||
|
||||
function showInventoryGUI(inventoryIndex, items) {
|
||||
closeAllWindows();
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing inventory window. Index: ${inventoryIndex}`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing inventory window. Index: ${inventoryIndex}`);
|
||||
inventoryGUI[inventoryIndex].window.shown = true;
|
||||
mexui.setInput(true);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ function initInventoryBulkGUI() {
|
||||
// ===========================================================================
|
||||
|
||||
function closeAllInventoryBulkGUI() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Closing all bulk inventory GUI`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Closing all bulk inventory GUI`);
|
||||
for (let i in inventoryBulkGUI) {
|
||||
inventoryBulkGUI[i].window.shown = false;
|
||||
}
|
||||
@@ -36,7 +36,7 @@ function closeAllInventoryBulkGUI() {
|
||||
|
||||
function showInventoryBulkGUI(inventoryIndex, items) {
|
||||
closeAllWindows();
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing bulk inventory window. Index: ${inventoryIndex}`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing bulk inventory window. Index: ${inventoryIndex}`);
|
||||
inventoryBulkGUI[inventoryIndex].window.shown = true;
|
||||
mexui.setInput(true);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ let listDialog = {
|
||||
// ===========================================================================
|
||||
|
||||
function initListGUI() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating list dialog GUI ...`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Creating list dialog GUI ...`);
|
||||
listDialog.window = mexui.window(game.width / 2 - 200, game.height / 2 - 70, 400, 500, 'List', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
@@ -72,14 +72,14 @@ function initListGUI() {
|
||||
}
|
||||
}
|
||||
});
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created list dialog GUI`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Created list dialog GUI`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showListGUI() {
|
||||
closeAllWindows();
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing list window`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing list window`);
|
||||
setChatWindowEnabled(false);
|
||||
mexui.setInput(true);
|
||||
listDialog.window.shown = true;
|
||||
|
||||
@@ -19,7 +19,7 @@ let flagImageGap = toVector2(5, 5);
|
||||
// ===========================================================================
|
||||
|
||||
function initLocaleChooserGUI() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating locale chooser GUI ...`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Creating locale chooser GUI ...`);
|
||||
localeChooser.window = mexui.window(game.width / 2 - 200, game.height - 150, 60, 60, 'Choose a language', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], 0),
|
||||
@@ -39,13 +39,13 @@ function initLocaleChooserGUI() {
|
||||
|
||||
localeChooser.window.shown = false;
|
||||
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created locale chooser GUI`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Created locale chooser GUI`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function closeLocaleChooserGUI() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Closing locale chooser window`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Closing locale chooser window`);
|
||||
localeChooser.window.shown = false;
|
||||
for (let i in localeChooser.flagImages) {
|
||||
localeChooser.flagImages[i].shown = false;
|
||||
@@ -63,7 +63,7 @@ function showLocaleChooserGUI(position = toVector2(0.0, 0.0)) {
|
||||
}
|
||||
|
||||
//closeAllWindows();
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing locale chooser window`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing locale chooser window`);
|
||||
mexui.setInput(true);
|
||||
localeChooser.window.shown = true;
|
||||
|
||||
@@ -85,14 +85,14 @@ function toggleLocaleChooserGUI() {
|
||||
// ===========================================================================
|
||||
|
||||
function localeChooserSetLocale(localeId) {
|
||||
logToConsole(LOG_DEBUG | LOG_WARN, `[AGRP.GUI] Asking server to change locale to ${localeId}`);
|
||||
logToConsole(LOG_DEBUG | LOG_WARN, `[V.RP.GUI] Asking server to change locale to ${localeId}`);
|
||||
sendLocaleSelectToServer(localeId);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function resetLocaleChooserOptions() {
|
||||
logToConsole(LOG_DEBUG | LOG_WARN, `[AGRP.GUI] Resetting locale chooser options`);
|
||||
logToConsole(LOG_DEBUG | LOG_WARN, `[V.RP.GUI] Resetting locale chooser options`);
|
||||
|
||||
// let tempLocaleOptions = getServerData().localeOptions; // getAvailableLocaleOptions();
|
||||
let tempLocaleOptions = getAvailableLocaleOptions();
|
||||
@@ -116,7 +116,7 @@ function resetLocaleChooserOptions() {
|
||||
|
||||
localeChooser.flagImages[i].shown = false;
|
||||
|
||||
logToConsole(LOG_DEBUG | LOG_WARN, `[AGRP.GUI] Created locale chooser option ${tempLocaleOptions[i].englishName} with image ${imagePath}`);
|
||||
logToConsole(LOG_DEBUG | LOG_WARN, `[V.RP.GUI] Created locale chooser option ${tempLocaleOptions[i].englishName} with image ${imagePath}`);
|
||||
|
||||
//localeChooser.activeRingImages.push(activeRingImage);
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ let loginHTML =
|
||||
// ===========================================================================
|
||||
|
||||
function initLoginGUI() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating login GUI ...`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Creating login GUI ...`);
|
||||
login.window = mexui.window(getScreenWidth() / 2 - 150, getScreenHeight() / 2 - 135, 300, 275, 'LOGIN', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
@@ -143,14 +143,14 @@ function initLoginGUI() {
|
||||
},
|
||||
});
|
||||
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created login GUI`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Created login GUI`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showLoginGUI() {
|
||||
closeAllWindows();
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing login window`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing login window`);
|
||||
setChatWindowEnabled(false);
|
||||
mexui.setInput(true);
|
||||
login.window.shown = true;
|
||||
@@ -164,14 +164,14 @@ function showLoginGUI() {
|
||||
// ===========================================================================
|
||||
|
||||
function checkLogin() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Checking login with server ...`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Checking login with server ...`);
|
||||
sendNetworkEventToServer("v.rp.checkLogin", login.passwordInput.lines[0]);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function loginFailed(errorMessage) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports login failed`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Server reports login failed`);
|
||||
login.messageLabel.text = errorMessage;
|
||||
login.messageLabel.styles.main.textColour = toColour(180, 32, 32, 255);
|
||||
login.passwordInput.text = "";
|
||||
@@ -180,7 +180,7 @@ function loginFailed(errorMessage) {
|
||||
// ===========================================================================
|
||||
|
||||
function loginSuccess() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports login was successful`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Server reports login was successful`);
|
||||
guiSubmitKey = false;
|
||||
closeAllWindows();
|
||||
}
|
||||
@@ -189,7 +189,7 @@ function loginSuccess() {
|
||||
|
||||
function switchToPasswordResetGUI() {
|
||||
//closeAllWindows();
|
||||
//logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing password reset dialog window`);
|
||||
//logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing password reset dialog window`);
|
||||
//showResetPasswordGUI();
|
||||
sendNetworkEventToServer("v.rp.checkResetPassword", "");
|
||||
return false;
|
||||
|
||||
@@ -19,7 +19,7 @@ let newCharacter = {
|
||||
// ===========================================================================
|
||||
|
||||
function initNewCharacterGUI() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating new character GUI ...`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Creating new character GUI ...`);
|
||||
newCharacter.window = mexui.window(getScreenWidth() / 2 - 150, getScreenHeight() / 2 - 115, 300, 230, 'NEW CHARACTER', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
@@ -110,13 +110,13 @@ function initNewCharacterGUI() {
|
||||
borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], buttonAlpha),
|
||||
},
|
||||
}, checkNewCharacter);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created new character GUI`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Created new character GUI`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function newCharacterFailed(errorMessage) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports new character creation failed. Reason: ${errorMessage}`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Server reports new character creation failed. Reason: ${errorMessage}`);
|
||||
newCharacter.messageLabel.text = errorMessage;
|
||||
newCharacter.messageLabel.styles.main.textColour = toColour(180, 32, 32, 255);
|
||||
newCharacter.firstNameInput.text = "";
|
||||
@@ -134,7 +134,7 @@ function newCharacterFailed(errorMessage) {
|
||||
// ===========================================================================
|
||||
|
||||
function checkNewCharacter() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Checking new character with server ...`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Checking new character with server ...`);
|
||||
if (newCharacter.firstNameInput.lines[0].length < 2) {
|
||||
return false;
|
||||
}
|
||||
@@ -152,7 +152,7 @@ function checkNewCharacter() {
|
||||
// ===========================================================================
|
||||
|
||||
function showNewCharacterGUI() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing new character window`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing new character window`);
|
||||
closeAllWindows();
|
||||
setChatWindowEnabled(false);
|
||||
mexui.setInput(true);
|
||||
|
||||
@@ -20,7 +20,7 @@ let register = {
|
||||
// ===========================================================================
|
||||
|
||||
function initRegisterGUI() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating register GUI ...`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Creating register GUI ...`);
|
||||
register.window = mexui.window(getScreenWidth() / 2 - 150, getScreenHeight() / 2 - 150, 300, 300, 'Register', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
@@ -130,13 +130,13 @@ function initRegisterGUI() {
|
||||
borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], buttonAlpha),
|
||||
},
|
||||
}, checkRegistration);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created register GUI`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Created register GUI`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function registrationFailed(errorMessage) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports registration failed. Reason: ${errorMessage}`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Server reports registration failed. Reason: ${errorMessage}`);
|
||||
register.messageLabel.text = errorMessage;
|
||||
register.messageLabel.styles.main.textColour = toColour(180, 32, 32, 255);
|
||||
register.passwordInput.text = "";
|
||||
@@ -147,14 +147,14 @@ function registrationFailed(errorMessage) {
|
||||
// ===========================================================================
|
||||
|
||||
function checkRegistration() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Checking registration with server ...`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Checking registration with server ...`);
|
||||
sendNetworkEventToServer("v.rp.checkRegistration", register.passwordInput.lines[0], register.confirmPasswordInput.lines[0], register.emailInput.lines[0]);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showRegistrationGUI() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing registration window`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing registration window`);
|
||||
closeAllWindows();
|
||||
setChatWindowEnabled(false);
|
||||
mexui.setInput(true);
|
||||
@@ -170,7 +170,7 @@ function showRegistrationGUI() {
|
||||
// ===========================================================================
|
||||
|
||||
function registrationSuccess() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports registration was successful`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Server reports registration was successful`);
|
||||
guiSubmitKey = false;
|
||||
closeAllWindows();
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ let passwordReset = {
|
||||
// ===========================================================================
|
||||
|
||||
function initResetPasswordGUI() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating password reset GUI ...`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Creating password reset GUI ...`);
|
||||
passwordReset.window = mexui.window(getScreenWidth() / 2 - 150, getScreenHeight() / 2 - 135, 300, 275, 'RESET PASSWORD', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
@@ -120,14 +120,14 @@ function initResetPasswordGUI() {
|
||||
},
|
||||
});
|
||||
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created password reset GUI`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Created password reset GUI`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showResetPasswordGUI() {
|
||||
closeAllWindows();
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing password reset window`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing password reset window`);
|
||||
setChatWindowEnabled(false);
|
||||
mexui.setInput(true);
|
||||
passwordReset.window.shown = true;
|
||||
@@ -141,14 +141,14 @@ function showResetPasswordGUI() {
|
||||
// ===========================================================================
|
||||
|
||||
function checkResetPassword() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Checking password reset with server (${passwordReset.emailInput.lines[0]}) ...`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Checking password reset with server (${passwordReset.emailInput.lines[0]}) ...`);
|
||||
sendNetworkEventToServer("v.rp.checkResetPassword", passwordReset.emailInput.lines[0]);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function resetPasswordFailed(errorMessage) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports password reset failed`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Server reports password reset failed`);
|
||||
passwordReset.messageLabel.text = errorMessage;
|
||||
passwordReset.messageLabel.styles.main.textColour = toColour(180, 32, 32, 255);
|
||||
passwordReset.emailInput.text = "";
|
||||
@@ -157,7 +157,7 @@ function resetPasswordFailed(errorMessage) {
|
||||
// ===========================================================================
|
||||
|
||||
function resetPasswordCodeInputGUI() {
|
||||
logToConsole(LOG_DEBUG | LOG_WARN, `[AGRP.GUI] Server reports password reset email confirmation was successful. Asking for code ...`);
|
||||
logToConsole(LOG_DEBUG | LOG_WARN, `[V.RP.GUI] Server reports password reset email confirmation was successful. Asking for code ...`);
|
||||
closeAllWindows();
|
||||
|
||||
passwordReset.messageLabel.text = getLocaleString("GUIResetPasswordCodeInputLabel");
|
||||
@@ -172,7 +172,7 @@ function resetPasswordCodeInputGUI() {
|
||||
// ===========================================================================
|
||||
|
||||
function resetPasswordEmailInputGUI() {
|
||||
logToConsole(LOG_DEBUG | LOG_WARN, `[AGRP.GUI] Server reports password reset request was approved. Asking for email ...`);
|
||||
logToConsole(LOG_DEBUG | LOG_WARN, `[V.RP.GUI] Server reports password reset request was approved. Asking for email ...`);
|
||||
closeAllWindows();
|
||||
|
||||
passwordReset.messageLabel.text = getLocaleString("GUIResetPasswordConfirmEmailLabel");
|
||||
|
||||
@@ -18,7 +18,7 @@ let yesNoDialog = {
|
||||
// ===========================================================================
|
||||
|
||||
function initYesNoDialogGUI() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created prompt GUI ...`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Created prompt GUI ...`);
|
||||
yesNoDialog.window = mexui.window(game.width / 2 - 200, game.height / 2 - 70, 400, 140, 'Question', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
@@ -73,14 +73,14 @@ function initYesNoDialogGUI() {
|
||||
borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], 255),
|
||||
},
|
||||
}, yesNoDialogAnswerNo);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created prompt GUI`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Created prompt GUI`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showYesNoPromptGUI(promptMessage, promptTitle, yesButtonText, noButtonText) {
|
||||
closeAllWindows();
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing prompt window. Prompt: ${promptTitle} - ${promptMessage}`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing prompt window. Prompt: ${promptTitle} - ${promptMessage}`);
|
||||
mexui.setInput(true);
|
||||
|
||||
yesNoDialog.messageLabel.text = "";
|
||||
@@ -99,7 +99,7 @@ function showYesNoPromptGUI(promptMessage, promptTitle, yesButtonText, noButtonT
|
||||
// ===========================================================================
|
||||
|
||||
function yesNoDialogAnswerNo() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Responding with answer NO to server prompt`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Responding with answer NO to server prompt`);
|
||||
sendNetworkEventToServer("v.rp.promptAnswerNo");
|
||||
closeAllWindows();
|
||||
}
|
||||
@@ -107,7 +107,7 @@ function yesNoDialogAnswerNo() {
|
||||
// ===========================================================================
|
||||
|
||||
function yesNoDialogAnswerYes() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Responding with answer YES to server prompt`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.GUI] Responding with answer YES to server prompt`);
|
||||
sendNetworkEventToServer("v.rp.promptAnswerYes");
|
||||
closeAllWindows();
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ class HouseData {
|
||||
// ===========================================================================
|
||||
|
||||
function receiveHouseFromServer(houseId, description, entrancePosition, blipModel, pickupModel, buyPrice, rentPrice, hasInterior, locked) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.House] Received house ${houseId} (${name}) from server`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.House] Received house ${houseId} (${name}) from server`);
|
||||
|
||||
if (!areServerElementsSupported() || getGame() == V_GAME_MAFIA_ONE || getGame() == V_GAME_GTA_IV) {
|
||||
if (getHouseData(houseId) != false) {
|
||||
@@ -50,10 +50,10 @@ function receiveHouseFromServer(houseId, description, entrancePosition, blipMode
|
||||
}
|
||||
}
|
||||
|
||||
logToConsole(LOG_DEBUG, `[AGRP.House] House ${houseId} already exists. Checking blip ...`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.House] House ${houseId} already exists. Checking blip ...`);
|
||||
if (blipModel == -1) {
|
||||
if (houseData.blipId != -1) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.House] House ${houseId}'s blip has been removed by the server`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.House] House ${houseId}'s blip has been removed by the server`);
|
||||
if (getGame() == V_GAME_GTA_IV) {
|
||||
natives.removeBlipAndClearIndex(getHouseData(houseId).blipId);
|
||||
} else {
|
||||
@@ -61,11 +61,11 @@ function receiveHouseFromServer(houseId, description, entrancePosition, blipMode
|
||||
}
|
||||
houseData.blipId = -1;
|
||||
} else {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.House] House ${houseId}'s blip is unchanged`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.House] House ${houseId}'s blip is unchanged`);
|
||||
}
|
||||
} else {
|
||||
if (houseData.blipId != -1) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.House] House ${houseId}'s blip has been changed by the server`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.House] House ${houseId}'s blip has been changed by the server`);
|
||||
if (getGame() == V_GAME_GTA_IV) {
|
||||
natives.setBlipCoordinates(houseData.blipId, houseData.entrancePosition);
|
||||
natives.changeBlipSprite(houseData.blipId, houseData.blipModel);
|
||||
@@ -78,20 +78,20 @@ function receiveHouseFromServer(houseId, description, entrancePosition, blipMode
|
||||
if (blipId != -1) {
|
||||
houseData.blipId = blipId;
|
||||
}
|
||||
logToConsole(LOG_DEBUG, `[AGRP.House] House ${houseId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.House] House ${houseId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.House] House ${houseId} doesn't exist. Adding ...`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.House] House ${houseId} doesn't exist. Adding ...`);
|
||||
let tempHouseData = new HouseData(houseId, description, entrancePosition, blipModel, pickupModel, hasInterior);
|
||||
if (blipModel != -1) {
|
||||
let blipId = createGameBlip(tempHouseData.blipModel, tempHouseData.entrancePosition, "House");
|
||||
if (blipId != -1) {
|
||||
tempHouseData.blipId = blipId;
|
||||
}
|
||||
logToConsole(LOG_DEBUG, `[AGRP.House] House ${houseId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.House] House ${houseId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`);
|
||||
} else {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.House] House ${houseId} has no blip.`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.House] House ${houseId} has no blip.`);
|
||||
}
|
||||
getServerData().houses.push(tempHouseData);
|
||||
setAllHouseDataIndexes();
|
||||
|
||||
@@ -47,7 +47,7 @@ function processItemActionRendering() {
|
||||
// ===========================================================================
|
||||
|
||||
function updatePlayerHotBar(activeSlot, itemsArray) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Main] Updating hotbar`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Main] Updating hotbar`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
@@ -42,21 +42,21 @@ function initJobScript() {
|
||||
// ===========================================================================
|
||||
|
||||
function setLocalPlayerJobType(tempJobType) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Job] Set local player job type to ${tempJobType}`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Job] Set local player job type to ${tempJobType}`);
|
||||
localPlayerJobType = tempJobType;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setLocalPlayerWorkingState(tempWorking) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Job] Setting working state to ${tempWorking}`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Job] Setting working state to ${tempWorking}`);
|
||||
localPlayerWorking = tempWorking;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showJobRouteLocation(position, colour) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Job] Showing job route location at ${position.x}, ${position.y}, ${position.z}`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Job] Showing job route location at ${position.x}, ${position.y}, ${position.z}`);
|
||||
hideJobRouteLocation();
|
||||
if (getMultiplayerMod() == V_MPMOD_GTAC) {
|
||||
if (getGame() == V_GAME_GTA_SA) {
|
||||
@@ -80,7 +80,7 @@ function showJobRouteLocation(position, colour) {
|
||||
// ===========================================================================
|
||||
|
||||
function enteredJobRouteSphere() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Job] Entered job route sphere`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Job] Entered job route sphere`);
|
||||
hideJobRouteLocation();
|
||||
tellServerPlayerArrivedAtJobRouteLocation();
|
||||
}
|
||||
@@ -114,7 +114,7 @@ function blinkJobRouteLocationBlip(times, position, colour) {
|
||||
// ===========================================================================
|
||||
|
||||
function hideJobRouteLocation() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Job] Hiding job route location`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Job] Hiding job route location`);
|
||||
|
||||
if (jobRouteLocationBlip != null) {
|
||||
destroyElement(jobRouteLocationBlip);
|
||||
@@ -137,7 +137,7 @@ function hideJobRouteLocation() {
|
||||
// ===========================================================================
|
||||
|
||||
function receiveJobFromServer(jobId, jobLocationId, name, position, blipModel, pickupModel) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Job] Received job ${jobId} (${name}) from server`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Job] Received job ${jobId} (${name}) from server`);
|
||||
|
||||
if (!areServerElementsSupported() || getGame() == V_GAME_MAFIA_ONE || getGame() == V_GAME_GTA_IV) {
|
||||
if (getJobData(jobId) != false) {
|
||||
@@ -148,10 +148,10 @@ function receiveJobFromServer(jobId, jobLocationId, name, position, blipModel, p
|
||||
jobData.blipModel = blipModel;
|
||||
jobData.pickupModel = pickupModel;
|
||||
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Job] Job ${jobId} already exists. Checking blip ...`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Job] Job ${jobId} already exists. Checking blip ...`);
|
||||
if (blipModel == -1) {
|
||||
if (jobData.blipId != -1) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Job] Job ${jobId}'s blip has been removed by the server`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Job] Job ${jobId}'s blip has been removed by the server`);
|
||||
if (getGame() == V_GAME_GTA_IV) {
|
||||
natives.removeBlipAndClearIndex(getJobData(jobId).blipId);
|
||||
} else {
|
||||
@@ -159,11 +159,11 @@ function receiveJobFromServer(jobId, jobLocationId, name, position, blipModel, p
|
||||
}
|
||||
jobData.blipId = -1;
|
||||
} else {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Job] Job ${jobId}'s blip is unchanged`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Job] Job ${jobId}'s blip is unchanged`);
|
||||
}
|
||||
} else {
|
||||
if (jobData.blipId != -1) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Job] Job ${jobId}'s blip has been changed by the server`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Job] Job ${jobId}'s blip has been changed by the server`);
|
||||
if (getGame() == V_GAME_GTA_IV) {
|
||||
natives.setBlipCoordinates(jobData.blipId, jobData.position);
|
||||
natives.changeBlipSprite(jobData.blipId, jobData.blipModel);
|
||||
@@ -176,20 +176,20 @@ function receiveJobFromServer(jobId, jobLocationId, name, position, blipModel, p
|
||||
if (blipId != -1) {
|
||||
jobData.blipId = blipId;
|
||||
}
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Job] Job ${jobId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Job] Job ${jobId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Job] Job ${jobId} doesn't exist. Adding ...`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Job] Job ${jobId} doesn't exist. Adding ...`);
|
||||
let tempJobData = new JobData(jobId, jobLocationId, name, position, blipModel, pickupModel);
|
||||
if (blipModel != -1) {
|
||||
let blipId = createGameBlip(blipModel, tempJobData.position, tempJobData.name);
|
||||
if (blipId != -1) {
|
||||
tempJobData.blipId = blipId;
|
||||
}
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Job] Job ${jobId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Job] Job ${jobId}'s blip has been added by the server (Model ${blipModel}, ID ${blipId})`);
|
||||
} else {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Job] Job ${jobId} has no blip.`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Job] Job ${jobId} has no blip.`);
|
||||
}
|
||||
getServerData().jobs.push(tempJobData);
|
||||
setAllJobDataIndexes();
|
||||
|
||||
@@ -23,7 +23,7 @@ function initKeyBindScript() {
|
||||
// ===========================================================================
|
||||
|
||||
function bindAccountKey(key, keyState) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.KeyBind]: Binded key ${toUpperCase(getKeyNameFromId(key))} (${key})`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.KeyBind]: Binded key ${toUpperCase(getKeyNameFromId(key))} (${key})`);
|
||||
keyBinds.push(toInteger(key));
|
||||
bindKey(toInteger(key), keyState, function (event) {
|
||||
if (isAnyGUIActive()) {
|
||||
@@ -32,14 +32,14 @@ function bindAccountKey(key, keyState) {
|
||||
|
||||
if (hasKeyBindDelayElapsed()) {
|
||||
if (canLocalPlayerUseKeyBinds()) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.KeyBind]: Using keybind for key ${toUpperCase(getKeyNameFromId(key))} (${key})`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.KeyBind]: Using keybind for key ${toUpperCase(getKeyNameFromId(key))} (${key})`);
|
||||
lastKeyBindUse = sdl.ticks;
|
||||
tellServerPlayerUsedKeyBind(key);
|
||||
} else {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.KeyBind]: Failed to use keybind for key ${toUpperCase(getKeyNameFromId(key))} (${key}) - Not allowed to use keybinds!`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.KeyBind]: Failed to use keybind for key ${toUpperCase(getKeyNameFromId(key))} (${key}) - Not allowed to use keybinds!`);
|
||||
}
|
||||
} else {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.KeyBind]: Failed to use keybind for key ${toUpperCase(getKeyNameFromId(key))} (${key}) - Not enough time has passed since last keybind use!`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.KeyBind]: Failed to use keybind for key ${toUpperCase(getKeyNameFromId(key))} (${key}) - Not enough time has passed since last keybind use!`);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -47,7 +47,7 @@ function bindAccountKey(key, keyState) {
|
||||
// ===========================================================================
|
||||
|
||||
function unBindAccountKey(key) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.KeyBind]: Unbinded key ${toUpperCase(getKeyNameFromId(key))} (${key})`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.KeyBind]: Unbinded key ${toUpperCase(getKeyNameFromId(key))} (${key})`);
|
||||
unbindKey(key);
|
||||
keyBinds.splice(keyBinds.indexOf(key), 1);
|
||||
return true;
|
||||
|
||||
@@ -97,7 +97,7 @@ function renderPropertyEntranceLabel(name, position, locked, isBusiness, price,
|
||||
screenPosition = getScreenFromWorldPosition(position);
|
||||
}
|
||||
|
||||
logToConsole(LOG_VERBOSE, `[AGRP.Label] World [${position.x}, ${position.y}, ${position.z}] to screen [${screenPosition.x}, ${screenPosition.y}, ${screenPosition.z}]`);
|
||||
logToConsole(LOG_VERBOSE, `[V.RP.Label] World [${position.x}, ${position.y}, ${position.z}] to screen [${screenPosition.x}, ${screenPosition.y}, ${screenPosition.z}]`);
|
||||
|
||||
if (screenPosition.x < 0 || screenPosition.x > game.width) {
|
||||
return false;
|
||||
|
||||
@@ -46,7 +46,7 @@ function loadLocaleConfig() {
|
||||
function loadAllLocaleStrings() {
|
||||
let localeOptions = getServerData().localeOptions;
|
||||
for (let i in localeOptions) {
|
||||
logToConsole(LOG_INFO, `[AGRP.Locale] Loading locale strings for ${localeOptions[i].englishName} (${i})`);
|
||||
logToConsole(LOG_INFO, `[V.RP.Locale] Loading locale strings for ${localeOptions[i].englishName} (${i})`);
|
||||
let localeStringFile = loadTextFile(`locale/${localeOptions[i].stringsFile}`);
|
||||
let localeStringData = JSON.parse(localeStringFile);
|
||||
|
||||
@@ -60,7 +60,7 @@ function loadAllLocaleStrings() {
|
||||
// ===========================================================================
|
||||
|
||||
function setLocale(tempLocaleId) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Locale] Setting locale to ${tempLocaleId} (${getServerData().localeOptions[tempLocaleId].englishName})`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Locale] Setting locale to ${tempLocaleId} (${getServerData().localeOptions[tempLocaleId].englishName})`);
|
||||
localLocaleId = tempLocaleId;
|
||||
resetGUIStrings();
|
||||
}
|
||||
@@ -53,7 +53,7 @@ function processLogoRendering() {
|
||||
// ===========================================================================
|
||||
|
||||
function setServerLogoRenderState(state) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Main] Server logo ${(state) ? "enabled" : "disabled"}`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Main] Server logo ${(state) ? "enabled" : "disabled"}`);
|
||||
renderLogo = state;
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ function processSmallGameMessageRendering() {
|
||||
logToConsole(LOG_VERBOSE, "[V.RP.Messaging]: Processing small game message rendering ...");
|
||||
if (renderSmallGameMessage) {
|
||||
if (smallGameMessageText != "") {
|
||||
logToConsole(LOG_VERBOSE, `[AGRP.Messaging]: Rendering small game message: ${smallGameMessageText}`);
|
||||
logToConsole(LOG_VERBOSE, `[V.RP.Messaging]: Rendering small game message: ${smallGameMessageText}`);
|
||||
if (smallGameMessageFonts[smallGameMessageFontName] != null) {
|
||||
smallGameMessageFonts[smallGameMessageFontName].render(smallGameMessageText, [0, game.height - 90], game.width, 0.5, 0.0, smallGameMessageFonts[smallGameMessageFontName].size, smallGameMessageColour, true, true, false, true);
|
||||
}
|
||||
@@ -89,7 +89,7 @@ function processSmallGameMessageRendering() {
|
||||
// ===========================================================================
|
||||
|
||||
function showSmallGameMessage(text, colour, duration, fontName) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Messaging] Showing small game message '${text}' using font ${fontName} for ${duration}ms`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Messaging] Showing small game message '${text}' using font ${fontName} for ${duration}ms`);
|
||||
if (smallGameMessageText != "") {
|
||||
clearTimeout(smallGameMessageTimer);
|
||||
}
|
||||
|
||||
@@ -188,7 +188,7 @@ function sendResourceStoppedSignalToServer() {
|
||||
// ===========================================================================
|
||||
|
||||
function set2DRendering(hudState, labelState, smallGameMessageState, scoreboardState, hotBarState, itemActionDelayState) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Main] Updating render states (HUD: ${hudState}, Labels: ${labelState}, Bottom Text: ${smallGameMessageState}, Scoreboard: ${scoreboardState}, HotBar: ${hotBarState}, Item Action Delay: ${itemActionDelayState})`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Main] Updating render states (HUD: ${hudState}, Labels: ${labelState}, Bottom Text: ${smallGameMessageState}, Scoreboard: ${scoreboardState}, HotBar: ${hotBarState}, Item Action Delay: ${itemActionDelayState})`);
|
||||
renderHUD = hudState;
|
||||
|
||||
if (getGame() == V_GAME_GTA_IV) {
|
||||
@@ -213,7 +213,7 @@ function set2DRendering(hudState, labelState, smallGameMessageState, scoreboardS
|
||||
// ===========================================================================
|
||||
|
||||
function onServerSpawnedLocalPlayer(state) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Main] Setting spawned state to ${state}`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Main] Setting spawned state to ${state}`);
|
||||
isSpawned = state;
|
||||
setUpInitialGame();
|
||||
if (state) {
|
||||
@@ -336,7 +336,7 @@ function setLocalPlayerInfiniteRun(state) {
|
||||
// ===========================================================================
|
||||
|
||||
function setLocalPlayerSkin(skinId) {
|
||||
logToConsole(LOG_INFO, `[AGRP.Server] Setting locale player skin to ${skinId}`);
|
||||
logToConsole(LOG_INFO, `[V.RP.Server] Setting locale player skin to ${skinId}`);
|
||||
if (getGame() == V_GAME_GTA_IV) {
|
||||
if (natives.isModelInCdimage(skinId)) {
|
||||
natives.requestModel(skinId);
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
// ===========================================================================
|
||||
|
||||
function setLocalPlayerFrozenState(state) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Setting frozen state to ${state}`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Setting frozen state to ${state}`);
|
||||
gui.showCursor(state, !state);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setLocalPlayerControlState(controlState, cursorState = false) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Setting control state to ${controlState} (Cursor: ${cursorState})`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Setting control state to ${controlState} (Cursor: ${cursorState})`);
|
||||
controlsEnabled = controlState;
|
||||
game.setPlayerControl(controlState);
|
||||
if (getGame() == V_GAME_GTA_III || getGame() == V_GAME_GTA_VC) {
|
||||
@@ -29,7 +29,7 @@ function setLocalPlayerControlState(controlState, cursorState = false) {
|
||||
// ===========================================================================
|
||||
|
||||
function fadeLocalCamera(state, duration, colour) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Fading camera ${(state) ? "in" : "out"} for ${time}ms`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Fading camera ${(state) ? "in" : "out"} for ${time}ms`);
|
||||
|
||||
cameraFadeDuration = duration;
|
||||
cameraFadeStart = sdl.ticks;
|
||||
@@ -48,7 +48,7 @@ function removeLocalPlayerFromVehicle() {
|
||||
// ===========================================================================
|
||||
|
||||
function restoreLocalCamera() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Camera restored`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Camera restored`);
|
||||
if (isGameFeatureSupported("customCamera")) {
|
||||
game.restoreCamera(true);
|
||||
}
|
||||
@@ -57,7 +57,7 @@ function restoreLocalCamera() {
|
||||
// ===========================================================================
|
||||
|
||||
function setLocalCameraLookAt(cameraPosition, cameraLookAt) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Set camera to look at [${cameraLookAt.x}, ${cameraLookAt.y}, ${cameraLookAt.z}] from [${cameraPosition.x}, ${cameraPosition.y}, ${cameraPosition.z}]`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Set camera to look at [${cameraLookAt.x}, ${cameraLookAt.y}, ${cameraLookAt.z}] from [${cameraPosition.x}, ${cameraPosition.y}, ${cameraPosition.z}]`);
|
||||
if (isCustomCameraSupported()) {
|
||||
game.setCameraLookAt(cameraPosition, cameraLookAt, true);
|
||||
}
|
||||
@@ -66,15 +66,15 @@ function setLocalCameraLookAt(cameraPosition, cameraLookAt) {
|
||||
// ===========================================================================
|
||||
|
||||
function clearLocalPlayerOwnedPeds() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Clearing all self-owned peds ...`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Clearing all self-owned peds ...`);
|
||||
clearSelfOwnedPeds();
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Utilities] All self-owned peds cleared`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Utilities] All self-owned peds cleared`);
|
||||
};
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setCityAmbienceState(state, clearElements = false) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Ambient civilians and traffic ${(state) ? "enabled" : "disabled"}`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Ambient civilians and traffic ${(state) ? "enabled" : "disabled"}`);
|
||||
game.setTrafficEnabled(state);
|
||||
|
||||
if (getMultiplayerMod() == V_MPMOD_GTAC) {
|
||||
@@ -134,7 +134,7 @@ function enterVehicleAsPassenger() {
|
||||
// ===========================================================================
|
||||
|
||||
function giveLocalPlayerWeapon(weaponId, ammo, active) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Giving weapon ${weaponId} with ${ammo} ammo`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Giving weapon ${weaponId} with ${ammo} ammo`);
|
||||
forceWeapon = weaponId;
|
||||
if (getGame() == V_GAME_MAFIA_ONE) {
|
||||
localPlayer.giveWeapon(weaponId, 0, ammo);
|
||||
@@ -155,7 +155,7 @@ function giveLocalPlayerWeapon(weaponId, ammo, active) {
|
||||
// ===========================================================================
|
||||
|
||||
function clearLocalPlayerWeapons(clearData) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Clearing weapons`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Clearing weapons`);
|
||||
localPlayer.clearWeapons();
|
||||
if (clearData == true) {
|
||||
forceWeapon = 0;
|
||||
@@ -173,7 +173,7 @@ function getClosestVehicle(pos) {
|
||||
// ===========================================================================
|
||||
|
||||
function setLocalPlayerPosition(position) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Setting position to ${position.x}, ${position.y}, ${position.z}`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Setting position to ${position.x}, ${position.y}, ${position.z}`);
|
||||
if (typeof localPlayer.velocity != "undefined") {
|
||||
localPlayer.velocity = toVector3(0.0, 0.0, 0.0);
|
||||
}
|
||||
@@ -186,7 +186,7 @@ function setLocalPlayerPosition(position) {
|
||||
// ===========================================================================
|
||||
|
||||
function setLocalPlayerHeading(heading) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Setting heading to ${heading}`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Setting heading to ${heading}`);
|
||||
if (typeof localPlayer.heading != "undefined") {
|
||||
localPlayer.heading = heading;
|
||||
}
|
||||
@@ -195,7 +195,7 @@ function setLocalPlayerHeading(heading) {
|
||||
// ===========================================================================
|
||||
|
||||
function setLocalPlayerInterior(interior) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Setting interior to ${interior}`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Setting interior to ${interior}`);
|
||||
if (getMultiplayerMod() == V_MPMOD_GTAC) {
|
||||
if (!isGTAIV()) {
|
||||
localPlayer.interior = interior;
|
||||
@@ -224,7 +224,7 @@ function setLocalPlayerInterior(interior) {
|
||||
// ===========================================================================
|
||||
|
||||
function setSnowState(falling, ground, forceGround) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Setting falling snow to ${falling} and ground snow to ${ground}`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Setting falling snow to ${falling} and ground snow to ${ground}`);
|
||||
snowing = falling;
|
||||
//snow.force = ground;
|
||||
//if (forceGround == true) {
|
||||
@@ -244,7 +244,7 @@ function setLocalPlayerHealth(health) {
|
||||
// ===========================================================================
|
||||
|
||||
function playPedSpeech(pedName, speechId) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Making ${pedName}'s ped talk (${speechId})`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Making ${pedName}'s ped talk (${speechId})`);
|
||||
if (getMultiplayerMod() == V_MPMOD_GTAC) {
|
||||
game.SET_CHAR_SAY(int, int);
|
||||
}
|
||||
@@ -253,7 +253,7 @@ function playPedSpeech(pedName, speechId) {
|
||||
// ===========================================================================
|
||||
|
||||
function clearLocalPedState() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Clearing local ped state`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Clearing local ped state`);
|
||||
localPlayer.clearObjective();
|
||||
}
|
||||
|
||||
@@ -267,7 +267,7 @@ function getWeaponSlot(weaponId) {
|
||||
|
||||
function setLocalPlayerDrunkEffect(amount, duration) {
|
||||
if (getMultiplayerMod() == V_MPMOD_GTAC) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Drunk effect set to ${amount} for ${duration} ms`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Drunk effect set to ${amount} for ${duration} ms`);
|
||||
drunkEffectAmount = 0;
|
||||
drunkEffectDurationTimer = setInterval(function () {
|
||||
drunkEffectAmount = drunkEffectAmount;
|
||||
@@ -319,7 +319,7 @@ function clearSelfOwnedVehicles() {
|
||||
// ===========================================================================
|
||||
|
||||
function setMouseCameraState(state) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Utilities] ${(state) ? "Enabled" : "Disabled"} mouse camera`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Utilities] ${(state) ? "Enabled" : "Disabled"} mouse camera`);
|
||||
mouseCameraEnabled = state;
|
||||
SetStandardControlsEnabled(!mouseCameraEnabled);
|
||||
}
|
||||
@@ -327,28 +327,28 @@ function setMouseCameraState(state) {
|
||||
// ===========================================================================
|
||||
|
||||
function toggleMouseCursor() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Utilities] ${(!gui.cursorEnabled) ? "Enabled" : "Disabled"} mouse cursor`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Utilities] ${(!gui.cursorEnabled) ? "Enabled" : "Disabled"} mouse cursor`);
|
||||
gui.showCursor(!gui.cursorEnabled, gui.cursorEnabled);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function toggleMouseCursor() {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Utilities] ${(!gui.cursorEnabled) ? "Enabled" : "Disabled"} mouse cursor`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Utilities] ${(!gui.cursorEnabled) ? "Enabled" : "Disabled"} mouse cursor`);
|
||||
setMouseCameraState(!mouseCameraEnabled);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setPlayerWeaponDamageEvent(clientName, eventType) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Set ${clientName} damage event type to ${eventType}`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Set ${clientName} damage event type to ${eventType}`);
|
||||
weaponDamageEvent[clientName] = eventType;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setPlayerWeaponDamageEnabled(clientName, state) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Utilities] ${(state) ? "Enabled" : "Disabled"} damage from ${clientName}`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Utilities] ${(state) ? "Enabled" : "Disabled"} damage from ${clientName}`);
|
||||
weaponDamageEnabled[clientName] = state;
|
||||
}
|
||||
|
||||
@@ -472,7 +472,7 @@ function getVehicleForNetworkEvent(vehicle) {
|
||||
// ===========================================================================
|
||||
|
||||
function setMinuteDuration(minuteDuration) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Setting minute duration to ${minuteDuration}ms`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Setting minute duration to ${minuteDuration}ms`);
|
||||
|
||||
if (isTimeSupported()) {
|
||||
game.time.minuteDuration = minuteDuration;
|
||||
@@ -617,7 +617,7 @@ function updateLocalPlayerMoney() {
|
||||
// ===========================================================================
|
||||
|
||||
function setLocalPlayerMoney(amount) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Setting local player money`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Setting local player money`);
|
||||
localPlayerMoney = amount;
|
||||
updateLocalPlayerMoney();
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ class VehicleData {
|
||||
// ===========================================================================
|
||||
|
||||
function receiveVehicleFromServer(vehicleId, position, model, colour1, colour2, colour3 = 0, colour4 = 0, locked = false, lights = false, engine = false, licensePlate = "") {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Vehicle] Received vehicle ${vehicleId} (${getVehicleNameFromModel(model, getGame())}) from server`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Vehicle] Received vehicle ${vehicleId} (${getVehicleNameFromModel(model, getGame())}) from server`);
|
||||
|
||||
if (getGame() != V_GAME_GTA_IV) {
|
||||
return false;
|
||||
@@ -52,7 +52,7 @@ function receiveVehicleFromServer(vehicleId, position, model, colour1, colour2,
|
||||
|
||||
let vehicle = natives.getVehicleFromNetworkId(vehicleId.ivNetworkId);
|
||||
} else {
|
||||
//logToConsole(LOG_DEBUG, `[AGRP.Vehicle] Vehicle ${vehicleId} doesn't exist. Adding ...`);
|
||||
//logToConsole(LOG_DEBUG, `[V.RP.Vehicle] Vehicle ${vehicleId} doesn't exist. Adding ...`);
|
||||
//let tempVehicleData = new VehicleData(vehicleId, name, position, blipModel, pickupModel);
|
||||
|
||||
//vehicles.push(tempVehicleData);
|
||||
|
||||
Reference in New Issue
Block a user