Найти в Дзене

ЧДС :)

const menuBrowser = mp.browsers.new("package://Menu/__menu.html"),
localPlayer = mp.players.local,
menuMap = new Map,
menuList = new Set;

const menuBrowser = mp.browsers.new("package://Menu/__menu.html"),

localPlayer = mp.players.local,

menuMap = new Map,

menuList = new Set;

var menuCursorCounter = 0;

function openMenu(e, t) {

e.params = t, e.beforeOpen(t), rpc.triggerBrowser(menuBrowser, "menuManager_menu_open", {

menu: e.page,

data: t

}), e.enableCursor && !e.isOpen && (0 == menuCursorCounter && global.showCursor(!0), menuCursorCounter++), e.isOpen = !0, e.afterOpen(t)

}

function closeMenu(e) {

e.isOpen && (rpc.triggerBrowser(menuBrowser, "menuManager_menu_close", e.page), e.onClose(), e.isOpen = !1, e.enableCursor && (menuCursorCounter--, 0 == menuCursorCounter && global.showCursor(!1)))

}

mp.events.add("client_menuManager_taskClose", function(e) {

const t = menuMap.get(e);

t && t.isOpen && closeMenu(t)

});

class Menu {

constructor(e) {

this.page = e, this.params = null, this.isOpen = !1, this.enableCursor = !0, menuMap.set(e, this), menuList.add(this)

}

beforeOpen(e) {}

afterOpen(e) {}

onClose() {}

}

global.menuBrowser = menuBrowser;

class PlayerInventoryMenu extends Menu {

constructor() {

var e = null;

super("playerInventory"), e = this, global.binder.register({

action: "INVENTORY_OPEN",

desc: "\u0418\u043D\u0432\u0435\u043D\u0442\u0430\u0440\u044C",

defaultKey: 73,

func: () => {

if (!(global.isChatOpen || global.disableKeys))

if (e.isOpen) closeMenu(e);

else {

if (mp.gui.cursor.visible) return;

global.rpc.triggerServer("server_inventory_open", {})

}

}

}), global.rpc.on("client_inventory_open", e => {

this.isOpen ? (this.checkWeaponData(e), openMenu(this, e)) : (this.checkWeaponData(e), openMenu(this, e), global.hideUI(!0))

}), global.rpc.on("client_trade_cancel", () => {

this.isOpen && closeMenu(this)

}), global.rpc.register("__client_getPlayerRandomGroundPos", () => {

const e = localPlayer.position;

return e.x += .5 < Math.random() ? +Math.random() : -Math.random(), e.y += .5 < Math.random() ? +Math.random() : -Math.random(), e.z = mp.game.gameplay.getGroundZFor3dCoord(e.x, e.y, e.z + 1, 0, !1) + .01, e

}), mp.events.add("client_inventory_close", () => {

this.isOpen && closeMenu(this)

})

}

afterOpen(e) {

mp.game.graphics.transitionToBlurred(100)

}

onClose() {

this.params.traderName && global.rpc.triggerServer("server_trade_cancel", {}), mp.events.callRemote("server_inventory_close"), mp.game.graphics.transitionFromBlurred(100), global.hideUI(!1)

}

checkWeaponData(e) {

if (e.weapons) {

let t = global.getPlayerCurrentWeaponData();

if (0 != t.weapon) {

e.currentWeaponAmmo = t.ammo;

for (let a = 0; 3 > a; a++) e.weapons[a].weapon == t.weapon && (e.weapons[a].ammo = t.ammo)

}

}

}

}

new PlayerInventoryMenu;

class PlayerDeathMenu extends Menu {

constructor() {

super("deathMenu"), this.enableCursor = !1, mp.events.addDataHandler("rsd", (e, t) => {

if (e == mp.players.local) {

const e = 0 > t;

global.isPlayerDeath = e, this.isOpen && !1 === e && closeMenu(this), this.isOpen || !0 !== e || (menuList.forEach(e => {

e.isOpen && closeMenu(e)

}), openMenu(this, null)), global.disableAllAction = e, global.enableCameraOnDisabled = e

}

})

}

afterOpen(e) {}

onClose() {}

}

new PlayerDeathMenu;

class PlayerSelectSpawnMenu extends Menu {

constructor() {

super("playerSpawnSelect"), mp.events.add("client_menu_selectSpawn", (e, t, a, o) => {

openMenu(this, {

last: e,

house: t,

faction: "-1" == a ? [] : 0 < a.length ? a.split("%").map((e, t) => [e, t]) : [

["\u0412\u044B\u0431\u0440\u0430\u0442\u044C", -1]

],

family: o

})

})

}

}

new PlayerSelectSpawnMenu;

class PlayerDocumentMenu extends Menu {

constructor() {

super("playerDocumentMenu"), this.serverName = "", global.rpc.on("client_menu_playerDocument", e => {

e.serverName = this.serverName, openMenu(this, e)

}), mp.events.add("client_auth_returnServerData", (e, t) => {

this.serverName = t

})

}

afterOpen() {

global.hideHelpBox(!0)

}

onClose() {

global.hideHelpBox(!1)

}

}

new PlayerDocumentMenu;

class PlayerVehicleDocumentMenu extends Menu {

constructor() {

super("playerVehicleDocMenu"), global.rpc.on("client_menu_playerVehicleDocument", e => {

openMenu(this, e)

})

}

afterOpen() {

global.hideHelpBox(!0)

}

onClose() {

global.hideHelpBox(!1)

}

}

new PlayerVehicleDocumentMenu;

class PlayerMainMenu extends Menu {

constructor() {

super("playerMainMenu"), global.rpc.on("client_menu_playerMainMenu_open", e => {

openMenu(this, e)

});

var e = null,

t = null;

mp.events.add("__client_menu_playerMenu_startDonate", function(a) {

e && e.destroy(), t && t.destroy(), e = mp.browsers.new(a), t = mp.browsers.new("package://Menu/__donateExitButton.html")

}), mp.events.add("__client_menu_playerMenu_endDonate", function() {

e && e.destroy(), t && t.destroy(), e = null, t = null

}), global.rpc.register("client_menu_playerMainMenu_getBinderData", function() {

let e = [];

for (const t of global.binder.getList()) e.push({

action: t.actionCode,

desc: t.desc,

key: t.key

});

return e

})

}

}

new PlayerMainMenu;

class PlayerTakeItemMenu extends Menu {

constructor() {

super("playerTakeItemMenu"), global.rpc.on("client_menu_playerTakeItemMenu_open", e => {

openMenu(this, e)

})

}

}

new PlayerTakeItemMenu;

class HouseMenu extends Menu {

constructor() {

super("house"), global.rpc.on("client_menu_house_open", e => {

openMenu(this, e)

})

}

}

new HouseMenu;

class RealEstateAgencyMenu extends Menu {

constructor() {

super("realEstateAgencyMenu"), mp.events.add("client_realEstateAgency_menu", e => {

const t = JSON.parse(e),

a = {

currentTime: t[0],

houses: {}

};

let o = 0;

for (const n in t[2]) {

const e = t[2][n],

r = t[1][o];

a.houses[n] = e.map(e => ({

id: e[0],

name: "\u0414\u043E\u043C #" + e[0],

className: r[0],

price: -1,

position: e[1],

streetName: this.getStreetName(e[1].x, e[1].y, e[1].z),

vehCount: -1,

contractCount: -1,

payment: r[1],

infoPrice: r[2],

contractPrice: r[3],

buyContract: !1

})), o++

}

openMenu(this, a)

})

}

getStreetName(e, t, a) {

const o = ["AIRP", "ALAMO", "ALTA", "ARMYB", "BANHAMC", "BANNING", "BEACH", "BHAMCA", "BRADP", "BRADT", "BURTON", "CALAFB", "CANNY", "CCREAK", "CHAMH", "CHIL", "CHU", "CMSW", "CYPRE", "DAVIS", "DELBE", "DELPE", "DELSOL", "DESRT", "DOWNT", "DTVINE", "EAST_V", "EBURO", "ELGORL", "ELYSIAN", "GALFISH", "GOLF", "GRAPES", "GREATC", "HARMO", "HAWICK", "HORS", "HUMLAB", "JAIL", "KOREAT", "LACT", "LAGO", "LDAM", "LEGSQU", "LMESA", "LOSPUER", "MIRR", "MORN", "MOVIE", "MTCHIL", "MTGORDO", "MTJOSE", "MURRI", "NCHU", "NOOSE", "OCEANA", "PALCOV", "PALETO", "PALFOR", "PALHIGH", "PALMPOW", "PBLUFF", "PBOX", "PROCOB", "RANCHO", "RGLEN", "RICHM", "ROCKF", "RTRAK", "SANAND", "SANCHIA", "SANDY", "SKID", "SLAB", "STAD", "STRAW", "TATAMO", "TERMINA", "TEXTI", "TONGVAH", "TONGVAV", "VCANA", "VESP", "VINE", "WINDF", "WVINE", "ZANCUDO", "ZP_ORT", "ZQ_UAR"],

n = mp.game.zone.getNameOfZone(e, t, a),

r = o.includes(n) ? ["Los Santos International Airport", "Alamo Sea", "Alta", "Fort Zancudo", "Banham Canyon Dr", "Banning", "Vespucci Beach", "Banham Canyon", "Braddock Pass", "Braddock Tunnel", "Burton", "Calafia Bridge", "Raton Canyon", "Cassidy Creek", "Chamberlain Hills", "Vinewood Hills", "Chumash", "Chiliad Mountain State Wilderness", "Cypress Flats", "Davis", "Del Perro Beach", "Del Perro", "La Puerta", "Grand Senora Desert", "Downtown", "Downtown Vinewood", "East Vinewood", "El Burro Heights", "El Gordo Lighthouse", "Elysian Island", "Galilee", "GWC and Golfing Society", "Grapeseed", "Great Chaparral", "Harmony", "Hawick", "Vinewood Racetrack", "Humane Labs and Research", "Bolingbroke Penitentiary", "Little Seoul", "Land Act Reservoir", "Lago Zancudo", "Land Act Dam", "Legion Square", "La Mesa", "La Puerta", "Mirror Park", "Morningwood", "Richards Majestic", "Mount Chiliad", "Mount Gordo", "Mount Josiah", "Murrieta Heights", "North Chumash", "N.O.O.S.E", "Pacific Ocean", "Paleto Cove", "Paleto Bay", "Paleto Forest", "Palomino Highlands", "Palmer-Taylor Power Station", "Pacific Bluffs", "Pillbox Hill", "Procopio Beach", "Rancho", "Richman Glen", "Richman", "Rockford Hills", "Redwood Lights Track", "San Andreas", "San Chianski Mountain Range", "Sandy Shores", "Mission Row", "Stab City", "Maze Bank Arena", "Strawberry", "Tataviam Mountains", "Terminal", "Textile City", "Tongva Hills", "Tongva Valley", "Vespucci Canals", "Vespucci", "Vinewood", "Ron Alternates Wind Farm", "West Vinewood", "Zancudo River", "Port of South Los Santos", "Davis Quartz"][o.indexOf(n)] : "",

s = mp.game.pathfind.getStreetNameAtCoord(e, t, a, 0, 0),

i = mp.game.ui.getStreetNameFromHashKey(s.streetName);

return r + " " + i

}

}

new RealEstateAgencyMenu;

class FactionMenu extends Menu {

constructor() {

super("faction"), global.rpc.on("client_menu_faction_open", e => {

openMenu(this, e)

})

}

}

new FactionMenu;

class FactionRadioMenu extends Menu {

constructor() {

super("factionRadio"), this.lastFactionSave = "", this.channels = [], global.binder.register({

action: "RADIO_CHAT_OPEN",

desc: "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0440\u0430\u0446\u0438\u044E",

defaultKey: -1,

func: async () => {

if (this.isOpen) return void closeMenu(this);

if (!(mp.gui.cursor.visible || global.isChatOpen || global.disableKeys || global.isPlayerDeath || localPlayer.getVariable("cuffed"))) {

const e = global.getEntityVariable(localPlayer, "factionId", "");

if (e != this.lastFactionSave) {

const e = await global.rpc.callServer("server_fRadio_get");

if (e.error) return global.rpc.triggerClient("clientFunc_notifyError", e.errorText);

this.channels = e.data

}

return 0 === this.channels.length ? global.rpc.triggerClient("clientFunc_notifyError", "\u0423 \u0432\u0430\u0441 \u043D\u0435\u0442 \u0440\u0430\u0446\u0438\u0438") : void openMenu(this, {

current: global.fRadioVoiceChannelId,

channels: this.channels

})

}

}

}), mp.events.addDataHandler("factionId", (e, t) => {

e === localPlayer && "" === t && (global.fRadioVoiceChannelId = -1)

})

}

}

new FactionRadioMenu;

class FactionGangWorkShopMenu extends Menu {

constructor() {

super("faction_gang_workshop"), global.rpc.on("client_menu_faction_gang_workshop_open", e => {

openMenu(this, e)

})

}

}

new FactionGangWorkShopMenu;

class FactionGovWorkShopMenu extends Menu {

constructor() {

super("faction_gov_workshop"), global.rpc.on("client_menu_faction_gov_workshop_open", e => {

openMenu(this, e)

})

}

}

new FactionGovWorkShopMenu;

class FactionNewsEditMenu extends Menu {

constructor() {

super("faction_news_edit"), global.rpc.on("client_menu_faction_newsEdit_open", e => {

openMenu(this, e)

}), global.rpc.on("client_menu_faction_news_ad_new", e => {

this.isOpen && global.rpc.triggerBrowser(menuBrowser, "new_ad", e)

}), global.rpc.on("client_menu_faction_news_ad_delete", e => {

this.isOpen && global.rpc.triggerBrowser(menuBrowser, "delete_ad", e)

}), global.rpc.on("client_menu_faction_news_ad_updateStatus", e => {

this.isOpen && global.rpc.triggerBrowser(menuBrowser, "status_ad", e)

})

}

}

new FactionNewsEditMenu;

class FactionNewsBossMenu extends Menu {

constructor() {

super("faction_news_boss"), global.rpc.on("client_menu_faction_newsBoss_open", e => {

openMenu(this, e)

})

}

}

new FactionNewsBossMenu;

class FactionCityHallDebtorsListMenu extends Menu {

constructor() {

super("faction_cityHall_debtorsList"), global.rpc.on("client_menu_faction_cityHall_debtorsList_open", e => {

openMenu(this, e)

})

}

}

new FactionCityHallDebtorsListMenu;

