Commit ae9f768e authored by Chris's avatar Chris

Merge branch 'stable' into 'master'

convert service class to service object

See merge request !1
parents d3e6894e ba791fda
......@@ -2,34 +2,22 @@
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="mechanic.css">
<script src="../vue.js"></script>
</head>
<script src="../../../vue.js"></script>
<body>
<div id="service">
<div class="b3-close" id="close-button" @click="exit">X</div>
<div class="b3-service" id="sp0-button" @click="sp0">No Spoiler</div>
<div class="b3-service" id="sp1-button" @click="sp1">Spoiler 1</div>
<div class="b3-service" id="sp2-button" @click="sp2">Spoiler 2</div>
<div class="b3-service" id="sp3-button" @click="sp3">Spoiler 3</div>
<div class="b1-service">
<div>
<div class="b1-summ">{{ garage }}</div>
<div class="b1-summ-info">{{ service }}</div>
</div>
<div>
<div class="b1-summ">{{ primeColor }}</div>
<div class="b1-summ-info">{{ secondaryColor }}</div>
</div>
<div>
<div class="b1-summ">{{ mod }}</div>
<div class="b1-summ-info">{{ engine }}</div>
</div>
<div v-if="fine">
<div>
<div class="b1-summ">{{ horn }}</div>
<div class="b1-summ-info">{{ breaks }}</div>
<div class="b1-summ-info">{{ wheels }}</div>
</div>
</div>
</div>
</body>
</html>
......@@ -38,11 +26,6 @@
const app = new Vue({
el: '#service',
data: {
garage: '',
service: '',
primeColor: -1,
secondaryColor: -1,
mod: -1,
engine: -1,
horn: -1,
breaks: -1,
......
......@@ -4,6 +4,33 @@ const misc = require('../cMisc');
const player = mp.players.local;
const vehicle = player.vehicle
mp.game.streaming.requestIpl("apa_v_mp_h_02_c");
mp.game.streaming.requestIpl("imp_dt1_02_modgarage")
mp.game.streaming.requestIpl("imp_dt1_02_cargarage_a")
mp.game.streaming.requestIpl("imp_dt1_02_cargarage_b")
mp.game.streaming.requestIpl("imp_dt1_02_cargarage_c")
mp.game.streaming.requestIpl("imp_dt1_11_modgarage")
mp.game.streaming.requestIpl("imp_dt1_11_cargarage_a")
mp.game.streaming.requestIpl("imp_dt1_11_cargarage_b")
mp.game.streaming.requestIpl("imp_dt1_11_cargarage_c")
mp.game.streaming.requestIpl("imp_sm_13_modgarage")
mp.game.streaming.requestIpl("imp_sm_13_cargarage_a")
mp.game.streaming.requestIpl("imp_sm_13_cargarage_b")
mp.game.streaming.requestIpl("imp_sm_13_cargarage_c")
mp.game.streaming.requestIpl("imp_sm_15_modgarage")
mp.game.streaming.requestIpl("imp_sm_15_cargarage_a")
mp.game.streaming.requestIpl("imp_sm_15_cargarage_b")
mp.game.streaming.requestIpl("imp_sm_15_cargarage_c")
mp.game.streaming.requestIpl("imp_impexp_interior_placement")
mp.game.streaming.requestIpl("imp_impexp_interior_placement_interior_0_impexp_int_01_milo_")
mp.game.streaming.requestIpl("imp_impexp_interior_placement_interior_3_impexp_int_02_milo_")
mp.game.streaming.requestIpl("imp_impexp_interior_placement_interior_1_impexp_intwaremed_milo_")
mp.game.streaming.requestIpl("imp_impexp_interior_placement_interior_2_imptexp_mod_int_01_milo_")
mp.events.add(
{
"cAutoShop-ShowPaintMenu" : (service) => {
......
......@@ -47,6 +47,8 @@ let service = {
hydraulics: -1,
wheels: -1
}
// Menu Class. Tracks what Menu to deliver based on which garage slot the users car is in.
class menu {
constructor() {
this.garage = false
......@@ -78,6 +80,13 @@ function colShapeEntered(player, shape){
service.tint = player.vehicle.getMod(46)
service.plate = player.vehicle.getMod(62)
service.boost = player.vehicle.getMod(40)
service.spoiler = player.vehicle.getMod(0)
service.fbumper = player.vehicle.getMod(1)
service.rbumper = player.vehicle.getMod(2)
service.skirt = player.vehicle.getMod(3)
service.armor = player.vehicle.getMod(16)
service.hydraulics = player.vehicle.getMod(38)
service.wheels = player.vehicle.getMod(23)
const str = `boost: ${service.boost} Turbo: ${service.turbo}`
player.notify(str)
player.notify(`Get out and see the mechanic.`)
......@@ -155,9 +164,29 @@ mp.events.add({"sKeys-E" : (player) => {
//player.call("cAutoShop-ShowPaintMenu", service)
}
else if (menu.garage == true) {
//player.notify(`Those custom parts aren't in yet.`)
const execute = JSON.stringify(service)
player.call("cAutoShop-ShowMechanicMenu", execute)
//player.notify(`Those custom parts aren't in yet.`)
//const servicevehicle = mp.vehicles.forEachInRange(111.08, 6626.702, 31.444, 2, 0, 70);
//player.notify(`${ servicevehicle }`)
let execute = `app.engine = ${service.engine};`
execute += `app.horn = ${service.horn};`
execute += `app.breaks = ${service.breaks};`
execute += `app.transmission = ${service.transmission};`
execute += `app.suspension = ${service.suspension};`
execute += `app.turbo = ${service.turbo};`
execute += `app.xenon = ${service.xenon};`
execute += `app.tint = ${service.tint};`
execute += `app.plate = ${service.plate};`
execute += `app.boost = ${service.boost};`
execute += `app.spoiler = ${service.spoiler};`
execute += `app.fbumper = ${service.fbumper};`
execute += `app.rbumper = ${service.rbumper};`
execute += `app.skirt = ${service.skirt};`
execute += `app.armor = ${service.armor};`
execute += `app.hyrdraulics = ${service.hydraulics};`
execute += `app.wheels = ${service.wheels};`
//const execute = JSON.stringify(service)
player.call("cAutoShop-ShowMechanicMenu", [execute])
}
else {
player.call("cAutoShop-ShowDevMenu")
......@@ -254,4 +283,3 @@ mp.events.addCommand('licenseplate', (player, _, plate) => {
});
// Air Force Base x: -2349.024, y: 3269.134, z: 32.811, rot: 315.41
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment