...
 
Commits (2)
html {
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
background-color: rgba(0, 0, 0, 0.0);
font-family: Segoe UI;
font-weight: 100;
color: #DDD;
text-align: center;
}
.b3-close {
background: coral;
position: absolute;
right: 0;
top: 0;
width: 6vh;
height: 3vh;
font-size: 2vh;
transition: 0.3s;
z-index: 2;
}
.b3-service {
background: rgb(39, 218, 98);
width: 6vh;
height: 3vh;
font-size: 2vh;
transition: 0.3s;
z-index: 2;
}
.b3-close:hover {
background: tomato;
}
.b1-logo {
background: #268F3A;
width: 100%;
position: absolute;
left: 0;
top: 0;
height: 40vh;
z-index: 1;
display: flex;
flex-wrap: wrap;
position: fixed;
transition: 1s;
}
.logoLoading {
height: 100vh;
}
.logo {
margin: auto;
/*height: 40vh;*/
}
.b1-tax {
text-transform: uppercase;
font-size: 2.5vh;
color: white;
}
.b2 {
position: fixed;
left: 0;
top: 40vh;
width: 100%;
height: 70vh;
}
.b2-gs {
width: 100%;
background: #DDD;
border-bottom: 1px solid #777;
display: flex;
padding: 2vh 0;
}
.b2-gs-item {
width: 100%;
text-align: center;
border-left: 1px solid #777;
font-size: 3vh;
color: green;
padding: 0 1vw;
}
.b2-gs-item:nth-child(1) {
border-left: 1px solid transparent;
}
.b2-title {
color: #777;
}
.gs-main {
font-size: 3vh;
}
.gs-info {
font-size: 1.5vh;
color: #777;
text-transform: uppercase;
}
.gs-dollar-before:before {
content: "$";
}
.gs-percent-after:after {
content: "%";
}
.b2-buttons {
display: flex;
flex-wrap: wrap;
width: 100%;
height: 42vh;
position: relative;
}
.b2-button {
width: calc(100% - 40vw);
background: #268F3A;
text-align: center;
margin: auto 20vw;
color: #EEE;
font-size: 2vh;
padding: 2vh 0;
text-transform: uppercase;
transition: 0.3s;
position: relative;
}
.b2-button:hover {
background: green;
color: #ddd;
}
.b2-cb {
.ma-close {
background: rgb(82, 82, 82);
position: absolute;
right: 0;
top: 0;
padding: 2vh 0;
width: 7vh;
color: white;
width: 6vh;
height: 3vh;
font-size: 2vh;
transition: 0.3s;
z-index: 2;
}
.b2-cb_left {
left: 0;
.ma-close:hover {
background: rgb(236, 41, 41);
}
.b2-cb_left:hover {
background: tomato;
.m1-tray-wrapper {
display: grid;
grid-template-columns: 10% 10% 10% 10% 10% 10% 10% 10% 10% 10%;
}
.b2-cb_right {
right: 0;
}
.m1-tray {
.b2-cb_right:hover {
background: limegreen;
}
}
\ No newline at end of file
......@@ -4,16 +4,33 @@
<link rel="stylesheet" href="mechanic.css">
<script src="../../../vue.js"></script>
<body>
<div id="service">
<div class="b3-close" id="close-button" @click="exit">X</div>
<div class="b1-service">
<div>
<div class="b1-summ-info">{{ engine }}</div>
</div>
<div>
<div class="b1-summ">{{ horn }}</div>
<div class="b1-summ-info">{{ breaks }}</div>
<div class="b1-summ-info">{{ wheels }}</div>
<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>
</div>
</div>
</div>
......
"use strict";
const misc = require('../cMisc');
const player = mp.players.local;
const vehicle = player.vehicle
......@@ -44,13 +43,13 @@ mp.events.add(
},
"cAutoShop-ShowMechanicMenu" : (execute) => {
misc.prepareToCef();
misc.prepareToGarage();
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(){
// setTimeout(function(){
// misc.destroyCam();
//},3000)
// },3000)
},
"cAutoShop-ShowDevMenu" : () => {
......@@ -61,15 +60,13 @@ mp.events.add(
"cAutoShop-CallServerEvent" : (eventName, a, b) => {
mp.events.callRemote(eventName, a, b)
},
"cAutoShop-GetModClass" : () => mp.events.callRemote(getMods)
//"cAutoShop-SetVehicleColor" : (col1, col2) => vehicle.setColours(col1, col2)
// "cAutoShop-SetVehicleColor" : (col1, col2) => vehicle.setColours(col1, col2)
});
// RAGE Object Declarations
//paleto right garage
//mp.game.object.doorControl(-822900180, 114, 6623, 32, true, 0, 0, 0);
//paleto left garage
//mp.game.object.doorControl(-822900180, 108, 6617, 32, true, 0, 0, 0);
//paleto paint garage
//mp.game.object.doorControl(106.161, 6619.949, 32, true, 0, 0, 0);
\ No newline at end of file
// paleto right garage
// mp.game.object.doorControl(-822900180, 114, 6623, 32, true, 0, 0, 0);
// paleto left garage
// mp.game.object.doorControl(-822900180, 108, 6617, 32, true, 0, 0, 0);
// paleto paint garage
// mp.game.object.doorControl(106.161, 6619.949, 32, true, 0, 0, 0);
\ No newline at end of file
......@@ -21,6 +21,13 @@ function prepareToCef(blurred = null) {
}
exports.prepareToCef = prepareToCef;
function prepareToGarage(blurred = null) {
mp.gui.cursor.visible = true;
mp.game.ui.displayRadar(false);
mp.gui.chat.show(false);
if (blurred) mp.game.graphics.transitionToBlurred(blurred);
}
exports.prepareToGarage = prepareToGarage;
function injectCef(execute) {
if(!cef) return;
......
"use strict"
const player = mp.players.local
// PAINT
// x: 104.129, y: 6622.053, z: 31.486, rot: 43.44
//Mech
//x: 111.08, y: 6626.702, z: 31.444, rot: 41.8
// Mech
// x: 111.08, y: 6626.702, z: 31.444, rot: 41.8
// car repair
//let bodyHealth = vehicle.bodyHealth
// let bodyHealth = vehicle.bodyHealth
//raise car
//entity.setCollision(false, true)
// raise car
// entity.setCollision(false, true)
// Map Location
mp.blips.new(524, new mp.Vector3(111.08, 6626.702, 31.444),
......@@ -23,7 +22,7 @@ mp.blips.new(524, new mp.Vector3(111.08, 6626.702, 31.444),
scale: 0.75,
})
// Service Class. Tracks where your car is.
let service = {
const service = {
garage: '',
service: '',
primeColor: -1,
......@@ -68,7 +67,7 @@ const colshapeDesk = mp.colshapes.newSphere(101.069, 6618.729, 32.435, 1);
// ColShape Functions Entering
function colShapeEntered(player, shape){
// Car is registered into the garage service
if (shape == colshapeMechanic) {
if (shape === colshapeMechanic) {
if (player.vehicle) {
service.engine = player.vehicle.getMod(11)
service.horn = player.vehicle.getMod(14)
......@@ -94,7 +93,7 @@ function colShapeEntered(player, shape){
}
}
// Car is registered into the paint service
if (shape == colshapePaint) {
if (shape === colshapePaint) {
if (player.vehicle) {
// Collect details of the vehicle in the garage
service.primeColor = player.vehicle.getColorRGB(0)
......@@ -104,12 +103,12 @@ function colShapeEntered(player, shape){
}
}
// Front desk presents menu based on car location
if (shape == colshapeDesk) {
if (shape === colshapeDesk) {
colshapeloc.location = 'menuactive'
if (service.garage == 'ingarage') {
if (service.garage === 'ingarage') {
menu.garage = true
player.notify(`Press ~b~E ~s~to open Mechanic Menu`)
} else if (service.garage == 'inpaint') {
} else if (service.garage === 'inpaint') {
menu.paint = true
player.notify(`Press ~b~E ~s~to open Paint Menu`)
} else {
......@@ -119,21 +118,21 @@ function colShapeEntered(player, shape){
}
// ColShape Functions Leaving
function colShapeExited(player, shape) {
if (shape == colshapeMechanic) {
if (shape === colshapeMechanic) {
if (player.vehicle) {
player.notify(`Have a nice day!`)
service.garage = ''
menu.garage = false
}
}
if (shape == colshapePaint) {
if (shape === colshapePaint) {
if (player.vehicle) {
player.notify(`Have a nice day!`)
service.garage = ''
menu.paint = false
}
}
if (shape == colshapeDesk) {
if (shape === colshapeDesk) {
colshapeloc.location = ''
}
}
......@@ -159,14 +158,14 @@ mp.events.add({
}
})
mp.events.add({"sKeys-E" : (player) => {
if (colshapeloc.location == 'menuactive') {
if (menu.paint == true) {
//player.call("cAutoShop-ShowPaintMenu", service)
if (colshapeloc.location === 'menuactive') {
if (menu.paint === true) {
// player.call("cAutoShop-ShowPaintMenu", service)
}
else if (menu.garage == true) {
//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 }`)
if (menu.garage === true) {
// 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};`
......@@ -184,7 +183,7 @@ mp.events.add({"sKeys-E" : (player) => {
execute += `app.armor = ${service.armor};`
execute += `app.hyrdraulics = ${service.hydraulics};`
execute += `app.wheels = ${service.wheels};`
//const execute = JSON.stringify(service)
// const execute = JSON.stringify(service)
player.call("cAutoShop-ShowMechanicMenu", [execute])
}
......@@ -192,9 +191,6 @@ mp.events.add({"sKeys-E" : (player) => {
player.call("cAutoShop-ShowDevMenu")
}
}
else {
return
}
}
});
//
......