class FactionEMSDispatcherMenu extends Menu {

constructor() {

super("faction_ems_dispatcher"), global.rpc.on("client_menu_faction_ems_dispatcherMenu_open", e => {

const t = localPlayer.position;

for (const a of e) a.dist = mp.game.pathfind.calculateTravelDistanceBetweenPoints(t.x, t.y, t.z, a.pos.x, a.pos.y, a.pos.z), a.streetName = this.getStreetName(a.pos.x, a.pos.y, a.pos.z);

openMenu(this, e)

}), global.rpc.on("client_menu_faction_ems_dispatcherMenu_update", e => {

if (this.isOpen) {

const t = localPlayer.position;

for (const a of e) a.dist = mp.game.pathfind.calculateTravelDistanceBetweenPoints(t.x, t.y, t.z, a.pos.x, a.pos.y, a.pos.z), a.streetName = this.getStreetName(a.pos.x, a.pos.y, a.pos.z);

openMenu(this, e)

}

})

}

getStreetName(e, t, a) {

const o = ["AIRP", "ALAMO", "ALTA", "ARMYB", "BANHAMC", "BANNING", "BEACH", "BHAMCA", "BRADP", "BRADT", "BURTON", "CALAFB", "CANNY", "CCREAK", "CHAMH", "CHIL", "CHU", "CMSW", "CYPRE", "DAVIS", "DELBE", "DELPE", "DELSOL", "DESRT", "DOWNT", "DTVINE", "EAST_V", "EBURO", "ELGORL", "ELYSIAN", "GALFISH", "GOLF", "GRAPES", "GREATC", "HARMO", "HAWICK", "HORS", "HUMLAB", "JAIL", "KOREAT", "LACT", "LAGO", "LDAM", "LEGSQU", "LMESA", "LOSPUER", "MIRR", "MORN", "MOVIE", "MTCHIL", "MTGORDO", "MTJOSE", "MURRI", "NCHU", "NOOSE", "OCEANA", "PALCOV", "PALETO", "PALFOR", "PALHIGH", "PALMPOW", "PBLUFF", "PBOX", "PROCOB", "RANCHO", "RGLEN", "RICHM", "ROCKF", "RTRAK", "SANAND", "SANCHIA", "SANDY", "SKID", "SLAB", "STAD", "STRAW", "TATAMO", "TERMINA", "TEXTI", "TONGVAH", "TONGVAV", "VCANA", "VESP", "VINE", "WINDF", "WVINE", "ZANCUDO", "ZP_ORT", "ZQ_UAR"],

n = mp.game.zone.getNameOfZone(e, t, a),

r = o.includes(n) ? ["Los Santos International Airport", "Alamo Sea", "Alta", "Fort Zancudo", "Banham Canyon Dr", "Banning", "Vespucci Beach", "Banham Canyon", "Braddock Pass", "Braddock Tunnel", "Burton", "Calafia Bridge", "Raton Canyon", "Cassidy Creek", "Chamberlain Hills", "Vinewood Hills", "Chumash", "Chiliad Mountain State Wilderness", "Cypress Flats", "Davis", "Del Perro Beach", "Del Perro", "La Puerta", "Grand Senora Desert", "Downtown", "Downtown Vinewood", "East Vinewood", "El Burro Heights", "El Gordo Lighthouse", "Elysian Island", "Galilee", "GWC and Golfing Society", "Grapeseed", "Great Chaparral", "Harmony", "Hawick", "Vinewood Racetrack", "Humane Labs and Research", "Bolingbroke Penitentiary", "Little Seoul", "Land Act Reservoir", "Lago Zancudo", "Land Act Dam", "Legion Square", "La Mesa", "La Puerta", "Mirror Park", "Morningwood", "Richards Majestic", "Mount Chiliad", "Mount Gordo", "Mount Josiah", "Murrieta Heights", "North Chumash", "N.O.O.S.E", "Pacific Ocean", "Paleto Cove", "Paleto Bay", "Paleto Forest", "Palomino Highlands", "Palmer-Taylor Power Station", "Pacific Bluffs", "Pillbox Hill", "Procopio Beach", "Rancho", "Richman Glen", "Richman", "Rockford Hills", "Redwood Lights Track", "San Andreas", "San Chianski Mountain Range", "Sandy Shores", "Mission Row", "Stab City", "Maze Bank Arena", "Strawberry", "Tataviam Mountains", "Terminal", "Textile City", "Tongva Hills", "Tongva Valley", "Vespucci Canals", "Vespucci", "Vinewood", "Ron Alternates Wind Farm", "West Vinewood", "Zancudo River", "Port of South Los Santos", "Davis Quartz"][o.indexOf(n)] : "",

s = mp.game.pathfind.getStreetNameAtCoord(e, t, a, 0, 0),

i = mp.game.ui.getStreetNameFromHashKey(s.streetName);

return r + " " + i

}

onClose() {}

}

new FactionEMSDispatcherMenu;

class FactionEMSChangeFace extends Menu {

constructor() {

super("faction_ems_changeFace");

const e = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23],

t = [21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 45];

this.father = 0, this.mother = 0, this.similarity = .5, this.skin = .5, this.faceData = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], this.headOverlay = {

face0: 255,

face3: 255,

face7: 255,

face9: 255,

face11: 255,

face12: 255

}, mp.events.add("client_ems_changeFace_start", () => {

this.resetParams(), this.updateCharacter(), localPlayer.setCoordsNoOffset(378.41, -1402.3, 32.51, !1, !1, !1), localPlayer.setHeading(139), openMenu(this, null), setTimeout(() => {

localPlayer.setCoordsNoOffset(378.41, -1402.3, 32.51, !1, !1, !1), localPlayer.setHeading(139)

}, 500)

}), mp.events.add("__client_ems_changeFace_parent", (a, o) => {

this.mother = t[a], this.father = e[o], this.updateCharacter()

}), mp.events.add("__client_ems_changeFace_similarity", e => {

this.similarity = e, this.updateCharacter()

}), mp.events.add("__client_ems_changeFace_skin", e => {

this.skin = e, this.updateCharacter()

}), mp.events.add("__client_ems_changeFace_face", (e, t) => {

this.faceData[e] = t, localPlayer.setFaceFeature(e, t)

}), mp.events.add("__client_ems_changeFace_headOverlay", (e, t) => {

this.headOverlay["face" + e] = t, localPlayer.setHeadOverlay(e, t, 100, 0, 0)

}), mp.events.add("__client_ems_changeFace_end", async e => {

const t = await global.rpc.callServer("server_ems_changeFace_end", [this.mother, this.father, this.similarity.toFixed(2), this.skin.toFixed(2), this.faceData.map(e => e.toFixed(2)), [this.headOverlay.face0, this.headOverlay.face3, this.headOverlay.face7, this.headOverlay.face9], e]);

return "" == t ? void(localPlayer.clearTasks(), closeMenu(this)) : void global.rpc.triggerClient("clientFunc_notifyError", t)

})

}

resetParams() {

this.fater = 0, this.mother = 0, this.similarity = .5, this.skin = .5, this.faceData = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], this.headOverlay = {

face0: 255,

face3: 255,

face7: 255,

face9: 255,

face11: 255,

face12: 255

}

}

updateCharacter() {

localPlayer.setHeadBlendData(this.mother, this.father, 0, this.mother, this.father, 0, this.similarity, this.skin, 0, !0);

for (let e = 0; e < this.faceData.length; e++) localPlayer.setFaceFeature(e, this.faceData[e]);

localPlayer.setHeadOverlay(0, this.headOverlay.face0, 100, 0, 0), localPlayer.setHeadOverlay(3, this.headOverlay.face3, 100, 0, 0), localPlayer.setHeadOverlay(7, this.headOverlay.face7, 100, 0, 0), localPlayer.setHeadOverlay(9, this.headOverlay.face9, 100, 0, 0)

}

afterOpen() {

global.setCameraToPlayer(1.2, new mp.Vector3(0, .65, .85), new mp.Vector3(0, .65, .85), 0, 1500), global.hideUI(!0), global.disableAllAction = !0

}

onClose() {

global.resetCamera(500), global.hideUI(!1), global.disableAllAction = !1

}

}

new FactionEMSChangeFace;

class FactionPoliceDispatcherMenu extends Menu {

constructor() {

super("faction_police_dispatcher"), this.requestOpen = !1, global.rpc.on("client_menu_faction_police_dispatcherMenu_open", async () => {

this.requestOpen || this.isOpen || (this.requestOpen = !0, openMenu(this, (await rpc.callServer("server_faction_police_dispatcherMenuOpen"))), this.requestOpen = !1)

}), global.rpc.on("client_menu_faction_police_dispatcherMenu_update", e => {

this.isOpen && openMenu(this, e)

})

}

afterOpen() {

global.hideHelpBox(!0)

}

onClose() {

global.hideHelpBox(!1), global.rpc.triggerServer("server_faction_police_dispatcher_closeMenu")

}

}

new FactionPoliceDispatcherMenu;

class FactionPoliceArrestMenu extends Menu {

constructor() {

super("faction_police_arrestMenu"), global.rpc.on("client_faction_police_arrestStart", e => {

openMenu(this, {

name: global.getEntityVariable(e, "characterName", ""),

target: e

})

}), global.rpc.on("client_faction_police_arrestEnd", () => {

this.isOpen && closeMenu(this)

})

}

onClose() {}

}

new FactionPoliceArrestMenu;

class FactionPoliceDocMenu extends Menu {

constructor() {

super("faction_policeDoc"), this.enableCursor = !1, global.rpc.on("client_faction_police_doc", e => {

openMenu(this, e)

})

}

afterOpen() {

global.hideUI(!0)

}

onClose() {

global.hideUI(!1)

}

}

new FactionPoliceDocMenu;

class GovDocMenu extends Menu {

constructor() {

super("faction_govDocument"), this.enableCursor = !1, global.rpc.on("client_faction_gov_doc", e => {

openMenu(this, e)

})

}

afterOpen() {

global.hideUI(!0)

}

onClose() {

global.hideUI(!1)

}

}

new GovDocMenu;

class PlayerFamilyMenu extends Menu {

constructor() {

super("playerFamily_mainMenu"), global.rpc.on("client_playerFamily_openMenu", e => {

openMenu(this, e)

})

}

afterOpen() {}

onClose() {}

}

new PlayerFamilyMenu;

class PlayerFamilyOfficeMenu extends Menu {

constructor() {

super("playerFamily_officeMenu"), global.rpc.on("client_playerFamily_officeMenu", e => {

openMenu(this, e)

})

}

afterOpen() {}

onClose() {}

}

new PlayerFamilyOfficeMenu;

class DriverSchoolMenu extends Menu {

constructor() {

super("driverSchool_text"), mp.events.add("client_driverSchool_openText", () => {

this.isOpen || openMenu(this, {})

})

}

afterOpen(e) {}

onClose() {}

}

new DriverSchoolMenu;

class DriverSchoolTestMenu extends Menu {

constructor() {

super("driverSchool_test"), global.rpc.on("client_driverSchool_startTest", e => {

this.isOpen || openMenu(this, e)

})

}

onClose() {}

}

new DriverSchoolTestMenu;

class BusinessMenu extends Menu {

constructor() {

var e = null;

super("business"), e = this, global.rpc.on("client_menu_business_open", function(t) {

openMenu(e, t)

})

}

afterOpen(e) {

mp.game.graphics.transitionToBlurred(500)

}

onClose() {

mp.game.graphics.transitionFromBlurred(100)

}

}

new BusinessMenu;

class ShopProductMenu extends Menu {

constructor() {

var e = null;

super("shop_product"), e = this, global.rpc.on("client_menu_shopProduct_open", function(t) {

openMenu(e, t)

})

}

onClose() {

global.rpc.callServer("server_business_playerExit", {})

}

}

new ShopProductMenu;

class ShopClothesMenu extends Menu {

constructor() {

var e = null;

super("shop_clothes"), e = this, this.selectedClothes = -1, this.selectedColor = -1, this.camera = null, this.lastCameraMode = -1, this.defaultRot = 0, this.playerClothes = [

[0, [0, 0, 0]],

[1, [0, 0, 0]],

[3, [0, 0, 0]],

[4, [0, 0, 0]],

[5, [0, 0, 0]],

[6, [0, 0, 0]],

[7, [0, 0, 0]],

[8, [0, 0, 0]],

[9, [0, 0, 0]],

[10, [0, 0, 0]],

[11, [0, 0, 0]]

], this.playerProps = [

[0, [0, 0]],

[1, [0, 0]],

[2, [0, 0]],

[6, [0, 0]],

[7, [0, 0]]

];

let t = [];

global.rpc.on("client_menu_shopClothes_open", function(a) {

1 == a.i && (t = []), t.push(...a.l), a.i === a.n && (e.defaultRot = localPlayer.getHeading(), e.savePlayerClothes(), mp.game.invoke("0xADF692B254977C0C", localPlayer.handle, -1569615261, !0), global.disableAllAction = !0, openMenu(e, {

list: t,

сurrency: a.сurrency

}))

}), global.rpc.on("__shopClothes_select", function(t) {

if (e.isOpen) {

e.selectedClothes = t;

for (let a = 0; a < e.params.list.length; a++)

if (e.params.list[a].i == t) {

const t = e.params.list[a].clothes;

for (let e = 0; e < t[3].length; e++) 0 >= t[3][e][0] ? localPlayer.setPropIndex(-1 * t[3][e][0], t[3][e][1], t[3][e][2], !0) : localPlayer.setComponentVariation(t[3][e][0], t[3][e][1], t[3][e][2], 2);

e.setCamera(t[0]);

break

}

}

}), global.rpc.on("__shopClothes_selectColor", function(t) {

if (e.isOpen) {

e.selectedColor = t;

for (let a = 0; a < e.params.list.length; a++)

if (e.params.list[a].i == e.selectedClothes) {

const o = e.params.list[a].clothes;

0 >= o[0] ? localPlayer.setPropIndex(-1 * o[0], o[1], o[2][t], !0) : 8 == o[0] ? (localPlayer.setComponentVariation(8, localPlayer.getDrawableVariation(8), o[2][t], 2), localPlayer.setComponentVariation(11, o[5], o[2][t], 2)) : localPlayer.setComponentVariation(o[0], o[1], o[2][t], 2);

break

}

}

}), mp.events.add("__shopClotehs_rotatePlayer", function(e) {

localPlayer.setHeading(localPlayer.getHeading() + e)

})

}

setCamera(e) {

if (this.lastCameraMode == e) return;

localPlayer.setHeading(this.defaultRot), this.lastCameraMode = e;

var t = mp.players.local.position,

a = {

Angle: mp.players.local.getRotation(2).z + 90,

Dist: 1,

Height: .6

};

let o = t.z;

switch (e) {

case 11:

case 8:

a.Height = .1;

break;

case 6:

a.Height = -.7, a.Dist = .5, o -= 1;

break;

case 4:

a.Height = -.7, o -= .6;

break;

case 3:

a.Height = .1, a.Angle += 35, a.Dist = .65;

break;

case -0:

a.Height = .9, o += 1;

break;

case -1:

a.Height = .7, a.Dist = .65, o += .85;

break;

case -2:

a.Height = .7, o += .7, a.Dist = .5;

break;

case -6:

a.Height = .1, a.Angle += 35, a.Dist = .65;

break;

case -7:

a.Height = .1, a.Angle += 260, a.Dist = .65;

break;

default:

}

var n = function(e, t, a) {

return t *= .0174533, e.y += a * Math.sin(t), e.x += a * Math.cos(t), e

}(new mp.Vector3(t.x, t.y, t.z + a.Height), a.Angle, a.Dist);

this.camera && this.camera.destroy(), this.camera = mp.cameras.new("default", n, new mp.Vector3(0, 0, 0), 80), this.camera.pointAtCoord(t.x, t.y, o), this.camera.setActive(!0), mp.game.cam.renderScriptCams(!0, !1, 0, !0, !1)

}

savePlayerClothes() {

for (let e = 0; e < this.playerClothes.length; e++) {

const t = this.playerClothes[e][0];

this.playerClothes[e][1] = [localPlayer.getDrawableVariation(t), localPlayer.getTextureVariation(t), localPlayer.getPaletteVariation(t)]

}

for (let e = 0; e < this.playerProps.length; e++) {

const t = this.playerProps[e][0];

this.playerProps[e][1] = [localPlayer.getPropIndex(t), localPlayer.getPropTextureIndex(t)]

}

}

resetPlayerClothes() {

for (let e = 0; e < this.playerClothes.length; e++) localPlayer.setComponentVariation(this.playerClothes[e][0], this.playerClothes[e][1][0], this.playerClothes[e][1][1], this.playerClothes[e][1][2]);

for (let e = 0; e < this.playerProps.length; e++) - 1 == this.playerProps[e][1][0] ? localPlayer.clearProp(this.playerProps[e][0]) : localPlayer.setPropIndex(this.playerProps[e][0], this.playerProps[e][1][0], this.playerProps[e][1][1], !0)

}

afterOpen(e) {

global.hideUI(!0)

}

onClose() {

this.lastCameraMode = -1, this.resetPlayerClothes(), global.hideUI(!1), global.disableAllAction = !1, mp.game.cam.renderScriptCams(!1, !0, 0, !0, !1), this.camera && (this.camera.destroy(), this.camera = null), global.rpc.callServer("server_business_playerExit", {})

}

}

