Commit ea3df71b authored by Test's avatar Test

remove legacy events. add sever trigger name as string. passes data to server trigger.

parent 723a9c02
......@@ -34,9 +34,35 @@
.m1-tray-wrapper {
display: grid;
grid-template-columns: 10% 10% 10% 10% 10% 10% 10% 10% 10% 10%;
grid-template-columns: auto auto auto auto auto
auto auto auto auto ;
}
.m1-tuning-parts {
grid-column-start: 4;
background: rgba(36, 36, 36, 0.74);
}
.m1-custom-parts {
grid-column-start: 5;
background: rgba(36, 36, 36, 0.74);
}
.m1-garage-services {
grid-column-start: 6;
background: rgba(36, 36, 36, 0.74);
}
.m1-tray {
background: rgb(82, 82, 82);
width: 6vh;
height: 3vh;
font-size: 2vh;
transition: 0.3s;
z-index: 2;
}
.m1-tray:hover {
background: rgb(236, 41, 41);
}
\ No newline at end of file
......@@ -3,45 +3,46 @@
<meta charset="utf-8">
<link rel="stylesheet" href="mechanic.css">
<script src="../../../vue.js"></script>
</head>
<body>
<div id="app">
<div class="ma-close" id="close-button" @click="exit">X</div>
<div class="ma-service">
<div class="m1-tray-wrapper">
<div class="m1-tuning-parts">
<div class="m1-tray">{{ engine }}</div>
<div class="m1-tray">{{ breaks }}</div>
<div class="m1-tray">{{ transmission }}</div>
<div class="m1-tray">{{ suspension }}</div>
<div class="m1-tray">{{ turbo }}</div>
<div class="m1-tray">{{ boost }}</div>
</div>
<div class="m1-custom-parts">
<div class="m1-tray">{{ horn }}</div>
<div class="m1-tray">{{ xenon }}</div>
<div class="m1-tray">{{ tint }}</div>
<div class="m1-tray">{{ plate }}</div>
<div class="m1-tray">{{ spoiler }}</div>
<div class="m1-tray">{{ fbumper }}</div>
<div class="m1-tray">{{ rbumper }}</div>
<div class="m1-tray">{{ skirt }}</div>
<div class="m1-tray">{{ armor }}</div>
<div class="m1-tray">{{ hydraulics }}</div>
<div class="m1-tray">{{ wheels }}</div>
</div>
<div class="m1-garage-services">
<div class="ma-service-show">
<div class="m1-tray-wrapper">
<div class="m1-tuning-parts">
<div class="m1-tray" @click="engineA">{{ engine }}</div>
<div class="m1-tray">{{ breaks }}</div>
<div class="m1-tray">{{ transmission }}</div>
<div class="m1-tray">{{ suspension }}</div>
<div class="m1-tray">{{ turbo }}</div>
<div class="m1-tray">{{ boost }}</div>
</div>
<div class="m1-custom-parts">
<div class="m1-tray">{{ horn }}</div>
<div class="m1-tray">{{ xenon }}</div>
<div class="m1-tray">{{ tint }}</div>
<div class="m1-tray">{{ plate }}</div>
<div class="m1-tray">{{ spoiler }}</div>
<div class="m1-tray">{{ fbumper }}</div>
<div class="m1-tray">{{ rbumper }}</div>
<div class="m1-tray">{{ skirt }}</div>
<div class="m1-tray">{{ armor }}</div>
<div class="m1-tray">{{ hydraulics }}</div>
<div class="m1-tray">{{ wheels }}</div>
</div>
<div class="m1-garage-services">
</div>
</div>
</div>
</div>
</div>
</body>
</html>
<script>
const app = new Vue({
el: '#service',
el: '#app',
data: {
engine: -1,
horn: -1,
......@@ -65,14 +66,8 @@ const app = new Vue({
changeCamRotation: function() {
mp.trigger("cChangeHeading", this.camRotation);
},
sp0: function() {
mp.trigger("cAutoShop-CallServerEvent", z-Mod, 0, -1);
},
sp1: function() {
mp.trigger("cAutoShop-CallServerEvent", sAutoShop-Mod, 0, 0);
},
sp2: function() {
mp.trigger("cAutoShop-CallServerEvent", sAutoShop-Mod, 0, 1);
engineA: function() {
mp.trigger("cAutoShop-CallServerEvent", "sAutoShop-Mod", 1, 1);
},
exit: function() {
mp.trigger("cCloseCefAndDestroyCam");
......
......@@ -36,7 +36,7 @@ mp.events.add(
misc.prepareToCef();
misc.openCef("package://RP/Browsers/Business/AutoShop/Paint/paint.html");
misc.injectCef(service);
misc.createPointedCam(103.13, 6626.423, 32.828, 0, 0, 0, 80, 102.738, 6623.627, 31.829)
misc.createPointedCam(110.485, 6630.113, 31.787, 0, 0, 0, 80, 102.738, 6623.627, 31.829)
// setTimeout(function(){
// misc.destroyCam();
// },3000)
......@@ -47,6 +47,7 @@ mp.events.add(
misc.openCef("package://RP/Browsers/Business/AutoShop/Mechanic/mechanic.html");
misc.injectCef(execute);
misc.createPointedCam(110.48, 6631.676, 31.787, 0, 0, 0, 80, 109.888, 6626.924, 31.787)
// setTimeout(function(){
// misc.destroyCam();
// },3000)
......
......@@ -137,22 +137,14 @@ function colShapeExited(player, shape) {
}
}
// Get Current Service Class
function getCurrentService() {
let garageservice = JSON.stringify(service)
return garageservice
}
// RAGE Event Declarations
mp.events.add("playerEnterColshape", colShapeEntered)
mp.events.add("playerExitColshape", colShapeExited)
mp.events.add("getMods", getCurrentService)
mp.events.add({
"sAutoShop-Mod" : ( a, b ) => {
mp.vehicles.forEachInRange(new mp.Vector3(111.08, 6626.702, 31.444), 3,
(vehicle) => {
vehicle.setMod(a,b)
vehicle.setMod(parseInt(a), parseInt(b))
}
);
}
......@@ -201,46 +193,19 @@ mp.events.addCommand('mod', (player, a , b) => {
mp.events.addCommand('color', (player, a, b) => {
player.vehicle.setColor(parseInt(a), parseInt(b));
});
// NOT A FUNCTION
mp.events.addCommand('modcolor1', (player, a , b) => {
player.vehicle.setModColor1(parseInt(a), parseInt(b), 0);
});
// NOT A FUNCTION
mp.events.addCommand('modcolor2', (player, a , b) => {
player.vehicle.setModColor2(parseInt(a), parseInt(b));
});
//
mp.events.addCommand('ExtraColor', (player, a , b) => {
player.vehicle.setExtraColours(parseInt(a), parseInt(b));
});
//
mp.events.addCommand('getpaint0', (player) => {
let paintgot = player.vehicle.getPaint(0);
const paintgot = player.vehicle.getPaint(0);
player.notify(`${paintgot}`);
});
//
mp.events.addCommand('getpaint1', (player) => {
let paintgot = player.vehicle.getPaint(1);
const paintgot = player.vehicle.getPaint(1);
player.notify(`${paintgot}`);
});
//
mp.events.addCommand('setpaint', (player, a , b) => {
player.vehicle.setPaint(parseInt(a), parseInt(b));
});
// Vehicle::setModColor1
// paintType: int
// color: int
// p3: int
mp.events.addCommand('setModColor1', (player, paintType, color, p3) => {
player.vehicle.setModColor1(parseInt(paintType), parseInt(color), parseInt(p3));
})
mp.events.addCommand('setModColor2', (player, paintType, color, p3) => {
player.vehicle.setModColor2(parseInt(paintType), parseInt(color), parseInt(p3));
})
//
mp.events.addCommand('getmod', (player, fullText, a) => {
let modgot = player.vehicle.getMod(parseInt(a));
const modgot = player.vehicle.getMod(parseInt(a));
player.notify(`${modgot}`);
});
//
......@@ -251,26 +216,6 @@ mp.events.addCommand('modtest', () => {
}
);
})
//
mp.events.addCommand('modcar', ( fulltext, a , b ) => {
mp.vehicles.forEachInRange(new mp.Vector3(111.08, 6626.702, 31.444), 3,
(vehicle) => {
vehicle.setMod(parseInt(a), parseInt(b));
}
);
})
// Mod My Car
mp.events.addCommand('mc', ( player, a , b ) => {
if(player.vehicle) {
player.vehicle.setMod(parseInt(a), parseInt(b));
}
})
// ??
mp.events.addCommand('pearl', (player, fulltext, pearl) => {
if(player.vehicle) {
player.vehicle.pearlescentColor = parseInt(pearl);
}
});
// Plate: Text string Alpha Numeric
mp.events.addCommand('licenseplate', (player, _, plate) => {
if(player.vehicle) {
......
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