Commit 3e28fba1 authored by Test's avatar Test

Client-side initial commit

parent 36e2ee4c
html {
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
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-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 {
position: absolute;
top: 0;
padding: 2vh 0;
width: 7vh;
color: white;
transition: 0.3s;
}
.b2-cb_left {
left: 0;
}
.b2-cb_left:hover {
background: tomato;
}
.b2-cb_right {
right: 0;
}
.b2-cb_right:hover {
background: limegreen;
}
<html>
<meta charset="utf-8">
<link rel="stylesheet" href="mechanic.css">
<script src="../vue.js"></script>
<body>
<div id="app">
</div>
</body>
</html>
<script>
const app = new Vue({
el: '#app',
data: {
},
methods: {
changeCamRotation: function() {
mp.trigger("cChangeHeading", this.camRotation);
},
exit: function() {
mp.trigger("cCloseCefAndDestroyCam");
},
});
</script>
\ No newline at end of file
<html>
<meta charset="utf-8">
<link rel="stylesheet" href="business.css">
<script src="../vue.js"></script>
<body>
<div id="app">
</div>
</body>
</html>
<script>
const app = new Vue({
el: '#app',
data: {
},
methods: {
changeCamRotation: function() {
mp.trigger("cChangeHeading", this.camRotation);
},
exit: function() {
mp.trigger("cCloseCefAndDestroyCam");
},
});
</script>
\ No newline at end of file
"use strict";
const misc = require('../cMisc');
const player = mp.players.local;
mp.events.add(
{
"cAutoShop-ShowPaintMenu" : () => {
//misc.prepareToCef();
//misc.openCef("package://RP/Business/AutoShop/Mechanic/Paint/paint.html");
//misc.injectCef(inject);
misc.createPointedCam(103.13, 6626.423, 32.828, 0, 0, 0, 80, 102.738, 6623.627, 31.829)
setTimeout(function(){
misc.destroyCam();
},3000)
},
"cAutoShop-ShowMechanicMenu" : () => {
//misc.prepareToCef();
//misc.openCef("package://RP/Business/AutoShop/Mechanic/Paint/paint.html");
//misc.injectCef(inject);
camera = mp.cameras.new("Cam", 103.13, 6626.423, 32.828, 0, 0, 0, 80);
camera.setActive(true);
camera.pointAtCoord(102.738, 6623.627, 31.829)
mp.game.cam.renderScriptCams(true, true, 20000000000000000000000000, false, false);
setTimeout(function(){
misc.destroyCam();
},3000)
},
"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
......@@ -8,4 +8,4 @@ mp.events.add({
misc.openCef("package://RP/Browsers/Business/business.html", lang);
misc.injectCef(inject);
}
});
});
\ No newline at end of file
......@@ -62,6 +62,16 @@ function createCam(x, y, z, rx, ry, rz, viewangle) {
}
exports.createCam = createCam;
// POINTED CAMERA //
function createPointedCam(x, y, z, rx, ry, rz, viewangle, px, py, pz) {
camera = mp.cameras.new("Cam", {x, y, z}, {x: rx, y: ry, z: rz}, viewangle);
camera.setActive(true);
camera.pointAtCoord(px, py, pz)
mp.game.cam.renderScriptCams(true, true, 20000000000000000000000000, false, false);
}
exports.createPointedCam = createPointedCam;
function destroyCam() {
if (!camera) return;
camera.setActive(false);
......
......@@ -6,6 +6,7 @@ require('./Business/cBusiness');
require('./Business/cCarDealership');
require('./Business/cClothingShop');
require('./Business/cBarberShop');
require('./Business/cAutoShop');
require('./Business/cGasStation');
require('./Basic/cVehicle');
require('./Jobs/cOrangeCollector');
......
......@@ -25,9 +25,10 @@ class Vehicle {
vehicle.windowsOpened = [false, false, false, false];
vehicle.numberPlate = d.numberPlate;
const primaryColor = JSON.parse(d.primaryColor);
const secondaryColor = JSON.parse(d.secondaryColor);
vehicle.setColorRGB(primaryColor[0], primaryColor[1], primaryColor[2], secondaryColor[0], secondaryColor[1], secondaryColor[2]);
const primaryColor = d.primaryColor;
const secondaryColor = d.secondaryColor;
vehicle.setColor(primaryColor,secondaryColor)
// vehicle.setColorRGB(primaryColor[0], primaryColor[1], primaryColor[2], secondaryColor[0], secondaryColor[1], secondaryColor[2]);
vehicle.canOpen = function(player) {
if (player.dimension !== this.dimension) return false;
......
......@@ -80,7 +80,7 @@ class VehicleSingleton {
mp.events.addCommand({
'v' : (player, fullText, model) => {
'v' : (player, fullText, model, color1, color2) => {
if (player.adminLvl < 1) return;
if (!model) return player.notify("Model required");
const d = {
......@@ -95,9 +95,12 @@ class VehicleSingleton {
ownerId: 0,
whoCanOpen: JSON.stringify([player.guid]),
factionName: '',
numberPlate: this.generateRandomNumberPlate(),
primaryColor: JSON.stringify([ misc.getRandomInt(0, 159), misc.getRandomInt(0, 159), misc.getRandomInt(0, 159) ]),
secondaryColor: JSON.stringify([ misc.getRandomInt(0, 159), misc.getRandomInt(0, 159), misc.getRandomInt(0, 159) ]),
numberPlate: 'SCUMBAG',
// numberPlate: this.generateRandomNumberPlate(),
primaryColor: color1,
secondaryColor: color2,
// primaryColor: JSON.stringify([ misc.getRandomInt(0, 159), misc.getRandomInt(0, 159), misc.getRandomInt(0, 159) ]),
// secondaryColor: JSON.stringify([ misc.getRandomInt(0, 159), misc.getRandomInt(0, 159), misc.getRandomInt(0, 159) ]),
}
const vehicle = new Vehicle(d);
player.putIntoVehicle(vehicle, -1);
......
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