new ShopClothesMenu;

class ShopCarMenu extends Menu {

constructor() {

var e = null;

super("shop_vehicle"), e = this, this.serverData = null, this.localVeh = null, this.camera = null, this.startTestDrive = !1, this.testDriveSpeedTimer = null, this.saveVehModel = "", this.savePlayerPos = new mp.Vector3(0, 0, 0), global.rpc.on("client_menu_shopVehicle_open", t => {

this.serverData = t, this.startTestDrive = !1, this.savePlayerPos = new mp.Vector3(localPlayer.position.x, localPlayer.position.y, localPlayer.position.z), openMenu(e, {

vehicles: t.vehicles,

rot: t.vehRot,

vehPos: t.vehPos,

vehRot: t.vehRot,

vehCamPos: t.vehCamPos,

camPos: t.camPos,

family: t.family,

сurrency: t.сurrency

}), global.hideUI(!0), null != e.camera && e.camera.destroy(), e.camera = mp.cameras.new("default", t.camPos, new mp.Vector3(0, 0, 0), 50), e.camera.pointAtCoord(t.vehCamPos.x, t.vehCamPos.y, t.vehCamPos.z), e.camera.setActive(!0), mp.game.cam.renderScriptCams(!0, !1, 0, !0, !1)

}), global.rpc.register("__client_carShop_select", t => {

if (e.isOpen) {

let a = e.params.vehicles[t];

return null != e.localVeh && e.localVeh.destroy(), this.saveVehModel = a.model, e.localVeh = mp.vehicles.new(mp.game.joaat(a.model), e.params.vehPos, {

heading: e.params.vehRot,

color: [

[255, 255, 255],

[255, 255, 255]

],

dimension: localPlayer.remoteId + 1

}), e.localVeh.setHeading(e.params.vehRot), e.localVeh.setDirtLevel(0), [3.6 * mp.game.vehicle.getVehicleModelMaxSpeed(mp.game.joaat(a.model)), mp.game.vehicle.getVehicleModelAcceleration(mp.game.joaat(a.model)), mp.game.vehicle.getVehicleModelMaxTraction(mp.game.joaat(a.model)), mp.game.vehicle.getVehicleModelMaxBraking(mp.game.joaat(a.model))]

}

}), mp.events.add("__client_carShop_rotateVeh", e => {

this.isOpen && this.localVeh && mp.vehicles.exists(this.localVeh) && this.localVeh.handle && this.localVeh.setHeading(this.localVeh.getHeading() + e)

}), global.rpc.on("__client_carShop_setColor", function(t) {

e.isOpen && null != e.localVeh && (e.localVeh.setCustomPrimaryColour(t[0][0], t[0][1], t[0][2]), e.localVeh.setCustomSecondaryColour(t[1][0], t[1][1], t[1][2]))

}), mp.events.add("__client_carShop_startTestDrive", () => {

this.localVeh && mp.vehicles.exists(this.localVeh) && (global.hideUI(!1), this.startTestDrive = !0, this.testDriveSpeedTimer = setInterval(() => {

this.localVeh && mp.vehicles.exists(this.localVeh) && global.mainBrowser.execute(`mainHud.vehicleData.speed = ${Math.round(3.6*this.localVeh.getSpeed())};`)

}, 250), global.mainBrowser.execute(`

mainHud.vehicleData.enable = true;

mainHud.vehicleData.speed = 0;

mainHud.vehicleData.fuel = 0;

mainHud.vehicleData.engine = true;

mainHud.vehicleData.lock = false;

mainHud.vehicleData.indicatorLeft = false;

mainHud.vehicleData.indicatorRight = false;

`), localPlayer.setAlpha(255), localPlayer.taskEnterVehicle(this.localVeh.handle, 2e3, -1, 2, 16, 0), this.camera && mp.cameras.exists(this.camera) && (this.camera.destroy(), this.camera = null), mp.game.cam.renderScriptCams(!1, !0, 0, !0, !1), global.showCursor(!1))

}), mp.events.add("playerLeaveVehicle", () => {

this.startTestDrive && (global.hideUI(!0), this.startTestDrive = !1, clearInterval(this.testDriveSpeedTimer), global.mainBrowser.execute(`mainHud.vehicleData.enable = false;`), localPlayer.setAlpha(0), localPlayer.setCoordsNoOffset(this.savePlayerPos.x, this.savePlayerPos.y, this.savePlayerPos.z, !1, !1, !1), this.camera = mp.cameras.new("default", this.serverData.camPos, new mp.Vector3(0, 0, 0), 50), this.camera.pointAtCoord(this.serverData.vehCamPos.x, this.serverData.vehCamPos.y, this.serverData.vehCamPos.z), this.camera.setActive(!0), mp.game.cam.renderScriptCams(!0, !1, 0, !0, !1), global.rpc.triggerBrowser(menuBrowser, "__client_browser_vehicleShop_endTestDrive"), null != this.localVeh && mp.vehicles.exists(this.localVeh) && this.localVeh.destroy(), this.localVeh = mp.vehicles.new(mp.game.joaat(this.saveVehModel), this.params.vehPos, {

heading: this.params.vehRot,

color: [

[255, 255, 255],

[255, 255, 255]

],

dimension: localPlayer.remoteId + 1

}), this.localVeh.setHeading(this.params.vehRot), this.localVeh.setDirtLevel(0), global.showCursor(!0))

})

}

afterOpen(e) {

localPlayer.setAlpha(0)

}

onClose() {

this.startTestDrive = !1, localPlayer.setAlpha(255), null != this.localVeh && (this.localVeh.destroy(), this.localVeh = null), global.rpc.callServer("server_business_playerExit", {}), global.hideUI(!1), this.camera && mp.cameras.exists(this.camera) && (this.camera.destroy(), this.camera = null), mp.game.cam.renderScriptCams(!1, !0, 0, !0, !1)

}

}

new ShopCarMenu;

class ShopWeaponMenu extends Menu {

constructor() {

var e = null;

super("shop_weapon"), e = this, global.rpc.on("client_menu_shopWeapon_open", function(t) {

openMenu(e, t)

})

}

onClose() {

global.rpc.callServer("server_business_playerExit", {})

}

}

new ShopWeaponMenu;

class ShopMaskMenu extends Menu {

constructor() {

var e = null;

super("shop_mask"), this.camera = null, this.currentIndex = -1, this.saveMaskId = -1, this.saveMaskColor = -1, this.saveHairId = -1, this.saveHairStyle = -1, e = this;

var t = [];

global.rpc.on("client_menu_shopMask_open", function(a) {

global.hideUI(!0), e.saveHairId = localPlayer.getDrawableVariation(2), e.saveHairStyle = localPlayer.getTextureVariation(2), e.saveMaskId = localPlayer.getDrawableVariation(1), e.saveMaskColor = localPlayer.getTextureVariation(1), mp.game.invoke("0xADF692B254977C0C", localPlayer.handle, -1569615261, !0), global.disableAllAction = !0, e.camera && e.camera.destroy();

var o = mp.players.local.position,

n = {

Angle: mp.players.local.getRotation(2).z + 90,

Dist: .7,

Height: .7

},

r = function(e, t, a) {

return t *= .0174533, e.y += a * Math.sin(t), e.x += a * Math.cos(t), e

}(new mp.Vector3(o.x, o.y, o.z + n.Height), n.Angle, n.Dist);

e.camera = mp.cameras.new("default", r, new mp.Vector3(0, 0, 0), 40), e.camera.pointAtCoord(o.x, o.y, o.z + .7), e.camera.setActive(!0), mp.game.cam.renderScriptCams(!0, !1, 0, !0, !1), t = a.list, openMenu(e, {

list: a.list.map(e => ({

name: e.name,

price: e.price,

colorCount: e.colors.length

})),

сurrency: a.сurrency

})

}), global.rpc.on("__shopMask_select", function(a) {

localPlayer.setComponentVariation(2, 0, 0, 2), localPlayer.setComponentVariation(1, t[a].maskId, 0, 2), e.currentIndex = a

}), global.rpc.on("__shopMask_selectColor", function(a) {

localPlayer.setComponentVariation(1, t[e.currentIndex].maskId, t[e.currentIndex].colors[a], 2)

})

}

onClose() {

global.hideUI(!1), global.disableAllAction = !1, mp.game.cam.renderScriptCams(!1, !0, 0, !0, !1), this.camera && (this.camera.destroy(), this.camera = null), localPlayer.setComponentVariation(2, this.saveHairId, this.saveHairStyle, 2), localPlayer.setComponentVariation(1, this.saveMaskId, this.saveMaskColor, 2), global.rpc.callServer("server_business_playerExit", {})

}

}

new ShopMaskMenu;

class GasStationMenu extends Menu {

constructor() {

super("gas_station"), mp.events.add("client_menu_gasStationOpen", (e, t) => {

openMenu(this, {

maxFuelTank: e,

price: t

})

})

}

}

new GasStationMenu;

class LSCustomMenu extends Menu {

constructor() {

super("shop_lsCustom"), this.isInPickup = !1, this.currentCustom = null, this.vehColor = [], this.vehData = [];

const e = [{

id: "LS_CUSTOM_1",

position: new mp.Vector3(-224.51, -1329.64, 31.38),

vehPosition: new mp.Vector3(-211.32, -1324.59, 30.38),

vehRot: 317,

cameraPosition: new mp.Vector3(-215.11, -1320.66, 32.89)

}, {

id: "LS_CUSTOM_2",

position: new mp.Vector3(-325, -133.26, 39.18),

vehPosition: new mp.Vector3(-337.82, -136.53, 38.21),

vehRot: 126,

cameraPosition: new mp.Vector3(-338.49, -140.15, 40.2)

}, {

id: "LS_CUSTOM_3",

position: new mp.Vector3(-1157.8, -2021.16, 13.34),

vehPosition: new mp.Vector3(-1155.36, -2006.26, 12.38),

vehRot: 273,

cameraPosition: new mp.Vector3(-1154.43, -2001.05, 14.8)

}];

for (const t of e) {

mp.markers.new(29, new mp.Vector3(t.position.x, t.position.y, t.position.z), .8, {

color: [228, 0, 0, 255]

});

const e = mp.colshapes.newCircle(t.position.x, t.position.y, 2.5, 0);

e.lsCustomShape = !0, e.custom = t

}

mp.events.add("playerEnterColshape", e => {

if (e.lsCustomShape != null) {

if (!localPlayer.vehicle) return;

this.isInPickup = !0, this.currentCustom = e.custom, global.notifyKeyHelpShow("E", "\u0432\u043E\u0439\u0442\u0438 \u0432 LSCustom")

}

}), mp.events.add("playerExitColshape", e => {

e.lsCustomShape != null && (this.isInPickup = !1, global.notifyKeyHelpHide())

}), mp.keys.bind(69, !0, () => {

this.isInPickup && mp.events.callRemote("server_lsCustom_start", this.currentCustom.id)

}), mp.events.add("__lsCustom_resetVeh", () => {

this.resetVehData()

}), mp.events.add("__lsCustom_rotateVeh", e => {

localPlayer.vehicle && localPlayer.vehicle.setHeading(localPlayer.vehicle.getHeading() + e)

}), mp.events.add("__lsCustom_setMod", (e, t) => {

localPlayer.vehicle && (14 == e ? (localPlayer.vehicle.setMod(e, t), localPlayer.vehicle.startHorn(1e3, 0, !1)) : 55 == e ? localPlayer.vehicle.setWindowTint(t + 1) : 22 == e && (localPlayer.vehicle.setLights(!0), 0 > t ? (localPlayer.vehicle.toggleMod(22, !1), mp.game.invoke("0xE41033B25D003A07", localPlayer.vehicle.handle, 255)) : (localPlayer.vehicle.toggleMod(22, !0), mp.game.invoke("0xE41033B25D003A07", localPlayer.vehicle.handle, t))), localPlayer.vehicle.setMod(e, t))

}), mp.events.add("__lsCustom_selectColorType", (e, t) => {

localPlayer.vehicle && (0 == e ? localPlayer.vehicle.setModColor1(t, 0, 0) : localPlayer.vehicle.setModColor2(t, 0))

}), global.rpc.on("__lsCustom_selectColor", e => {

localPlayer.vehicle && (localPlayer.vehicle.setCustomPrimaryColour(e[0][0], e[0][1], e[0][2]), localPlayer.vehicle.setCustomSecondaryColour(e[1][0], e[1][1], e[1][2]))

}), global.rpc.on("__lsCustom_buyColor", async e => {

if (await global.rpc.callServer("server_lsCustom_buyColor", e)) {

if (global.rpc.triggerClient("clientFunc_notifySuccess", "\u0413\u043E\u0442\u043E\u0432\u043E"), !localPlayer.vehicle) return;

const e = localPlayer.vehicle.getCustomPrimaryColour(0, 0, 0),

t = localPlayer.vehicle.getCustomSecondaryColour(0, 0, 0);

this.vehColor = [

[e.r, e.g, e.b],

[t.r, t.g, t.b]

]

}

}), global.rpc.on("__lsCustom_buyMod", async e => {

if (await global.rpc.callServer("server_lsCustom_buyMod", e)) {

if (global.rpc.triggerClient("clientFunc_notifySuccess", "\u0413\u043E\u0442\u043E\u0432\u043E"), !localPlayer.vehicle) return;

for (let t = 0; 50 > t; t++) t == e[2] && (this.vehData[t] = e[3])

}

}), global.rpc.on("__lsCustom_buyUniMod", async e => {

(await global.rpc.callServer("server_lsCustom_buyUniMod", e)) && global.rpc.triggerClient("clientFunc_notifySuccess", "\u0413\u043E\u0442\u043E\u0432\u043E")

}), global.rpc.on("__lsCustom_selectNeonColor", e => {

localPlayer.vehicle && (localPlayer.vehicle.setNeonLightEnabled(0, !0), localPlayer.vehicle.setNeonLightEnabled(1, !0), localPlayer.vehicle.setNeonLightEnabled(2, !0), localPlayer.vehicle.setNeonLightEnabled(3, !0), localPlayer.vehicle.setNeonLightsColour(e[0], e[1], e[2]))

}), global.rpc.on("client_lsCustom_open", e => {

this.saveVehData();

const t = localPlayer.vehicle,

a = [0, 1, 2, 3, 4, 5, 6, 7, 10, 14, 23, 48, 55];

t ? (e.modsCount = [], a.forEach(a => {

var o = [-1];

for (let e = 0; e < t.getNumMods(a); e++) o.push(e);

e.modsCount[a + ""] = o

})) : (e.modsCount = [], a.forEach(t => {

e.modsCount[t + ""] = [-1]

})), openMenu(this, e)

})

}

saveVehData() {

if (!localPlayer.vehicle) return;

this.vehData = [];

for (let e = 0; 50 > e; e++) this.vehData[e] = localPlayer.vehicle.getMod(e);

const e = localPlayer.vehicle.getCustomPrimaryColour(0, 0, 0),

t = localPlayer.vehicle.getCustomSecondaryColour(0, 0, 0);

this.vehColor = [

[e.r, e.g, e.b],

[t.r, t.g, t.b]

]

}

resetVehData() {

const e = localPlayer.vehicle;

if (e)

for (let t = 0; t < this.vehData.length; t++) e.setMod(t, this.vehData[t])

}

afterOpen() {

global.disableAllAction = !0, global.hideUI(!0), global.setCamera(this.currentCustom.cameraPosition, new mp.Vector3(0, 0, 0), 80, this.currentCustom.vehPosition, 0)

}

onClose() {

this.resetVehData(), global.rpc.triggerServer("server_lsCustom_end", this.currentCustom.id), global.disableAllAction = !1, global.hideUI(!1), global.resetCamera(0)

}

}

