Archived
Private
Public Access
1
0

Update 07.12.2022

This commit is contained in:
2022-12-07 15:35:41 +01:00
parent 771f58073f
commit 840d7ad42f
288 changed files with 148948 additions and 4346 deletions

View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
namespace TaxiJob.Shared {
public static class ArrayExtensions {
public static T Random<T>(this IEnumerable<T> enumerable, [Optional] int seed) {
var random = new Random(seed != 0 ? seed : Environment.TickCount);
var array = enumerable.ToArray();
var index = random.Next(array.Length);
return array[index];
}
}
}

View File

@@ -46,6 +46,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ArrayExtensions.cs" />
<Compile Include="ClientConfig.cs" />
<Compile Include="ESX\Client\Enums\HudColor.cs" />
<Compile Include="ESX\Client\Enums\IconType.cs" />

View File

@@ -0,0 +1,36 @@
fx_version 'cerulean'
games { 'gta5' }
-- details
author 'Leon Hoppe'
description "Mosley's"
version '2.0'
ui_page "nui/meter.html"
files {
"nui/digital-7.regular.ttf",
"nui/OPTICalculator.otf",
"nui/meter.html",
"nui/meter.css",
"nui/meter.js",
'nui/img/phone.png',
'nui/img/fare1.png',
'nui/img/fare2.png',
'nui/img/redlight.png',
'nui/img/greenlight.png',
'nui/img/offlight.png',
'Newtonsoft.Json.dll',
'TaxiJob.Shared.dll',
'settings.ini'
}
client_scripts {
'client.lua',
'TaxiJob.Client.net.dll'
}
server_scripts {
'TaxiJob.Server.net.dll'
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -0,0 +1,267 @@
@font-face {
/*font-family: "Digital-7";
src: url( "digital-7.regular.ttf" );*/
font-family: "OPTICalculator";
src: url("OPTICalculator.otf");
}
@-webkit-keyframes blink {
0% {
opacity: 1;
}
49% {
opacity: 1;
}
50% {
opacity: 0;
}
100% {
opacity: 0;
}
}
@-webkit-keyframes blink2 {
0% {
opacity: 1;
}
49% {
opacity: 1;
}
50% {
opacity: 0;
}
100% {
opacity: 0;
}
}
/* Police Radar */
#meter {
width: 505px;
height: 162px;
/*
position: absolute;
bottom: 0px;
right: 10px;
*/
position: relative;
top: 63%;
left: 36.5%;
margin: auto;
color: white;
border-radius: 10px;
/*display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;*/
background-image: url("img/fare2.png");
}
#fare {
/*
width: 370px;
height: 120px;
*/
width: 455px;
height: 120px;
/*
position: absolute;
bottom: 10px;
right: 10px;
margin: auto;
*/
position: relative;
/*bottom: 2%;
right: 2%;*/
left: 0.2%;
bottom: 7%;
margin: auto;
color: white;
border-radius: 10px;
display: grid;
grid-column-gap: 33px;
grid-row-gap: 40px;
/*grid-template-columns: repeat(2, 3fr) repeat(3, 0.5fr) 30% 30%;*/
grid-template-columns: 40% 28.5% 18%;
/*background-image: url("img/fare2.png");*/
padding: 2%;
}
/*|
#fare .label {
display: grid;
grid-area: label;
}
#fare .container {
display: grid;
grid-template-columns: 100%;
grid-template-rows: 75% 25%;
grid-template-areas:
"meter-field"
"label";
margin-top: 35px;
margin-bottom: 30px;
}*/
#fare .label {
display: grid;
grid-area: label;
}
#fare .container {
/*position: relative;
left: 20%;*/
display: grid;
grid-template-columns: 100%; /*50*/
grid-template-rows: 85% 15%;
grid-row-gap: 16%;
grid-template-areas:
"meter-field"
"label";
margin-top: 35px;
margin-bottom: 30px;
}
#baselight {
width: 18px; /*50px*/
height: 18px;
position: relative;
right: 40.1%;
bottom: 22.5%;
margin: auto;
background-size: 100%;
background-image: url("img/offlight.png");
}
#greenlight {
/*width: 50px;
height: 50px;*/
position: relative;
/*
left: 1.5%;
bottom: 7%;*/
margin: auto;
/*background-image: url("img/greenlight.png");*/
-webkit-animation: blink 1s;
-webkit-animation-iteration-count: infinite;
}
#redlight {
/*width: 50px;
height: 50px;*/
position: relative;
/*
left: 1.5%;
bottom: 7%;*/
margin: auto;
/*background-image: url("img/greenlight.png");*/
-webkit-animation: blink 4s;
-webkit-animation-iteration-count: infinite;
}
/*
#contenedor1{
width: 200px;
height: 50px;
position: relative;
left: 5%;
bottom: -2%;
display: grid;
grid-template-columns: 100%; /*50*//*
grid-template-rows: 85% 15%;
grid-template-areas:
"meter-field"
"label";
margin-top: 35px;
margin-bottom: 30px;
}
/*
#contenedor2{
width: 200px;
height: 50px;
position: relative;
left: 45%;
bottom: 50.5%;
display: grid;
grid-template-columns: 100%; /*50*//*
grid-template-rows: 85% 15%;
grid-template-areas:
"meter-field"
"label";
margin-top: 35px;
margin-bottom: 30px;
/*margin-left: 10%;*//*
}
*/
#fare .meter-field {
/*display: grid;*/
/*grid-area: meter-field;*/
/*font-family: "Verdana";*/
/*background-color: black;*/
font-family: "OPTICalculator";
color: red;
font-weight: bold;
font-size: 43px;
letter-spacing: 3px;
text-align: left; /*center*/
/*overflow-x: hidden;*/
}
#fare .label {
width: 100%;
height: 100%;
/*position: relative;
bottom: 5%;*/
/*background-color: black;*/
/*font-family: Verdana;*/
font-family: "OPTICalculator";
font-weight: bold;
font-size: 12px;
text-align: center;
}
/*
#config {
background-image: url("img/phone.png");
width: 280px;
height: 450px;
position: absolute;
left: 90%;
transform: translateX(-50%);
padding: 10px;
position: absolute;
top: 65%;
margin-top: -250px;
margin-left: auto;
margin-right: auto;
padding-bottom: 20px;
text-align: center;
color: #333;
}
#config h1{
margin-top: 120px;
font-size: 18px;
font-family: 'Digital-7';
text-align: center;
}
#config .button{
font-family: 'Arial';
padding: 8px;
width: 100px;
opacity: 0.8;
font-size: 12px;
margin: 0 auto;
background: #efc700;
margin-bottom: 10px;
text-align: center;
}
*/

