...
 
Commits (3)
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="mechanic.css">
<script src="../../../vue.js"></script>
<body>
<div id="app">
<div id="service">
<div class="b3-close" id="close-button" @click="exit">X</div>
<div class="b1-service">
<div>
......@@ -23,7 +24,7 @@
<script>
const app = new Vue({
el: '#app',
el: '#service',
data: {
engine: -1,
horn: -1,
......
......@@ -58,10 +58,11 @@ mp.events.add(
misc.openCef("package://RP/Browsers/Business/AutoShop/Paint/paint.html")
},
"cAutoShop-CallServerEvent" : (eventName, a, b) => mp.events.callRemote(eventName, a, b),
"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)
});
......
mp.events.add("enterCEOOffice", (x,y,z,IPLName) => {
var interior = mp.game.interior.getInteriorAtCoords(-786.8195, 315.5634, 187.9137);
mp.game.streaming.requestIpl("apa_v_mp_h_02_c");
mp.game.interior.refreshInterior(interior);
});
\ No newline at end of file
......@@ -3,6 +3,7 @@ require('./Basic/cLogin');
require('./Basic/cMoney');
require('./Character/cCharacterCreator');
require('./Business/cBusiness');
require('./Business/cCEOOffice');
require('./Business/cCarDealership');
require('./Business/cClothingShop');
require('./Business/cBarberShop');
......
......@@ -138,12 +138,24 @@ 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 ) => {
player.vehicle.setMod(parseInt(a), parseInt(b))
mp.vehicles.forEachInRange(new mp.Vector3(111.08, 6626.702, 31.444), 3,
(vehicle) => {
vehicle.setMod(a,b)
}
);
}
})
mp.events.add({"sKeys-E" : (player) => {
......@@ -184,15 +196,90 @@ mp.events.add({"sKeys-E" : (player) => {
return
}
}
});
//
mp.events.addCommand('mod', (player, a , b) => {
player.vehicle.setMod(parseInt(a), parseInt(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);
player.notify(`${paintgot}`);
});
//
mp.events.addCommand('getpaint1', (player) => {
let 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('mod', (player, fullText, a , b) => {
player.vehicle.setMod(parseInt(a), parseInt(b));
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));
player.notify(`${modgot}`);
});
//
mp.events.addCommand('modtest', () => {
mp.vehicles.forEachInRange(new mp.Vector3(111.08, 6626.702, 31.444), 3,
(vehicle) => {
vehicle.setMod(0,1)
vehicle.setMod(0,1);
}
);
})
//
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));
}
);
})
\ No newline at end of file
})
// 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) {
player.vehicle.numberPlate = plate;
}
});
// Air Force Base x: -2349.024, y: 3269.134, z: 32.811, rot: 315.41
mp.blips.new(524, new mp.Vector3(-544.73876953125, -204.69960021972656, 38.215152740478516),
{
name: "CEO Office",
color: 49,
shortRange: true,
scale: 0.75,
})
let CEOColShape = mp.colshapes.newSphere(-544.73876953125, -204.69960021972656, 38.215152740478516, 1, 0);
const CEOmarker = mp.markers.new(2, new mp.Vector3(-544.73876953125, -204.69960021972656, 38.215152740478516),1,
{
color: [255, 165, 0, 50],
visible: true,
dimension: 0
});
mp.events.addCommand("CEOEnter", (player, fullText, x, y, z) => {
if(PresiColShape.isPointWithin(player.position)) {
player.position = new mp.Vector3(-141.78150939941406, -617.6240844726562, 168.82052612304688);
player.call("enterCEOOffice", [x,y,z]);
player.notify("Sie haben das Haus des Bürgermeisters betreten!");
}
});
function colShapeEntered(player, shape) {
if(shape == CEOColShape) {
player.call("enterCEOOffice", [x,y,z]);
player.position = new mp.Vector3(-786.8195, 315.5634, 187.9137);
player.notify("Welcome back.");
}
}
mp.events.add("playerEnterColshape", colShapeEntered);
\ No newline at end of file