new LSCustomMenu;

class ShopTattoSalon extends Menu {

constructor() {

super("shop_tatto"), this.tatto = [], global.rpc.on("client_tattoSalon_open", e => {

this.tatto = e.playerTatto, openMenu(this, e)

}), mp.events.add("__client_tattoSalon_setTatto", (e, t) => {

this.resetTatto(), localPlayer.setDecoration(mp.game.joaat(e), mp.game.joaat(t))

}), mp.events.add("__client_tattoSalon_addTatto", (e, t) => {

this.tatto.push(["", e, t]), this.resetTatto()

})

}

afterOpen(e) {

localPlayer.setCoordsNoOffset(e.position.x, e.position.y, e.position.z, !1, !1, !1), localPlayer.setHeading(e.rot), global.setCameraToPlayer(1.2, new mp.Vector3(0, 0, 0), new mp.Vector3(0, 0, 0), 0, 1e3), global.hideUI(!0), global.disableAllAction = !0

}

resetTatto() {

localPlayer.clearDecorations(), this.tatto.map(e => localPlayer.setDecoration(mp.game.joaat(e[1]), mp.game.joaat(e[2])))

}

onClose() {

global.resetCamera(1e3), global.hideUI(!1), global.disableAllAction = !1, global.rpc.callServer("server_business_playerExit", {})

}

}

new ShopTattoSalon;

class ShopBarberShop extends Menu {

constructor() {

super("shop_barbershop"), global.rpc.on("client_barberShop_open", e => {

openMenu(this, e)

}), global.rpc.register("__client_barbershop_getHairStyleCount", e => localPlayer.getNumberOfTextureVariations(2, e))

}

afterOpen(e) {

localPlayer.setCoordsNoOffset(e.position.x, e.position.y, e.position.z, !1, !1, !1), localPlayer.setHeading(e.rot), global.setCameraToPlayer(.45, new mp.Vector3(0, 0, .6), new mp.Vector3(0, 0, .6), 0, 1e3), global.hideUI(!0), global.disableAllAction = !0

}

onClose() {

global.resetCamera(1e3), global.hideUI(!1), global.disableAllAction = !1, global.rpc.callServer("server_business_playerExit", {})

}

}

new ShopBarberShop;