View File

@@ -0,0 +1,52 @@
<html lang="de">
<head>
<script src="nui://game/ui/jquery.js" type="text/javascript">
</script>
<script src="meter.js" type="text/javascript" defer></script>
<link href="meter.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<title></title>
</head>
<body onselectstart="return false;" ondragstart="return false;">
<div id="meter" style="display: none;">
<div id="fare">
<div class="container">
<div id="fare-amount" class="meter-field fare">--</div>
<div class="label">PREIS</div> <!--FARE-->
</div>
<div class="container">
<div id="rate" class="meter-field rate">--/km</div> <!--/mi-->
<div class="label">TARIF</div> <!--RATE-->
</div>
<div class="container">
<div id="state" class="meter-field state">ON</div>
<!--<div class="label">PAUSA</div>-->
</div>
</div>
<div id="baselight">
<div id="greenlight">
<img style="width:18px; height:18px" src="img/greenlight.png">
</div>
<div id="redlight">
<img style="width:18px; height:18px" src="img/redlight.png">
</div>
</div>
</div>
<!--
<div id="config" style="display:none;">
<h1>Fare Configuration</h1>
<div class="config-container">
<div class="button toggle-meter">Toggle Fare Meter</div>
<div class="button fare-distance">Fare Type: Distance</div>
<div class="button fare-flat">Fare Type: Flat Fee</div>
<div class="button set-rate">Set Rate</div>
<div class="button reset-trip">Reset Fare</div>
<div class="button close">Close</div>
</div>
</div>-->
</body>
</html>

View File

