Merge branch 'esx-framework:dev' into dev

This commit is contained in:
Epyi
2023-07-11 14:36:26 +02:00
committed by GitHub
19 changed files with 118 additions and 39 deletions
+43
View File
@@ -0,0 +1,43 @@
name: formatter-all
on:
push:
branches: [ main ]
pull_request:
types: [ labeled ]
jobs:
formatter:
name: formatter
runs-on: ubuntu-latest
permissions:
contents: write
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.label.name == 'format_all') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: "16"
- name: Install stylua and format files
uses: JohnnyMorganz/stylua-action@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: v0.18.0
args: -- .
- name: Format files with Prettier
run: |
npx prettier --write '**/*.{ts,js,css,html}'
- name: Update repo before push
run: |
git pull
- name: Commit changes and push current branch
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_user_name: ESX GITHUB ACTIONS BOT
commit_user_email: esx-github-actions-bot@users.noreply.github.com
commit_message: :art:Code formatted in all files
+39
View File
@@ -0,0 +1,39 @@
name: Add issue or pull request to project board
on:
issues:
types:
- opened
pull_request:
types:
- opened
jobs:
add-to-project:
name: Add issue or pull request to project
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Get event creation date
id: date
run: |
if [[ "${{ github.event_name }}" == "issues" ]]; then
echo "date=${{ github.event.issue.created_at }}" >> $GITHUB_ENV
elif [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "date=${{ github.event.pull_request.created_at }}" >> $GITHUB_ENV
fi
- name: Add to project
uses: actions/add-to-project@v0.5.0
with:
project-url: https://github.com/orgs/esx-framework/projects/9
github-token: ${{ secrets.MY_GITHUB_TOKEN }}
id: add-project
- name: Update project fields
uses: titoportas/update-project-fields@v0.1.0
with:
project-url: https://github.com/orgs/esx-framework/projects/9
github-token: ${{ secrets.MY_GITHUB_TOKEN }}
item-id: ${{ steps.add-project.outputs.itemId }}
field-keys: Date
field-values: ${{ env.date }},
+1 -1
View File
@@ -4,6 +4,6 @@ game 'gta5'
author 'ESX-Framework'
description 'cron'
lua54 'yes'
version '1.9.5'
version '1.10.1'
server_script 'server/main.lua'
+3 -9
View File
@@ -689,7 +689,7 @@ function ESX.Game.GetVehicleProperties(vehicle)
neonColor = table.pack(GetVehicleNeonLightsColour(vehicle)),
extras = extras,
dirftTyresEnabled = driftTyresEnabled,
driftTyresEnabled = driftTyresEnabled,
tyreSmokeColor = table.pack(GetVehicleTyreSmokeColor(vehicle)),
modSpoilers = GetVehicleMod(vehicle, 0),
@@ -913,16 +913,10 @@ function ESX.Game.SetVehicleProperties(vehicle, props)
ToggleVehicleMod(vehicle, 22, props.modXenon)
end
if props.modFrontWheels ~= nil then
SetVehicleMod(vehicle, 23, props.modFrontWheels, false)
end
if props.modCustomFrontWheels ~= nil then
SetVehicleMod(vehicle, 23, props.modCustomFrontWheels, false)
SetVehicleMod(vehicle, 23, props.modFrontWheels, props.modCustomFrontWheels)
end
if props.modBackWheels ~= nil then
SetVehicleMod(vehicle, 24, props.modBackWheels, false)
end
if props.modCustomBackWheels ~= nil then
SetVehicleMod(vehicle, 24, props.modCustomBackWheels, false)
SetVehicleMod(vehicle, 24, props.modBackWheels, props.modCustomBackWheels)
end
if props.modPlateHolder ~= nil then
SetVehicleMod(vehicle, 25, props.modPlateHolder, false)
+1 -3
View File
@@ -332,9 +332,7 @@ if not Config.OxInventory then
RegisterNetEvent('esx:removeWeapon')
AddEventHandler('esx:removeWeapon', function(weapon)
local playerPed = ESX.PlayerData.ped
RemoveWeaponFromPed(playerPed, joaat(weapon))
SetPedAmmo(ESX.PlayerData.ped, joaat(weapon), 0)
print("[^1ERROR^7] event ^5'esx:removeWeapon'^7 Has Been Removed. Please use ^5xPlayer.removeWeapon^7 Instead!")
end)
RegisterNetEvent('esx:removeWeaponComponent')
+1 -3
View File
@@ -1,11 +1,9 @@
fx_version 'adamant'
game 'gta5'
description 'ES Extended'
lua54 'yes'
version '1.9.5'
version '1.10.1'
shared_scripts {
'locale.lua',
+10 -2
View File
@@ -460,7 +460,11 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
end
function self.removeWeapon(weaponName)
local weaponLabel
local weaponLabel, playerPed = nil, GetPlayerPed(self.source)
if not playerPed then
return print("[^1ERROR^7] xPlayer.removeWeapon ^5invalid^7 player ped!")
end
for k, v in ipairs(self.loadout) do
if v.name == weaponName then
@@ -469,6 +473,11 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
for _, v2 in ipairs(v.components) do
self.removeWeaponComponent(weaponName, v2)
end
local weaponHash = joaat(v.name)
RemoveWeaponFromPed(playerPed, weaponHash)
SetPedAmmo(playerPed, weaponHash, 0)
table.remove(self.loadout, k)
break
@@ -476,7 +485,6 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
end
if weaponLabel then
self.triggerEvent('esx:removeWeapon', weaponName)
self.triggerEvent('esx:removeInventoryItem', weaponLabel, false, true)
end
end
+1 -1
View File
@@ -4,7 +4,7 @@ game 'gta5'
author 'ESX-Framework & Brayden'
description 'Offical ESX Legacy Context Menu'
lua54 'yes'
version '1.9.5'
version '1.10.1'
ui_page 'index.html'
+1 -2
View File
@@ -1,10 +1,9 @@
fx_version 'adamant'
game 'gta5'
description 'ESX Identity'
lua54 'yes'
version '1.9.5'
version '1.10.1'
shared_scripts {
'@es_extended/imports.lua',
+2 -1
View File
@@ -1,5 +1,6 @@
game 'common'
version '1.9.5'
version '1.10.1'
fx_version 'cerulean'
author 'ESX-Framework'
lua54 'yes'
+1 -2
View File
@@ -1,10 +1,9 @@
fx_version 'adamant'
game 'gta5'
description 'ESX Menu Default'
lua54 'yes'
version '1.9.5'
version '1.10.1'
client_scripts { '@es_extended/imports.lua', 'client/main.lua' }
+1 -2
View File
@@ -1,10 +1,9 @@
fx_version 'adamant'
game 'gta5'
description 'ESX Menu Dialog'
lua54 'yes'
version '1.9.5'
version '1.10.1'
client_scripts {
'@es_extended/imports.lua',
+2 -2
View File
@@ -1,10 +1,10 @@
fx_version 'adamant'
game 'gta5'
description 'ESX Menu List'
lua54 'yes'
version '1.9.5'
version '1.10.1'
client_scripts {
'@es_extended/imports.lua',
+2 -1
View File
@@ -1,8 +1,9 @@
fx_version 'cerulean'
game 'gta5'
author 'ESX-Framework - Linden - KASH'
description 'Official Multicharacter System For ESX Legacy'
version '1.9.5'
version '1.10.1'
lua54 'yes'
dependencies { 'es_extended', 'esx_context', 'esx_identity', 'esx_skin' }
+2 -1
View File
@@ -1,7 +1,8 @@
fx_version 'adamant'
lua54 'yes'
game 'gta5'
version '1.9.5'
version '1.10.1'
author 'ESX-Framework'
description 'Official NUI Notification system for ESX'
+2 -1
View File
@@ -1,8 +1,9 @@
fx_version 'adamant'
game 'gta5'
author 'ESX-Framework'
lua54 'yes'
version '1.9.5'
version '1.10.1'
description 'ESX Progressbar'
client_scripts { 'Progress.lua' }
+2 -3
View File
@@ -1,11 +1,10 @@
fx_version 'adamant'
game 'gta5'
description 'ESX Skin'
version '1.9.5'
version '1.10.1'
lua54 'yes'
shared_script '@es_extended/imports.lua'
server_scripts {
+3 -1
View File
@@ -1,9 +1,11 @@
fx_version 'adamant'
game 'gta5'
author 'ESX-Framework'
version '1.9.5'
version '1.10.1'
description 'ESX TextUI'
lua54 'yes'
client_scripts { 'TextUI.lua' }
shared_script '@es_extended/imports.lua'
ui_page 'nui/index.html'
+1 -4
View File
@@ -1,12 +1,9 @@
fx_version 'adamant'
game 'gta5'
lua54 'yes'
description 'Official ESX-Legacy resource for handling the Player`s Skin'
version '1.9.5'
version '1.10.1'
client_scripts {
'@es_extended/locale.lua',