class Casino {

constructor() {

function e(e, t, a, o, n, r) {

function s(e, t) {

if (mp.game.streaming.hasAnimDictLoaded(e)) return t();

mp.game.streaming.requestAnimDict(e);

let a = setInterval(function() {

mp.game.streaming.hasAnimDictLoaded(e) && (clearInterval(a), t())

}, 250)

}

const i = mp.peds.new(mp.game.joaat(e), new mp.Vector3(t, a, o), n, 0);

i.pedStreamInHandler = e => {

e.setAlpha(255), e.freezePosition(!0), e.setInvincible(!1), e.setCanBeDamaged(!1), e.setProofs(!1, !1, !1, !1, !1, !1, !1, !1), null != r && s(r[0], () => {

0 === i.handle || i.taskPlayAnim(r[0], r[1], 8, 0, 2, r[2], 0, !0, !0, !0)

})

}, null != r && s(r[0], () => {

0 === i.handle || i.taskPlayAnim(r[0], r[1], 8, 0, 2, r[2], 0, !0, !0, !0)

})

}

function t(e, t, a, o, n) {

mp.objects.new(mp.game.joaat(e), new mp.Vector3(t, a, o), {

rotation: new mp.Vector3(0, 0, n)

})

}

const a = new class extends Menu {

constructor() {

super("casinoMenu")

}

afterOpen() {

global.hideUI(!0), global.disableAllAction = !0

}

onClose() {

global.hideUI(!1), global.disableAllAction = !1

}

},

o = [{

model: "vw_prop_casino_slot_06a",

bets: [5, 10, 20, 25, 55],

position: new mp.Vector3(969.141602, 66.7241669, 74.7429276),

rot: -68.7528305

}, {

model: "vw_prop_casino_slot_01a",

bets: [25, 50, 75, 100, 200],

position: new mp.Vector3(969.586487, 66.5169296, 74.7415619),

rot: 22.8179436

}, {

model: "vw_prop_casino_slot_07a",

bets: [5, 10, 15, 20, 25],

position: new mp.Vector3(970.002686, 67.0885773, 74.7429276),

rot: 111.191933

}, {

model: "vw_prop_casino_slot_03a",

bets: [5, 10, 15, 20, 25],

position: new mp.Vector3(969.330872, 67.1390686, 74.7454834),

rot: -156.369827

}, {

model: "vw_prop_casino_slot_06a",

bets: [5, 10, 20, 25, 55],

position: new mp.Vector3(970.634827, 72.824295, 74.7429276),

rot: -135.309174

}, {

model: "vw_prop_casino_slot_01a",

bets: [25, 50, 75, 100, 200],

position: new mp.Vector3(970.614563, 72.3230133, 74.7415619),

rot: -38.0874634

}, {

model: "vw_prop_casino_slot_05a",

bets: [5, 10, 15, 20, 25],

position: new mp.Vector3(971.081726, 72.2742081, 74.7429276),

rot: 42.2463379

}, {

model: "vw_prop_casino_slot_07a",

bets: [5, 10, 15, 20, 25],

position: new mp.Vector3(971.169067, 72.7360916, 74.7429276),

rot: 137.472214

}, {

model: "vw_prop_casino_slot_08a",

bets: [5, 10, 15, 20, 25],

position: new mp.Vector3(976.255066, 73.2260818, 74.7495041),

rot: -121.992676

}, {

model: "vw_prop_casino_slot_04a",

bets: [55, 150, 155, 255, 550],

position: new mp.Vector3(976.43811, 72.4770355, 74.7495041),

rot: -31.9999561

}, {

model: "vw_prop_casino_slot_07a",

bets: [5, 10, 15, 20, 25],

position: new mp.Vector3(977.214172, 72.6521378, 74.7429276),

rot: 57.998745

}, {

model: "vw_prop_casino_slot_03a",

bets: [5, 10, 15, 20, 25],

position: new mp.Vector3(977.011108, 73.4251022, 74.7454834),

rot: 147.99968

}, {

model: "vw_prop_casino_slot_05a",

bets: [5, 10, 15, 20, 25],

position: new mp.Vector3(979.006287, 67.8628616, 74.7429276),

rot: 170.517303

}, {

model: "vw_prop_casino_slot_04a",

bets: [55, 150, 155, 255, 550],

position: new mp.Vector3(979.264099, 67.391098, 74.7495041),

rot: 76.4923248

}, {

model: "vw_prop_casino_slot_03a",

bets: [5, 10, 15, 20, 25],

position: new mp.Vector3(978.845337, 67.1535568, 74.7454834),

rot: -14.3978605

}, {

model: "vw_prop_casino_slot_06a",

bets: [5, 10, 20, 25, 55],

position: new mp.Vector3(978.597046, 67.5690613, 74.7429276),

rot: -101.6558

}, {

model: "vw_prop_casino_slot_04a",

bets: [55, 150, 155, 255, 550],

position: new mp.Vector3(979.264099, 67.391098, 7495041),

rot: 76.4923248

}, {

model: "vw_prop_casino_slot_03a",

bets: [5, 10, 15, 20, 25],

position: new mp.Vector3(978.845337, 67.1535568, 74.7454834),

rot: -14.3978605

}, {

model: "vw_prop_casino_slot_06a",

bets: [5, 10, 20, 25, 55],

position: new mp.Vector3(978.597046, 67.5690613, 74.7429276),

rot: -101.6558

}, {

model: "vw_prop_casino_slot_08a",

bets: [55, 150, 155, 255, 550],

position: new mp.Vector3(974.373047, 64.247757, 74.7495041),

rot: -177.047394

}, {

model: "vw_prop_casino_slot_02a",

bets: [55, 150, 155, 255, 550],

position: new mp.Vector3(974.986938, 63.7345848, 74.7436066),

rot: 92.4701157

}, {

model: "vw_prop_casino_slot_01a",

bets: [25, 50, 75, 100, 200],

position: new mp.Vector3(974.429932, 63.2939034, 74.7415619),

rot: .960162878

}, {

model: "vw_prop_casino_slot_07a",

bets: [5, 10, 15, 20, 25],

position: new mp.Vector3(973.922302, 63.6841125, 74.7429276),

rot: -87.0270386

}];

var n = [],

r = -1;

class s {

constructor(e, t) {

this.index = e, this.data = t, this.object = mp.objects.new(mp.game.joaat(t.model), t.position, {

dimension: 0,

rotation: new mp.Vector3(0, 0, t.rot)

}), this.reels = [], this.reelsCenterPos = mp.game.object.getObjectOffsetFromCoords(t.position.x, t.position.y, t.position.z, t.rot, 0, .035, 1.1), this.seatPos = mp.game.object.getObjectOffsetFromCoords(t.position.x, t.position.y, t.position.z, t.rot, 0, -.8, .7), this.actionColshape = new global.ActionColshape(t.position, 0, 1.2, `сесть за автомат ( от ${this.data.bets[0]}ф )`, () => {

global.actionAntiFlood("casinoStartSlot", 3e3) && mp.events.callRemote("server_casino_taskStartSlot", this.index)

}), this.actionColshape.isPlayerCanUse = () => -1 == r, this.actionColshape.onceMode = !0, new i("casinoSlot_" + this.index, t.position, t.rot, this.seatPos), n.push(this)

}

reCreateReels() {

this.reels.forEach(e => e.destroy()), this.reels = [mp.objects.new(mp.game.joaat(this.data.model + `_reels`), mp.game.object.getObjectOffsetFromCoords(this.data.position.x, this.data.position.y, this.data.position.z, this.data.rot, -.115, .035, 1.1), {

dimension: 0,

rotation: new mp.Vector3(0, 0, this.data.rot)

}), mp.objects.new(mp.game.joaat(this.data.model + `_reels`), mp.game.object.getObjectOffsetFromCoords(this.data.position.x, this.data.position.y, this.data.position.z, this.data.rot, .01, .035, 1.1), {

dimension: 0,

rotation: new mp.Vector3(0, 0, this.data.rot)

}), mp.objects.new(mp.game.joaat(this.data.model + `_reels`), mp.game.object.getObjectOffsetFromCoords(this.data.position.x, this.data.position.y, this.data.position.z, this.data.rot, .125, .035, 1.1), {

dimension: 0,

rotation: new mp.Vector3(0, 0, this.data.rot)

})]

}

}

class i extends global.CustomScenario {

constructor(e, t, a, o) {

super(e), this.position = t, this.rot = a, this.seatPos = o

}

onStart(e) {

e == localPlayer ? (e.taskStartScenarioAtPosition("PROP_HUMAN_SEAT_BENCH", this.seatPos.x, this.seatPos.y, this.seatPos.z, this.rot, -1, !0, !1), setTimeout(() => {

this.onStartForNew(e)

}, 3e3)) : (this.onStartForNew(e), setTimeout(() => {

mp.players.exists(e) && 0 !== e.handle && e.setHeading(this.rot)

}, 4e3))

}

onStartForNew(e) {

this.loadAnimDict("amb@code_human_in_bus_passenger_idles@male@sit@base", () => {

mp.players.exists(e) && 0 !== e.handle && (e.freezePosition(!0), e.setCollision(!1, !0), e.setHeading(this.rot), e.setCoordsNoOffset(this.seatPos.x, this.seatPos.y, this.seatPos.z - .1, !1, !1, !1), e.taskPlayAnim("amb@code_human_in_bus_passenger_idles@male@sit@base", "base", 1, 0, -1, 1, 1, !1, !1, !1))

})

}

onEnd(e) {

e.freezePosition(!1), e.setCollision(!0, !1), e.clearTasksImmediately()

}

loadAnimDict(e, t) {

if (mp.game.streaming.hasAnimDictLoaded(e)) return void t();

mp.game.streaming.requestAnimDict(e);

let a = setInterval(function() {

mp.game.streaming.hasAnimDictLoaded(e) && (clearInterval(a), t())

}, 100)

}

}

mp.events.add("client_casino_slot_start", (e, t, o) => {

r = e;

const s = n[e];

setTimeout(() => {

r !== e || (s.reCreateReels(), localPlayer.setVisible(!1, !0), global.setCamera(new mp.Vector3(s.seatPos.x, s.seatPos.y, s.seatPos.z + .5), new mp.Vector3(0, 0, 0), 50, s.reelsCenterPos, 800), openMenu(a, {

chips: t,

type: "slot",

bets: s.data.bets,

jackpot: o

}))

}, 2900)

}), mp.events.add("client_casino_slot_spitRes", (e, t, a) => {

var o = Math.floor;

const s = n[r];

if (!s) return;

s.reCreateReels();

const i = o(Math.random() * 3) + 0 + (o(Math.random() * 2) + 1);

let c = 0;

const l = [280, 320, 360],

d = [!0, !0, !0],

m = -1 === e ? [i, i + (.5 < Math.random() ? 1 : 0), i + 2] : [e, e, e];

global.menuBrowser.execute(`casinoMenu.vue.slotMusic('https://files.gta5rp.com/sound/casino_slot_spin.mp3');`);

const p = setInterval(() => {

c += 5;

for (let e = 0; 3 > e; e++) d[e] && (l[e]--, 0 > l[e] ? (s.reels[e].setRotation(22.5 * m[e], 0, s.data.rot, 2, !0), d[e] = !1) : s.reels[e].setRotation(c, 0, s.data.rot, 2, !0));

if (!d[2]) return -1 === e ? global.menuBrowser.execute(`

casinoMenu.vue.slotData.waitSpin = false;

casinoMenu.vue.slotMusic('https://files.gta5rp.com/sound/casino_slot_lose.mp3');

`) : global.menuBrowser.execute(`

casinoMenu.vue.slotData.waitSpin = false;

casinoMenu.vue.slotData.jackpot = ${a};

casinoMenu.vue.setSlotChips(${t});

casinoMenu.vue.slotMusic('https://files.gta5rp.com/sound/casino_slot_win.mp3');

`), void clearInterval(p)

}, 10);

global.antiAFK_sendAction()

}), mp.events.add("client_casino_slot_stop", () => {

r = -1, global.resetCamera(), localPlayer.setVisible(!0, !0), closeMenu(a)

}), o.forEach((e, t) => new s(t, e));

const c = [{

position: new mp.Vector3(986.6173, 43.7554, 74.9912),

rot: 52,

maxPlayer: 10,

bet: 10

}, {

position: new mp.Vector3(983.9677, 39.4752, 74.9912),

rot: 52,

maxPlayer: 10,

bet: 25

}, {

position: new mp.Vector3(982.8859, 46.0471, 74.9912),

rot: 58,

maxPlayer: 10,

bet: 35

}, {

position: new mp.Vector3(980.2363, 41.8069, 74.9912),

rot: 58,

maxPlayer: 10,

bet: 10

}];

var l = -1,

d = [];

class m {

constructor(e, t) {

this.index = e, this.data = t, this.tableObject = mp.objects.new(mp.game.joaat("cls_casino_kosti"), t.position, {

rotation: new mp.Vector3(0, 0, t.rot)

}), this.actionColshape = new global.ActionColshape(t.position, 0, 2, `встать за стол ( ставка ${t.bet}ф )`, () => {

global.actionAntiFlood("casinoStartDice", 5e3) && mp.events.callRemote("server_casino_taskStartDice", this.index)

}), this.actionColshape.onceMode = !0, d.push(this)

}

enableCamera(e) {

e ? global.setCameraRot(new mp.Vector3(this.data.position.x, this.data.position.y, this.data.position.z + 2), new mp.Vector3(270, -90, this.data.rot + 270), 80, 900) : global.resetCamera(900)

}

}

mp.events.add("client_casino_dice_start", (e, t, o) => {

l = e;

const n = d[e];

n.enableCamera(!0), openMenu(a, {

chips: t,

type: "dice",

status: o,

playerId: localPlayer.getVariable("characterId"),

bet: n.data.bet

})

}), mp.events.add("client_casino_dice_log", (e, t) => {

t ? global.menuBrowser.execute(`casinoMenu.vue.diceLog(${e}, '${escape(t)}');`) : global.menuBrowser.execute(`casinoMenu.vue.diceLog(${e}, '${escape(JSON.stringify([]))}');`), global.antiAFK_sendAction()

}), mp.events.add("client_casino_dice_stop", () => {

const e = d[l];

e && e.enableCamera(!1), l = -1, closeMenu(a)

}), c.forEach((e, t) => new m(t, e));

const p = [{

position: new mp.Vector3(942.325195, 55.3995285, 74.9912338),

rot: -166.999939,

minBet: 5,

maxBet: 1e3,

playerLimit: 10

}, {

position: new mp.Vector3(945.523193, 53.4012032, 74.9912338),

rot: -76.9999542,

minBet: 100,

maxBet: 5e3,

playerLimit: 10

}, {

position: new mp.Vector3(947.521484, 56.5991898, 74.9912338),

rot: 13,

minBet: 5,

maxBet: 1e3,

playerLimit: 10

}, {

position: new mp.Vector3(944.318176, 58.5890465, 74.9912338),

rot: 103.000038,

minBet: 250,

maxBet: 15e3,

playerLimit: 10

}];

var _ = -1,

u = [];

mp.game.streaming.requestAnimDict("anim_casino_b@amb@casino@games@roulette@table"), mp.game.streaming.requestAnimDict("anim_casino_b@amb@casino@games@roulette@dealer_female");

class h {

constructor(e, t) {

this.index = e, this.data = t, this.tableObject = mp.objects.new(mp.game.joaat("vw_prop_casino_roulette_01"), t.position, {

rotation: new mp.Vector3(0, 0, t.rot)

}), this.ped = mp.peds.new(mp.game.joaat("S_F_Y_Casino_01"), mp.game.object.getObjectOffsetFromCoords(t.position.x, t.position.y, t.position.z, t.rot, 0, .7, 1), t.rot + 180, 0), this.ped.pedStreamInHandler = e => {

e.setAlpha(255), e.freezePosition(!0), e.setInvincible(!1), e.setCanBeDamaged(!1), e.setProofs(!1, !1, !1, !1, !1, !1, !1, !1)

}, this.numbersData = [], this.betData = [], this.actionColshape = new global.ActionColshape(t.position, 0, 2, `встать за стол ( ставки от ${t.minBet}ф )`, () => {

global.actionAntiFlood("casinoStartRoulette", 5e3) && mp.events.callRemote("server_casino_taskStartRoulette", this.index)

}), this.actionColshape.onceMode = !0, this.hoverObjects = [], this.betObject = [], this.ballObject = null, u.push(this)

}

spin(e) {

if (0 !== this.tableObject.handle && 0 !== this.ped.handle) {

mp.objects.exists(this.ballObject) && this.ballObject.destroy();

const t = {

0: "38",

12: "37",

35: "36",

23: "35",

2: "34",

14: "33",

33: "32",

21: "31",

4: "30",

16: "29",

31: "28",

19: "27",

6: "26",

10: "25",

29: "24",

25: "23",

8: "22",

27: "21",

36: "20",

1: "19",

13: "18",

34: "17",

22: "16",

3: "15",

15: "14",

32: "13",

20: "12",

5: "11",

17: "10",

30: "9",

18: "8",

7: "7",

11: "6",

28: "5",

24: "4",

9: "3",

26: "2",

37: "1"

};

t[e + ""] && (e = t[e + ""]), this.ped.taskPlayAnim("anim_casino_b@amb@casino@games@roulette@dealer_female", "spin_wheel", 8, 0, -1, 0, 0, !0, !0, !0), setTimeout(() => {

if (0 !== this.tableObject.handle && 0 !== this.ped.handle) {

const t = this.tableObject.getWorldPositionOfBone(this.tableObject.getBoneIndexByName("Roulette_Wheel"));

this.tableObject.playAnim(`exit_${e}_wheel`, "anim_casino_b@amb@casino@games@roulette@table", 1e4, !1, !0, !1, 0, 131072), this.tableObject.forceAiAndAnimationUpdate(), this.ballObject = mp.objects.new(mp.game.joaat("vw_prop_roulette_ball"), t, {

dimension: 0,

rotation: new mp.Vector3(0, 0, this.data.rot)

}), this.ballObject.setCoordsNoOffset(t.x, t.y, t.z, !1, !1, !1);

const a = this.ballObject.getRotation(2);

this.ballObject.setRotation(a.x, a.y, a.z + 90, 2, !1), this.ballObject.playAnim(`exit_${e}_ball`, "anim_casino_b@amb@casino@games@roulette@table", 1e4, !1, !0, !1, 0, 136704), this.ballObject.forceAiAndAnimationUpdate(), setTimeout(() => {

0 === this.tableObject.handle || 0 === this.ped.handle || (this.ped.taskPlayAnim("anim_casino_b@amb@casino@games@roulette@dealer_female", "clear_chips_zone2", 8, 0, -1, 0, 0, !0, !0, !0), setTimeout(() => {

0 === this.tableObject.handle || 0 === this.ped.handle || this.ped.taskPlayAnim("anim_casino_b@amb@casino@games@roulette@dealer_female", "idle", 8, 0, -1, 0, 0, !0, !0, !0)

}, 1500))

}, 11e3)

}

}, 2800)

}

}

loadTableData() {

this.numbersData = [], this.betData = [];

let e = 0;

for (let t = 0; 12 > t; t++)

for (let a = 0; 3 > a; a++) this.numbersData.push({

name: e + 1,

hoverPos: this.tableObject.getOffsetFromInWorldCoords(.081 * t - .057, .167 * a - .192, .9448),

hoverObject: "vw_prop_vw_marker_02a"

}), this.betData.push({

betId: e,

name: e + 1,

pos: this.tableObject.getOffsetFromInWorldCoords(.07 * t - .05, .167 * a - [.155, .171, .192][a], .9448),

objectPos: this.tableObject.getOffsetFromInWorldCoords(.081 * t - .057, .167 * a - .192, .9448),

hoverNumbers: [e]

}), e++;

this.numbersData.push({

name: "Zero",

hoverPos: this.tableObject.getOffsetFromInWorldCoords(-.137, -.148, .9448),

hoverObject: "vw_prop_vw_marker_01a"

}), this.betData.push({

betId: this.betData.length,

name: "Zero",

pos: this.tableObject.getOffsetFromInWorldCoords(-.13, -.11, .9448),

objectPos: this.tableObject.getOffsetFromInWorldCoords(-.126, -.14, .9448),

hoverNumbers: [this.numbersData.length - 1]

}), this.numbersData.push({

name: "Double Zero",

hoverPos: this.tableObject.getOffsetFromInWorldCoords(-.133, .107, .9448),

hoverObject: "vw_prop_vw_marker_01a"

}), this.betData.push({

betId: this.betData.length,

name: "Double Zero",

pos: this.tableObject.getOffsetFromInWorldCoords(-.13, .11, .9448),

objectPos: this.tableObject.getOffsetFromInWorldCoords(-.13, .11, .9448),

hoverNumbers: [this.numbersData.length - 1]

}), this.betData.push({

betId: this.betData.length,

name: "RED",

pos: this.tableObject.getOffsetFromInWorldCoords(.265, -.31, .9448),

objectPos: this.tableObject.getOffsetFromInWorldCoords(.295, -.38, .9448),

hoverNumbers: [0, 2, 4, 6, 8, 11, 13, 15, 17, 18, 20, 22, 24, 26, 29, 31, 33, 35]

}), this.betData.push({

betId: this.betData.length,

name: "BLACK",

pos: this.tableObject.getOffsetFromInWorldCoords(.405, -.31, .9448),

objectPos: this.tableObject.getOffsetFromInWorldCoords(.45, -.38, .9448),

hoverNumbers: [1, 3, 5, 7, 9, 10, 12, 14, 16, 19, 21, 23, 25, 27, 28, 30, 32, 34]

}), this.betData.push({

betId: this.betData.length,

name: "EVEN",

pos: this.tableObject.getOffsetFromInWorldCoords(.12, -.31, .9448),

objectPos: this.tableObject.getOffsetFromInWorldCoords(.13, -.38, .9448),

hoverNumbers: [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35]

}), this.betData.push({

betId: this.betData.length,

name: "ODD",

pos: this.tableObject.getOffsetFromInWorldCoords(.55, -.31, .9448),

objectPos: this.tableObject.getOffsetFromInWorldCoords(.65, -.38, .9448),

hoverNumbers: [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34]

}), this.betData.push({

betId: this.betData.length,

name: "1to18",

pos: this.tableObject.getOffsetFromInWorldCoords(-.02, -.31, .9448),

objectPos: this.tableObject.getOffsetFromInWorldCoords(-.01, -.38, .9448),

hoverNumbers: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]

}), this.betData.push({

betId: this.betData.length,

name: "19to36",

pos: this.tableObject.getOffsetFromInWorldCoords(.68, -.31, .9448),

objectPos: this.tableObject.getOffsetFromInWorldCoords(.77, -.38, .9448),

hoverNumbers: [18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35]

}), this.betData.push({

betId: this.betData.length,

name: "1st 12",

pos: this.tableObject.getOffsetFromInWorldCoords(.05, -.245, .9448),

objectPos: this.tableObject.getOffsetFromInWorldCoords(.1, -.3, .9448),

hoverNumbers: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]

}), this.betData.push({

betId: this.betData.length,

name: "2nd 12",

pos: this.tableObject.getOffsetFromInWorldCoords(.34, -.245, .9448),

objectPos: this.tableObject.getOffsetFromInWorldCoords(.4, -.3, .9448),

hoverNumbers: [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]

}), this.betData.push({

betId: this.betData.length,

name: "3rd 12",

pos: this.tableObject.getOffsetFromInWorldCoords(.62, -.245, .9448),

objectPos: this.tableObject.getOffsetFromInWorldCoords(.7, -.3, .9448),

hoverNumbers: [24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35]

}), this.betData.push({

betId: this.betData.length,

name: "2to1",

pos: this.tableObject.getOffsetFromInWorldCoords(.795, -.15, .9448),

objectPos: this.tableObject.getOffsetFromInWorldCoords(.92, -.2, .9448),

hoverNumbers: [0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33]

}), this.betData.push({

betId: this.betData.length,

name: "2to1",

pos: this.tableObject.getOffsetFromInWorldCoords(.795, 0, .9448),

objectPos: this.tableObject.getOffsetFromInWorldCoords(.93, -.01, .9448),

hoverNumbers: [1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34]

}), this.betData.push({

betId: this.betData.length,

name: "2to1",

pos: this.tableObject.getOffsetFromInWorldCoords(.795, .15, .9448),

objectPos: this.tableObject.getOffsetFromInWorldCoords(.94, .17, .9448),

hoverNumbers: [2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35]

})

}

hoverNumbers(e) {

this.hoverObjects.forEach(e => e.destroy()), this.hoverObjects = [], e.forEach(e => {

const t = this.numbersData[e];

t && this.hoverObjects.push(mp.objects.new(mp.game.joaat(t.hoverObject), t.hoverPos, {

rotation: new mp.Vector3(0, 0, this.data.rot)

}))

})

}

createBetObject(e) {

this.betObject.forEach(e => e.destroy()), this.betObject = [], e.forEach(e => {

const t = this.betData[e];

t && this.betObject.push(mp.objects.new(mp.game.joaat("vw_prop_chip_100dollar_x1"), t.objectPos, {

rotation: new mp.Vector3(0, 0, this.data.rot)

}))

})

}

enableCamera(e) {

e ? global.setCameraRot(new mp.Vector3(this.data.position.x, this.data.position.y, this.data.position.z + 2), new mp.Vector3(270, -90, this.data.rot + 270), 80, 900) : global.resetCamera(900)

}

}

var b = -1,

C = -1,

g = 0,

A = !1,

v = 0,

y = -1,

f = [];

const V = () => {

try {

const e = u[_];

if (!e) return;

const [t, a] = mp.gui.cursor.position, o = mp.game.graphics.getScreenActiveResolution(0, 0);

let n = 30,

r = -1;

if (e.betData.forEach((e, s) => {

var i = Math.pow;

const c = mp.game.graphics.world3dToScreen2d(e.pos.x, e.pos.y, e.pos.z),

l = Math.sqrt(i(c.x * o.x - t, 2) + i(c.y * o.y - a, 2));

l < n && (n = l, r = s)

}), b !== r) {

const t = e.betData[r];

t && -1 === f.indexOf(t.betId) ? (e.hoverNumbers(t.hoverNumbers), C = t.betId) : (e.hoverNumbers([]), C = -1), b = r

}

} catch (e) {

mp.game.graphics.notify("" + e)

}

};