@@ -0,0 +1,152 @@
let meterVisible = false;
let currencyPrefix = '';
let rateSuffix = '';
let rateType = 'distance';
let rateAmount = null;
let currentFare = 5.00;
let pause = false;
let moving = false;
$('#greenlight').hide();
$('#redlight').hide();
window.addEventListener("message", function (event) {
switch (event.data.type) {
case 'show_config':
showConfig();
break;
case 'hide_config':
hideConfig();
break;
case 'update_meter':
updateMeterAttributes(JSON.parse(event.data.attributes));
break;
//refreshMeterDisplay(); TESTEAR ESTO
}
});
/*$('.toggle-meter').on('click', function () {
let attrs = {'meterVisible': 'toggle'}
$.post('http://esx_taximeter/updateAttrs', JSON.stringify(attrs));
});
$('.fare-distance').on('click', function () {
let attrs = {'rateType': 'distance'}
$.post('http://esx_taximeter/updateAttrs', JSON.stringify(attrs));
});
$('.fare-flat').on('click', function () {
let attrs = {'rateType': 'flat'}
$.post('http://esx_taximeter/updateAttrs', JSON.stringify(attrs));
});
$('.close').on('click', function () {
$.post('http://esx_taximeter/closeConfig', JSON.stringify({}));
});
$('.set-rate').on('click', function () {
$.post('http://esx_taximeter/setRate', JSON.stringify({}));
});
$('.reset-trip').on('click', function () {
$.post('http://esx_taximeter/resetFare', JSON.stringify({}));
});*/
function showConfig() {
$('#config').show();
}
function hideConfig() {
$('#config').hide();
}
function showMeter() {
$('#meter').show();
}
function hideMeter() {
$('#meter').hide();
}
function setRate(rate) {
updateFareType();
}
function updateMeterAttributes(attributes) {
if (attributes) {
meterVisible = attributes['meterVisible'];
rateType = attributes['rateType'];
rateAmount = attributes['rateAmount'];
currentFare = attributes['currentFare'];
currencyPrefix = attributes['currencyPrefix'];
rateSuffix = attributes['rateSuffix'];
pause = attributes['meterPause'];
//moving = attributes['isMoving'];
if (moving !== attributes['isMoving']) {
moving = attributes['isMoving'];
updateLight()
}
refreshMeterDisplay();
}
}
function updateLight() {
if (moving) {
$('#greenlight').show();
$('#redlight').hide();
} else {
$('#redlight').show();
$('#greenlight').hide();
}
}
function refreshMeterDisplay() {
toggleMeterVisibility();
updateRateType();
updateCurrentFare();
updatePauseState();
//updateLight();
}
function toggleMeterVisibility() {
if (meterVisible) {
showMeter();
} else {
hideMeter();
}
}
function updateCurrentFare() {
let string;
if (rateType === 'flat') {
string = currencyPrefix + (rateAmount || '--');
} else {
string = currencyPrefix + (currentFare || '0.00');
}
$('.meter-field.fare').text(string);
}
function updateRateType() {
let string;
if (rateType === 'flat') {
string = 'FLAT'
} else {
string = currencyPrefix + (rateAmount || '--') + rateSuffix
}
$('.meter-field.rate').text(string);
}
function updatePauseState() {
let string;
if (pause) {
string = 'OFF'
} else {
string = 'ON'
}
$('.meter-field.state').text(string);
}

View File

