mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-28 17:01:14 +00:00
Merge branch 'develop' into main
This commit is contained in:
+2
-1
@@ -329,7 +329,8 @@ INSERT INTO `licenses` (`type`, `label`) VALUES
|
||||
('drive', 'Drivers License'),
|
||||
('drive_bike', 'Motorcycle License'),
|
||||
('drive_truck', 'Commercial Drivers License'),
|
||||
('weed_processing', 'Weed Processing License');
|
||||
('weed_processing', 'Weed Processing License'),
|
||||
('boat', 'Boat License');
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
||||
@@ -12,102 +12,106 @@
|
||||
* This copyright should appear in every part of the project code
|
||||
*/
|
||||
|
||||
html,body {
|
||||
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: 'Quicksand', sans-serif;
|
||||
overflow: hidden;
|
||||
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: "Quicksand", sans-serif;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#esx_intro {
|
||||
|
||||
z-index: 2;
|
||||
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
#esx_loop {
|
||||
|
||||
z-index: 1;
|
||||
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
#loading_txt {
|
||||
bottom: 5%;
|
||||
left: 50%;
|
||||
margin-left: -80px;
|
||||
position: absolute;
|
||||
z-index: 999;
|
||||
|
||||
bottom: 5%;
|
||||
left: 50%;
|
||||
margin-left: -80px;
|
||||
position: absolute;
|
||||
z-index: 999;
|
||||
|
||||
-webkit-animation: fadein 5s;
|
||||
-moz-animation: fadein 5s;
|
||||
-ms-animation: fadein 5s;
|
||||
-o-animation: fadein 5s;
|
||||
animation: fadein 5s;
|
||||
|
||||
-webkit-animation: fadein 5s;
|
||||
-moz-animation: fadein 5s;
|
||||
-ms-animation: fadein 5s;
|
||||
-o-animation: fadein 5s;
|
||||
animation: fadein 5s;
|
||||
}
|
||||
|
||||
p {
|
||||
|
||||
color: white;
|
||||
font-size: 32px;
|
||||
|
||||
color: white;
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
.text_thing:after {
|
||||
content: ' .';
|
||||
animation: dots 2s steps(5, end) infinite;
|
||||
content: " .";
|
||||
animation: dots 2s steps(5, end) infinite;
|
||||
}
|
||||
|
||||
@keyframes dots {
|
||||
0%, 20% {
|
||||
color: rgba(0,0,0,0);
|
||||
text-shadow:
|
||||
.25em 0 0 rgba(0,0,0,0),
|
||||
.5em 0 0 rgba(0,0,0,0);
|
||||
}
|
||||
40% {
|
||||
color: white;
|
||||
text-shadow:
|
||||
.25em 0 0 rgba(0,0,0,0),
|
||||
.5em 0 0 rgba(0,0,0,0);
|
||||
}
|
||||
60% {
|
||||
text-shadow:
|
||||
.25em 0 0 white,
|
||||
.5em 0 0 rgba(0,0,0,0);
|
||||
}
|
||||
80%, 100% {
|
||||
text-shadow:
|
||||
.25em 0 0 white,
|
||||
.5em 0 0 white;
|
||||
}
|
||||
0%,
|
||||
20% {
|
||||
color: 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);
|
||||
}
|
||||
40% {
|
||||
color: white;
|
||||
text-shadow: 0.25em 0 0 rgba(0, 0, 0, 0), 0.5em 0 0 rgba(0, 0, 0, 0);
|
||||
}
|
||||
60% {
|
||||
text-shadow: 0.25em 0 0 white, 0.5em 0 0 rgba(0, 0, 0, 0);
|
||||
}
|
||||
80%,
|
||||
100% {
|
||||
text-shadow: 0.25em 0 0 white, 0.5em 0 0 white;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@keyframes fadein {
|
||||
from { opacity: 0; }
|
||||
to { opacity: 1; }
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@-moz-keyframes fadein {
|
||||
from { opacity: 0; }
|
||||
to { opacity: 1; }
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes fadein {
|
||||
from { opacity: 0; }
|
||||
to { opacity: 1; }
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@-ms-keyframes fadein {
|
||||
from { opacity: 0; }
|
||||
to { opacity: 1; }
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@-o-keyframes fadein {
|
||||
from { opacity: 0; }
|
||||
to { opacity: 1; }
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,28 +1,25 @@
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
|
||||
<head>
|
||||
<link rel="stylesheet" href="css/index.css" type="text/css" />
|
||||
<link href="https://fonts.googleapis.com/css2?family=Quicksand&display=swap" rel="stylesheet">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js" type="text/javascript"></script>
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Quicksand&display=swap"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
<script src="./js/index.js" type="text/javascript"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<div id="loading_txt">
|
||||
<p class="text_thing">Loading</p>
|
||||
</div>
|
||||
<div id="loading_txt">
|
||||
<p class="text_thing">Loading</p>
|
||||
</div>
|
||||
|
||||
<video id="esx_intro" width="100%" autoplay>
|
||||
<source src="vid/esx_intro.mp4" type="video/webm">
|
||||
</video>
|
||||
<video id="esx_loop" width="100%" loop>
|
||||
<source src="vid/esx_loop.mp4" type="video/webm">
|
||||
</video>
|
||||
<video id="esx_intro" width="100%" autoplay>
|
||||
<source src="vid/esx_intro.mp4" type="video/webm" />
|
||||
</video>
|
||||
<video id="esx_loop" width="100%" loop>
|
||||
<source src="vid/esx_loop.mp4" type="video/webm" />
|
||||
</video>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
// 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
|
||||
|
||||
$(document).ready(function(){
|
||||
const introTag = document.getElementById('esx_intro');
|
||||
const loopTag = document.getElementById('esx_loop');
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
const introTag = document.getElementById("esx_intro");
|
||||
const loopTag = document.getElementById("esx_loop");
|
||||
|
||||
introTag.onended = (event) => {
|
||||
introTag.style.display = "none";
|
||||
loopTag.loop = true; // true
|
||||
loopTag.play()
|
||||
};
|
||||
})
|
||||
introTag.onended = () => {
|
||||
introTag.style.display = "none";
|
||||
loopTag.loop = true; // true
|
||||
loopTag.play();
|
||||
};
|
||||
});
|
||||
|
||||
@@ -140,6 +140,24 @@ if ESX.GetConfig().Multichar then
|
||||
})
|
||||
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)
|
||||
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"}}
|
||||
@@ -157,9 +175,7 @@ if ESX.GetConfig().Multichar then
|
||||
ESX.CloseContext()
|
||||
TriggerServerEvent('esx_multicharacter:CharacterChosen', Action.value, false)
|
||||
elseif Action.action == "delete" then
|
||||
ESX.CloseContext()
|
||||
TriggerServerEvent('esx_multicharacter:DeleteCharacter', Action.value)
|
||||
spawned = false
|
||||
CharacterDeleteConfirmation(Characters, slots, SelectedCharacter, Action.value)
|
||||
elseif Action.action == "return" then
|
||||
SelectCharacterMenu(Characters, slots)
|
||||
end
|
||||
|
||||
@@ -10,6 +10,10 @@ Locales["en"] = {
|
||||
["char_disabled_description"] = "This Character Is Unusable.",
|
||||
["char_delete"] = "Delete",
|
||||
["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",
|
||||
["return"] = "Return",
|
||||
["return_description"] = "Return To Character Selection.",
|
||||
|
||||
@@ -2,9 +2,7 @@ local Vehicles, myCar = {}, {}
|
||||
local lsMenuIsShowed, HintDisplayed, isInLSMarker = false, false, false
|
||||
|
||||
RegisterNetEvent('esx:playerLoaded')
|
||||
AddEventHandler('esx:playerLoaded', function(xPlayer)
|
||||
ESX.PlayerLoaded = true
|
||||
ESX.PlayerData = xPlayer
|
||||
AddEventHandler('esx:playerLoaded', function()
|
||||
ESX.TriggerServerCallback('esx_lscustom:getVehiclesPrices', function(vehicles)
|
||||
Vehicles = vehicles
|
||||
end)
|
||||
@@ -13,8 +11,9 @@ end)
|
||||
RegisterNetEvent('esx_lscustom:installMod')
|
||||
AddEventHandler('esx_lscustom:installMod', function()
|
||||
local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
|
||||
local NetId = NetworkGetNetworkIdFromEntity(vehicle)
|
||||
myCar = ESX.Game.GetVehicleProperties(vehicle)
|
||||
TriggerServerEvent('esx_lscustom:refreshOwnedVehicle', myCar)
|
||||
TriggerServerEvent('esx_lscustom:refreshOwnedVehicle', myCar, NetId)
|
||||
end)
|
||||
|
||||
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
|
||||
ESX.ShowNotification(TranslateCap('already_own', data.current.label))
|
||||
myCar = ESX.Game.GetVehicleProperties(vehicle)
|
||||
TriggerServerEvent('esx_lscustom:refreshOwnedVehicle', myCar)
|
||||
myCar = ESX.Game.GetVehicleProperties(vehicle)
|
||||
TriggerServerEvent('esx_lscustom:refreshOwnedVehicle', myCar, NetworkGetNetworkIdFromEntity(vehicle))
|
||||
else
|
||||
local vehiclePrice = 50000
|
||||
|
||||
|
||||
@@ -495,7 +495,7 @@ Config.Menus = {
|
||||
label = TranslateCap('transmission'),
|
||||
parent = 'upgrades',
|
||||
modType = 13,
|
||||
price = {13.95, 20.93, 46.51}
|
||||
price = {13.95, 20.93, 46.51, 63.55}
|
||||
},
|
||||
modSuspension = {
|
||||
label = TranslateCap('suspension'),
|
||||
|
||||
@@ -4,10 +4,10 @@ local Customs = {}
|
||||
RegisterNetEvent('esx_lscustom:startModing', function(props, netId)
|
||||
local src = tostring(source)
|
||||
if Customs[src] then
|
||||
Customs[src][props.plate] = {props = props, netId = netId}
|
||||
Customs[src][tostring(props.plate)] = {props = props, netId = netId}
|
||||
else
|
||||
Customs[src] = {}
|
||||
Customs[src][props.plate] = {props = props, netId = netId}
|
||||
Customs[src][tostring(props.plate)] = {props = props, netId = netId}
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -70,16 +70,30 @@ AddEventHandler('esx_lscustom:buyMod', function(price)
|
||||
end)
|
||||
|
||||
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)
|
||||
|
||||
MySQL.single('SELECT vehicle FROM owned_vehicles WHERE plate = ?', {vehicleProps.plate},
|
||||
function(result)
|
||||
if result then
|
||||
local vehicle = json.decode(result.vehicle)
|
||||
if vehicleProps.model == vehicle.model then
|
||||
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
|
||||
print(('[^3WARNING^7] Player ^5%s^7 Attempted To upgrade with mismatching vehicle model'):format(xPlayer.source))
|
||||
end
|
||||
|
||||
@@ -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",
|
||||
}
|
||||
Reference in New Issue
Block a user