Merge branch 'develop' into main

This commit is contained in:
TheFantomas
2023-01-02 21:01:20 +01:00
committed by GitHub
10 changed files with 175 additions and 110 deletions
+2 -1
View File
@@ -329,7 +329,8 @@ INSERT INTO `licenses` (`type`, `label`) VALUES
('drive', 'Drivers License'), ('drive', 'Drivers License'),
('drive_bike', 'Motorcycle License'), ('drive_bike', 'Motorcycle License'),
('drive_truck', 'Commercial Drivers License'), ('drive_truck', 'Commercial Drivers License'),
('weed_processing', 'Weed Processing License'); ('weed_processing', 'Weed Processing License'),
('boat', 'Boat License');
-- -------------------------------------------------------- -- --------------------------------------------------------
+68 -64
View File
@@ -12,102 +12,106 @@
* This copyright should appear in every part of the project code * This copyright should appear in every part of the project code
*/ */
html,body { html,
body {
margin: 0; margin: 0;
padding: 0; padding: 0;
font-family: 'Quicksand', sans-serif; font-family: "Quicksand", sans-serif;
overflow: hidden; overflow: hidden;
} }
#esx_intro { #esx_intro {
z-index: 2;
z-index: 2;
} }
#esx_loop { #esx_loop {
z-index: 1;
z-index: 1;
} }
#loading_txt { #loading_txt {
bottom: 5%;
left: 50%;
margin-left: -80px;
position: absolute;
z-index: 999;
bottom: 5%; -webkit-animation: fadein 5s;
left: 50%; -moz-animation: fadein 5s;
margin-left: -80px; -ms-animation: fadein 5s;
position: absolute; -o-animation: fadein 5s;
z-index: 999; animation: fadein 5s;
-webkit-animation: fadein 5s;
-moz-animation: fadein 5s;
-ms-animation: fadein 5s;
-o-animation: fadein 5s;
animation: fadein 5s;
} }
p { p {
color: white;
color: white; font-size: 32px;
font-size: 32px;
} }
.text_thing:after { .text_thing:after {
content: ' .'; content: " .";
animation: dots 2s steps(5, end) infinite; animation: dots 2s steps(5, end) infinite;
} }
@keyframes dots { @keyframes dots {
0%, 20% { 0%,
color: rgba(0,0,0,0); 20% {
text-shadow: color: rgba(0, 0, 0, 0);
.25em 0 0 rgba(0,0,0,0), text-shadow: 0.25em 0 0 rgba(0, 0, 0, 0), 0.5em 0 0 rgba(0, 0, 0, 0);
.5em 0 0 rgba(0,0,0,0); }
} 40% {
40% { color: white;
color: white; text-shadow: 0.25em 0 0 rgba(0, 0, 0, 0), 0.5em 0 0 rgba(0, 0, 0, 0);
text-shadow: }
.25em 0 0 rgba(0,0,0,0), 60% {
.5em 0 0 rgba(0,0,0,0); text-shadow: 0.25em 0 0 white, 0.5em 0 0 rgba(0, 0, 0, 0);
} }
60% { 80%,
text-shadow: 100% {
.25em 0 0 white, text-shadow: 0.25em 0 0 white, 0.5em 0 0 white;
.5em 0 0 rgba(0,0,0,0); }
}
80%, 100% {
text-shadow:
.25em 0 0 white,
.5em 0 0 white;
}
} }
@keyframes fadein { @keyframes fadein {
from { opacity: 0; } from {
to { opacity: 1; } opacity: 0;
}
to {
opacity: 1;
}
} }
@-moz-keyframes fadein { @-moz-keyframes fadein {
from { opacity: 0; } from {
to { opacity: 1; } opacity: 0;
}
to {
opacity: 1;
}
} }
@-webkit-keyframes fadein { @-webkit-keyframes fadein {
from { opacity: 0; } from {
to { opacity: 1; } opacity: 0;
}
to {
opacity: 1;
}
} }
@-ms-keyframes fadein { @-ms-keyframes fadein {
from { opacity: 0; } from {
to { opacity: 1; } opacity: 0;
}
to {
opacity: 1;
}
} }
@-o-keyframes fadein { @-o-keyframes fadein {
from { opacity: 0; } from {
to { opacity: 1; } opacity: 0;
}
to {
opacity: 1;
}
} }
+18 -21
View File
@@ -1,28 +1,25 @@
<html lang="en"> <html lang="en">
<head>
<head>
<link rel="stylesheet" href="css/index.css" type="text/css" /> <link rel="stylesheet" href="css/index.css" type="text/css" />
<link href="https://fonts.googleapis.com/css2?family=Quicksand&display=swap" rel="stylesheet"> <link
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js" type="text/javascript"></script> href="https://fonts.googleapis.com/css2?family=Quicksand&display=swap"
rel="stylesheet"
/>
<script src="./js/index.js" type="text/javascript"></script> <script src="./js/index.js" type="text/javascript"></script>
</head> </head>
<body>
<body>
<div id="wrapper"> <div id="wrapper">
<div id="loading_txt"> <div id="loading_txt">
<p class="text_thing">Loading</p> <p class="text_thing">Loading</p>
</div> </div>
<video id="esx_intro" width="100%" autoplay> <video id="esx_intro" width="100%" autoplay>
<source src="vid/esx_intro.mp4" type="video/webm"> <source src="vid/esx_intro.mp4" type="video/webm" />
</video> </video>
<video id="esx_loop" width="100%" loop> <video id="esx_loop" width="100%" loop>
<source src="vid/esx_loop.mp4" type="video/webm"> <source src="vid/esx_loop.mp4" type="video/webm" />
</video> </video>
</div> </div>
</body>
</body> </html>
</html>
+9 -9
View File
@@ -10,13 +10,13 @@
// If you redistribute this software, you must link to ORIGINAL repository at https://github.com/esx-framework/esx-reborn // If you redistribute this software, you must link to ORIGINAL repository at https://github.com/esx-framework/esx-reborn
// This copyright should appear in every part of the project code // This copyright should appear in every part of the project code
$(document).ready(function(){ document.addEventListener("DOMContentLoaded", () => {
const introTag = document.getElementById('esx_intro'); const introTag = document.getElementById("esx_intro");
const loopTag = document.getElementById('esx_loop'); const loopTag = document.getElementById("esx_loop");
introTag.onended = (event) => { introTag.onended = () => {
introTag.style.display = "none"; introTag.style.display = "none";
loopTag.loop = true; // true loopTag.loop = true; // true
loopTag.play() loopTag.play();
}; };
}) });
+19 -3
View File
@@ -140,6 +140,24 @@ if ESX.GetConfig().Multichar then
}) })
end end
function CharacterDeleteConfirmation(Characters, slots, SelectedCharacter, value)
local elements = {
{title = TranslateCap('char_delete_confirmation'), icon = "fa-solid fa-users", description = TranslateCap('char_delete_confirmation_description'), unselectable = true},
{title = TranslateCap('char_delete'), icon ="fa-solid fa-xmark", description = TranslateCap('char_delete_yes_description'), action = 'delete', value = value},
{title = TranslateCap('return'), unselectable = false, icon = "fa-solid fa-arrow-left", description = TranslateCap('char_delete_no_description'), action = "return"}
}
ESX.OpenContext("left", elements, function(element, Action)
if Action.action == "delete" then
ESX.CloseContext()
TriggerServerEvent('esx_multicharacter:DeleteCharacter', Action.value)
spawned = false
elseif Action.action == "return" then
CharacterOptions(Characters, slots, SelectedCharacter)
end
end, nil, false)
end
function CharacterOptions(Characters, slots, SelectedCharacter) function CharacterOptions(Characters, slots, SelectedCharacter)
local elements = {{title = TranslateCap('character', Characters[SelectedCharacter.value].firstname .. " ".. Characters[SelectedCharacter.value].lastname),icon = "fa-regular fa-user", unselectable = true}, local elements = {{title = TranslateCap('character', Characters[SelectedCharacter.value].firstname .. " ".. Characters[SelectedCharacter.value].lastname),icon = "fa-regular fa-user", unselectable = true},
{title = TranslateCap('return'), unselectable = false,icon = "fa-solid fa-arrow-left",description = TranslateCap('return_description'), action = "return"}} {title = TranslateCap('return'), unselectable = false,icon = "fa-solid fa-arrow-left",description = TranslateCap('return_description'), action = "return"}}
@@ -157,9 +175,7 @@ if ESX.GetConfig().Multichar then
ESX.CloseContext() ESX.CloseContext()
TriggerServerEvent('esx_multicharacter:CharacterChosen', Action.value, false) TriggerServerEvent('esx_multicharacter:CharacterChosen', Action.value, false)
elseif Action.action == "delete" then elseif Action.action == "delete" then
ESX.CloseContext() CharacterDeleteConfirmation(Characters, slots, SelectedCharacter, Action.value)
TriggerServerEvent('esx_multicharacter:DeleteCharacter', Action.value)
spawned = false
elseif Action.action == "return" then elseif Action.action == "return" then
SelectCharacterMenu(Characters, slots) SelectCharacterMenu(Characters, slots)
end end
+4
View File
@@ -10,6 +10,10 @@ Locales["en"] = {
["char_disabled_description"] = "This Character Is Unusable.", ["char_disabled_description"] = "This Character Is Unusable.",
["char_delete"] = "Delete", ["char_delete"] = "Delete",
["char_delete_description"] = "Permanently Remove This Character.", ["char_delete_description"] = "Permanently Remove This Character.",
["char_delete_confirmation"] = "Delete Confirmation",
["char_delete_confirmation_description"] = "Are you sure removing selected character?",
["char_delete_yes_description"] = "Yes, I am sure removing selected character",
["char_delete_no_description"] = "No, return to character options",
["character"] = "Character: %s", ["character"] = "Character: %s",
["return"] = "Return", ["return"] = "Return",
["return_description"] = "Return To Character Selection.", ["return_description"] = "Return To Character Selection.",
+5 -6
View File
@@ -2,9 +2,7 @@ local Vehicles, myCar = {}, {}
local lsMenuIsShowed, HintDisplayed, isInLSMarker = false, false, false local lsMenuIsShowed, HintDisplayed, isInLSMarker = false, false, false
RegisterNetEvent('esx:playerLoaded') RegisterNetEvent('esx:playerLoaded')
AddEventHandler('esx:playerLoaded', function(xPlayer) AddEventHandler('esx:playerLoaded', function()
ESX.PlayerLoaded = true
ESX.PlayerData = xPlayer
ESX.TriggerServerCallback('esx_lscustom:getVehiclesPrices', function(vehicles) ESX.TriggerServerCallback('esx_lscustom:getVehiclesPrices', function(vehicles)
Vehicles = vehicles Vehicles = vehicles
end) end)
@@ -13,8 +11,9 @@ end)
RegisterNetEvent('esx_lscustom:installMod') RegisterNetEvent('esx_lscustom:installMod')
AddEventHandler('esx_lscustom:installMod', function() AddEventHandler('esx_lscustom:installMod', function()
local vehicle = GetVehiclePedIsIn(PlayerPedId(), false) local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
local NetId = NetworkGetNetworkIdFromEntity(vehicle)
myCar = ESX.Game.GetVehicleProperties(vehicle) myCar = ESX.Game.GetVehicleProperties(vehicle)
TriggerServerEvent('esx_lscustom:refreshOwnedVehicle', myCar) TriggerServerEvent('esx_lscustom:refreshOwnedVehicle', myCar, NetId)
end) end)
RegisterNetEvent('esx_lscustom:restoreMods', function(netId, props) RegisterNetEvent('esx_lscustom:restoreMods', function(netId, props)
@@ -79,8 +78,8 @@ function OpenLSMenu(elems, menuName, menuTitle, parent)
if data.current.label == TranslateCap('by_default') or string.match(data.current.label, TranslateCap('installed')) then if data.current.label == TranslateCap('by_default') or string.match(data.current.label, TranslateCap('installed')) then
ESX.ShowNotification(TranslateCap('already_own', data.current.label)) ESX.ShowNotification(TranslateCap('already_own', data.current.label))
myCar = ESX.Game.GetVehicleProperties(vehicle) myCar = ESX.Game.GetVehicleProperties(vehicle)
TriggerServerEvent('esx_lscustom:refreshOwnedVehicle', myCar) TriggerServerEvent('esx_lscustom:refreshOwnedVehicle', myCar, NetworkGetNetworkIdFromEntity(vehicle))
else else
local vehiclePrice = 50000 local vehiclePrice = 50000
+1 -1
View File
@@ -495,7 +495,7 @@ Config.Menus = {
label = TranslateCap('transmission'), label = TranslateCap('transmission'),
parent = 'upgrades', parent = 'upgrades',
modType = 13, modType = 13,
price = {13.95, 20.93, 46.51} price = {13.95, 20.93, 46.51, 63.55}
}, },
modSuspension = { modSuspension = {
label = TranslateCap('suspension'), label = TranslateCap('suspension'),
+19 -5
View File
@@ -4,10 +4,10 @@ local Customs = {}
RegisterNetEvent('esx_lscustom:startModing', function(props, netId) RegisterNetEvent('esx_lscustom:startModing', function(props, netId)
local src = tostring(source) local src = tostring(source)
if Customs[src] then if Customs[src] then
Customs[src][props.plate] = {props = props, netId = netId} Customs[src][tostring(props.plate)] = {props = props, netId = netId}
else else
Customs[src] = {} Customs[src] = {}
Customs[src][props.plate] = {props = props, netId = netId} Customs[src][tostring(props.plate)] = {props = props, netId = netId}
end end
end) end)
@@ -70,16 +70,30 @@ AddEventHandler('esx_lscustom:buyMod', function(price)
end) end)
RegisterServerEvent('esx_lscustom:refreshOwnedVehicle') RegisterServerEvent('esx_lscustom:refreshOwnedVehicle')
AddEventHandler('esx_lscustom:refreshOwnedVehicle', function(vehicleProps) AddEventHandler('esx_lscustom:refreshOwnedVehicle', function(vehicleProps, netId)
local src = tostring(source)
local xPlayer = ESX.GetPlayerFromId(source) local xPlayer = ESX.GetPlayerFromId(source)
MySQL.single('SELECT vehicle FROM owned_vehicles WHERE plate = ?', {vehicleProps.plate}, MySQL.single('SELECT vehicle FROM owned_vehicles WHERE plate = ?', {vehicleProps.plate},
function(result) function(result)
if result then if result then
local vehicle = json.decode(result.vehicle) local vehicle = json.decode(result.vehicle)
if vehicleProps.model == vehicle.model then if vehicleProps.model == vehicle.model then
MySQL.update('UPDATE owned_vehicles SET vehicle = ? WHERE plate = ?', {json.encode(vehicleProps), vehicleProps.plate}) MySQL.update('UPDATE owned_vehicles SET vehicle = ? WHERE plate = ?', {json.encode(vehicleProps), vehicleProps.plate})
Customs[tostring(source)][tostring(vehicleProps.plate)].props = vehicleProps if Customs[src] then
if Customs[src][tostring(vehicleProps.plate)] then
Customs[src][tostring(vehicleProps.plate)].props = vehicleProps
else
Customs[src][tostring(vehicleProps.plate)] = {props = vehicleProps, netId = netId}
end
else
Customs[src] = {}
Customs[src][tostring(vehicleProps.plate)] = {props = vehicleProps, netId = netId}
end
local veh = NetworkGetEntityFromNetworkId(netId)
local Veh_State = Entity(veh).state.VehicleProperties
if Veh_State then
Entity(veh).state:set("VehicleProperties", vehicleProps, true)
end
else else
print(('[^3WARNING^7] Player ^5%s^7 Attempted To upgrade with mismatching vehicle model'):format(xPlayer.source)) print(('[^3WARNING^7] Player ^5%s^7 Attempted To upgrade with mismatching vehicle model'):format(xPlayer.source))
end end
+30
View File
@@ -0,0 +1,30 @@
Locales['it'] = {
['male'] = "Maschio",
['female'] = "Femmina",
['delete_label'] = "Cancella %s %s?",
['select_char'] = "Seleziona Personaggio",
["select_char_description"] = "Seleziona il personaggio con cui vuoi giocare.",
['create_char'] = "Crea un nuovo personaggio",
['char_play'] = "Gioca questo personaggio",
['char_disabled'] = "Questo personaggio è disabilitato",
['char_delete'] = "Cancella questo personaggio",
['cancel'] = "Annulla",
['confirm'] = "Conferma",
['command_setslots'] = "Imposta il numero di slot di personaggi di un giocatore",
['command_remslots'] = "Rimuovi il numero di slot di personaggi di un giocatore",
['command_enablechar'] = "Abilita un personaggio di un giocatore",
['command_disablechar'] = "Disabilita un personaggio di un giocatore",
['command_charslot'] = "Numero dello slot del personaggio",
['command_identifier'] = "Identifier del giocatore",
['command_slots'] = "# di slot",
['slotsadd'] = "Hai aggiunto %s slot a %s",
['slotsedit'] = "Hai impostato %s slot a %s",
['slotsrem'] = "Hai rimosso gli slot a %s",
['charenabled'] = "Hai abilitato il %s° personaggio di %s",
['chardisabled'] = "Hai disabilitato il %s° personaggio di %s",
['charnotfound'] = "Il personaggio %s di %s non esiste",
['return_description'] ="Ritorna alla selezione dei personaggi" ,
['char_play_description'] ="continua a giocare con questo personaggio",
['char_delete_description'] = "elimina il personaggio selezionato",
['return'] = "ritorna indietro",
}