1
0
Fork 0
forked from Simnation/Main
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

Binary file not shown.

View file

@ -0,0 +1,36 @@
Thank you for purchasing rtx_carlift we're grateful for your support. If you'd ever have a question and / or need our help, please reach out to us by sending an email or go ahead and create a ticket on our discord: https://discord.gg/P6KdaDpgAk
Install instructions (Standalone):
1. Put rtx_carlift folder to your resources
2. Open config.lua file
3. Configure your config.lua to your preferences
4. Put rtx_carlift to the server.cfg
5. Put rtx_carlift_objects folder to your resources
6. Put rtx_carlift_objects to the server.cfg
Install instructions (QBCore):
1. Put rtx_carlift folder to your resources
2. Open config.lua file
3. Replace Config.Framework = "standalone" with Config.Framework = "qbcore"
4. Configure your config.lua to your preferences
5. Put rtx_carlift to the server.cfg
6. Put rtx_carlift_objects folder to your resources
7. Put rtx_carlift_objects to the server.cfg
Install instructions (ESX):
1. Put rtx_carlift folder to your resources
2. Open config.lua file
3. Replace Config.Framework = "standalone" with Config.Framework = "esx"
4. Configure your config.lua to your preferences
5. Put rtx_carlift to the server.cfg
6. Put rtx_carlift_objects folder to your resources
7. Put rtx_carlift_objects to the server.cfg
License agreement / Terms of Service
1. Any purchase is non-refundable.
2. Each product is to be used on a singular server, with the exception of a test server.
3. Any form of redistribution of our content is considered copyright infringement.
4. If any of these rules are broken, legal actions can be taken.
© 2025 RTX Development, all rights reserved.

View file

