Merge branch 'develop' into dev

This commit is contained in:
Tony Stark
2022-12-28 11:51:19 +05:30
committed by GitHub
10 changed files with 171 additions and 155 deletions
+2 -1
View File
@@ -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');
-- --------------------------------------------------------
+51 -51
View File
@@ -1,5 +1,5 @@
local pickups = {}
local PlayerBank, PlayerMoney = 0,0
CreateThread(function()
while not Config.Multichar do
Wait(0)
@@ -52,71 +52,71 @@ AddEventHandler('esx:playerLoaded', function(xPlayer, isNew, skin)
while ESX.PlayerData.ped == nil do Wait(20) end
-- enable PVP
if Config.EnablePVP then
SetCanAttackFriendly(ESX.PlayerData.ped, true, false)
NetworkSetFriendlyFireOption(true)
end
CreateThread(function()
local SetPlayerHealthRechargeMultiplier = SetPlayerHealthRechargeMultiplier
local BlockWeaponWheelThisFrame = BlockWeaponWheelThisFrame
local DisableControlAction = DisableControlAction
local IsPedArmed = IsPedArmed
local SetPlayerLockonRangeOverride = SetPlayerLockonRangeOverride
local DisablePlayerVehicleRewards = DisablePlayerVehicleRewards
local RemoveAllPickupsOfType = RemoveAllPickupsOfType
local HideHudComponentThisFrame = HideHudComponentThisFrame
local PlayerId = PlayerId()
local DisabledComps = {}
for i=1, #(Config.RemoveHudCommonents) do
if Config.RemoveHudCommonents[i] then
DisabledComps[#DisabledComps + 1] = i
end
end
while true do
local Sleep = true
CreateThread(function()
local SetPlayerHealthRechargeMultiplier = SetPlayerHealthRechargeMultiplier
local BlockWeaponWheelThisFrame = BlockWeaponWheelThisFrame
local DisableControlAction = DisableControlAction
local IsPedArmed = IsPedArmed
local SetPlayerLockonRangeOverride = SetPlayerLockonRangeOverride
local DisablePlayerVehicleRewards = DisablePlayerVehicleRewards
local RemoveAllPickupsOfType = RemoveAllPickupsOfType
local HideHudComponentThisFrame = HideHudComponentThisFrame
local PlayerId = PlayerId()
local DisabledComps = {}
for i=1, #(Config.RemoveHudCommonents) do
if Config.RemoveHudCommonents[i] then
DisabledComps[#DisabledComps + 1] = i
end
end
if Config.DisableHealthRegeneration then
Sleep = false
SetPlayerHealthRechargeMultiplier(PlayerId, 0.0)
end
while true do
local Sleep = true
if Config.DisableWeaponWheel then
Sleep = false
BlockWeaponWheelThisFrame()
DisableControlAction(0, 37,true)
end
if Config.DisableHealthRegeneration then
Sleep = false
SetPlayerHealthRechargeMultiplier(PlayerId, 0.0)
end
if Config.DisableAimAssist then
Sleep = false
if IsPedArmed(ESX.PlayerData.ped, 4) then
SetPlayerLockonRangeOverride(PlayerId, 2.0)
end
end
if Config.DisableWeaponWheel then
Sleep = false
BlockWeaponWheelThisFrame()
DisableControlAction(0, 37,true)
end
if Config.DisableVehicleRewards then
Sleep = false
DisablePlayerVehicleRewards(PlayerId)
if Config.DisableAimAssist then
Sleep = false
if IsPedArmed(ESX.PlayerData.ped, 4) then
SetPlayerLockonRangeOverride(PlayerId, 2.0)
end
end
if Config.DisableVehicleRewards then
Sleep = false
DisablePlayerVehicleRewards(PlayerId)
end
if Config.DisableNPCDrops then
Sleep = false
RemoveAllPickupsOfType(0xDF711959) -- carbine rifle
RemoveAllPickupsOfType(0xF9AFB48F) -- pistol
RemoveAllPickupsOfType(0xA9355DCD) -- pumpshotgun
end
if Config.DisableNPCDrops then
Sleep = false
RemoveAllPickupsOfType(0xDF711959)
RemoveAllPickupsOfType(0xF9AFB48F)
RemoveAllPickupsOfType(0xA9355DCD)
end
if #DisabledComps > 0 then
Sleep = false
for i=1, #(DisabledComps) do
HideHudComponentThisFrame(DisabledComps[i])
end
if #DisabledComps > 0 then
Sleep = false
for i=1, #(DisabledComps) do
HideHudComponentThisFrame(DisabledComps[i])
end
end
Wait(Sleep and 1500 or 0)
end
end)
end
end)
if Config.EnableHud then
for i=1, #(ESX.PlayerData.accounts) do
+4
View File
@@ -308,6 +308,10 @@ function loadESXPlayer(identifier, playerId, isNew)
maxWeight = xPlayer.getMaxWeight(),
money = xPlayer.getMoney(),
sex = xPlayer.get("sex") or "m",
firstName = xPlayer.get("firstName") or "John",
lastName = xPlayer.get("lastName") or "Doe",
dateofbirth = xPlayer.get("dateofbirth") or "01/01/2000",
height = xPlayer.get("height") or 120,
dead = false
}, isNew,
userData.skin)
+1
View File
@@ -13,6 +13,7 @@ function Post(fn,...)
end
function Open(position,eles,onSelect,onClose,canClose)
local canClose = canClose == nil and true or canClose
activeMenu = {
position = position,
eles = eles,
+68 -64
View File
@@ -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;
}
}
+18 -21
View File
@@ -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>
+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
// 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();
};
});
+2 -2
View File
@@ -78,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
+1 -1
View File
@@ -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'),
+15 -6
View File
@@ -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)
@@ -71,20 +71,29 @@ end)
RegisterServerEvent('esx_lscustom:refreshOwnedVehicle')
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
local veh = NetworkGetEntityFromNetworkId(netId)
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
end
else
print(('[^3WARNING^7] Player ^5%s^7 Attempted To upgrade with mismatching vehicle model'):format(xPlayer.source))
end