Wide range of improvements.

+ Updated keybinds for the police speed radar and rp-radio.
+ Removed old shitty laptop ui.
+ Re-added 3dme after mistakenly removed.
This commit is contained in:
Jacob
2022-04-12 23:07:14 +01:00
parent 532c3d9378
commit 766f1a8d6d
18 changed files with 107 additions and 415 deletions
+9
View File
@@ -0,0 +1,9 @@
resource_manifest_version '05cfa83c-a124-4cfa-a768-c24a5811d8f9'
name "Optimized 3D /ME Script."
author "Mart475 - Universal Development."
credit "Elio."
description "The optimized 3d /me script is 3d display of a persons ingame actions, face expressions & more."
client_script 'client.lua'
server_script 'server.lua'
+68
View File
@@ -0,0 +1,68 @@
-----------
-- 3D ME --
-----------
Citizen.CreateThread(function()
TriggerEvent('chat:addSuggestion', '/mee', 'Can show personal actions, face expressions & much more above a player.')
end)
local nbrDisplaying = 1
RegisterCommand('mee', function(source, args, raw)
local text = string.sub(raw, 4)
TriggerServerEvent('3dme:shareDisplay', text)
end)
RegisterNetEvent('3dme:triggerDisplay')
AddEventHandler('3dme:triggerDisplay', function(text, source)
local offset = 1 + (nbrDisplaying*0.15)
Display(GetPlayerFromServerId(source), text, offset)
end)
function Display(mePlayer, text, offset)
local displaying = true
Citizen.CreateThread(function()
Wait(5000)
displaying = false
end)
Citizen.CreateThread(function()
nbrDisplaying = nbrDisplaying + 1
while displaying do
Wait(0)
local coordsMe = GetEntityCoords(GetPlayerPed(mePlayer), false)
local coords = GetEntityCoords(PlayerPedId(), false)
local dist = Vdist2(coordsMe, coords)
if dist < 500 then
DrawText3D(coordsMe['x'], coordsMe['y'], coordsMe['z']+offset-0.125, text)
end
end
nbrDisplaying = nbrDisplaying - 1
end)
end
function DrawText3D(x,y,z, text)
local onScreen, _x, _y = World3dToScreen2d(x, y, z)
local p = GetGameplayCamCoords()
local distance = GetDistanceBetweenCoords(p.x, p.y, p.z, x, y, z, 1)
local scale = (1 / distance) * 2
local fov = (1 / GetGameplayCamFov()) * 100
local scale = scale * fov
if onScreen then
SetTextScale(0.75, 0.75)
SetTextFont(4)
SetTextProportional(1)
SetTextColour(213, 48, 48, 255)
SetTextDropShadow(0, 0, 0, 0,255)
SetTextEdge(2, 0, 0, 0, 255)
SetTextDropShadow()
SetTextOutline()
SetTextEntry("STRING")
SetTextCentre(1)
AddTextComponentString(text)
DrawText(_x,_y)
-- local factor = (string.len(text)) / 370
-- DrawRect(_x,_y+0.0125, 0.015+ factor, 0.03, 41, 11, 41, 68)
end
end
+4
View File
@@ -0,0 +1,4 @@
RegisterServerEvent('3dme:shareDisplay')
AddEventHandler('3dme:shareDisplay', function(text)
TriggerClientEvent('3dme:triggerDisplay', -1, text, source)
end)
-2
View File
@@ -1,2 +0,0 @@
# Auto detect text files and perform LF normalization
* text=auto
-21
View File
@@ -1,21 +0,0 @@
MIT License
Copyright (c) 2021 Arne
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-13
View File
@@ -1,13 +0,0 @@
# FiveM Laptop UI
A standalone FiveM laptop UI with easy configuration
### Config
Laptop.webPage = The url you want to be shown as an iframe.
Laptop.webPageTitle = The tab title for the browser UI.
Laptop.webPageUrl = The URL for the browser UI.
### Changing the resource name
When changing the resource name, also change line 48 in the app.js file to your new resource name.
### Support
Questions? Add Arne#7777 on Discord.
-17
View File
@@ -1,17 +0,0 @@
RegisterNetEvent('laptop:client/openUI')
AddEventHandler('laptop:client/openUI', function()
print('open')
SetNuiFocus(true, true)
SendNUIMessage({
action = "openLaptop",
iframe = Laptop.webPage,
pagetitle = Laptop.webPageTitle,
pageurl = Laptop.webPageUrl,
})
end)
closeLaptop = function()
SetNuiFocus(false, false)
end
RegisterNUICallback('closeLaptop', closeLaptop)
-19
View File
@@ -1,19 +0,0 @@
fx_version 'adamant'
games { 'gta5' }
ui_page "html/ui.html"
client_scripts {
"shared/config.lua",
"client/main.lua",
}
server_scripts {
"server/main.lua"
}
files {
"html/ui.html",
"html/app.js",
"html/style.css",
}
-59
View File
@@ -1,59 +0,0 @@
Laptop = {}
$(document).on('keydown', function() {
switch(event.keyCode) {
case 27:
Laptop.Close();
break;
}
});
$(document).ready(function(){
window.addEventListener('message', function(event){
var action = event.data.action;
switch(action) {
case "openLaptop":
Laptop.Open(event.data);
break;
case "closeLaptop":
Laptop.Close();
break;
}
});
});
// MEOS
Laptop.Open = function(data) {
$(".laptop").fadeIn(1000);
$("#iframeLocation").html("");
console.log(data.pagetitle);
// SET CONTENT
$("#tabTitle").html(data.pagetitle);
$("#pageUrl").html(data.pageurl);
// SET IFRAME VIEW
var iframeView = '<iframe src=' + data.iframe + ' style="border:none;height:72vh;width:120vh;"></iframe>';
$("#iframeLocation").append(iframeView);
setTimeout(() => {
$(".iframe").fadeIn(1000);
}, 1000);
}
Laptop.Close = function(data) {
$(".laptop").fadeOut(500);
$(".iframe").fadeOut(500);
$.post('http://laptop/closeLaptop');
}
$(document).on('click', '#closelaptop', function(e) {
e.preventDefault();
Laptop.Close()
});
window.onload = function(e) {
$(".laptop").hide();
$(".iframe").hide();
}
-164
View File
@@ -1,164 +0,0 @@
body {
font-family: 'Lato', sans-serif;
color: white;
margin: 0;
}
.laptop {
display: none;
position: fixed;
background-image: url('https://i.insider.com/5dd42a3e7eece50609155eae?width=1200&format=jpeg');
background-repeat: no-repeat;
background-size: cover;
height: 100%;
width: 100%;
}
.bottombar {
bottom: 0;
position: fixed;
background-color: black;
height: 5vh;
width: 100%;
}
.bottombar div {
display: inline-block;
}
.home-icon {
padding: 1.5vh;
color: white;
width: 2vh;
}
.home-icon:hover {
color: #2196F3;
background-color: #424242;
transition: ease 0.5s;
}
.iconbar {
padding-left: 1vh;
}
.iconbar div {
display: inline-block;
}
.w-icon {
padding: 1.5vh;
border-bottom: 2px solid transparent;
}
.w-icon:hover {
background-color: #424242;
transition: ease 0.5s;
}
.selected {
background-color: #424242;
border-bottom: 2px solid white;
}
.iframe {
display: none;
top: 10vh;
left: 16vh;
height: 80vh;
width: 120vh;
position: absolute;
background-color: #FAFAFA;
}
.iframe-topbar {
width: 100%;
color: black;
height: 3.5vh;
background-color: #E0E0E0;
}
.iframe-window-title {
padding: 1vh;
font-size: 1.4vh;
font-weight: 600;
}
.iframe-close-button {
top: 20vh;
float: right;
background-color: #C62828;
color: white;
padding-top: 0.93vh;
padding-bottom: 0.93vh;
padding-left: 2vh;
padding-right: 2vh;
}
.iframe-close-button:hover {
background-color: #e05b5b;
transition: ease 0.5s;
}
.iframe-searchbar {
width: 100%;
color: black;
height: 4.6vh;
background-color: #F5F5F5;
}
.iframe-searchbar-container {
padding-top: 0.62vh;
padding-left: 1vh;
}
.iframe-searchbar-input {
padding: 0.8vh;
background-color: #e7e7e7;
width: 90vh;
border-radius: 2vh;
}
.iframe-searchbar-input p {
margin: 0;
padding: 0;
padding-left: 1vh;
line-height: 1;
color: rgb(95, 95, 95);
}
.iframe-searchbar-input mark {
color: green;
background-color: transparent;
}
.iframe-window-title mark {
background-color: transparent;
font-weight: normal;
margin-left: 1vh;
font-size: 1.2vh;
}
.iframe-browser-icon {
margin-left: 0.5vh;
color: rgb(95, 95, 95);
font-size: 1.5vh;
padding: 0.8vh;
padding-left: 1.2vh;
padding-right: 1.2vh;
background-color: #e9e9e9;
border-radius: 0.7vh;
}
.iframe-browser-icon:hover {
background-color: #d6d6d6;
transition: ease 0.5s;
}
.iframe-browser-icons div {
display: inline-block;
}
.iframe-browser-firsticons div {
display: inline-block;
}
-90
View File
@@ -1,90 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.css">
<link href="https://fonts.googleapis.com/css2?family=Lato&display=swap" rel="stylesheet">
<link rel="stylesheet" href="./style.css">
</head>
<body>
<div class="laptop">
<div class="iframe">
<div class="iframe-topbar">
<div class="iframe-window-title">
<i class="fab fa-edge" style="margin-right:0.5vh;"></i> Microsoft Edge <mark id="tabTitle"></mark>
<span class="iframe-close-button" id="closelaptop" style="margin-top:-1vh;margin-right:-1vh;">
<i class="fas fa-times"></i>
</span>
</div>
</div>
<div class="iframe-searchbar">
<div class="iframe-searchbar-container">
<span class="iframe-browser-firsticons" style="float:left;">
<div class="iframe-browser-icon">
<i class="fas fa-chevron-left"></i>
</div>
<div class="iframe-browser-icon">
<i class="fas fa-chevron-right"></i>
</div>
</span>
<div class="iframe-searchbar-input" style="margin-left:10vh;margin-top:0.15vh;">
<p>
<mark><i class="fas fa-lock" style="margin-right:0.5vh;"></i> https://</mark><span id="pageUrl"></span>
<span style="float:right;margin-right:0.5vh;">
<i class="fas fa-star" style="color:#FFAB00;margin-right:0.5vh;"></i>
<i class="fas fa-redo-alt"></i>
</span>
</p>
</div>
<span class="iframe-browser-icons" style="float:right;margin-top:-3.3vh;padding-right:2vh;">
<div class="iframe-browser-icon">
<i class="fas fa-home"></i>
</div>
<div class="iframe-browser-icon">
<i class="fas fa-bookmark"></i>
</div>
<div class="iframe-browser-icon">
<i class="fas fa-cog"></i>
</div>
</span>
</div>
</div>
<div id="iframeLocation"></div>
</div>
<div class="bottombar">
<div class="home-icon">
<i class="fab fa-windows"></i>
</div>
<div class="iconbar">
<div class="w-icon selected">
<i class="fab fa-edge"></i>
</div>
<div class="w-icon">
<i class="fas fa-folder"></i>
</div>
<div class="w-icon">
<i class="fas fa-cog"></i>
</div>
</div>
</div>
</div>
</body>
<script src="./app.js"></script>
</html>
-4
View File
@@ -1,4 +0,0 @@
RegisterCommand('cad', function(source, args, rawCommand)
local src = source
TriggerClientEvent('laptop:client/openUI', src)
end, false)
-5
View File
@@ -1,5 +0,0 @@
Laptop = {}
Laptop.webPage = 'https://cad.elite-gaming.co.uk' -- This is the URL to the website that should be displayed as an iframe.
Laptop.webPageTitle = 'Elite Gaming RP CAD' -- This is the title that will be shown on the top of the browser tab.
Laptop.webPageUrl = 'cad.elite-gaming.co.uk' -- This is the URL which will be shown in the browser search tab - WITHOUT HTTPS://.
+23 -18
View File
@@ -35,7 +35,7 @@ var config = {
// Home page annountments.
var announcements = [
'Check out our rules & join our CAD: elite-gaming.co.uk',
'Pre-Easter Updates are now LIVE!',
'Summer Updates are now LIVE!',
]
@@ -50,7 +50,7 @@ var guidelines = [
'Minor rules may be superseded by excellent role-play as determined by Staff.',
'AOP (Area of Roleplay) may be changed at any time, you must comply with it.',
'Join our discord: discord.gg/2UBSFv3 for more information and mod request ect.',
'Join our CAD: https://elite-gaming.co.uk and select CAD! This is manditory, not optional!',
'Join our CAD: https://elite-gaming.co.uk and select CAD (OR cad.elite-gaming.co.uk)! This is manditory, not optional!',
'Vote for us to help us grow: https://www.trackyserver.com/server/315407',
]
@@ -108,37 +108,42 @@ var abuse = [
]
var staff = [
'Owners:',
'Staff Team:',
'ThatGuyJacobee - Developer',
'King Rodriguez - Head of Staffing & Mods',
'Admins: Hiring new staff!',
'Moderators: Suu, dcapone00, vJack',
'King Rodriguez - Developer',
'Skylerblue21 - Developer',
'vJack - Head Admin',
'Choxie - Admin',
'Harold - Moderator',
'aF - Staff',
'Suu - Staff',
]
// Modify hotkeys below.
var generalhotkeys = [
'Press <kbd>M</kbd> to open v-Menu.',
'Hold <kbd>UPARROW</kbd> to view the player list.',
'Press <kbd>F1</kbd> to open this menu.',
//'Press <kbd>F2</kbd> to toggle no-clip mode.',
'Press <kbd>F3</kbd> to open the Emote Menu.',
'Press <kbd>F7</kbd> to open the Handling Editor.',
'Press <kbd>F1</kbd> to open and close the phone.',
'Press <kbd>F2</kbd> to toggle no-clip mode.',
'Press <kbd>F5</kbd> to open police menu [Police ONLY].',
'Press <kbd>F6</kbd> to open the emote menu.',
'Press <kbd>F7</kbd> to open this support menu.',
'Press <kbd>F10</kbd> to toggle voice proximity.',
'Press <kbd>Shift</kbd> + <kbd>F10</kbd> to take out or put away the handheld RP Radio.',
'Press <kbd>F11</kbd> to open Enchanced Camera Menu.',
'Use <code>/vote</code> in the chat to display the link at the bottom of the screen and in the chat.',
'Use <code>/votecheck</code> in the chat to have the API check for your vote and to receive the rewards if the vote is confirmed.',
]
var rphotkeys = [
'Use <code>/tweet {message}</code> in chat to use twitter.',
'Use <code>/911 {message}</code> in chat to call emergency services.',
'Use <code>/911</code> to open the civilian emergency call menu!',
'Use <code>/me {message}</code> to talk in character in the chat.',
'Use <code>/mee {message}</code> to talk in character above your player.',
'Use <code>/ooc {message}</code> to talk out of character.',
'Use <code>/darkweb {message}</code> in chat to post on the darkweb.',
// 'Use <code>/ad {message}</code> in chat to post an advertisemnet.',
// 'Use <code>/drugdeal {message}</code> in chat to post on the drugdeal website.',
'Use <code>/drugdeal {message}</code> in chat to post on the drugdeal website.',
'Use <code>/emotemenu {message}</code> in chat to open up the emote menu.',
'Use <code>/revive</code> or <code>/respawn</code> in chat revive yourself if you fully die.',
'Use <code>/revive</code> or <code>/respawn</code> in chat after the timer is over to respawn or revive.',
'Press <kbd>X</kbd> to put your hands up.',
'Press <kbd>B</kbd> to point.',
'Press <kbd>U</kbd> to fall to the floor/RP Death.',
@@ -148,16 +153,16 @@ var rphotkeys = [
var vehiclehotkeys = [
//'Press <kbd>U</kbd> to lock/unlock your vehicle.',
'Press <kbd>F10</kbd> to turn car engine off/on.',
'Press <code>/engine</code> to turn car engine off/on.',
'Press <kbd>-</kbd> for the left blinker, <kbd>=</kbd> for the right blinker & <kbd>]</kbd> to put on the hazard lights.',
'You may use <code>/dv</code> to delete your vehicle and <code>/fix</code> to fix your vehicle when appropirate.',
'You may use <code>/dv</code> to delete your vehicle and <code>/fix</code> to temporarily fix engine, or fix fully if near a repair point.',
'You may use vMenu to customise and modify your vehicle.',
]
var jobshotkey = [
'Use v-Menu to teleport to clock-in stations.',
'Press <kbd>F5</kbd> to open Police Menu.',
'Use <kbd>F9</kbd> to oepn the police speed radar. ',
'Use <kbd>F6</kbd> to oepn the police speed radar. ',
'Use <code>/mdt</code> to open the in-game CAD MDT.',
//'Press <kbd>CTRL+]</kbd> to open the CAD Terminal.',
'Press <kbd>Q</kbd> to turn on emergency lights.',
+1 -1
View File
@@ -2,7 +2,7 @@ radioConfig = {
Controls = {
Activator = { -- Open/Close Radio
Name = "INPUT_REPLAY_START_STOP_RECORDING_SECONDARY", -- Control name
Key = 289, -- F2
Key = 57, -- F2
},
Secondary = {
Name = "INPUT_SPRINT",
+1 -1
View File
@@ -68,7 +68,7 @@ CONFIG.use_sonorancad = false
CONFIG.keyDefaults =
{
-- Remote control key
remote_control = "f5",
remote_control = "f6",
-- Radar key lock key
key_lock = "l",
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -32,6 +32,7 @@ set mysql_connection_string "server=localhost;uid=root;password=Martyniak_13;dat
start police
start screenshot-basic
start pma-voice
setr voice_defaultCycle 57
start rp-radio
start pe-core
@@ -155,7 +156,6 @@ start SmartSigns
start eup-stream
start eup-ui
start Speed-Warning
start Laptop-UI
start carsounds
start carsounds4
start rcore_pool