@ -0,0 +1,95 @@
Config = {}
Config.Framework = "standalone" -- types (standalone, qbcore, esx)
Config.ESXFramework = {
newversion = false, -- use this if you using new esx version (if you get error with old esxsharedobjectmethod in console)
getsharedobject = "esx:getSharedObject",
resourcename = "es_extended",
}
Config.QBCoreFrameworkResourceName = "qb-core" -- qb-core resource name, change this if you have different name of main resource of qbcore
Config.InterfaceColor = "#ff66ff" -- change interface color, color must be in hex
Config.Language = "English" -- text language from code, if you want translate interface, you need do it manually in html folder.
Config.LiftControlDistance = 4.0 -- lift control distance
Config.LiftOpenKey = "E" -- lift open key
Config.InteractionSystem = 1 -- 1 == Our custom interact system, 2 == 3D Text Interact, 3 == Gta V Online Interaction Style
Config.Target = false -- enable this if you want use target
Config.Targettype = "qtarget" -- types - qtarget, qbtarget, oxtarget
Config.TargetSystemsNames = {qtarget = "qtarget", qbtarget = "qb-target", oxtarget = "ox_target"}
Config.TargetIcon = "fas fa-box-circle-check"
Config.CarLiftCreator = false -- enable this only on dev server, you can open car lift creator via /carliftcreator command (https://www.youtube.com/watch?v=0KHiz_MKl2g)
Config.CustomJobEvent = false -- enable this if you want use custom job event for detect if player have a job (for lifts which have enabled onlyjoballowed function)
Config.CustomJobEventName = "rtx_carlift:SetJob" -- you can execute this event for set player job in car lift script (its clientside event) for example TriggerEvent("rtx_carlift:SetJob", "mechanic") (after that, script will know that player have job mechanic)
-- You can detect if vehicle is on lift via our function IsVehicleOnLift example: local vehicleonlift, liftheight = exports["rtx_carlift"]:IsVehicleOnLift(vehicle) (vehicleonlift return false or true, liftheight return height on which lift currently is)
-- for add new lift you need just copy line from 29 to 42 and paste it at under line 42
Config.Lifts = {
{
coords = vector3(-220.45, -1329.88, 29.9), -- lift coords
rotation = vector3(0.0, 0.0, 90.0),-- lift rotation
currentheight = 0.0, -- dont edit this
objecthandler = {frame = nil, lift = nil}, -- dont edit this
manipulating = false, -- dont edit this
manipulatingplayerid = nil, -- dont edit this
lifttype = 2, -- lift type 1-4
buttonuppress = false, -- dont edit this
buttondownpress = false, -- dont edit this
onlyjoballowed = false, -- enable this if you want lift restricted only for some jobs (works for only for qbcore and esx)
jobs = {
},
},
--[[ -- Other example for new lifts (this is example for lift with job allow only
{
coords = vector3(-60.84, -165.34, -99.63), -- lift coords
rotation = vector3(0.0, 0.0, 90.0),-- lift rotation
currentheight = 0.0, -- dont edit this
objecthandler = {frame = nil, lift = nil}, -- dont edit this
manipulating = false, -- dont edit this
manipulatingplayerid = nil, -- dont edit this
lifttype = 4, -- lift type 1-4
buttonuppress = false, -- dont edit this
buttondownpress = false, -- dont edit this
onlyjoballowed = true, -- enable this if you want lift restricted only for some jobs (works for only for qbcore and esx)
jobs = {
["mechanic"] = true,
["police"] = true,
},
},-]]
}
function Notify(text)
exports["rtx_notify"]:Notify("Lift", text, 5000, "info") -- if you get error in this line its because you dont use our notify system buy it here https://rtx.tebex.io/package/5402098 or you can use some other notify system just replace this notify line with your notify system
--exports["mythic_notify"]:SendAlert("inform", text, 5000)
end
function DrawText3D(x, y, z, text)
local onScreen,_x,_y=World3dToScreen2d(x,y,z)
local px,py,pz=table.unpack(GetGameplayCamCoords())
if onScreen then
SetTextScale(0.35, 0.35)
SetTextFont(4)
SetTextProportional(1)
SetTextColour(255, 255, 255, 255)
SetTextEntry("STRING")
SetTextCentre(1)
AddTextComponentString(text)
DrawText(_x,_y)
local factor = (string.len(text)) / 240
DrawRect(_x, _y + 0.0125, 0.015 + factor, 0.03, 255, 102, 255, 150)
end
end

View file

@ -0,0 +1,48 @@
fx_version 'adamant'
game 'gta5'
description 'RTX CAR LIFT'
version '100.0'
server_scripts {
'config.lua',
'language/main.lua',
'server/main.lua'
}
client_scripts {
'config.lua',
'language/main.lua',
'client/main.lua'
}
files {
'html/ui.html',
'html/styles.css',
'html/scripts.js',
'html/gizmoapi.js',
'html/debounce.min.js',
'html/BebasNeueBold.ttf',
'html/img/*.png'
}
ui_page 'html/ui.html'
exports {
'IsVehicleOnLift',
}
lua54 'yes'
escrow_ignore {
'config.lua',
'language/main.lua'
}
dependency '/assetpacks'

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>

View file

@ -0,0 +1,9 @@
Language = {
["English"] = {
["presskeytoopen"] = "Press ["..Config.LiftOpenKey.."] to use lift",
["presskeytoopeninterract"] = "Press <span id='infobindcolor'>"..Config.LiftOpenKey.."</span> to use lift",
["presskeytoopenclassic"] = "Press ~INPUT_CONTEXT~ to use lift",
["somealreadyuse"] = "Someone already use this lift",
["openlift"] = "Lift",
},
}

Binary file not shown.

View file

@ -0,0 +1,36 @@
fx_version 'adamant'
game 'gta5'
description 'RTX CARLIFT OBJECTS'
version '1.0'
lua54 'yes'
data_file 'DLC_ITYP_REQUEST' 'sempre_impexp_carrack.ytyp'
data_file 'DLC_ITYP_REQUEST' 'sempre_impexp_carrack_lift.ytyp'
data_file 'DLC_ITYP_REQUEST' 'sempre_impexp_postlift.ytyp'
data_file 'DLC_ITYP_REQUEST' 'sempre_impexp_postlift_lift.ytyp'
data_file 'DLC_ITYP_REQUEST' 'sempre_supermod_carlift2.ytyp'
data_file 'DLC_ITYP_REQUEST' 'sempre_supermod_carlift2_lift.ytyp'
data_file 'DLC_ITYP_REQUEST' 'sempre_v_45_carlift.ytyp'
data_file 'DLC_ITYP_REQUEST' 'sempre_v_45_carlift_lift.ytyp'
dependency '/assetpacks'