@@ -0,0 +1,139 @@
{[General]
DrawDistance 100.0
VehicleSpawnPoint [911.108, -177.867, 74.283, 225.0]
VehicleDeleter [908.317, -183.070, 73.201]
VehicleModel taxi
TimeToNpcJob 20000
}
{[Cloakroom]
Position [894.88, -180.23, 74.5]
Size [1.0, 1.0, 1.0]
Color [204, 204, 0]
Type 21
Rotate true
}
{[VehicleSpawner]
Position [915.039, -162.187, 74.5]
Size [1.0, 1.0, 1.0]
Color [204, 204, 0]
Type 36
Rotate true
}
{[Npcs]
0 a_m_m_salton_03
1 a_m_m_skater_01
2 a_m_m_prolhost_01
3 a_m_m_soucent_02
4 a_m_y_beach_01
5 a_f_m_bevhills_01
6 a_m_y_bevhills_01
7 a_m_y_busicas_01
8 a_f_y_clubcust_03
9 a_f_m_eastsa_01
10 a_f_m_eastsa_02
11 a_f_m_fatbla_01
12 a_f_o_ktown_01
13 a_f_y_vinewood_02
14 a_f_y_scdressy_01
17 a_f_y_genhot_01
18 a_m_m_fatlatin_01
19 a_m_m_farmer_01
}
{[Positions]
1 [293.5, -590.2, 42.7]
2 [253.4, -375.9, 44.1]
3 [120.8, -300.4, 45.1]
4 [-38.4, -381.6, 38.3]
5 [-107.4, -614.4, 35.7]
6 [-252.3, -856.5, 30.6]
7 [-236.1, -988.4, 28.8]
8 [-277.0, -1061.2, 25.7]
9 [-576.5, -999.0, 21.8]
10 [-602.8, -952.6, 21.6]
11 [-790.7, -961.9, 14.9]
12 [-912.6, -864.8, 15.0]
13 [-1069.8, -792.5, 18.8]
14 [-1306.9, -854.1, 15.1]
15 [-1468.5, -681.4, 26.2]
16 [-1380.9, -452.7, 34.1]
17 [-1326.3, -394.8, 36.1]
18 [-1383.7, -270.0, 42.5]
19 [-1679.6, -457.3, 39.4]
20 [-1812.5, -416.9, 43.7]
21 [-2043.6, -268.3, 23.0]
22 [-2186.4, -421.6, 12.7]
23 [-1862.1, -586.5, 11.2]
24 [-1859.5, -617.6, 10.9]
25 [-1635.0, -988.3, 12.6]
26 [-1284.0, -1154.2, 5.3]
27 [-1126.5, -1338.1, 4.6]
28 [-867.9, -1159.7, 5.0]
29 [-847.5, -1141.4, 6.3]
30 [-722.6, -1144.6, 10.2]
31 [-575.5, -318.4, 34.5]
32 [-592.3, -224.9, 36.1]
33 [-559.6, -162.9, 37.8]
34 [-535.0, -65.7, 40.6]
35 [-758.2, -36.7, 37.3]
36 [-1375.9, 21.0, 53.2]
37 [-1320.3, -128.0, 48.1]
38 [-1285.7, 294.3, 64.5]
39 [-1245.7, 386.5, 75.1]
40 [-760.4, 285.0, 85.1]
41 [-626.8, 254.1, 81.1]
42 [-563.6, 268.0, 82.5]
43 [-486.8, 272.0, 82.8]
44 [88.3, 250.9, 108.2]
45 [234.1, 344.7, 105.0]
46 [435.0, 96.7, 99.2]
47 [482.6, -142.5, 58.2]
48 [762.7, -786.5, 25.9]
49 [809.1, -1290.8, 25.8]
50 [490.8, -1751.4, 28.1]
51 [432.4, -1856.1, 27.0]
52 [164.3, -1734.5, 28.9]
53 [-57.7, -1501.4, 31.1]
54 [52.2, -1566.7, 29.0]
55 [310.2, -1376.8, 31.4]
56 [182.0, -1332.8, 28.9]
57 [-74.6, -1100.6, 25.7]
58 [-887.0, -2187.5, 8.1]
59 [-749.6, -2296.6, 12.5]
60 [-1064.8, -2560.7, 19.7]
61 [-1033.4, -2730.2, 19.7]
62 [-1018.7, -2732.0, 13.3]
63 [797.4, -174.4, 72.7]
64 [508.2, -117.9, 60.8]
65 [159.5, -27.6, 67.4]
66 [-36.4, -106.9, 57.0]
67 [-355.8, -270.4, 33.0]
68 [-831.2, -76.9, 37.3]
69 [-1038.7, -214.6, 37.0]
70 [1918.4, 3691.4, 32.3]
71 [1820.2, 3697.1, 33.5]
72 [1619.3, 3827.2, 34.5]
73 [1418.6, 3602.2, 34.5]
74 [1944.9, 3856.3, 31.7]
75 [2285.3, 3839.4, 34.0]
76 [2760.9, 3387.8, 55.7]
77 [1952.8, 2627.7, 45.4]
78 [1051.4, 474.8, 93.7]
79 [866.4, 17.6, 78.7]
80 [319.0, 167.4, 103.3]
81 [88.8, 254.1, 108.2]
82 [-44.9, 70.4, 72.4]
83 [-115.5, 84.3, 70.8]
84 [-384.8, 226.9, 83.5]
85 [-578.7, 139.1, 61.3]
86 [-651.3, -584.9, 34.1]
87 [-571.8, -1195.6, 17.9]
88 [-1513.3, -670.0, 28.4]
89 [-1297.5, -654.9, 26.1]
90 [-1645.5, 144.6, 61.7]
91 [-1160.6, 744.4, 154.6]
92 [-798.1, 831.7, 204.4]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@@ -45,8 +45,8 @@
right: 10px;
*/
position: relative;
top: 63%;
left: 36.5%;
top: 50%;
left: 40%;
margin: auto;
color: white;
@@ -58,6 +58,7 @@
align-items: center;*/
background-image: url("img/fare2.png");
transform: scale(0.7);
}
#fare {

