This commit is contained in:
Nordi98 2025-08-13 21:09:54 +02:00
parent 07b6af6991
commit d796428b76
32 changed files with 4965 additions and 0 deletions

View file

@ -0,0 +1,9 @@
/*
* jQuery throttle / debounce - v1.1 - 3/7/2010
* http://benalman.com/projects/jquery-throttle-debounce-plugin/
*
* Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/
(function(b,c){var $=b.jQuery||b.Cowboy||(b.Cowboy={}),a;$.throttle=a=function(e,f,j,i){var h,d=0;if(typeof f!=="boolean"){i=j;j=f;f=c}function g(){var o=this,m=+new Date()-d,n=arguments;function l(){d=+new Date();j.apply(o,n)}function k(){h=c}if(i&&!h){l()}h&&clearTimeout(h);if(i===c&&m>e){l()}else{if(f!==true){h=setTimeout(i?k:l,i===c?e-m:e)}}}if($.guid){g.guid=j.guid=j.guid||$.guid++}return g};$.debounce=function(d,e,f){return f===c?a(d,e,false):a(d,f,e!==false)}})(this);

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 757 B

View file

@ -0,0 +1,257 @@
var liftresourcename = "rtx_carlift";
function closeMain() {
$("body").css("display", "none");
}
function openMain() {
$("body").css("display", "block");
}
$(".closelift").click(function(){
$.post('https://'+liftresourcename+'/quit', JSON.stringify({}));
});
$(".closeliftposfinish").click(function(){
$.post('https://'+liftresourcename+'/closeliftoffsets', JSON.stringify({}));
});
function CarLiftPrepareInterface() {
let reformated1 = document.getElementById("cameraspeeddata");
var value = (reformated1.value-reformated1.min)/(reformated1.max-reformated1.min)*100
reformated1.style.background = 'linear-gradient(to right, #ff66ff 0%, #ff66ff ' + value + '%, #ccccc8 ' + value + '%, #ccccc8 100%)'
let reformated2 = document.getElementById("lookspeedxdata");
var value = (reformated2.value-reformated2.min)/(reformated2.max-reformated2.min)*100
reformated2.style.background = 'linear-gradient(to right, #ff66ff 0%, #ff66ff ' + value + '%, #ccccc8 ' + value + '%, #ccccc8 100%)'
let reformated3 = document.getElementById("lookspeedydata");
var value = (reformated3.value-reformated3.min)/(reformated3.max-reformated3.min)*100
reformated3.style.background = 'linear-gradient(to right, #ff66ff 0%, #ff66ff ' + value + '%, #ccccc8 ' + value + '%, #ccccc8 100%)'
let reformated4 = document.getElementById("translatesnapdata");
var value = (reformated4.value-reformated4.min)/(reformated4.max-reformated4.min)*100
reformated4.style.background = 'linear-gradient(to right, #ff66ff 0%, #ff66ff ' + value + '%, #ccccc8 ' + value + '%, #ccccc8 100%)'
let reformated5 = document.getElementById("rotationsnapdata");
var value = (reformated5.value-reformated5.min)/(reformated5.max-reformated5.min)*100
reformated5.style.background = 'linear-gradient(to right, #ff66ff 0%, #ff66ff ' + value + '%, #ccccc8 ' + value + '%, #ccccc8 100%)'
}
CarLiftPrepareInterface();
document.getElementById("cameraspeeddata").oninput = function() {
var value = (this.value-this.min)/(this.max-this.min)*100
this.style.background = 'linear-gradient(to right, #ff66ff 0%, #ff66ff ' + value + '%, #ccccc8 ' + value + '%, #ccccc8 100%)'
};
document.getElementById("lookspeedxdata").oninput = function() {
var value = (this.value-this.min)/(this.max-this.min)*100
this.style.background = 'linear-gradient(to right, #ff66ff 0%, #ff66ff ' + value + '%, #ccccc8 ' + value + '%, #ccccc8 100%)'
};
document.getElementById("lookspeedydata").oninput = function() {
var value = (this.value-this.min)/(this.max-this.min)*100
this.style.background = 'linear-gradient(to right, #ff66ff 0%, #ff66ff ' + value + '%, #ccccc8 ' + value + '%, #ccccc8 100%)'
};
document.getElementById("translatesnapdata").oninput = function() {
var value = (this.value-this.min)/(this.max-this.min)*100
this.style.background = 'linear-gradient(to right, #ff66ff 0%, #ff66ff ' + value + '%, #ccccc8 ' + value + '%, #ccccc8 100%)'
};
document.getElementById("rotationsnapdata").oninput = function() {
var value = (this.value-this.min)/(this.max-this.min)*100
this.style.background = 'linear-gradient(to right, #ff66ff 0%, #ff66ff ' + value + '%, #ccccc8 ' + value + '%, #ccccc8 100%)'
};
window.addEventListener('message', function (event) {
var item = event.data;
if (item.message == "liftshow") {
$("#liftposshow").hide();
$("#liftposfinishshow").hide();
$('#liftshow').show();
openMain();
}
if (item.message == "infonotifyshow") {
document.getElementsByClassName("infonotifytext")[0].innerHTML = item.infonotifytext;
openMain();
$("#infonotifyshow").show();
}
if (item.message == "hide") {
$("#liftshow").hide();
}
if (item.message == "hidenotify") {
$("#infonotifyshow").hide();
}
if (item.message == "updateinterfacedata") {
liftresourcename = item.liftresourcenamedata;
let root = document.documentElement;
root.style.setProperty('--color', item.interfacecolordata);
}
if (item.message == "carliftcreatorshow") {
$("#cameraspeeddata").val("");
$("#lookspeedxdata").val("");
$("#lookspeedydata").val("");
$("#translatesnapdata").val("");
$("#rotationsnapdata").val("");
CarLiftPrepareInterface();
$("#posmoretranslate").addClass("active");
$("#posmorerotation").removeClass("active");
$("#spacebuttonworld").addClass("active");
$("#spacebuttonlocal").removeClass("active");
$("#liftshow").hide();
$("#liftposfinishshow").hide();
$("#liftposshow").show();
openMain();
}
if (item.message == "liftposfinishshow") {
var offsetdatacarlift =
' {\n' +
' coords = ' + item.carliftposcoordsdata + ',\n' +
' rotation = ' + item.carliftposrotationdata + ',\n' +
' currentheight = 0.0,\n' +
' objecthandler = {frame = nil, lift = nil},\n' +
' manipulating = false,\n' +
' manipulatingplayerid = nil,\n' +
' lifttype = ' + item.carliftpostypedata + ',\n' +
' buttonuppress = false,\n' +
' buttondownpress = false,\n' +
' onlyjoballowed = false,\n' +
' jobs = {\n' +
' },\n' +
' },';
$(".liftposfinishcopytextdata").val(offsetdatacarlift);
$("#liftshow").hide();
$("#liftposshow").hide();
$("#liftposfinishshow").show();
openMain();
}
if (item.message == "updatelifttype") {
document.getElementsByClassName("poscarliftypedatatext")[0].innerHTML = item.carlifttypedata;
}
if (item.message == "hide") {
$("#liftposshow").hide();
closeMain();
}
if (item.message == "hidecreator") {
$("#liftposfinishshow").hide();
closeMain();
}
document.onkeyup = function (data) {
if (open) {
if (data.which == 27) {
$.post('https://'+liftresourcename+'/quit', JSON.stringify({}));
}
}
};
});
$(".buttonup").mousedown(function() {
$.post('https://'+liftresourcename+'/liftupactivated', JSON.stringify({}));
});
$(".buttonup").mouseup(function() {
$.post('https://'+liftresourcename+'/liftupdeactivated', JSON.stringify({}));
});
$(".buttondown").mousedown(function() {
$.post('https://'+liftresourcename+'/liftdownactivated', JSON.stringify({}));
});
$(".buttondown").mouseup(function() {
$.post('https://'+liftresourcename+'/liftdowndeactivated', JSON.stringify({}));
});
$("#posmoretranslate").click(function () {
$(this).addClass("active");
$("#posmorerotation").removeClass("active");
$.post('https://'+liftresourcename+'/carliftchangemode', JSON.stringify({
modetype: "translate"
}));
});
$("#posmorerotation").click(function () {
$(this).addClass("active");
$("#posmoretranslate").removeClass("active");
$.post('https://'+liftresourcename+'/carliftchangemode', JSON.stringify({
modetype: "rotate"
}));
});
$("#spacebuttonworld").click(function () {
$(this).addClass("active");
$("#spacebuttonlocal").removeClass("active");
$.post('https://'+liftresourcename+'/carliftchangespace', JSON.stringify({
spacetype: "world"
}));
});
$(".poscarlifrighttext").click(function () {
$.post('https://'+liftresourcename+'/carliftchangetypeplus', JSON.stringify({}));
});
$(".poscarliflefttext").click(function () {
$.post('https://'+liftresourcename+'/carliftchangetypeminus', JSON.stringify({}));
});
$(".buttoncopy").click(function () {
var copyText = document.getElementById("liftposfinishcopydata");
copyText.select();
copyText.setSelectionRange(0, 99999);
});
$(".createcarliftbutton").click(function () {
$.post('https://'+liftresourcename+'/carliftoffsetget', JSON.stringify({}));
});
$("#spacebuttonlocal").click(function () {
$(this).addClass("active");
$("#spacebuttonworld").removeClass("active");
$.post('https://'+liftresourcename+'/carliftchangespace', JSON.stringify({
spacetype: "local"
}));
});
function cameraspeedchange(e) {
$.post('https://'+liftresourcename+'/carliftspeedchange', JSON.stringify({
speedtype: "camera",
speeddata: e.value
}));
}
function lookspeedxchange(e) {
$.post('https://'+liftresourcename+'/carliftspeedchange', JSON.stringify({
speedtype: "lookx",
speeddata: e.value
}));
}
function lookspeedychange(e) {
$.post('https://'+liftresourcename+'/carliftspeedchange', JSON.stringify({
speedtype: "looky",
speeddata: e.value
}));
}
function translatesnapchange(e) {
$.post('https://'+liftresourcename+'/carliftsnapchange', JSON.stringify({
snaptype: "translate",
snapdata: e.value
}));
}
function rotationsnapchange(e) {
$.post('https://'+liftresourcename+'/carliftsnapchange', JSON.stringify({
snaptype: "rotate",
snapdata: e.value
}));
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,99 @@
<head>
<link rel="stylesheet" href="styles.css" type="text/css">
<link rel="stylesheet" href="https://kit-pro.fontawesome.com/releases/v6.2.0/css/pro.min.css">
<script type="module" crossorigin src="gizmoapi.js"></script>
</head>
<body>
<div class="full-screen">
<div class="lift-container" id="liftshow">
<img class="closelift" src="img/close.png" style="width:25px;height:25px"/>
<div class="liftheadertext">LIFT</div>
<div class="liftmaintext">Use the buttons to control lift</div>
<div class="buttonup"><i class="fas fa-arrow-circle-up"></i></div>
<div class="liftuptext">UP</div>
<div class="buttondown"><i class="fas fa-arrow-circle-down"></i></div>
<div class="liftdowntext">DOWN</div>
</div>
<div class="infonotify-container" id="infonotifyshow">
<div class="infonotifytext">Text</div>
</div>
<div class="liftpos-container" id="liftposshow">
<div id="root"></div>
<div class="liftposinfosettings">
<div class="poscreatormaintext">
<div class="poscreatortext">CARLIFT CREATOR</div>
</div>
<div class="posspacemaintext">
<div class="posspacetext">Space:</div>
</div>
<div class="posspacebuttons">
<button class="buttontypespace active" style="active" id="spacebuttonworld">World</button>
<button class="buttontypespace" id="spacebuttonlocal">Local</button>
</div>
<div class="posmodemaintext">
<div class="posmodetext">Mode:</div>
</div>
<div class="posmodebuttons">
<button class="buttontypemode active" style="active" id="posmoretranslate">Translate</button>
<button class="buttontypemode" id="posmorerotation">Rotate</button>
</div>
<div class="poscamerasettingsmaintext">
<div class="poscamerasettingstext">Camera Settings</div>
</div>
<div class="poscamerasettingsspeedmaintext">
<div class="poscamerasettingsspeedtext">Camera Speed:</div>
</div>
<input type="range" min="1" max="20" value="10" class="cameraspeed" id="cameraspeeddata" onchange="cameraspeedchange(this)">
<div class="poscamerasettingslookxspeedmaintext">
<div class="poscamerasettingslookxspeedtext">Look Speed X:</div>
</div>
<input type="range" min="1" max="20" value="10" class="lookspeedx" id="lookspeedxdata" onchange="lookspeedxchange(this)">
<div class="poscamerasettingslookyspeedmaintext">
<div class="poscamerasettingslookyspeedtext">Look Speed Y:</div>
</div>
<input type="range" min="1" max="20" value="10" class="lookspeedy" id="lookspeedydata" onchange="lookspeedychange(this)">
<div class="posmovementsettingsmaintext">
<div class="posmovementsettingstext">Movement Settings</div>
</div>
<div class="posmovementsettingstranslatemaintext">
<div class="posmovementsettingstranslatetext">Translate Snap</div>
</div>
<input type="range" min="1" max="10" value="1" class="translatesnap" id="translatesnapdata" onchange="translatesnapchange(this)">
<div class="posmovementsettingsrotationmaintext">
<div class="posmovementsettingsrotationtext">Rotation Snap</div>
</div>
<input type="range" min="1" max="10" value="1" class="rotationsnap" id="rotationsnapdata" onchange="rotationsnapchange(this)">
<div class="poscarliftypemaintext">
<div class="poscarliftypetext">CAR LIFT TYPE</div>
</div>
<div class="poscarliftypedatamaintext">
<div class="poscarliftypedatatext">1</div>
</div>
<div class="poscarlifleftmain">
<div class="poscarliflefttext"><i class="fa-solid fa-left"></i></div>
</div>
<div class="poscarlifrightmain">
<div class="poscarlifrighttext"><i class="fa-solid fa-right"></i></div>
</div>
<div class="createcarliftbutton">CREATE CAR LIFT</div>
</div>
</div>
<div class="liftposfinish-container" id="liftposfinishshow">
<div class="headerliftposfinish">
<h1 class="headerliftposfinishtext">Car Lift Creator</h1>
<img class="closeliftposfinish" src="img/close.png" style="width:30px;height:30px"/>
</div>
<div class="offsetspreviewtext">Offsets preview</div>
<div class="liftposfinishcopytextdatamain">
<textarea class="liftposfinishcopytextdata" id="liftposfinishcopydata" placeholder="" type="text"></textarea>
</div>
<div class="buttoncopy"><i class="fa-solid fa-copy" id="copyicon"></i>&ensp;Copy offsets</div>
</div>
</div>
<script src="nui://game/ui/jquery.js" type="text/javascript"></script>
<script src="scripts.js" type="text/javascript"></script>
<script src="debounce.min.js" type="text/javascript"></script>
</body>