diff --git a/resources/3dme/__resource.lua b/resources/3dme/__resource.lua new file mode 100644 index 000000000..53e585806 --- /dev/null +++ b/resources/3dme/__resource.lua @@ -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 person’s ingame actions, face expressions & more." + +client_script 'client.lua' +server_script 'server.lua' diff --git a/resources/3dme/client.lua b/resources/3dme/client.lua new file mode 100644 index 000000000..addeeb12f --- /dev/null +++ b/resources/3dme/client.lua @@ -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 diff --git a/resources/3dme/server.lua b/resources/3dme/server.lua new file mode 100644 index 000000000..64ba4f05f --- /dev/null +++ b/resources/3dme/server.lua @@ -0,0 +1,4 @@ +RegisterServerEvent('3dme:shareDisplay') +AddEventHandler('3dme:shareDisplay', function(text) + TriggerClientEvent('3dme:triggerDisplay', -1, text, source) +end) diff --git a/resources/Laptop-UI/.gitattributes b/resources/Laptop-UI/.gitattributes deleted file mode 100644 index dfe077042..000000000 --- a/resources/Laptop-UI/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -# Auto detect text files and perform LF normalization -* text=auto diff --git a/resources/Laptop-UI/LICENSE b/resources/Laptop-UI/LICENSE deleted file mode 100644 index 47e9c4bcd..000000000 --- a/resources/Laptop-UI/LICENSE +++ /dev/null @@ -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. diff --git a/resources/Laptop-UI/README.md b/resources/Laptop-UI/README.md deleted file mode 100644 index d934f12c7..000000000 --- a/resources/Laptop-UI/README.md +++ /dev/null @@ -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. diff --git a/resources/Laptop-UI/client/main.lua b/resources/Laptop-UI/client/main.lua deleted file mode 100644 index 7ff52ba37..000000000 --- a/resources/Laptop-UI/client/main.lua +++ /dev/null @@ -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) \ No newline at end of file diff --git a/resources/Laptop-UI/fxmanifest.lua b/resources/Laptop-UI/fxmanifest.lua deleted file mode 100644 index 8de7d7063..000000000 --- a/resources/Laptop-UI/fxmanifest.lua +++ /dev/null @@ -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", -} \ No newline at end of file diff --git a/resources/Laptop-UI/html/app.js b/resources/Laptop-UI/html/app.js deleted file mode 100644 index 602f1daf6..000000000 --- a/resources/Laptop-UI/html/app.js +++ /dev/null @@ -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 = ''; - $("#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(); -} \ No newline at end of file diff --git a/resources/Laptop-UI/html/style.css b/resources/Laptop-UI/html/style.css deleted file mode 100644 index d2aae8c0e..000000000 --- a/resources/Laptop-UI/html/style.css +++ /dev/null @@ -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; -} \ No newline at end of file diff --git a/resources/Laptop-UI/html/ui.html b/resources/Laptop-UI/html/ui.html deleted file mode 100644 index 2d9037b72..000000000 --- a/resources/Laptop-UI/html/ui.html +++ /dev/null @@ -1,90 +0,0 @@ - - -
- - - - - - - - - -/vote in the chat to display the link at the bottom of the screen and in the chat.',
- 'Use /votecheck in the chat to have the API check for your vote and to receive the rewards if the vote is confirmed.',
]
var rphotkeys = [
- 'Use /tweet {message} in chat to use twitter.',
- 'Use /911 {message} in chat to call emergency services.',
+ 'Use /911 to open the civilian emergency call menu!',
'Use /me {message} to talk in character in the chat.',
'Use /mee {message} to talk in character above your player.',
'Use /ooc {message} to talk out of character.',
'Use /darkweb {message} in chat to post on the darkweb.',
// 'Use /ad {message} in chat to post an advertisemnet.',
-// 'Use /drugdeal {message} in chat to post on the drugdeal website.',
+ 'Use /drugdeal {message} in chat to post on the drugdeal website.',
'Use /emotemenu {message} in chat to open up the emote menu.',
- 'Use /revive or /respawn in chat revive yourself if you fully die.',
+ 'Use /revive or /respawn in chat after the timer is over to respawn or revive.',
'Press X to put your hands up.',
'Press B to point.',
'Press U to fall to the floor/RP Death.',
@@ -148,16 +153,16 @@ var rphotkeys = [
var vehiclehotkeys = [
//'Press U to lock/unlock your vehicle.',
- 'Press F10 to turn car engine off/on.',
+ 'Press /engine to turn car engine off/on.',
'Press - for the left blinker, = for the right blinker & ] to put on the hazard lights.',
- 'You may use /dv to delete your vehicle and /fix to fix your vehicle when appropirate.',
+ 'You may use /dv to delete your vehicle and /fix 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 F5 to open Police Menu.',
- 'Use F9 to oepn the police speed radar. ',
+ 'Use F6 to oepn the police speed radar. ',
'Use /mdt to open the in-game CAD MDT.',
//'Press CTRL+] to open the CAD Terminal.',
'Press Q to turn on emergency lights.',
diff --git a/resources/rp-radio/config.lua b/resources/rp-radio/config.lua
index cbd029420..4933d7dda 100644
--- a/resources/rp-radio/config.lua
+++ b/resources/rp-radio/config.lua
@@ -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",
diff --git a/resources/wk_wars2x/config.lua b/resources/wk_wars2x/config.lua
index 6844120b2..bb77183e0 100644
--- a/resources/wk_wars2x/config.lua
+++ b/resources/wk_wars2x/config.lua
@@ -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",
diff --git a/server.7z b/server.7z
deleted file mode 100644
index e9c8f25e7..000000000
Binary files a/server.7z and /dev/null differ
diff --git a/server.cfg b/server.cfg
index 5d0b8a447..eff030947 100644
--- a/server.cfg
+++ b/server.cfg
@@ -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