View File

@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8.1", FrameworkDisplayName = ".NET Framework 4.8.1")]

View File

@@ -0,0 +1 @@
4ef6346f7e5d1235706c5fb03ebea1457679799a

View File

@@ -0,0 +1,19 @@
D:\Programmierstuff\C#\FiveM\TaxiJob\TaxiJob.Shared\bin\Debug\fxmanifest.lua
D:\Programmierstuff\C#\FiveM\TaxiJob\TaxiJob.Shared\bin\Debug\nui\digital-7.regular.ttf
D:\Programmierstuff\C#\FiveM\TaxiJob\TaxiJob.Shared\bin\Debug\nui\img\fare1.png
D:\Programmierstuff\C#\FiveM\TaxiJob\TaxiJob.Shared\bin\Debug\nui\img\fare2.png
D:\Programmierstuff\C#\FiveM\TaxiJob\TaxiJob.Shared\bin\Debug\nui\img\greenlight.png
D:\Programmierstuff\C#\FiveM\TaxiJob\TaxiJob.Shared\bin\Debug\nui\img\offlight.png
D:\Programmierstuff\C#\FiveM\TaxiJob\TaxiJob.Shared\bin\Debug\nui\img\phone.png
D:\Programmierstuff\C#\FiveM\TaxiJob\TaxiJob.Shared\bin\Debug\nui\img\redlight.png
D:\Programmierstuff\C#\FiveM\TaxiJob\TaxiJob.Shared\bin\Debug\nui\meter.css
D:\Programmierstuff\C#\FiveM\TaxiJob\TaxiJob.Shared\bin\Debug\nui\meter.html
D:\Programmierstuff\C#\FiveM\TaxiJob\TaxiJob.Shared\bin\Debug\nui\meter.js
D:\Programmierstuff\C#\FiveM\TaxiJob\TaxiJob.Shared\bin\Debug\nui\OPTICalculator.otf
D:\Programmierstuff\C#\FiveM\TaxiJob\TaxiJob.Shared\bin\Debug\settings.ini
D:\Programmierstuff\C#\FiveM\TaxiJob\TaxiJob.Shared\bin\Debug\TaxiJob.Shared.dll
D:\Programmierstuff\C#\FiveM\TaxiJob\TaxiJob.Shared\bin\Debug\TaxiJob.Shared.pdb
D:\Programmierstuff\C#\FiveM\TaxiJob\TaxiJob.Shared\obj\Debug\TaxiJob.Shared.csproj.AssemblyReference.cache
D:\Programmierstuff\C#\FiveM\TaxiJob\TaxiJob.Shared\obj\Debug\TaxiJob.Shared.csproj.CoreCompileInputs.cache
D:\Programmierstuff\C#\FiveM\TaxiJob\TaxiJob.Shared\obj\Debug\TaxiJob.Shared.dll
D:\Programmierstuff\C#\FiveM\TaxiJob\TaxiJob.Shared\obj\Debug\TaxiJob.Shared.pdb

View File

@@ -1 +1 @@
af26162c6c5430203b98197ce430b5bb1b311951
b1779fdd674aacbeda671410e75ee6df0a20fa8d

View File

@@ -3,7 +3,7 @@ DrawDistance 100.0
VehicleSpawnPoint [911.108, -177.867, 74.283, 225.0]
VehicleDeleter [908.317, -183.070, 73.201]
VehicleModel taxi
TimeToNpcJob 20000
TimeToNpcJob 300000
}
{[Cloakroom]