forked from Simnation/Main
ed
This commit is contained in:
parent
da886cd616
commit
b9d52618bb
29 changed files with 2892 additions and 0 deletions
60
resources/[carscripts]/qb-vehiclekeys/NUI/script.js
Normal file
60
resources/[carscripts]/qb-vehiclekeys/NUI/script.js
Normal file
|
@ -0,0 +1,60 @@
|
|||
|
||||
window.onload = function () {
|
||||
var eventCallback = {
|
||||
setText: function(data) {
|
||||
var key = document.querySelector('#'+data.id+' span');
|
||||
var html = data.value;
|
||||
saferInnerHTML(key, html);
|
||||
},
|
||||
};
|
||||
}
|
||||
$(function()
|
||||
{
|
||||
$('.container').hide();
|
||||
window.addEventListener('message', function(event)
|
||||
{
|
||||
var cdata = event.data;
|
||||
if (cdata.casemenue == 'open')
|
||||
{
|
||||
$('.container').show();
|
||||
}
|
||||
}, false);
|
||||
|
||||
document.onkeyup = function (data) {
|
||||
if (data.which == 27) { // Escape key
|
||||
$.post('https://qb-vehiclekeys/closui', JSON.stringify({ message: null }));
|
||||
$('.container').hide();
|
||||
}
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
function unlock()
|
||||
{
|
||||
$.post('https://qb-vehiclekeys/unlock', JSON.stringify({
|
||||
|
||||
}))
|
||||
$('.container').hide();
|
||||
}
|
||||
function lock()
|
||||
{
|
||||
$.post('https://qb-vehiclekeys/lock', JSON.stringify({
|
||||
|
||||
}))
|
||||
$('.container').hide();
|
||||
}
|
||||
function trunk()
|
||||
{
|
||||
$.post('https://qb-vehiclekeys/trunk', JSON.stringify({
|
||||
|
||||
}))
|
||||
$('.container').hide();
|
||||
}
|
||||
function engine()
|
||||
{
|
||||
$.post('https://qb-vehiclekeys/engine', JSON.stringify({
|
||||
|
||||
}))
|
||||
$('.container').hide();
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue