-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
152 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
let visible = false | ||
|
||
RegisterCommand('kasiraamat', (source, args) => { | ||
print('Käsiraamat avatud.') | ||
setDisplay(!visible) | ||
}, false); | ||
|
||
RegisterNuiCallback("lahku",() => { | ||
setDisplay(false) | ||
}); | ||
|
||
RegisterNuiCallback("error",(data) => { | ||
print(data.error) | ||
setDisplay(false) | ||
}); | ||
|
||
function setDisplay(b) { | ||
visible = b | ||
SetNuiFocus(b, b) | ||
SendNUIMessage({ | ||
type: "ui", | ||
status: b | ||
}); | ||
} | ||
|
||
setImmediate(() => { | ||
while (visible) { | ||
Delay(0); | ||
DisableControlAction(0, 1, visible) // LookLeftRight | ||
DisableControlAction(0, 2, visible) // LookUpDown | ||
DisableControlAction(0, 142, visible) // MeleeAttackAlternate | ||
DisableControlAction(0, 18, visible) // Enter | ||
DisableControlAction(0, 322, visible) // ESC | ||
DisableControlAction(0, 106, visible) // VehicleMouseControlOverride | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
fx_version 'cerulean' | ||
game 'gta5' | ||
|
||
name 'PDL Help' | ||
author 'wallsxd & atluzka' | ||
description 'Displays commands and keybind information' | ||
version '1.0.1' | ||
|
||
client_scripts {"client/*.js"} | ||
|
||
ui_page { | ||
'html/index.html' | ||
} | ||
|
||
files { | ||
'html/*.*', | ||
'html/images/*.*' | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<link rel="stylesheet" href="./styles.css" type="text/css"> | ||
<script src="nui://game/ui/jquery.js" type="text/javascript"></script> | ||
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.0.2/dist/tailwind.min.css" rel="stylesheet"> | ||
<link href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" rel="stylesheet"> | ||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.2/css/all.min.css" rel="stylesheet"> | ||
<title>Käsiraamat</title> | ||
</head> | ||
<body> | ||
<div id="container" class="flex items-center justify-center h-screen"> | ||
<div class="max-w-2xl mx-auto w-full h-600 bg-gray-900"> | ||
<img src="./images/logo.png" alt='logo' class="h-32 w-32 rounded-full mt-3 mx-auto "> | ||
<div class="flex-grow bg-gray-900 p-4 overflow-y-scroll h-96"> | ||
<div class="flex flex-col gap-6"> | ||
<div class="bg-gray-800 p-4 rounded-md text-center text-white"> | ||
<h2 class="text-xl mb-4">NUPUD</h2> | ||
<p>Siin on kõik tavalised keybindid erinevatele tegevustele, mis teil vaja läheb</p> | ||
</div> | ||
<div class="bg-gray-800 p-4 rounded-md text-center text-white"> | ||
<h2 class="text-xl">F1</h2> | ||
<p>Avab Telefoni</p> | ||
</div> | ||
<div class="bg-gray-800 p-4 rounded-md text-center text-white"> | ||
<h2 class="text-xl">F2</h2> | ||
<p>Avab seljakoti</p> | ||
</div> | ||
<!-- Add more boxes related to "NUPUD" as needed --> | ||
|
||
<div class="bg-gray-800 p-4 rounded-md text-center text-white"> | ||
<h2 class="text-xl mb-4">COMMANDID</h2> | ||
<p>Siin on kõik tavalised keybindid erinevatele tegevustele, mis teil vaja läheb</p> | ||
</div> | ||
<div class="bg-gray-800 p-4 rounded-md text-center text-white"> | ||
<h2 class="text-xl">/ABI</h2> | ||
<p>Avab selle sama menüü</p> | ||
</div> | ||
<div class="bg-gray-800 p-4 rounded-md text-center text-white"> | ||
<h2 class="text-xl">/report</h2> | ||
<p>Loob kaebuse A-Tiimile</p> | ||
</div> | ||
<!-- Add more boxes related to "COMMANDID" as needed --> | ||
</div> | ||
</div> | ||
<button id="close" class="bg-red-700 text-white p-2 rounded-md flex flex-col m-3 mx-auto focus:outline-none">Sulge</button> | ||
</div> | ||
</div> | ||
<script src="./script.js" type="text/javascript"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
$(function () { | ||
function display(bool) { | ||
if (bool) { | ||
$("#container").show(); | ||
} else { | ||
$("#container").hide(); | ||
} | ||
} | ||
|
||
display(false) | ||
|
||
window.addEventListener('message', function(event) { | ||
var item = event.data; | ||
if (item.type === "ui") { | ||
if (item.status == true) { | ||
display(true) | ||
} else { | ||
display(false) | ||
} | ||
} | ||
}) | ||
|
||
document.onkeyup = function (data) { | ||
if (data.key == "Escape") { | ||
fetch(`https://${GetParentResourceName()}/lahku`, { | ||
method: 'POST', | ||
headers: { | ||
'Content-Type': 'application/json; charset=UTF-8', | ||
}, | ||
body: JSON.stringify({}) | ||
}).then(resp => resp.json()).then(resp => console.log(resp)); | ||
return | ||
} | ||
}; | ||
$("#close").click(function () { | ||
fetch(`https://${GetParentResourceName()}/lahku`, { | ||
method: 'POST', | ||
headers: { | ||
'Content-Type': 'application/json; charset=UTF-8', | ||
}, | ||
body: JSON.stringify({}) | ||
}).then(resp => resp.json()).then(resp => console.log(resp)); | ||
return | ||
}) | ||
}) |