mp.events.add("click", (e, t, a) => {

if (-1 !== _ && -1 !== C && "up" === a) {

const e = u[_];

return e ? A ? global.rpc.trigger("clientFunc_notifyError", "\u041F\u043E\u0434\u043E\u0436\u0434\u0438\u0442\u0435") : 2 === y ? global.rpc.trigger("clientFunc_notifyError", "\u0421\u0435\u0439\u0447\u0430\u0441 \u043D\u0435\u043B\u044C\u0437\u044F \u0434\u0435\u043B\u0430\u0442\u044C \u0441\u0442\u0430\u0432\u043A\u0438") : 3 <= f.length ? global.rpc.trigger("clientFunc_notifyError", "\u041D\u0435\u043B\u044C\u0437\u044F \u0441\u0434\u0435\u043B\u0430\u0442\u044C \u0431\u043E\u043B\u044C\u0448\u0435 3 \u0441\u0442\u0430\u0432\u043E\u043A") : v < g ? global.rpc.trigger("clientFunc_notifyError", "\u0423 \u0432\u0430\u0441 \u043D\u0435\u0442 \u0441\u0442\u043E\u043B\u044C\u043A\u043E \u0444\u0438\u0448\u0435\u043A") : g > e.data.maxBet ? global.rpc.trigger("clientFunc_notifyError", `Нельзя поставить больше ${e.data.maxBet} фишек.`) : g < e.data.minBet ? global.rpc.trigger("clientFunc_notifyError", `Нельзя поставить меньше ${e.data.minBet} фишек.`) : -1 === f.indexOf(C) ? void(A = !0, mp.events.callRemote("server_casino_taskBetRoulette", C, g), global.antiAFK_sendAction()) : global.rpc.trigger("clientFunc_notifyError", "\u0412\u044B \u0443\u0436\u0435 \u0441\u0434\u0435\u043B\u0430\u043B\u0438 \u0441\u0442\u0430\u0432\u043A\u0443 \u043D\u0430 \u044D\u0442\u0443 \u043F\u043E\u0437\u0438\u0446\u0438\u044E") : void 0

}

}), mp.events.add("client_casino_roulette_taskBetSuccess", (e, t) => {

A = !1;

const a = u[_];

a && (v = t, f.push(e), a.createBetObject(f), global.menuBrowser.execute(`casinoMenu.vue.setRouletteChip(${v});`))

}), mp.events.add("client_casino_roulette_taskBetError", e => {

A = !1, global.rpc.trigger("clientFunc_notifyError", e)

}), mp.events.add("client_casino_roulette_start", (e, t, o, n, r) => {

_ = e;

const s = u[e];

s.enableCamera(!0), v = t, y = o, g = s.data.minBet, f = JSON.parse(r), openMenu(a, {

chips: t,

type: "roulette",

minBet: s.data.minBet,

maxBet: s.data.maxBet,

status: o,

beforeStart: n

}), s.loadTableData(), s.createBetObject(f), mp.events.add("render", V)

}), mp.events.add("__client_casino_roulette_setBetSum", e => {

g = e

}), mp.events.add("client_casino_roulette_win", (e, t, a) => {

const o = u[e];

o && (v = a, mp.events.call("client_casino_roulette_spin", e, t), setTimeout(() => {

_ !== e || global.menuBrowser.execute(`casinoMenu.vue.setRouletteChip(${v});`)

}, 13e3))

}), mp.events.add("client_casino_roulette_newStatus", e => {

if (y = e, 0 == e) {

f = [];

const e = u[_];

e && e.createBetObject([])

}

global.menuBrowser.execute(`casinoMenu.vue.rouletteData.status = ${e};`), 1 == y && global.menuBrowser.execute(`casinoMenu.vue.rouletteData.beforeStart = 15;`)

}), mp.events.add("client_casino_roulette_stop", () => {

const e = u[_];

e && (e.hoverNumbers([]), e.createBetObject([]), b = -1, e.enableCamera(!1)), _ = -1, C = -1, closeMenu(a), mp.events.remove("render", V)

}), mp.events.add("client_casino_roulette_spin", (e, t) => {

const a = u[e];

a && a.spin(t)

}), p.forEach((e, t) => new h(t, e)), mp.game.streaming.requestAnimDict("anim_casino_a@amb@casino@games@lucky7wheel@male");

const O = global.LUCKY = mp.objects.new(mp.game.joaat("vw_prop_vw_luckywheel_02a"), new mp.Vector3(948.62, 63.41, 76.49), {

dimension: 0,

rotation: new mp.Vector3(0, 0, 57)

});

mp.objects.new(mp.game.joaat("vw_prop_vw_luckywheel_01a"), new mp.Vector3(948.62, 63.41, 74.99), {

dimension: 0,

rotation: new mp.Vector3(0, 0, 57)

}), mp.objects.new(mp.game.joaat("vw_prop_vw_jackpot_on"), new mp.Vector3(948.62, 63.41, 74.99), {

dimension: 0,

rotation: new mp.Vector3(0, 0, 57)

}), new global.ActionColshape(new mp.Vector3(948.62, 63.41, 74.99), 0, 2, `крутить колесо удачи`, () => {

global.actionAntiFlood("server_casino_luckywheel_taskSpin", 5e3) && mp.events.callRemote("server_casino_luckywheel_taskSpin")

}).onceMode = !0, new global.ActionColshape(new mp.Vector3(944.65, 9.74, 74.74), 0, 1, `забрать приз`, () => {

global.actionAntiFlood("server_casino_luckywheel_getGift", 5e3) && mp.events.callRemote("server_casino_luckywheel_getGift")

}).onceMode = !0;

var P = null;

mp.events.add("client_casino_luckywheel_spin", e => {

if (0 === O.handle) return;

const t = O.getRotation(2).z;

O.setRotation(0, 0, t, 2, !0), clearInterval(P);

const a = 1800 + 18 * e;

let o = 0;

P = setInterval(() => 0 === O.handle ? clearInterval(P) : (o += o < .6 * a ? 4.5 : o < .65 * a ? 4 : o < .7 * a ? 3.5 : o < .8 * a ? 2.5 : o < .9 * a ? 1.5 : o < .92 * a ? 1.2 : o < .94 * a ? 1 : o < .96 * a ? .9 : o < .98 * a ? .6 : .3, o >= a ? void clearInterval(P) : void O.setRotation(0, -o, t, 2, !0)), 15)

}), mp.events.add("client_casino_luckywheel_player_spin", (e, t) => {

const a = mp.players.atRemoteId(e);

mp.players.exists(a) && 0 !== a.handle && (a.taskGoStraightToCoord(948.14, 61.93, 74.99, 1, 3e3, -25, 1), setTimeout(() => {

mp.players.exists(a) && 0 !== a.handle && (a.taskPlayAnim("anim_casino_a@amb@casino@games@lucky7wheel@male", "enter_to_armraisedidle", 1, 1, 3e3, 2, !1, !0, !0, !0), setTimeout(() => {

mp.players.exists(a) && 0 !== a.handle && (setTimeout(() => {

mp.events.call("client_casino_luckywheel_spin", t), a === mp.players.local && global.menuBrowser.execute(`casinoMenu.vue.luckyWheelMusic('https://files.gta5rp.com/sound/casino_luckywheel.mp3');`)

}, 500), a.taskPlayAnim("anim_casino_a@amb@casino@games@lucky7wheel@male", "armraisedidle_to_spinningidle_high", 1, 1, 2e3, 1, !1, !0, !0, !0))

}, 3e3))

}, 3e3))

});

const S = [new mp.Vector3(961.13, 26.51, 75.99), new mp.Vector3(959.36, 25.13, 75.99), new mp.Vector3(958.89, 22.57, 75.99)];

S.forEach(e => {

new global.ActionColshape(e, 0, 1, `обменять фишки`, () => {

global.actionAntiFlood("casinoCasher", 2e3) && mp.events.callRemote("server_casino_taskStartConvert")

})

}), mp.events.add("client_casino_startConvert", (e, t, o, n) => {

openMenu(a, {

chips: t,

type: "convert",

cash: e,

price: o,

sellPrice: n

})

});

const R = [new mp.Vector3(934.84, 7.98, 74.49), new mp.Vector3(936.9, 9.78, 74.49), new mp.Vector3(939, 10.9, 74.49), new mp.Vector3(958.46, 53.54, 73.99), new mp.Vector3(969.04, 47.92, 73.99), new mp.Vector3(969.8, 54.08, 73.99), new mp.Vector3(963.73, 58.13, 73.99)];

R.forEach(e => {

new global.ActionColshape(e, 0, 1, `выпить виски за 200$`, () => global.actionAntiFlood("casinoBarAlco", 6e3) ? void mp.events.callRemote("server_casino_taskBuyAlcoBar") : void global.rpc.trigger("clientFunc_notifyError", "\u041D\u0435 \u0444\u043B\u0443\u0434\u0438"))

}), new global.ActionColshape(new mp.Vector3(944.94, 47.75, 79.29), 0, 1, `использовать лифт`, () => {

global.actionAntiFlood("server_casino_upTo", 5e3) && (localPlayer.setCoordsNoOffset(964.52, 58.79, 112.55, !1, !1, !1), localPlayer.setHeading(57))

}), new global.ActionColshape(new mp.Vector3(964.52, 58.79, 111.55), 0, 1, `использовать лифт`, () => {

global.actionAntiFlood("server_casino_downTo", 5e3) && (localPlayer.setCoordsNoOffset(944.94, 47.75, 80.29, !1, !1, !1), localPlayer.setHeading(60))

}), e("U_F_M_CasinoCash_01", 960.38, 22.7, 76.9, 93.6, ["random@robbery", "sit_down_idle_01", 1]), e("U_F_M_CasinoCash_01", 960.71, 24.4, 76.9, 55, ["random@robbery", "sit_down_idle_01", 1]), e("U_F_M_CasinoCash_01", 962.11, 25.26, 76.9, 29, ["random@robbery", "sit_down_idle_01", 1]), e("U_F_M_CasinoShop_01", 944.43, 7.93, 75.74, 348, null), t("vw_prop_casino_blckjack_01", 983.575256, 57.7864532, 74.4913254, -75.8559723), t("vw_prop_casino_blckjack_01", 986.937988, 64.5264893, 74.4913254, -154.369675), t("vw_prop_casino_blckjack_01", 995.07251, 60.4496307, 74.4913254, 102.443062), t("vw_prop_casino_blckjack_01", 989.516174, 53.4870605, 74.4913254, 3.77360344), t("vw_prop_casino_3cardpoker_01", 991.218811, 58.0548325, 74.491333, 58.000824), t("vw_prop_casino_3cardpoker_01", 987.826599, 60.1745071, 74.491333, -121.999107), t("cls_casino_durak", 972.377014, 32.0740318, 74.7412796, -142.335007), t("cls_casino_durak", 973.313599, 36.365345, 74.7412796, 150.886642), t("cls_casino_durak", 969.364746, 35.4699402, 74.7412796, -100.714981), t("cls_casino_durak", 969.315491, 28.2201996, 74.7412796, -45.2340508), t("cls_casino_durak", 976.534363, 29.7875023, 74.7412796, 59.3789444), t("cls_casino_durak", 976.404663, 33.9030914, 74.7412796, 102.827888), t("cls_casino_mafia", 935.76709, 25.9409962, 74.491272, -52.2105255)

}

}

var casinoLoad = !1;

const casinoShape = mp.colshapes.newCircle(950, 30, 50, 0),

casinoShapeHandler = e => {

e !== casinoShape || casinoLoad || (casinoLoad = !0, new Casino)

};

mp.events.add("playerEnterColshape", casinoShapeHandler);

class ClubShopMenu extends Menu {

constructor() {

super("club_shop"), global.rpc.on("client_clubShop_open", e => {

openMenu(this, e)

})

}

}

new ClubShopMenu;

class ClubControlMenu extends Menu {

constructor() {

super("club_control"), global.rpc.on("client_clubControl_open", e => {

openMenu(this, e)

})

}

}

new ClubControlMenu;

class ClubDanceMenu extends Menu {

constructor() {

super("club_dance"), global.rpc.on("client_clubDanceBattleMenu_open", e => {

openMenu(this, e)

})

}

}

new ClubDanceMenu;

class TaxiAcceptMenu extends Menu {

constructor() {

super("taxiAcceptMenu"), global.rpc.on("client_taxiJob_taxiAcceptMenu", e => {

try {

e.position = JSON.parse(e.position), openMenu(this, {

player: e.player,

position: e.position,

street: this.getStreetName(e.position.x, e.position.y, e.position.z),

dist: Math.round(mp.game.system.vdist(e.position.x, e.position.y, 1, localPlayer.position.x, localPlayer.position.y, 1))

})

} catch (e) {}

})

}

getStreetName(e, t, a) {

const o = ["AIRP", "ALAMO", "ALTA", "ARMYB", "BANHAMC", "BANNING", "BEACH", "BHAMCA", "BRADP", "BRADT", "BURTON", "CALAFB", "CANNY", "CCREAK", "CHAMH", "CHIL", "CHU", "CMSW", "CYPRE", "DAVIS", "DELBE", "DELPE", "DELSOL", "DESRT", "DOWNT", "DTVINE", "EAST_V", "EBURO", "ELGORL", "ELYSIAN", "GALFISH", "GOLF", "GRAPES", "GREATC", "HARMO", "HAWICK", "HORS", "HUMLAB", "JAIL", "KOREAT", "LACT", "LAGO", "LDAM", "LEGSQU", "LMESA", "LOSPUER", "MIRR", "MORN", "MOVIE", "MTCHIL", "MTGORDO", "MTJOSE", "MURRI", "NCHU", "NOOSE", "OCEANA", "PALCOV", "PALETO", "PALFOR", "PALHIGH", "PALMPOW", "PBLUFF", "PBOX", "PROCOB", "RANCHO", "RGLEN", "RICHM", "ROCKF", "RTRAK", "SANAND", "SANCHIA", "SANDY", "SKID", "SLAB", "STAD", "STRAW", "TATAMO", "TERMINA", "TEXTI", "TONGVAH", "TONGVAV", "VCANA", "VESP", "VINE", "WINDF", "WVINE", "ZANCUDO", "ZP_ORT", "ZQ_UAR"],

n = mp.game.zone.getNameOfZone(e, t, a),

r = o.includes(n) ? ["Los Santos International Airport", "Alamo Sea", "Alta", "Fort Zancudo", "Banham Canyon Dr", "Banning", "Vespucci Beach", "Banham Canyon", "Braddock Pass", "Braddock Tunnel", "Burton", "Calafia Bridge", "Raton Canyon", "Cassidy Creek", "Chamberlain Hills", "Vinewood Hills", "Chumash", "Chiliad Mountain State Wilderness", "Cypress Flats", "Davis", "Del Perro Beach", "Del Perro", "La Puerta", "Grand Senora Desert", "Downtown", "Downtown Vinewood", "East Vinewood", "El Burro Heights", "El Gordo Lighthouse", "Elysian Island", "Galilee", "GWC and Golfing Society", "Grapeseed", "Great Chaparral", "Harmony", "Hawick", "Vinewood Racetrack", "Humane Labs and Research", "Bolingbroke Penitentiary", "Little Seoul", "Land Act Reservoir", "Lago Zancudo", "Land Act Dam", "Legion Square", "La Mesa", "La Puerta", "Mirror Park", "Morningwood", "Richards Majestic", "Mount Chiliad", "Mount Gordo", "Mount Josiah", "Murrieta Heights", "North Chumash", "N.O.O.S.E", "Pacific Ocean", "Paleto Cove", "Paleto Bay", "Paleto Forest", "Palomino Highlands", "Palmer-Taylor Power Station", "Pacific Bluffs", "Pillbox Hill", "Procopio Beach", "Rancho", "Richman Glen", "Richman", "Rockford Hills", "Redwood Lights Track", "San Andreas", "San Chianski Mountain Range", "Sandy Shores", "Mission Row", "Stab City", "Maze Bank Arena", "Strawberry", "Tataviam Mountains", "Terminal", "Textile City", "Tongva Hills", "Tongva Valley", "Vespucci Canals", "Vespucci", "Vinewood", "Ron Alternates Wind Farm", "West Vinewood", "Zancudo River", "Port of South Los Santos", "Davis Quartz"][o.indexOf(n)] : "",

s = mp.game.pathfind.getStreetNameAtCoord(e, t, a, 0, 0),

i = mp.game.ui.getStreetNameFromHashKey(s.streetName);

return r + " " + i

}

}

