inshallah kein fehler

This commit is contained in:
hydrant
2020-05-10 23:18:53 +02:00
153 changed files with 6517 additions and 3407 deletions

View File

@@ -0,0 +1,968 @@
@font-face {
font-family: OSL;
src: url(../font/OSL.ttf);
}
* {
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
body {
width: 100%;
height: 100%;
margin: 0px auto;
background-color: transparent;
}
.main2 {
z-index: 2;
background: #0c0c0cc4;
position: absolute;
padding-left: 100%;
padding-top: 100%;
}
.main {
z-index: 1;
background: #272727;
position: absolute;
left: 19vw;
padding-left: 53vw;
padding-top: 33vw;
top: 5vw;
transition: 0.2s;
}
.title {
font-size: 2vw;
position: absolute;
color: #fff;
font-family: 'OSL';
left: 1vw;
top: 0.2vw;
background: #1b1b1b;
}
.titletext {
position: absolute;
left: 21vw;
background: #1b1b1b;
padding-right: 22.7vw;
}
.sidebar {
z-index: 1;
position: absolute;
right: 72.5vw;
cursor: pointer;
z-index: 200;
top: 9.5vw;
}
.sidebaritem1 {
z-index: 1;
margin-bottom: 0.2vw;
color: #fff;
font-family: OSL;
width: 6vw;
background: #1b1b1b;
height: 4vw;
text-align: center;
line-height: 6.1vw;
transition: 0.2s;
}
.sidebaritem2 {
z-index: 1;
margin-bottom: 0.2vw;
color: #fff;
font-family: OSL;
width: 6vw;
background: #1b1b1b;
height: 4vw;
text-align: center;
line-height: 6.1vw;
transition: 0.2s;
}
.sidebaritem3 {
z-index: 1;
margin-bottom: 0.2vw;
color: #fff;
font-family: OSL;
width: 6vw;
background: #1b1b1b;
height: 4vw;
text-align: center;
line-height: 6.1vw;
transition: 0.2s;
}
.sidebaritem4 {
z-index: 1;
margin-bottom: 0.2vw;
color: #fff;
font-family: OSL;
width: 6vw;
background: #1b1b1b;
height: 4vw;
text-align: center;
line-height: 6.1vw;
transition: 0.2s;
}
.sidebaritem5 {
z-index: 1;
margin-bottom: 0.2vw;
color: #fff;
font-family: OSL;
width: 6vw;
background: #1b1b1b;
height: 4vw;
text-align: center;
line-height: 6.1vw;
transition: 0.2s;
}
.sidebaritem6 {
z-index: 1;
margin-bottom: 0.2vw;
color: #fff;
font-family: OSL;
width: 6vw;
background: #1b1b1b;
height: 4vw;
text-align: center;
line-height: 6.1vw;
transition: 0.2s;
}
.sidebaritem {
z-index: 1;
margin-bottom: 0.2vw;
color: #fff;
font-family: OSL;
width: 6vw;
background: #1b1b1b;
height: 4vw;
text-align: center;
line-height: 6.1vw;
transition: 0.2s;
}
.items {
position: absolute;
left: 5.5vw;
top: 2.5vw;
cursor: default;
width: 6vw;
}
.item {
}
ul {
float: left;
}
li {
display: block;
}
.titlecount {
position: absolute;
font-size: 0.7vw;
width: 16.3vw;
top: 0vw;
background: #1b1b1b;
padding-top: 1.8vw;
left: -1vw;
padding-right: 10vw;
padding-left: 0.2vw;
}
.sideicon1 {
padding-top: 0.2vw;
}
.sideicon2 {
padding-top: 0.2vw;
}
.sideicon3 {
padding-top: 0.2vw !important;
}
.sideicon4 {
padding-top: 0.2vw;
}
.sideicon5 {
}
.sideicon6 {
}
.sideicon7 {
width: 5vw;
}
.sideicon8 {
width: 5vw;
}
.sideicon9 {
width: 5vw;
}
.sideicon10 {
width: 5vw;
}
.sideicon11 {
width: 5vw;
}
.sideicon12 {
width: 5vw;
}
.sideicon13 {
width: 5vw;
}
.sideicon14 {
width: 5vw;
}
.sideicon15 {
width: 2vw;
}
.sideicon16 {
width: 5vw;
}
.sideicon17 {
width: 5vw;
}
.sideicon18 {
width: 5vw;
}
.sideicon7, .sideicon8, .sideicon9, .sideicon10, .sideicon11, .sideicon12, .sideicon13, .sideicon14, .sideicon15, .sideicon16, .sideicon17, .sideicon18 {
position: absolute;
left: 2.1vw;
top: 0.6vw;
}
.sideicon1, .sideicon2, .sideicon3, .sideicon4, .sideicon5, .sideicon6 {
width: 2vw;
padding-bottom: 1.8vw;
}
.bartext {
margin-top: -6.5vw;
font-size: 0.8vw;
}
.sidebaritem1:hover {
background: #131313;
}
.sidebaritem2:hover {
background: #131313;
}
.sidebaritem3:hover {
background: #131313;
}
.sidebaritem4:hover {
background: #131313;
}
.sidebaritem5:hover {
background: #131313;
}
.sidebaritem6:hover {
background: #131313;
}
li.item1 {
}
li.item2 {
top: -22vw;
left: 9vw;
}
li.item3 {
top: -46vw;
left: 16vw;
}
li.item4 {
top: -70vw;
left: 23vw;
}
li.item5 {
top: -94vw;
left: 30vw;
}
li.item6 {
top: -118vw;
left: 37vw;
}
.item1, .item2, .item3, .item4, .item5, .item6 {
color: #fff;
font-family: 'OSL';
position: relative;
margin-bottom: 2vw;
color: #fff;
font-family: OSL;
width: 6vw;
background: #1b1b1b;
height: 4vw;
text-align: center;
line-height: 6.5vw;
transition: 0.2s;
font-size: 0.5vw;
left: 2vw;
top: 2vw;
}
.show {
display: show !important;
}
.hidden {
display: none !important;
}
.green {
z-index: 1;
position: relative;
width: 6vw;
background: #55ff0096;
height: 4vw;
line-height: 1;
top: -8vw;
cursor: pointer;
opacity: 0.0;
transition: 0.3s;
}
.green:hover {
opacity: 1
}
.red {
z-index: 1;
position: relative;
width: 2.5vw;
left: 3.5vw;
background: #6d2525;
height: 1.5vw;
line-height: 1;
top: -2.4vw;
cursor: pointer;
opacity: 0.5;
transition: 0.3s;
}
.red:hover {
opacity: 1
}
.blue {
z-index: 1;
position: relative;
width: 2.5vw;
left: 0vw;
background: #0d91af8c;
height: 1.5vw;
line-height: 1;
top: -7.9vw;
cursor: pointer;
opacity: 0.5;
transition: 0.3s;
}
.blue:hover {
opacity: 1
}
.blue2 {
z-index: 1;
position: relative;
width: 2.5vw;
left: 0vw;
background: #0d91af8c;
height: 1.5vw;
line-height: 1;
top: -3.9vw;
cursor: pointer;
opacity: 0.5;
transition: 0.3s;
}
.blue2:hover {
opacity: 1
}
.redImg {
width: 1.3vw;
margin-top: 0.1vw;
}
.blueImg {
width: 1.3vw;
margin-top: 0.1vw;
}
.greenImg {
width: 1.3vw;
margin-top: 1.2vw;
}
body select {
display: block;
padding: 10px 70px 11px 13px !important;
margin-top: -29.9vw;
margin-left: -30.6vw;
height: auto !important;
border: 1px solid #000000;
border-radius: 3px;
background: url(https://i.ibb.co/b7xjLrB/selectbox-arrow.png) right center no-repeat;
background-color: #404040;
color: #fffbfb;
font-size: 12px;
line-height: 12px !important;
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
}
/* body select.select_box option */
body select option {
padding: 0 4px;
}
/* for IE and Edge */
select::-ms-expand {
display: none;
}
select:disabled::-ms-expand {
background: #f60;
}
.Betrag {
z-index: 2;
background: rgba(0,0,0,0.6);
height: 100%;
width: 100%;
display: block;
transform: translate(-50%, -50%);
position: absolute;
left: 50%;
top: 50%;
}
.Betrag4 {
z-index: 2;
background: rgba(0,0,0,0.6);
height: 100%;
width: 100%;
display: block;
transform: translate(-50%, -50%);
position: absolute;
left: 50%;
top: 50%;
}
.Betrag3 {
z-index: 2;
background: rgba(0,0,0,0.6);
height: 100%;
width: 100%;
display: block;
transform: translate(-50%, -50%);
position: absolute;
left: 50%;
top: 50%;
}
.Betrag2 {
z-index: 2;
background: rgba(0,0,0,0.6);
height: 100%;
width: 100%;
display: block;
transform: translate(-50%, -50%);
position: absolute;
left: 50%;
top: 50%;
}
t#tf_nameorid {
background-color: #313131;
border: none;
height: 1.2vw;
width: 6vw;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 12px;
position: relative;
left: -30.1vw;
top: -29.9vw;
color: #ffffff;
}
#tf_submitTrade {
background-color: #267d00;
border: none;
height: 1.2vw;
width: 4vw;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
font-color: white;
position: relative;
left: -30vw;
top: -29.9vw;
color: #ffffff;
opacity: 0.5;
transition: 0.3s;
}
#tf_submitTrade {
opacity: 1;
}
#tf_zahl {
background-color: #313131; /* blau */
border: none;
height: 30px;
width: 124px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 12px;
position: relative;
left: 42%;
top: 40%;
color: #ffffff;
}
#tf_cancle {
background-color: #ff0000;
border: none;
height: 32px;
width: 124px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
font-color: white;
position: relative;
left: 33.7%;
top: 44%;
color: #ffffff;
opacity: 0.5;
transition: 0.3s;
}
#tf_submitZahl {
background-color: #008CBA; /* blau */
border: none;
height: 32px;
width: 124px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
font-color: white;
position: relative;
left: 42%;
top: 40%;
color: #ffffff;
opacity: 0.5;
transition: 0.3s;
}
#tf_submitZahl {
opacity: 1;
}
#tf_zahl4 {
background-color: #313131;
border: none;
height: 1.5vw;
width: 5vw;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 0.6vw;
position: relative;
left: 19vw;
top: 13vw;
color: #ffffff;
}
#tf_cancle4 {
background-color: #ff0000;
border: none;
height: 0.9vw;
width: 3vw;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 0.5vw;
font-color: white;
position: relative;
left: 17.8vw;
top: 9.4vw;
color: #ffffff;
opacity: 0.5;
transition: 0.3s;
}
#tf_cancle4 {
opacity: 1;
}
#tf_submitZahl4 {
background-color: #008CBA;
border: none;
height: 1.5vw;
width: 8vw;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 0.5vw;
font-color: white;
position: relative;
left: 21vw;
top: 13vw;
color: #ffffff;
opacity: 0.5;
transition: 0.3s;
}
#tf_submitZahl4 {
opacity: 1;
}
#tf_submitTrade {
background-color: #009b03;
border: none;
height: 1.6vw;
width: 4vw;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 0.5vw;
font-color: white;
position: absolute;
color: #ffffff;
top: 3vw;
left: 29.3vw;
opacity: 0.5;
transition: 0.3s;
}
#tf_submitTrade:hover {
opacity: 1;
}
#tf_acceptTrade {
background-color: #009b03;
border: none;
height: 1.6vw;
width: 4vw;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 0.5vw;
font-color: white;
position: absolute;
color: #ffffff;
top: 3vw;
left: 29.3vw;
opacity: 0.5;
transition: 0.3s;
}
#tf_acceptTrade:hover {
opacity: 1;
}
#tf_cancle3 {
background-color: #ff0000;
border: none;
height: 0.9vw;
width: 3vw;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 0.5vw;
font-color: white;
position: relative;
left: 17.8vw;
top: 9.4vw;
color: #ffffff;
opacity: 0.5;
transition: 0.3s;
}
i
#tf_cancle3:hover {
opacity: 1
}
#tf_cancle:hover {
opacity: 1
}
#tf_cancle2:hover {
opacity: 1
}
#tf_zahl3 {
background-color: #313131;
border: none;
height: 1.5vw;
width: 5vw;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 0.6vw;
position: relative;
left: 19vw;
top: 13vw;
color: #ffffff;
}
#tf_submitZahl3 {
background-color: #008CBA;
border: none;
height: 1.5vw;
width: 8vw;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 0.7vw;
font-color: white;
position: relative;
left: 21vw;
top: 13vw;
color: #ffffff;
opacity: 0.5;
transition: 0.3s;
}
#tf_submitZahl3 {
opacity: 1;
}
.BoxBlue {
background-color: #1b1b1b;
height: 11.1vw;
width: 20.2vw;
position: relative;
margin-top: 11vw;
margin-left: 16vw;
}
#tf_cancle2 {
background-color: #ff0000;
border: none;
height: 1vw;
width: 3vw;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 0.5vw;
position: relative;
left: 5.45vw;
top: 0vw;
color: #ffffff;
}
#tf_submitZahlToHandel {
background-color: #008CBA;
border: none;
height: 1.4vw;
width: 7vw;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 0.6vw;
position: relative;
left: -3vw;
top: 7vw;
color: #ffffff;
opacity: 0.5;
transition: 0.3s;
}
#tf_submitZahlToHandel:hover {
opacity: 1;
}
#tf_submitZahlToVehicle {
background-color: #008CBA;
border: none;
height: 1.3vw;
width: 7.8vw;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 0.6vw;
position: relative;
left: 10.8vw;
top: 5.45vw;
color: #ffffff;
opacity: 0.5;
transition: 0.3s;
}
#tf_submitZahlToVehicle:hover {
opacity: 1
}
#tf_zahl2 {
background-color: #313131;
border: none;
height: 1vw;
width: 4.3vw;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 0.5vw;
position: relative;
left: 7.5vw;
top: 4.4vw;
color: #ffffff;
}
select.select_box2 {
margin-top: -1vw;
margin-left: 11.3vw;
}
.blueIcon1 {
position: relative;
height: 3vw;
margin-bottom: -3.1vw;
margin-left: 13.4vw;
}
.blueIcon2 {
position: relative;
height: 3vw;
margin-bottom: 0.9vw;
margin-left: 3.4vw;
}
.blue3 {
z-index: 1;
position: relative;
width: 2.5vw;
left: 0vw;
background: #0d91af8c;
height: 1.5vw;
line-height: 1;
top: -2.45vw;
z-index: 10000;
cursor: pointer;
opacity: 0.5;
transition: 0.3s;
}
.blue3:hover {
opacity: 1
}
#tf_nameorid {
background-color: #313131;
border: none;
height: 1.5vw;
width: 6vw;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 12px;
position: absolute;
left: 23vw;
top: 3vw;
color: #ffffff;
}
.alert_green {
z-index: 2;
background: rgba(85, 255, 0, 0.90);
position: relative;
width: 17vw;
height: 1vw;
margin-left: 74.1vw;
padding-bottom: 3vw;
margin-top: -9.5vw;
font-family: 'OSL';
font-size: 0.9vw;
text-align: center;
line-height: 3.9vw;
}
.alert_red {
z-index: 2;
background: rgba(175, 0, 0, 0.9);
position: relative;
width: 17vw;
height: 1vw;
margin-left: 74.1vw;
padding-bottom: 3vw;
margin-top: -9.5vw;
font-family: 'OSL';
text-align: center;
line-height: 3.9vw;
font-size: 0.7vw;
display: none;
}
.alert_blue {
z-index: 2;
background: rgba(0, 140, 186, 0.90);
position: relative;
width: 17vw;
height: 1vw;
margin-left: 74.1vw;
padding-bottom: 3vw;
margin-top: -9.5vw;
font-family: 'OSL';
text-align: center;
line-height: 3.9vw;
font-size: 0.7vw;
display: none;
}
.alerts {
margin-bottom: 47.5vw;
padding-top: 43.3vw;
}

