// const resName = GetParentResourceName(); const CURRENCY_SYMBOL = "$"; let CATEGORIES_DATA = null; let CURRENT_DEALERSHIP_ID = null; let CURRENT_DEALERSHIP_DATA = null; let CURRENT_UI_TYPE = null; // Used to know what buttons to show (for example difference between auto dealership and order vehicles in player dealership) let MODELS_PRICES = {}; // Used when a player checks the showroom of a player owned dealership, for custom prices set by employees SELECTED_VEHICLE = {} let SELECTED_COLOR = 111; // GTA Color let currentActiveCategory = null; function display(bool) { if (bool) { $(".main-container").show(); } else { $(".main-container").hide(); $.post(`https://${resName}/exitDealership`); } } async function showSelectionPage(categoryToShow) { const div = $(`
${getLocalizedText("menu:dealership")}
${getLocalizedText("menu:exit_dealership")}
${upCase(vehicleData.categoryLabel)}
${upCase(vehicleLabel)}
${formatNumber(modelPrice)}
${vehicleData.label}
${getLocalizedText("menu:go_back")}
${getLocalizedText("menu:vehicle_stats")}
${getLocalizedText("menu:color_palette")}
${getLocalizedText("menu:total_price")}
${formatNumber(vehicleData.price)}
Test Drive
${getLocalizedText("menu:try_now")}${getLocalizedText("menu:loan")}
${getLocalizedText("menu:sell_to_player")}
${getLocalizedText("menu:loan_to_player")}
${getLocalizedText("menu:display_vehicle")}
${getLocalizedText("menu:free_visual")}
${dealershipInfo.label} no. ${dealershipInfo.id}
${dealershipInfo.street}
${getLocalizedText("menu:description")}
${getLocalizedText("menu:buy_dealership_description")}
${getLocalizedText("menu:owner")}
${getLocalizedText("menu:no_owner_yet")}
${getLocalizedText("menu:total_price")}
${formatNumber(dealershipInfo.data.price)}
Resell (${dealershipInfo.data.resellPercentage}%)
${formatNumber(dealershipInfo.data.price * (dealershipInfo.data.resellPercentage / 100))}${getLocalizedText("menu:statistic:" + statistic)}
Are you sure you want to buy ${label} for $${price}?
Confirm
Close
${getLocalizedText("menu:choose_from_list")}
${elementData.label}