new TaxiAcceptMenu;

class TaxiListMenu extends Menu {

constructor() {

var e = Math.round;

super("taxiListMenu"), global.rpc.on("client_menu_taxiMenu_list", async () => {

let t = await global.rpc.callServer("server_taxiMenu_getList");

for (let a of t.list) a.street = this.getStreetName(a.position.x, a.position.y, a.position.z), a.dist = e(mp.game.system.vdist(a.position.x, a.position.y, 1, localPlayer.position.x, localPlayer.position.y, 1));

openMenu(this, t)

}), global.rpc.on("client_menu_taxiMenu_update", t => {

if (this.isOpen) {

for (let a of t.list) a.street = this.getStreetName(a.position.x, a.position.y, a.position.z), a.dist = e(mp.game.system.vdist(a.position.x, a.position.y, 1, localPlayer.position.x, localPlayer.position.y, 1));

global.rpc.triggerBrowser(menuBrowser, "__client_menu_taxiMenu_update", t)

}

})

}

getStreetName(e, t, a) {

const o = ["AIRP", "ALAMO", "ALTA", "ARMYB", "BANHAMC", "BANNING", "BEACH", "BHAMCA", "BRADP", "BRADT", "BURTON", "CALAFB", "CANNY", "CCREAK", "CHAMH", "CHIL", "CHU", "CMSW", "CYPRE", "DAVIS", "DELBE", "DELPE", "DELSOL", "DESRT", "DOWNT", "DTVINE", "EAST_V", "EBURO", "ELGORL", "ELYSIAN", "GALFISH", "GOLF", "GRAPES", "GREATC", "HARMO", "HAWICK", "HORS", "HUMLAB", "JAIL", "KOREAT", "LACT", "LAGO", "LDAM", "LEGSQU", "LMESA", "LOSPUER", "MIRR", "MORN", "MOVIE", "MTCHIL", "MTGORDO", "MTJOSE", "MURRI", "NCHU", "NOOSE", "OCEANA", "PALCOV", "PALETO", "PALFOR", "PALHIGH", "PALMPOW", "PBLUFF", "PBOX", "PROCOB", "RANCHO", "RGLEN", "RICHM", "ROCKF", "RTRAK", "SANAND", "SANCHIA", "SANDY", "SKID", "SLAB", "STAD", "STRAW", "TATAMO", "TERMINA", "TEXTI", "TONGVAH", "TONGVAV", "VCANA", "VESP", "VINE", "WINDF", "WVINE", "ZANCUDO", "ZP_ORT", "ZQ_UAR"],

n = mp.game.zone.getNameOfZone(e, t, a),

r = o.includes(n) ? ["Los Santos International Airport", "Alamo Sea", "Alta", "Fort Zancudo", "Banham Canyon Dr", "Banning", "Vespucci Beach", "Banham Canyon", "Braddock Pass", "Braddock Tunnel", "Burton", "Calafia Bridge", "Raton Canyon", "Cassidy Creek", "Chamberlain Hills", "Vinewood Hills", "Chumash", "Chiliad Mountain State Wilderness", "Cypress Flats", "Davis", "Del Perro Beach", "Del Perro", "La Puerta", "Grand Senora Desert", "Downtown", "Downtown Vinewood", "East Vinewood", "El Burro Heights", "El Gordo Lighthouse", "Elysian Island", "Galilee", "GWC and Golfing Society", "Grapeseed", "Great Chaparral", "Harmony", "Hawick", "Vinewood Racetrack", "Humane Labs and Research", "Bolingbroke Penitentiary", "Little Seoul", "Land Act Reservoir", "Lago Zancudo", "Land Act Dam", "Legion Square", "La Mesa", "La Puerta", "Mirror Park", "Morningwood", "Richards Majestic", "Mount Chiliad", "Mount Gordo", "Mount Josiah", "Murrieta Heights", "North Chumash", "N.O.O.S.E", "Pacific Ocean", "Paleto Cove", "Paleto Bay", "Paleto Forest", "Palomino Highlands", "Palmer-Taylor Power Station", "Pacific Bluffs", "Pillbox Hill", "Procopio Beach", "Rancho", "Richman Glen", "Richman", "Rockford Hills", "Redwood Lights Track", "San Andreas", "San Chianski Mountain Range", "Sandy Shores", "Mission Row", "Stab City", "Maze Bank Arena", "Strawberry", "Tataviam Mountains", "Terminal", "Textile City", "Tongva Hills", "Tongva Valley", "Vespucci Canals", "Vespucci", "Vinewood", "Ron Alternates Wind Farm", "West Vinewood", "Zancudo River", "Port of South Los Santos", "Davis Quartz"][o.indexOf(n)] : "",

s = mp.game.pathfind.getStreetNameAtCoord(e, t, a, 0, 0),

i = mp.game.ui.getStreetNameFromHashKey(s.streetName);

return r + " " + i

}

onClose() {

global.rpc.triggerServer("server_taxiMenu_close")

}

}

new TaxiListMenu;

class MehanicListMenu extends Menu {

constructor() {

var e = Math.round;

super("mehanicListMenu"), global.rpc.on("client_menu_mehanicMenu_list", async () => {

let t = await global.rpc.callServer("server_mehanicMenu_getList");

for (let a of t.list) a.street = this.getStreetName(a.position.x, a.position.y, a.position.z), a.dist = e(mp.game.system.vdist(a.position.x, a.position.y, 1, localPlayer.position.x, localPlayer.position.y, 1));

openMenu(this, t)

}), global.rpc.on("client_menu_mehanicMenu_update", t => {

if (this.isOpen) {

for (let a of t.list) a.street = this.getStreetName(a.position.x, a.position.y, a.position.z), a.dist = e(mp.game.system.vdist(a.position.x, a.position.y, 1, localPlayer.position.x, localPlayer.position.y, 1));

global.rpc.triggerBrowser(menuBrowser, "__client_menu_mehanicMenu_update", t)

}

})

}

getStreetName(e, t, a) {

const o = ["AIRP", "ALAMO", "ALTA", "ARMYB", "BANHAMC", "BANNING", "BEACH", "BHAMCA", "BRADP", "BRADT", "BURTON", "CALAFB", "CANNY", "CCREAK", "CHAMH", "CHIL", "CHU", "CMSW", "CYPRE", "DAVIS", "DELBE", "DELPE", "DELSOL", "DESRT", "DOWNT", "DTVINE", "EAST_V", "EBURO", "ELGORL", "ELYSIAN", "GALFISH", "GOLF", "GRAPES", "GREATC", "HARMO", "HAWICK", "HORS", "HUMLAB", "JAIL", "KOREAT", "LACT", "LAGO", "LDAM", "LEGSQU", "LMESA", "LOSPUER", "MIRR", "MORN", "MOVIE", "MTCHIL", "MTGORDO", "MTJOSE", "MURRI", "NCHU", "NOOSE", "OCEANA", "PALCOV", "PALETO", "PALFOR", "PALHIGH", "PALMPOW", "PBLUFF", "PBOX", "PROCOB", "RANCHO", "RGLEN", "RICHM", "ROCKF", "RTRAK", "SANAND", "SANCHIA", "SANDY", "SKID", "SLAB", "STAD", "STRAW", "TATAMO", "TERMINA", "TEXTI", "TONGVAH", "TONGVAV", "VCANA", "VESP", "VINE", "WINDF", "WVINE", "ZANCUDO", "ZP_ORT", "ZQ_UAR"],

n = mp.game.zone.getNameOfZone(e, t, a),

r = o.includes(n) ? ["Los Santos International Airport", "Alamo Sea", "Alta", "Fort Zancudo", "Banham Canyon Dr", "Banning", "Vespucci Beach", "Banham Canyon", "Braddock Pass", "Braddock Tunnel", "Burton", "Calafia Bridge", "Raton Canyon", "Cassidy Creek", "Chamberlain Hills", "Vinewood Hills", "Chumash", "Chiliad Mountain State Wilderness", "Cypress Flats", "Davis", "Del Perro Beach", "Del Perro", "La Puerta", "Grand Senora Desert", "Downtown", "Downtown Vinewood", "East Vinewood", "El Burro Heights", "El Gordo Lighthouse", "Elysian Island", "Galilee", "GWC and Golfing Society", "Grapeseed", "Great Chaparral", "Harmony", "Hawick", "Vinewood Racetrack", "Humane Labs and Research", "Bolingbroke Penitentiary", "Little Seoul", "Land Act Reservoir", "Lago Zancudo", "Land Act Dam", "Legion Square", "La Mesa", "La Puerta", "Mirror Park", "Morningwood", "Richards Majestic", "Mount Chiliad", "Mount Gordo", "Mount Josiah", "Murrieta Heights", "North Chumash", "N.O.O.S.E", "Pacific Ocean", "Paleto Cove", "Paleto Bay", "Paleto Forest", "Palomino Highlands", "Palmer-Taylor Power Station", "Pacific Bluffs", "Pillbox Hill", "Procopio Beach", "Rancho", "Richman Glen", "Richman", "Rockford Hills", "Redwood Lights Track", "San Andreas", "San Chianski Mountain Range", "Sandy Shores", "Mission Row", "Stab City", "Maze Bank Arena", "Strawberry", "Tataviam Mountains", "Terminal", "Textile City", "Tongva Hills", "Tongva Valley", "Vespucci Canals", "Vespucci", "Vinewood", "Ron Alternates Wind Farm", "West Vinewood", "Zancudo River", "Port of South Los Santos", "Davis Quartz"][o.indexOf(n)] : "",

s = mp.game.pathfind.getStreetNameAtCoord(e, t, a, 0, 0),

i = mp.game.ui.getStreetNameFromHashKey(s.streetName);

return r + " " + i

}

onClose() {

global.rpc.triggerServer("server_mehanicMenu_close")

}

}

new MehanicListMenu;