View File

@@ -22,8 +22,6 @@ body {
background-color: transparent;
}
.main2 {
z-index: 2;
background: #0c0c0cc4;
@@ -557,53 +555,48 @@ t#tf_nameorid {
}
#tf_zahl {
background-color: #313131; /* blau */
background-color: #313131;
border: none;
height: 30px;
width: 124px;
height: 1vw;
width: 4.3vw;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 12px;
font-size: 0.5vw;
position: relative;
left: 42%;
top: 40%;
left: 7.8vw;
top: 1.2vw;
color: #ffffff;
}
#tf_cancle {
background-color: #ff0000;
border: none;
height: 32px;
width: 124px;
height: 1vw;
width: 3vw;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
font-color: white;
font-size: 0.5vw;
position: relative;
left: 33.7%;
top: 44%;
left: 12.5vw;
top: -0.2vw;
color: #ffffff;
opacity: 0.5;
transition: 0.3s;
}
#tf_submitZahl {
background-color: #008CBA; /* blau */
background-color: #008CBA;
border: none;
height: 32px;
width: 124px;
height: 1.5vw;
width: 8vw;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
font-color: white;
font-size: 0.5vw;
position: relative;
left: 42%;
top: 40%;
left: -1.8vw;
top: 6vw;
color: #ffffff;
opacity: 0.5;
transition: 0.3s;
}
@@ -614,15 +607,15 @@ t#tf_nameorid {
#tf_zahl4 {
background-color: #313131;
border: none;
height: 1.5vw;
width: 5vw;
height: 1vw;
width: 4.3vw;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 0.6vw;
font-size: 0.5vw;
position: relative;
left: 19vw;
top: 13vw;
left: 7.7vw;
top: 1vw;
color: #ffffff;
}
@@ -635,12 +628,10 @@ t#tf_nameorid {
text-decoration: none;
display: inline-block;
font-size: 0.5vw;
font-color: white;
position: relative;
left: 17.8vw;
top: 9.4vw;
left: 12.5vw;
top: -0.3vw;
color: #ffffff;
opacity: 0.5;
transition: 0.3s;
}
@@ -657,12 +648,10 @@ t#tf_nameorid {
text-decoration: none;
display: inline-block;
font-size: 0.5vw;
font-color: white;
position: relative;
left: 21vw;
top: 13vw;
left: -5.4vw;
top: 6vw;
color: #ffffff;
opacity: 0.5;
transition: 0.3s;
}
@@ -692,7 +681,6 @@ t#tf_nameorid {
opacity: 1;
}
#tf_acceptTrade {
background-color: #009b03;
border: none;
@@ -731,11 +719,13 @@ t#tf_nameorid {
color: #ffffff;
opacity: 0.5;
transition: 0.3s;
}i
}
#tf_cancle3:hover {
opacity: 1
}
i
#tf_cancle3:hover {
opacity: 1
}
#tf_cancle:hover {
opacity: 1
@@ -784,7 +774,7 @@ t#tf_nameorid {
.BoxBlue {
background-color: #1b1b1b;
height: 11.1vw;
height: 8.9vw;
width: 20.2vw;
position: relative;
margin-top: 11vw;
@@ -801,7 +791,7 @@ t#tf_nameorid {
display: inline-block;
font-size: 0.5vw;
position: relative;
left: 5.45vw;
left: 12.45vw;
top: 0vw;
color: #ffffff;
}
@@ -837,8 +827,8 @@ t#tf_nameorid {
display: inline-block;
font-size: 0.6vw;
position: relative;
left: 10.8vw;
top: 5.45vw;
left: -1.7vw;
top: 6.45vw;
color: #ffffff;
opacity: 0.5;
transition: 0.3s;
@@ -858,8 +848,8 @@ t#tf_nameorid {
display: inline-block;
font-size: 0.5vw;
position: relative;
left: 7.5vw;
top: 4.4vw;
left: 7.8vw;
top: 1.4vw;
color: #ffffff;
}
@@ -871,15 +861,15 @@ select.select_box2 {
.blueIcon1 {
position: relative;
height: 3vw;
margin-bottom: -3.1vw;
margin-left: 13.4vw;
margin-bottom: -3.6vw;
margin-left: 8.5vw;
}
.blueIcon2 {
position: relative;
height: 3vw;
margin-bottom: 0.9vw;
margin-left: 3.4vw;
margin-bottom: -4.6vw;
margin-left: 0.7vw;
}
.blue3 {
@@ -901,7 +891,6 @@ select.select_box2 {
opacity: 1
}
#tf_nameorid {
background-color: #313131;
border: none;
@@ -917,7 +906,6 @@ select.select_box2 {
color: #ffffff;
}
.alert_green {
z-index: 2;
background: rgba(85, 255, 0, 0.90);

View File

@@ -0,0 +1 @@
<svg height="512pt" viewBox="-64 0 512 512" width="512pt" xmlns="http://www.w3.org/2000/svg"><path d="m256 80h-32v-48h-64v48h-32v-80h128zm0 0" fill="#62808c"/><path d="m304 512h-224c-26.507812 0-48-21.492188-48-48v-336h320v336c0 26.507812-21.492188 48-48 48zm0 0" fill="#e76e54"/><path d="m384 160h-384v-64c0-17.671875 14.328125-32 32-32h320c17.671875 0 32 14.328125 32 32zm0 0" fill="#77959e"/><path d="m260 260c-6.246094-6.246094-16.375-6.246094-22.625 0l-41.375 41.375-41.375-41.375c-6.25-6.246094-16.378906-6.246094-22.625 0s-6.246094 16.375 0 22.625l41.375 41.375-41.375 41.375c-6.246094 6.25-6.246094 16.378906 0 22.625s16.375 6.246094 22.625 0l41.375-41.375 41.375 41.375c6.25 6.246094 16.378906 6.246094 22.625 0s6.246094-16.375 0-22.625l-41.375-41.375 41.375-41.375c6.246094-6.25 6.246094-16.378906 0-22.625zm0 0" fill="#fff"/></svg>

After

Width:  |  Height:  |  Size: 842 B

View File

@@ -11,40 +11,48 @@
<body>
<div class="alerts" id='alertbox'>
</div>
<div class="sidebar">
<ul>
<li name="side1" class="sidebaritem1" onclick="switchSite('backpackClass')"><img class="sideicon1" src="img/backpack/backpack.svg"><p class="bartext">Rucksack</p></li>
<li name="side2" class="sidebaritem2" onclick="getVehicle()"><img class="sideicon2" src="img/backpack/car.svg"><p class="bartext">Fahrzeug</p></li>
<li name="side3" class="sidebaritem3" onclick="switchSite('tradeClass')"><img class="sideicon4" src="img/backpack/trading.svg"><p class="bartext">Handel</p></li>
<li name="side1" class="sidebaritem1" onclick="switchSite('backpackClass')">
<img class="sideicon1" src="img/backpack/backpack.svg"><p class="bartext">Rucksack</p>
</li>
<li name="side2" class="sidebaritem2" onclick="getVehicle()">
<img class="sideicon2" src="img/backpack/car.svg"><p class="bartext">Fahrzeug</p>
</li>
<!-- <li name="side3" class="sidebaritem3" onclick="switchSite('tradeClass')"><img class="sideicon4" src="img/backpack/trading.svg"><p class="bartext">Handel</p></li>
<li name="side4" class="sidebaritem4 hidden" onclick="switchSite('handelClass')"><img class="sideicon4" src="img/backpack/trading.svg"><p class="bartext">Handeln</p></li>
<li name="side5" class="sidebaritem5 hidden" onclick="getTrade()"><img class="sideicon4" src="img/backpack/save-money.svg"><p class="bartext">Anfrage</p></li>
<li name="side6" class="sidebaritem6 hidden" onclick="switchSite('backClass')"><img class="sideicon4" src="img/backpack/back.svg"><p class="bartext">Zurück</p></li>
<li name="side5" class="sidebaritem5 hidden" onclick="getTrade()"><img class="sideicon4" src="img/backpack/save-money.svg"><p class="bartext">Anfrage</p></li> -->
<li name="side6" class="sidebaritem6 hidden" onclick="switchSite('backClass')">
<img class="sideicon4" src="img/backpack/back.svg"><p class="bartext">Zurück</p>
</li>
</ul>
</div>
<div name="backpackClass" class="backpack">
<div class="main">
<div class="Betrag" style="display:none;">
<input type="text" id="tf_zahl" name="number" placeholder="Betrag eingeben" min="1" step="1" oninput="this.value=this.value.replace(/[^0-9]/g,'');">
<button id='tf_submitZahl' onclick="">Bestätigen</button>
<button id='tf_cancle' onclick="">Schließen</button>
</div>
<div class="Betrag2" style="display:none;">
<div class="Betrag" style="display: none;">
<div class="BoxBlue">
<input type="text" id="tf_zahl2" name="number" placeholder="Betrag eingeben" min="1" step="1" oninput="this.value=this.value.replace(/[^0-9]/g,'');">
<button id="tf_submitZahlToHandel" onclick="">Zum handeln transferieren</button>
<button id="tf_cancle2" onclick="">Schließen</button>
<button id="tf_submitZahlToVehicle" onclick="">Zum Fahrzeug transferieren</button>
<img class="blueIcon1" src="img/backpack/car.svg">
<img class="blueIcon2" src="img/backpack/trading.svg">
<input type="text" id="tf_zahl" name="number" placeholder="Betrag eingeben" min="1" step="1" oninput="this.value=this.value.replace(/[^0-9]/g,'');">
<button id="tf_cancle" onclick="">Schließen</button>
<button id="tf_submitZahl" onclick="">Bestätigen</button>
<img class="blueIcon1" src="img/backpack/trash2.svg"></img>
</div>
</div>
<div class="title"><div class="titlecount"><span id="count1">0</span> / 40 Kilogramm</div><div class="titletext">Rucksack</div></div>
<div class="Betrag2" style="display: none;">
<div class="BoxBlue">
<input type="text" id="tf_zahl2" name="number" placeholder="Betrag eingeben" min="1" step="1" oninput="this.value=this.value.replace(/[^0-9]/g,'');">
<button id="tf_cancle2" onclick="">Schließen</button>
<button id="tf_submitZahlToVehicle" onclick="">Zum Fahrzeug transferieren</button>
<img class="blueIcon1" src="img/backpack/car.svg"></img>
</div>
</div>
<div class="title">
<div class="titlecount"><span id="count1">0</span> / 40 Kilogramm</div>
<div class="titletext">Rucksack</div>
</div>
<div class="items">
<ul id="List0"></ul>
</div>
@@ -53,91 +61,60 @@
<div name="vehClass" class="veh hidden">
<div class="main">
<div class="title"><div class="titlecount"><span id="count2">0</span> / 250 Kilogramm</div><div class="titletext">Fahrzeug</div></div>
<div class="Betrag4" style="display:none;">
<input type="text" id="tf_zahl4" name="number" placeholder="Betrag eingeben" min="1" step="1" oninput="this.value=this.value.replace(/[^0-9]/g,'');">
<button id='tf_submitZahl4' onclick="">Zum Rucksack transferieren</button>
<button id='tf_cancle4' onclick="">Schließen</button>
<div class="title">
<div class="titlecount"><span id="count2">0</span> / 250 Kilogramm</div>
<div class="titletext">Fahrzeug</div>
</div>
<div class="Betrag4" style="display: none;">
<div class="BoxBlue">
<img class="blueIcon1" src="img/backpack/backpack.svg">
<button id="tf_cancle4" onclick="">Schließen</button><input type="text" id="tf_zahl4" name="number" placeholder="Betrag eingeben" min="1" step="1" oninput="this.value=this.value.replace(/[^0-9]/g,'');">
<button id="tf_submitZahl4" onclick="">Zum Rucksack transferieren</button>
</div>
</div>
<div class="items">
<ul id="List4"></ul>
</div>
</div>
</div>
<!-- <div name="handelClass" class="handel hidden">
<div class="main">
<div class="Betrag3" style="display:none;">
<input type="text" id="tf_zahl3" name="number" placeholder="Betrag eingeben" min="1" step="1" oninput="this.value=this.value.replace(/[^0-9]/g,'');">
<button id='tf_submitZahl3' onclick="">Bestätigen</button>
<button id='tf_cancle3' onclick="">Schließen</button>
</div>
<input type="text" id="tf_nameorid" name="fname" placeholder="Name oder ID eingeben">
<button id='tf_submitTrade' onclick="">Senden</button>
<div class="title"><div class="titlecount"><span id="count3">0</span> Kilogramm</div><div class="titletext">Handeln</div></div>
<div class="items">
<ul id="List4"></ul>
<ul id="List2"></ul>
</div>
</div>
</div>
<div name="handelClass" class="handel hidden">
<div class="main">
<div class="Betrag3" style="display:none;">
<input type="text" id="tf_zahl3" name="number" placeholder="Betrag eingeben" min="1" step="1" oninput="this.value=this.value.replace(/[^0-9]/g,'');">
<button id='tf_submitZahl3' onclick="">Bestätigen</button>
<button id='tf_cancle3' onclick="">Schließen</button>
<div name="anfrageClass" class="something hidden">
<div class="main">
<button id='tf_acceptTrade' onclick="">Annehmen</button>
<div class="title"><div class="titlecount"><span id="count4">0</span> Kilogramm</div><div class="titletext">Anfrage</div></div>
<div class="items">
<ul id="List3"></ul>
</div>
</div>
</div> -->
<input type="text" id="tf_nameorid" name="fname" placeholder="Name oder ID eingeben">
<button id='tf_submitTrade' onclick="">Senden</button>
<div id="invisible" style="display: none"></div>
<div class="title"><div class="titlecount"><span id="count3">0</span> Kilogramm</div><div class="titletext">Handeln</div></div>
<div class="items">
<ul id="List2"></ul>
</div>
</div>
</div>
<div name="anfrageClass" class="something hidden">
<div class="main">
<button id='tf_acceptTrade' onclick="">Annehmen</button>
<div class="title"><div class="titlecount"><span id="count4">0</span> Kilogramm</div><div class="titletext">Anfrage</div></div>
<div class="items">
<ul id="List3"></ul>
</div>
</div>
</div>
<div id="invisible" style="display:none"></div>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="../../js/jquery-3.3.1.min.js"></script>
<script>
var lastClass = "backpackClass";
var val = 0;
var val = 0;
function changeTradeStatus(value) {
val = JSON.parse(value);
}
function getTrade() {
if (val == 1) {
switchSite('anfrageClass');
}
}
function getVehicle() {
if (vehInv.length > 0) {
switchSite('vehClass');
} else {
mp.trigger("Error", "Kofferraum leer oder kein Fahrzeug in der Nähe.")
}
}
$("#tf_acceptTrade").unbind('click').click(function () {
if (anfrageInv.length > 0) {
mp.trigger("CEF:acceptTrade");
}
});
$("#tf_submitTrade").unbind('click').click(function () {
if (handelInv.length > 0) {
var handelItemID = [];
var handelItemAmount = [];
for (i = 0; i < handelInv.length; i++) {
handelItemID.push(handelInv[i].ID);
handelItemAmount.push(handelInv[i].Amount);
}
mp.trigger("CEF:tradeItem", 0, JSON.stringify(String($('#tf_nameorid').val())), JSON.stringify(handelItemID), JSON.stringify(handelItemAmount))
}
});
$("#tf_cancle4").unbind('click').click(function () {
$(".Betrag4").hide();
});
@@ -151,20 +128,6 @@
$(".Betrag2").hide();
});
function setAnfrage(jsonIdArr, jsonAmountArr, jsonNameArr, jsonWeight) {
var parsedIdArr = JSON.parse(jsonIdArr);
var parsedAmountArr = JSON.parse(jsonAmountArr);
var parsedNameArr = JSON.parse(jsonNameArr);
var parsedWeight = JSON.parse(jsonWeight);
for (var i = 0; i < parsedNameArr.length; i++) {
var num = parsedAmountArr[i];
var newItem = { Name: parsedNameArr[i], ID: parsedIdArr[i], Amount: num, Category: 3 };
anfrageInv[i] = newItem;
}
$('#count4').html(parsedWeight / 1000);
drawAnfrage();
}
function switchSite(site) {
if (site != lastClass) {
if (site == "tradeClass") {
@@ -203,111 +166,8 @@
$(document).ready(function () {
mp.trigger('CEF:InventoryLoaded');
mp.trigger('CEF:getNearVehicles');
});
function setItems(jsonName, jsonID, jsonAmount, nearPlayers) {
var parsedName = JSON.parse(jsonName);
var parsedID = JSON.parse(jsonID);
var parsedAmount = JSON.parse(jsonAmount);
for (var i = 0; i < parsedName.length; i++) {
var num = parsedAmount[i];
var newItem = { Name: parsedName[i], ID: parsedID[i], Amount: num, Category: 0 };
rucksackInv[i] = newItem;
}
jsonInv = JSON.stringify(rucksackInv);
ReceiveClientInformation(jsonInv);
var parsedPlayers = JSON.parse(nearPlayers);
Players = parsedPlayers;
for (var x = 0; x < parsedPlayers.length; x++) {
$('.dropdown-content').append("<a value=" + x + ">" + parsedPlayers[x] + "</a>");
}
}
var Players = [];
function setWeight(jsonWeight) {
var parsedWeight = JSON.parse(jsonWeight);
$('#count1').html(parsedWeight / 1000);
}
function setVehiclesInv(jsonVehInv) {
var parsedVehInv = JSON.parse(jsonVehInv);
vehInvItem.push(parsedVehInv);
var vehicle = vehInvItem[0];
for (i = 0; i < vehicle.ivehName.length; i++) {
var newItem = { Name: vehicle.ivehName[i], ID: vehicle.ivehId[i], Amount: vehicle.ivehAmount[i], Category: 1 };
vehInv.push(newItem);
}
Origin.push(0);
Origin.push(vehicle.ID);
var jsonVehInv = JSON.stringify(vehInv);
$('#count2').html(vehInvItem[0].currentWeight / 1000);
RecieveVehicleInfo(jsonVehInv);
}
function RecieveVehicleInfo(json) {
var parsed = JSON.parse(json);
for (var i = 0; i < parsed.length; i++) {
var item = parsed[i];
console.log(item);
var quantity = parsed[i].Amount;
var list = document.getElementById("List4");
var pictureElement = document.createElement("img");
pictureElement.setAttribute("class", "sideicon15");
pictureElement.setAttribute("src", "img/inventory/" + item.ID + ".svg");
var redButton = document.createElement("div");
var redButtonImg = document.createElement("img");
redButton.setAttribute("class", "red");
redButton.setAttribute("onclick", "onAction(1," + item.ID + "," + item.Amount + ","+ i +");");
redButtonImg.setAttribute("src", "img/backpack/trash.svg");
redButtonImg.setAttribute("class", "redImg");
redButton.appendChild(redButtonImg);
var blueButton = document.createElement("div");
var blueButtonImg = document.createElement("img");
blueButton.setAttribute("class", "blue2");
blueButton.setAttribute("onclick", "onAction(4," + item.ID + "," + item.Amount + ","+ i +");");
blueButtonImg.setAttribute("src", "img/backpack/paper-plane.svg");
blueButtonImg.setAttribute("class", "blueImg");
blueButton.appendChild(blueButtonImg);
var listLength = list.length;
var row = 1;
if (listLength > 3) {
row = 2;
}
if (listLength > 7) {
row = 3;
}
if (listLength > 11) {
row = 4;
}
if (listLength > 15) {
row = 5;
}
if (listLength > 19) {
row = 6;
}
var Litem = document.createElement("li");
Litem.setAttribute("class", "item" + row);
Litem.appendChild(document.createTextNode(quantity + "x " + item.Name));
Litem.appendChild(pictureElement);
Litem.appendChild(redButton);
Litem.appendChild(blueButton);
list.appendChild(Litem);
}
}
var rucksackInv = [];
var handelInv = [];
var vehInv = [];
@@ -316,81 +176,43 @@
var vehInvItem = [];
function ReceiveClientInformation(json) {
var parsed = JSON.parse(json);
rucksackInv = parsed;
for (var i = 0; i < parsed.length; i++) {
var item = parsed[i];
item.Category = 0;
console.log(item);
var quantity = parsed[i].Amount;
var list = document.getElementById("List" + item.Category);
var pictureElement = document.createElement("img");
pictureElement.setAttribute("class", "sideicon15");
pictureElement.setAttribute("src", "img/inventory/" + item.ID + ".svg");
var redButton = document.createElement("div");
var redButtonImg = document.createElement("img");
redButton.setAttribute("class", "red");
redButton.setAttribute("onclick", "onAction(1," + item.ID + "," + item.Amount + "," + i + ");");
redButtonImg.setAttribute("src", "img/backpack/trash.svg");
redButtonImg.setAttribute("class", "redImg");
redButton.appendChild(redButtonImg);
var greenButton = document.createElement("div");
var greenButtonImg = document.createElement("img");
greenButton.setAttribute("class", "green");
greenButton.setAttribute("onclick", "onAction(0," + item.ID + "," + item.Amount + "," + i + ");");
greenButtonImg.setAttribute("src", "img/backpack/use.svg");
greenButtonImg.setAttribute("class", "greenImg");
greenButton.appendChild(greenButtonImg);
var blueButton = document.createElement("div");
var blueButtonImg = document.createElement("img");
blueButton.setAttribute("class", "blue");
blueButton.setAttribute("onclick", "onAction(2," + item.ID + "," + item.Amount + ", " + i + ");");
blueButtonImg.setAttribute("src", "img/backpack/paper-plane.svg");
blueButtonImg.setAttribute("class", "blueImg");
blueButton.appendChild(blueButtonImg);
var listLength = list.length;
var row = 1;
if (listLength > 3) {
row = 2;
}
if (listLength > 7) {
row = 3;
}
if (listLength > 11) {
row = 4;
}
if (listLength > 15) {
row = 5;
}
if (listLength > 19) {
row = 6;
}
var Litem = document.createElement("li");
Litem.setAttribute("class", "item" + row);
Litem.appendChild(document.createTextNode(quantity + "x " + item.Name));
Litem.appendChild(pictureElement);
Litem.appendChild(redButton);
Litem.appendChild(greenButton);
Litem.appendChild(blueButton);
list.appendChild(Litem);
function setBackpackItems(jsonItemArr) {
console.log(jsonItemArr);
var parsedItemArr = JSON.parse(jsonItemArr)
rucksackInv = [];
for (var i = 0; i < parsedItemArr.length; i++) {
var item = parsedItemArr[i];
var newItem = { Name: item.Name, ID: item.ItemId, Amount: item.Amount, Category: 0 };
rucksackInv.push(newItem);
$('#count1').html(item.Weight / 1000);
}
drawRucksack();
}
function getVehicle() {
mp.trigger("CEF:callVehicleInventory");
}
function setVehicleItems(jsonItemArr) {
var parsedItemArr = JSON.parse(jsonItemArr)
vehInv = [];
for (var i = 0; i < parsedItemArr.length; i++) {
var item = parsedItemArr[i];
var newItem = { Name: item.Name, ID: item.ItemId, Amount: item.Amount, Category: 0 };
vehInv.push(newItem);
$('#count2').html(item.Weight / 1000);
}
switchSite('vehClass');
drawVehicle();
}
var clnc = 1;
function alertGreen(JsonAmount, JsonName) {
var amount = JSON.parse(JsonAmount);
var amount = JSON.parse(JsonAmount);
var name = JSON.parse(JsonName);
var list = document.getElementById("alertbox");
var Litem = document.createElement("div");
Litem.setAttribute("class", "alert_green");
@@ -401,13 +223,13 @@
$(Litem).fadeOut(500, function () {
$(Litem).remove();
});
}, 5000);
}, 5000);
}
function alertRed(JsonAmount, JsonName) {
var amount = JSON.parse(JsonAmount);
var amount = JSON.parse(JsonAmount);
var name = JSON.parse(JsonName);
var list = document.getElementById("alertbox");
var Litem = document.createElement("div");
Litem.setAttribute("class", "alert_red");
@@ -423,7 +245,7 @@
function alertError(jsonString) {
var string = JSON.parse(jsonString);
var list = document.getElementById("alertbox");
var Litem = document.createElement("div");
Litem.setAttribute("class", "alert_red");
@@ -445,21 +267,21 @@
var list = document.getElementById("alertbox");
var Litem = document.createElement("div");
Litem.setAttribute("class", "alert_blue");
Litem.appendChild(document.createTextNode("Du hast " + amount + "x " + name + " ins "+transferInv+" transferiert."));
Litem.appendChild(document.createTextNode("Du hast " + amount + "x " + name + " ins " + transferInv + " transferiert."));
$(Litem).hide().appendTo(list).fadeIn(500);
$(Litem).fadeIn(500);
setTimeout(function () {
$(Litem).fadeOut(500, function () {
$(Litem).remove();
});
}, 5000);
}, 5000);
}
function removeItems(JsonId, JsonAmount) {
var amount = JSON.parse(JsonAmount);
var id = JSON.parse(JsonId);
console.log("start : " + amount +" " + id);
console.log("start : " + amount + " " + id);
for (var i = 0; i < rucksackInv.length; i++) {
console.log(i);
if (rucksackInv[i].ID == id) {
@@ -471,14 +293,13 @@
rucksackInv.splice(i, 1);
}
drawRucksack();
return;
}
}
}
}
function onAction(action, id, ammount, i) {
$(".Betrag").hide();
@@ -494,11 +315,9 @@
if ($('#tf_zahl').val() < ammount && ammount > 0) {
mp.trigger("CEF:useItem", JSON.stringify("drop"), JSON.stringify($('#tf_zahl').val()), JSON.stringify(rucksackInv[i].ID))
} else if ($('#tf_zahl').val() >= ammount) {
mp.trigger("CEF:useItem", JSON.stringify("drop"), JSON.stringify(ammount), JSON.stringify(rucksackInv[i].ID))
mp.trigger("CEF:useItem", JSON.stringify("drop"), JSON.stringify(ammount), JSON.stringify(rucksackInv[i].ID))
}
$(".Betrag").hide();
drawRucksack();
drawVehicle();
event.preventDefault()
event.stopPropagation()
});
@@ -507,209 +326,33 @@
{
$(".Betrag2").show();
var Copy = Object.assign({}, rucksackInv[i]);
$("#tf_submitZahlToHandel").unbind('click').click(function () {
var y = parseInt($('#tf_zahl2').val(), 10);
if ($('#tf_zahl2').val() < ammount && ammount > 0) {
for (x = 0; x < handelInv.length; x++) {
if (handelInv[x].ID == Copy.ID) {
handelInv[x].Amount += y;
rucksackInv[i].Amount -= y;
$(".Betrag2").hide();
drawHandel();
drawRucksack();
event.preventDefault()
event.stopPropagation()
return;
}
}
handelInv.push(Copy);
handelInv[handelInv.length - 1].Amount = y;
handelInv[handelInv.length - 1].Category = 2;
rucksackInv[i].Amount -= y;
} else if ($('#tf_zahl2').val() >= ammount) {
for (x = 0; x < handelInv.length; x++) {
if (handelInv[x].ID == Copy.ID) {
handelInv[x].Amount += y;
rucksackInv.splice(i, 1);
$(".Betrag2").hide();
drawHandel();
drawRucksack();
event.preventDefault()
event.stopPropagation()
return;
}
}
handelInv.push(Copy);
handelInv[handelInv.length - 1].Category = 2;
rucksackInv.splice(i, 1);
}
$(".Betrag2").hide();
drawHandel();
drawRucksack();
event.preventDefault()
event.stopPropagation()
});
$("#tf_submitZahlToVehicle").unbind('click').click(function () {
if (Origin.length < 2) {
$(".Betrag2").hide();
drawVehicle();
drawRucksack();
event.preventDefault()
event.stopPropagation()
return;
}
Origin[0] = 0;
var y = parseInt($('#tf_zahl2').val(), 10);
if ($('#tf_zahl2').val() < ammount && ammount > 0) {
for (x = 0; x < vehInv.length; x++) {
if (vehInv[x].ID == Copy.ID) {
vehInv[x].Amount += y;
rucksackInv[i].Amount -= y;
$(".Betrag2").hide();
mp.trigger("CEF:saveVehicleTransfer",0, JSON.stringify(Origin), JSON.stringify(rucksackInv[i].ID), JSON.stringify(rucksackInv[i].Amount), JSON.stringify(y));
drawVehicle();
drawRucksack();
event.preventDefault()
event.stopPropagation()
return;
}
}
vehInv.push(Copy);
vehInv[vehInv.length - 1].Amount = y;
vehInv[vehInv.length - 1].Category = 2;
rucksackInv[i].Amount -= y;
mp.trigger("CEF:saveVehicleTransfer",0, JSON.stringify(Origin), JSON.stringify(rucksackInv[i].ID), JSON.stringify(rucksackInv[i].Amount), JSON.stringify(y));
mp.trigger("CEF:backpackToVehicle", JSON.stringify(rucksackInv[i].ID), JSON.stringify(y));
} else if ($('#tf_zahl2').val() >= ammount) {
for (x = 0; x < vehInv.length; x++) {
if (vehInv[x].ID == Copy.ID) {
vehInv[x].Amount += y;
rucksackInv.splice(i, 1);
$(".Betrag2").hide();
mp.trigger("CEF:saveVehicleTransfer",0, JSON.stringify(Origin), JSON.stringify(Copy.ID), JSON.stringify(0), JSON.stringify(ammount));
drawVehicle();
drawRucksack();
event.preventDefault()
event.stopPropagation()
return;
}
}
vehInv.push(Copy);
vehInv[vehInv.length - 1].Category = 2;
rucksackInv.splice(i, 1);
mp.trigger("CEF:saveVehicleTransfer",0, JSON.stringify(Origin), JSON.stringify(Copy.ID), JSON.stringify(0), JSON.stringify(ammount));
mp.trigger("CEF:backpackToVehicle", JSON.stringify(rucksackInv[i].ID), JSON.stringify(ammount));
}
$(".Betrag2").hide();
drawVehicle();
drawRucksack();
event.preventDefault()
event.stopPropagation()
});
}
if (action == 3) {
$(".Betrag3").show();
var Copy = Object.assign({}, handelInv[i]);
$("#tf_submitZahl3").unbind('click').click(function () {
var y = parseInt($('#tf_zahl3').val(), 10);
if ($('#tf_zahl3').val() < ammount && ammount > 0) {
for (x = 0; x < rucksackInv.length; x++) {
if (rucksackInv[x].ID == Copy.ID) {
rucksackInv[x].Amount += y;
handelInv[i].Amount -= y;
$(".Betrag3").hide();
drawHandel();
drawRucksack();
event.preventDefault()
event.stopPropagation()
return;
}
}
rucksackInv.push(Copy);
rucksackInv[rucksackInv.length - 1].Amount = y;
rucksackInv[rucksackInv.length - 1].Category = 0;
handelInv[i].Amount -= y;
} else if ($('#tf_zahl3').val() >= ammount) {
for (x = 0; x < rucksackInv.length; x++) {
if (rucksackInv[x].ID == Copy.ID) {
rucksackInv[x].Amount += ammount;
handelInv.splice(i, 1);
$(".Betrag3").hide();
drawHandel();
drawRucksack();
event.preventDefault()
event.stopPropagation()
return;
}
}
rucksackInv.push(Copy);
rucksackInv[rucksackInv.length - 1].Category = 0;
handelInv.splice(i, 1);
}
$(".Betrag3").hide();
drawHandel();
drawRucksack();
event.preventDefault()
event.stopPropagation()
});
}
if (action == 4) {
$(".Betrag4").show();
var Copy = Object.assign({}, vehInv[i]);
$("#tf_submitZahl4").unbind('click').click(function () {
Origin[0] = 1;
var y = parseInt($('#tf_zahl4').val(), 10);
if ($('#tf_zahl4').val() < ammount && ammount > 0) {
for (x = 0; x < rucksackInv.length; x++) {
if (rucksackInv[x].ID == Copy.ID) {
rucksackInv[x].Amount += y;
vehInv[i].Amount -= y;
$(".Betrag2").hide();
mp.trigger("CEF:saveVehicleTransfer",1, JSON.stringify(Origin), JSON.stringify(Copy.ID), JSON.stringify(vehInv[i].Amount), JSON.stringify(y));
drawRucksack();
drawVehicle();
event.preventDefault()
event.stopPropagation()
return;
}
}
console.log(rucksackInv);
rucksackInv.push(Copy);
rucksackInv[rucksackInv.length - 1].Amount = y;
rucksackInv[rucksackInv.length - 1].Category = 2;
vehInv[i].Amount -= y;
console.log(rucksackInv);
mp.trigger("CEF:saveVehicleTransfer",1, JSON.stringify(Origin), JSON.stringify(Copy.ID), JSON.stringify(vehInv[i].Amount), JSON.stringify(y));
mp.trigger("CEF:vehicleToBackpack", JSON.stringify(vehInv[i].ID), JSON.stringify(y));
} else if ($('#tf_zahl4').val() >= ammount) {
for (x = 0; x < rucksackInv.length; x++) {
if (rucksackInv[x].ID == Copy.ID) {
rucksackInv[x].Amount += ammount;
vehInv.splice(i, 1);
$(".Betrag2").hide();
mp.trigger("CEF:saveVehicleTransfer",1, JSON.stringify(Origin), JSON.stringify(Copy.ID), JSON.stringify(0), JSON.stringify(ammount));
drawRucksack();
drawVehicle();
event.preventDefault()
event.stopPropagation()
return;
}
}
rucksackInv.push(Copy);
rucksackInv[rucksackInv.length - 1].Amount = ammount;
rucksackInv[rucksackInv.length - 1].Category = 2;
vehInv.splice(i, 1);
mp.trigger("CEF:saveVehicleTransfer",1, JSON.stringify(Origin), JSON.stringify(Copy.ID), JSON.stringify(0), JSON.stringify(ammount));
mp.trigger("CEF:vehicleToBackpack", JSON.stringify(vehInv[i].ID), JSON.stringify(ammount));
}
$(".Betrag4").hide();
drawRucksack();
drawVehicle();
$(".Betrag4").hide();
event.preventDefault()
event.stopPropagation()
});
@@ -736,7 +379,6 @@
pictureElement.setAttribute("class", "sideicon15");
pictureElement.setAttribute("src", "img/inventory/" + item.ID + ".svg");
var blueButton = document.createElement("div");
var blueButtonImg = document.createElement("img");
blueButton.setAttribute("class", "blue3");
@@ -878,16 +520,15 @@
var redButton = document.createElement("div");
var redButtonImg = document.createElement("img");
redButton.setAttribute("class", "red");
redButton.setAttribute("onclick", "onAction(1," + item.ID + "," + item.Amount + ","+ i +");");
redButton.setAttribute("onclick", "onAction(1," + item.ID + "," + item.Amount + "," + i + ");");
redButtonImg.setAttribute("src", "img/backpack/trash.svg");
redButtonImg.setAttribute("class", "redImg");
redButton.appendChild(redButtonImg);
var blueButton = document.createElement("div");
var blueButtonImg = document.createElement("img");
blueButton.setAttribute("class", "blue2");
blueButton.setAttribute("onclick", "onAction(4," + item.ID + "," + item.Amount + ","+ i +");");
blueButton.setAttribute("onclick", "onAction(4," + item.ID + "," + item.Amount + "," + i + ");");
blueButtonImg.setAttribute("src", "img/backpack/paper-plane.svg");
blueButtonImg.setAttribute("class", "blueImg");
blueButton.appendChild(blueButtonImg);
@@ -943,7 +584,6 @@
pictureElement.setAttribute("class", "sideicon15");
pictureElement.setAttribute("src", "img/inventory/" + item.ID + ".svg");
var listLength = list.length;
var row = 1;
@@ -974,8 +614,6 @@
}
}
</script>
</body>
</html>
</html>