class ATMMenu extends Menu {

constructor() {

super("atm");

const e = {

mazebank: [228, 0, 0, 255],

lombank: [71, 101, 231, 255],

fleecabank: [38, 141, 57, 255]

},

t = [

[new mp.Vector3(-28.02, -724.54, 43.23), 366, "mazebank"],

[new mp.Vector3(-30.3, -723.71, 43.23), 366, "mazebank"],

[new mp.Vector3(119.13, -883.75, 30.12), 69, "mazebank"],

[new mp.Vector3(147.69, -1035.73, 28.34), 161, "fleecabank"],

[new mp.Vector3(146.01, -1035.12, 28.34), 155, "fleecabank"],

[new mp.Vector3(-549.62, -204.37, 37.22), 209, "lombank"],

[new mp.Vector3(236.96, 218.71, 105.29), 288, "lombank"],

[new mp.Vector3(237.82, 216.84, 105.29), 303, "lombank"],

[new mp.Vector3(285.43, 143.4, 103.17), 158, "lombank"],

[new mp.Vector3(527.26, -160.68, 56.09), 270, "lombank"],

[new mp.Vector3(114.38, -776.42, 30.42), 340, "mazebank"],

[new mp.Vector3(111.26, -775.33, 30.44), 347, "mazebank"],

[new mp.Vector3(112.76, -819.36, 30.34), 164, "mazebank"],

[new mp.Vector3(5.18, -919.82, 28.56), 244, "lombank"],

[new mp.Vector3(-203.77, -861.35, 29.27), 29, "mazebank"],

[new mp.Vector3(-303.28, -829.73, 31.42), 348, "mazebank"],

[new mp.Vector3(-301.74, -830.05, 31.42), 353, "mazebank"],

[new mp.Vector3(-258.78, -723.38, 32.47), 72, "mazebank"],

[new mp.Vector3(-256.19, -715.96, 32.52), 72, "mazebank"],

[new mp.Vector3(-254.27, -692.44, 32.61), 159, "mazebank"],

[new mp.Vector3(-611.87, -704.76, 30.24), 177, "mazebank"],

[new mp.Vector3(-614.55, -704.84, 30.24), 181, "mazebank"],

[new mp.Vector3(-618.32, -706.91, 29.05), 267, "mazebank"],

[new mp.Vector3(-618.26, -708.86, 29.05), 267, "mazebank"],

[new mp.Vector3(-1315.79, -834.79, 15.96), 307, "mazebank"],

[new mp.Vector3(-1314.82, -836.06, 15.96), 306, "mazebank"],

[new mp.Vector3(-3241.15, 997.49, 11.55), 40, "mazebank"],

[new mp.Vector3(-3144.26, 1127.62, 19.86), 62, "lombank"],

[new mp.Vector3(-95.5, 6457.21, 30.46), 39, "lombank"],

[new mp.Vector3(-97.21, 6455.42, 30.47), 47, "lombank"],

[new mp.Vector3(155.87, 6642.79, 30.6), 316, "lombank"],

[new mp.Vector3(174.17, 6637.83, 30.57), 43, "lombank"],

[new mp.Vector3(-717.53, -915.74, 18.22), 91.6, "lombank"],

[new mp.Vector3(-596.1, -1161.59, 21.32), 5.54, "lombank"],

[new mp.Vector3(-594.55, -1161.53, 21.32), 5, "lombank"],

[new mp.Vector3(33.22, -1348.02, 28.5), 170.78, "lombank"],

[new mp.Vector3(380.84, 323.55, 102.57), 170.02, "lombank"],

[new mp.Vector3(-1827.16, 784.9, 137.3), 134.32, "lombank"],

[new mp.Vector3(1153.83, -326.76, 68.21), 103.05, "lombank"],

[new mp.Vector3(2683.04, 3286.63, 54.24), 235.25, "lombank"],

[new mp.Vector3(2558.25, 389.5, 107.62), 266.99, "lombank"],

[new mp.Vector3(-3040.88, 593.05, 6.91), 291.99, "lombank"],

[new mp.Vector3(-3240.77, 1008.6, 11.83), 266.79, "lombank"],

[new mp.Vector3(540.28, 2670.97, 41.16), 5.03, "lombank"],

[new mp.Vector3(1171.59, 2702.28, 37.18), 359.28, "lombank"],

[new mp.Vector3(1172.51, 2702.36, 37.17), 2.42, "lombank"],

[new mp.Vector3(-717.52, -915.71, 18.22), 79.87, "lombank"],

[new mp.Vector3(-56.86, -1752.19, 28.42), 45.49, "lombank"],

[new mp.Vector3(1077.74, -776.19, 57.23), 176.82, "lombank"],

[new mp.Vector3(-537.8, -854.25, 28.29), 189.3, "mazebank"],

[new mp.Vector3(1735.29, 6410.71, 34.04), 153.76, "lombank"],

[new mp.Vector3(1701.35, 6426.42, 31.76), 65.49, "lombank"],

[new mp.Vector3(1702.99, 4933.6, 41.06), 316.32, "lombank"],

[new mp.Vector3(1968.08, 3743.6, 31.34), 210.1, "lombank"],

[new mp.Vector3(-710.06, -818.99, 22.73), 0, "lombank"],

[new mp.Vector3(-712.93, -819, 22.73), 359, "lombank"],

[new mp.Vector3(-1205.77, -324.82, 36.86), 133, "fleecabank"],

[new mp.Vector3(-1204.95, -326.23, 36.83), 112, "fleecabank"],

[new mp.Vector3(1686.84, 4815.83, 41.01), 274.61, "lombank"],

[new mp.Vector3(-1091.47, 2708.6, 17.95), 38, "lombank"],

[new mp.Vector3(1822.65, 3683.06, 33.28), 209, "lombank"],

[new mp.Vector3(-1415.94, -212.03, 45.5), 233, "lombank"],

[new mp.Vector3(-1430.06, -211.11, 45.5), 107, "lombank"],

[new mp.Vector3(-1570.19, -546.65, 33.96), 215, "lombank"],

[new mp.Vector3(-1571.11, -547.33, 33.96), 214, "lombank"],

[new mp.Vector3(296.39, -894.16, 28.23), 224, "lombank"],

[new mp.Vector3(295.77, -896.12, 28.22), 250, "lombank"],

[new mp.Vector3(89.66, 2.39, 67.31), 340, "mazebank"],

[new mp.Vector3(230.9, 367.54, 105.11), 76, "lombank"],

[new mp.Vector3(228.22, 338.37, 104.57), 161, "lombank"],

[new mp.Vector3(-846.21, -341.25, 37.68), 113, "lombank"],

[new mp.Vector3(-846.75, -340.17, 37.68), 113, "lombank"],

[new mp.Vector3(158.54, 234.15, 105.63), 342, "lombank"],

[new mp.Vector3(-660.79, -853.83, 23.48), 179, "lombank"],

[new mp.Vector3(-57.75, -92.67, 56.78), 291.8, "lombank"],

[new mp.Vector3(288.58, -1282.33, 28.65), 266, "lombank"],

[new mp.Vector3(-2293.85, 354.86, 173.6), 113.13, "lombank"],

[new mp.Vector3(-2294.67, 356.42, 173.6), 115.8, "lombank"],

[new mp.Vector3(-2295.36, 358.11, 173.6), 118.5, "lombank"],

[new mp.Vector3(-1305.27, -706.41, 24.32), 118.5, "lombank"],

[new mp.Vector3(-526.52, -1222.92, 17.45), 150, "mazebank"],

[new mp.Vector3(2558.76, 351, 107.62), 88, "lombank"],

[new mp.Vector3(-2072.41, -317.3, 12.32), 264, "lombank"],

[new mp.Vector3(-386.8, 6046.02, 30.5), 311, "lombank"],

[new mp.Vector3(-2975.11, 380.06, 14), 264, "mazebank"],

[new mp.Vector3(-2956.9, 487.73, 14.46), 176, "mazebank"],

[new mp.Vector3(-2958.93, 487.81, 14.46), 174, "mazebank"],

[new mp.Vector3(-1109.76, -1690.7, 3.38), 123, "lombank"],

[new mp.Vector3(289.05, -1256.8, 28.44), 268, "lombank"],

[new mp.Vector3(-132.96, 6366.57, 30.48), 314, "lombank"],

[new mp.Vector3(-283, 6226.12, 30.49), 316, "lombank"],

[new mp.Vector3(129.18, -1291.24, 28.27), 293, "lombank"],

[new mp.Vector3(130.1, -1292.64, 28.27), 293, "lombank"],

[new mp.Vector3(-1390.94, -590.37, 29.32), 23, "lombank"],

[new mp.Vector3(24.41, -946.03, 28.36), 339, "lombank"],

[new mp.Vector3(1138.33, -468.95, 65.73), 77, "lombank"],

[new mp.Vector3(-721.05, -415.49, 33.98), 265, "lombank"],

[new mp.Vector3(-866.59, -187.7, 36.83), 118, "mazebank"],

[new mp.Vector3(-867.64, -186.05, 36.84), 122, "mazebank"],

[new mp.Vector3(-821.7, -1082.04, 10.13), 26, "lombank"],

[new mp.Vector3(-165.06, 232.81, 93.92), 75, "mazebank"],

[new mp.Vector3(-165.1, 234.75, 93.92), 92, "mazebank"],

[new mp.Vector3(356.91, 173.47, 102.07), 345, "lombank"],

[new mp.Vector3(1166.93, -456.15, 65.8), 344, "lombank"],

[new mp.Vector3(-1409.69, -100.49, 51.38), 105, "lombank"],

[new mp.Vector3(-1410.31, -98.73, 51.43), 110, "lombank"],

[new mp.Vector3(2564.53, 2584.76, 37.08), 106, "lombank"],

[new mp.Vector3(934.57, 31.49, 79.29), 333, "fleecabank"],

[new mp.Vector3(942.7, 44.59, 79.29), 154, "lombank"]

];

t.forEach(t => {

mp.markers.new(29, new mp.Vector3(t[0].x, t[0].y, t[0].z + 1), .8, {

color: e[t[2]]

}), new global.ActionColshape(t[0], 0, 1, "\u0432\u043E\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u043E\u043C", () => {

this.isOpen || (localPlayer.setHeading(t[1]), openMenu(this, t[2]))

})

}), mp.events.add("client_menu_atm_find", function() {

const e = localPlayer.position;

let o = null,

n = 99999999;

for (const r of t) {

const t = mp.game.system.vdist(e.x, e.y, 0, r[0].x, r[0].y, 0);

t < n && (o = r, n = t)

}

o && mp.events.call("client_smartphone_gps_start", "\u0411\u0430\u043D\u043A\u043E\u043C\u0430\u0442", o[0].x, o[0].y, o[0].z)

})

}

}

new ATMMenu;

class TraningClubMenu extends Menu {

constructor() {

super("traningClubMenu"), global.rpc.on("client_traningClub_menu_open", e => {

openMenu(this, e)

}), mp.events.add("client_traningClub_startRound", () => {

global.disableChatAndKeys(!0), global.setCameraToPlayer(1, new mp.Vector3(0, 0, 0), new mp.Vector3(0, 0, 0), 0, 0, 80), global.resetCamera(), global.mainBrowser.execute("startGameCounterSec(5)"), setTimeout(() => {

global.disableChatAndKeys(!1), localPlayer.clearTasksImmediately()

}, 5e3)

})

}

}

new TraningClubMenu;

class VotingMenu extends Menu {

constructor() {

super("votingMenu"), global.rpc.on("client_votingMenu_open", e => {

openMenu(this, e)

})

}

}

new VotingMenu;

class PedTalkMenu extends Menu {

constructor() {

function t(e, t) {

if (mp.game.streaming.hasAnimDictLoaded(e)) return t();

mp.game.streaming.requestAnimDict(e);

let a = setInterval(function() {

mp.game.streaming.hasAnimDictLoaded(e) && (clearInterval(a), t())

}, 100)

}

super("pedTalkMenu"), this.currentPed = null, this.startTalk = !1, this.pedCamera = null;

this;

var e = new Map;

class a {

constructor(t, a, o, n, r, s, i, c) {

this.id = t, this.name = a, this.model = o, this.position = new mp.Vector3(n.x, n.y, n.z), this.rot = r, this.dimension = s, this.script = i, this.data = c, this.colshape = null == this.data.startTalkPosition ? mp.colshapes.newCircle(this.position.x, this.position.y, 1.3, this.dimension) : mp.colshapes.newCircle(this.data.startTalkPosition.x, this.data.startTalkPosition.y, .8, this.dimension), this.colshape.pedColshape = this, this.ped = mp.peds.new(mp.game.joaat(o), n, r, s), this.ped.pedStreamInHandler = this.getStreamHandler(), this.nameLabel = mp.labels.new(a, new mp.Vector3(n.x, n.y, n.z + 1.05), {

los: !c.longRange,

font: 0,

drawDistance: c.longRange ? 10 : 5,

dimension: this.dimension

}), this.waitResponce = !1, e.set(t, this)

}

getStreamHandler() {

return a => {

a.setAlpha(255), a.freezePosition(!0), a.setInvincible(!1), a.setCanBeDamaged(!1), a.setProofs(!1, !1, !1, !1, !1, !1, !1, !1), "" == this.data.scenario ? null != this.data.anim && t(this.data.anim.dict, () => {

0 === this.ped.handle || this.ped.taskPlayAnim(this.data.anim.dict, this.data.anim.name, this.data.anim.speed, 0, 2, this.data.anim.flag, 0, !0, !0, !0)

}) : this.ped.taskStartScenarioInPlace(this.data.scenario, 0, !0)

}

}

destroy() {

this.ped.destroy(), this.colshape.destroy(), this.nameLabel.destroy(), this == this.currentPed && startTalk && global.rpc.trigger("client_peds_endTalk")

}

}

mp.events.add("entityStreamIn", function(e) {

e.pedStreamInHandler && e.pedStreamInHandler(e)

}), mp.events.add("playerEnterColshape", e => {

if (e.pedColshape != null) {

if (2 < Math.abs(localPlayer.position.z - e.pedColshape.position.z)) return;

if (null != this.currentPed) return;

this.currentPed = e.pedColshape, this.currentPed.script && global.notifyKeyHelpShow("E", "\u0433\u043E\u0432\u043E\u0440\u0438\u0442\u044C")

}

}), mp.events.add("playerExitColshape", e => {

e.pedColshape != null && this.currentPed == e.pedColshape && (this.currentPed.script && global.notifyKeyHelpHide(), !this.currentPed.waitResponce && (this.currentPed = null))

}), mp.keys.bind(69, !0, () => {

if (!(mp.gui.cursor.visible || global.isChatOpen || global.disableKeys) && this.currentPed && this.currentPed.script && !this.currentPed.waitResponce) {

this.startTalk = !0, null != this.pedCamera && mp.cameras.exists(this.pedCamera) && this.pedCamera.destroy(), this.currentPed.data.disableRotation || this.currentPed.ped.setHeading(localPlayer.getRotation(2).z + 180);

var e = this.currentPed.position,

t = function(e, t, a) {

return t *= .0174533, e.y += a * Math.sin(t), e.x += a * Math.cos(t), e

}(new mp.Vector3(e.x, e.y, e.z + .6), this.currentPed.ped.getRotation(2).z + 90, this.currentPed.data.longRange ? 1.1 : .9);

this.pedCamera = mp.cameras.new("default", t, new mp.Vector3(0, 0, 0), 80), this.pedCamera.pointAtCoord(e.x, e.y, e.z + .6), this.pedCamera.setActive(!0), mp.game.cam.renderScriptCams(!0, !1, 0, !0, !1), localPlayer.freezePosition(!0), localPlayer.setAlpha(0), global.notifyKeyHelpHide(), this.currentPed.nameLabel.text = "", this.currentPed.waitResponce = !0, global.rpc.triggerServer("server_peds_startTalk", this.currentPed.id)

}

}), global.rpc.on("client_peds_startTalk", e => e.isEnd ? (null != this.currentPed && (this.currentPed.waitResponce = !1), void this.onClose()) : void(null != this.currentPed && (this.currentPed.waitResponce = !1, openMenu(this, e)))), global.rpc.on("client_peds_create", function(e) {

new a(e[0], e[1], e[2], new mp.Vector3(e[3][0], e[3][1], e[3][2]), e[4], e[5], e[6], {

anim: null == e[7][0] ? null : {

dict: e[7][0][0],

name: e[7][0][1],

flag: e[7][0][2],

speed: e[7][0][3]

},

scenario: e[7][1],

startTalkPosition: null == e[7][2] ? null : new mp.Vector3(e[7][2][0], e[7][2][1], e[7][2][2]),

longRange: e[7][3],

disableRotation: e[7][4]

})

}), global.rpc.on("client_peds_setName", function(t) {

let a = e.get(t.id);

a && (a.name = t.name, a.nameLabel.text = t.name)

}), global.rpc.on("client_peds_setModel", function(t) {

let a = e.get(t.id);

a && (a.model = t.model, a.ped.destroy(), a.ped = mp.peds.new(mp.game.joaat(t.model), a.position, a.rot, a.dimension), a.ped.pedStreamInHandler = a.getStreamHandler())

}), global.rpc.on("client_peds_destroy", function(t) {

let a = e.get(t);

a && a.destroy()

}), mp.events.add("client_dynamicData_serverPed", function(e) {

e = JSON.parse(unescape(e));

for (let t of e) new a(t[0], t[1], t[2], new mp.Vector3(t[3][0], t[3][1], t[3][2]), t[4], t[5], t[6], {

anim: null == t[7][0] ? null : {

dict: t[7][0][0],

name: t[7][0][1],

flag: t[7][0][2],

speed: t[7][0][3]

},

scenario: t[7][1],

startTalkPosition: null == t[7][2] ? null : new mp.Vector3(t[7][2][0], t[7][2][1], t[7][2][2]),

longRange: t[7][3],

disableRotation: t[7][4]

})

})

}

onClose() {

this.startTalk && (this.startTalk = !1, localPlayer.freezePosition(!1), localPlayer.setAlpha(255), mp.game.cam.renderScriptCams(!1, !1, 0, !0, !1), null != this.pedCamera && mp.cameras.exists(this.pedCamera) && (this.pedCamera.destroy(), this.pedCamera = null), this.currentPed && (this.currentPed.ped.setHeading(this.currentPed.rot), this.currentPed.nameLabel.text = this.currentPed.name, this.currentPed = null))

}

}

new PedTalkMenu;

class JobsGameMenu extends Menu {

constructor() {

super("jobsGameMenu"), mp.events.add("client_jobs_builder_start", () => {

menuBrowser.execute("startBuilderGame()")

}), mp.events.add("client_jobs_mine_start", () => {

menuBrowser.execute("startMineGame()")

}), mp.events.add("client_jobs_port_start", () => {

menuBrowser.execute("startPortGame()")

}), mp.events.add("client_jobs_drugsMachine", () => {

menuBrowser.execute("startDrugsMachineGame()")

}), mp.events.add("client_house_brokenDoor_start", () => {

menuBrowser.execute("startDoorBrokenGame()")

}), mp.events.add("client_house_hackDoor_start", () => {

menuBrowser.execute("startDoorHackGame()")

}), mp.attachmentMngr.register("jobsPortBox", "prop_cardbordbox_02a", 28422, new mp.Vector3(0, -.18, -.18), new mp.Vector3(0, 0, 0)), mp.attachmentMngr.register("jobsMineRock", "prop_rock_5_d", 28422, new mp.Vector3(0, -.18, -.25), new mp.Vector3(0, 0, 0)), mp.events.add("client_contract_robECircuit", () => {

menuBrowser.execute("startRobECircuit()")

}), mp.events.add("client_contract_startMakeClothes", () => {

menuBrowser.execute("startMakeWorkClothes()")

}), mp.attachmentMngr.register("contractGovClothes", "prop_cs_scissors", 28422, new mp.Vector3(.06, 0, 0), new mp.Vector3(10, 170, -30)), mp.events.add("client_danceBattleStart", e => {

menuBrowser.execute(`startDanceGame(${e})`)

})

}

}

new JobsGameMenu;

class SystemCaptchaMenu extends Menu {

constructor() {

super("systemCaptcha"), mp.events.add("client_captcha", () => {

openMenu(this, null)

})

}

}

new SystemCaptchaMenu;